On Wed, 11 Jan 2012 12:06:37 -0800, Paul Berry <stereotype...@gmail.com> wrote: > We always access pull constant buffers using the message types "OWord > Block Read" or "OWord Dual Block Read". According to the Sandy Bridge > PRM, Vol 4 Part 1, pages 214 and 218, when using these messages: > > "the surface pitch is ignored, the surface is treated as a > 1-dimensional surface. An element size (pitch) of 16 bytes is > used to determine the size of the buffer for out-of-bounds > checking if using the surface state model." > > Previously we were setting the pitch for pull constant buffers to the > size of the whole constant buffer--this made no sense and would have > led to incorrect behavior if it were not for the fact that the pitch > is ignored. > > For clarity, this patch sets the pitch for pull constant buffers to 16 > bytes, consistent with the hardware's behavior.
I'd prefer to see the 15 written as (16 - 1) just to clarify that it's a value-minus-one field, similarly to how we do the OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (7 - 2)); for the length field of packets.
pgpqRkcLWunKp.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev