On 11 January 2012 12:23, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net">eric@anholt.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, 11 Jan 2012 12:06:37 -0800, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
> We always access pull constant buffers using the message types "OWord<br>
> Block Read" or "OWord Dual Block Read". According to the Sandy Bridge<br>
> PRM, Vol 4 Part 1, pages 214 and 218, when using these messages:<br>
><br>
> "the surface pitch is ignored, the surface is treated as a<br>
> 1-dimensional surface. An element size (pitch) of 16 bytes is<br>
> used to determine the size of the buffer for out-of-bounds<br>
> checking if using the surface state model."<br>
><br>
> Previously we were setting the pitch for pull constant buffers to the<br>
> size of the whole constant buffer--this made no sense and would have<br>
> led to incorrect behavior if it were not for the fact that the pitch<br>
> is ignored.<br>
><br>
> For clarity, this patch sets the pitch for pull constant buffers to 16<br>
> bytes, consistent with the hardware's behavior.<br>
<br>
</div>I'd prefer to see the 15 written as (16 - 1) just to clarify that it's a<br>
value-minus-one field, similarly to how we do the<br>
OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (7 - 2)); for the length field of<br>
packets.<br>
</blockquote></div><br>Ok, I'll do that. Is that a "reviewed-by" with this change?<br>