On 03/28/2012 10:58 AM, Eric Anholt wrote:
It turns out this field *is* used, and it's the stride between samples
from the buffer.  Discovered during TBO debugging.
---
  src/mesa/drivers/dri/i965/gen7_wm_surface_state.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Oh, right. It's ignored by the OWORD_DUAL_BLOCK_READ message that we use, but *is* used by the sampler messages. I discovered this when cherry-picking my change to use LD/samplers for constants on Gen7...but forgot to update the comment. Sorry about that!

Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>

diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c 
b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
index c52f6aa..57fa540 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -157,7 +157,7 @@ gen7_create_constant_surface(struct brw_context *brw,
     surf->ss2.width = w&  0x7f;            /* bits 6:0 of size or width */
     surf->ss2.height = (w>>  7)&  0x1fff;  /* bits 19:7 of size or width */
     surf->ss3.depth = (w>>  20)&  0x7f;    /* bits 26:20 of size or width */
-   surf->ss3.pitch = (16 - 1); /* ignored */
+   surf->ss3.pitch = (16 - 1); /* stride between samples */
     gen7_set_surface_tiling(surf, I915_TILING_NONE); /* tiling now allowed */

     /* Emit relocation to surface contents.  Section 5.1.1 of the gen4
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to