On 08/11/2010 09:40 PM, Luca Barbieri wrote:
[Apparently bri...@kemper.freedesktop.org is forwarded to
brian.p...@tungstengraphics.com, which is no longer valid.]

  I'd suggest to put it in struct pipe_index_buffer.

  The argument is that the index buffer needs to be prepared
  specifically for the primitive restart enable setting:
  1. If the index buffer has no restart indices, using primitive restart
  will have no effect
  2. If the index buffer has restart indices, not using primitive
  restart will cause out-of-bounds accesses or weird rendering results

  Also, the index size is there too, so there is no question of what
  happens if the primitive restart index doesn't fit in the index size.

  Currently the Mesa state tracker binds the index buffer for every draw
  call, and thus would be unaffected (but it should stop doing that).

The thing is, primitive restart also applies to non-indexed primitives. It would be a little weird to set index buffer state for glDrawArrays calls.

-Brian

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to