On 05/23/2013 04:14 PM, Jordan Justen wrote:
On Thu, May 23, 2013 at 3:46 PM, Kenneth Graunke <kenn...@whitecape.org> wrote:
According to the documentation: "The Cut Index is compared to the
fetched (and possibly-sign-extended) vertex index, and if these values
are equal, the current primitive topology is terminated.  Note that,
for index buffers <32bpp, it is possible to set the Cut Index to a
(large) value that will never match a sign-extended vertex index."

This suggests that we should not set the value to 0xFFFFFFFF for
unsigned byte or short index buffers, but rather 0xFF or 0xFFFF.

I was wondering what the GL spec had to say about this situation. For
example, what should happen if the index is 0x100, and bytes are used.
Should it effectively disable prim-restart? Should it use 0xff, or
0x00? Unfortunately, I didn't find anything concrete.

Reviewed-by: Jordan Justen <jordan.l.jus...@intel.com>

You raise a good point. If I set the cut index to 0x31337 and DrawElements with GL_UNSIGNED_BYTE, should it reset when it sees 37 or not?

I'll have to write Piglit tests and find out what other implementations do.

Thanks for the excellent review!
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to