[Mesa-dev] [PATCH 3/4] st/mesa: ignore primitive restart if FixedIndex is enabled in DrawArraysIndirect

Kenneth Graunke kenneth at whitecape.org
Mon Jan 5 22:18:08 PST 2015


On Monday, January 05, 2015 09:27:36 PM Marek Olšák wrote:
> Radeon hardware doesn't support primitive restart for DrawArrays either.
> 
> Marek

Current Intel hardware doesn't support primitive restart for DrawArrays
either.  I'm betting the DrawArraysIndirect case is broken on i965 currently,
and testing the interaction with primitive restart just never occurred to us.

The non-indirect case is trivial to implement in software, but I'm not really
sure how to handle the indirect case competently.

You could potentially bind an index buffer containing <0, 1, 2, 3, 4, ...> and
translate their command to a DrawElementsIndirect.  Seems like a pain.

You could also just synchronize - map their indirect command, and issue it as
multiple normal glDrawArrays calls.  Clearly not desirable, but probably not
too bad to implement.

Frankly, I'm inclined to leave it broken until someone complains, and if they
do, implement the simplest correct solution possible - even if it's punishing
for performance.  You're using primitive restart without an index buffer, and
with GL's arbitrary-value restart index...seriously, what are you doing? :)

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150105/aa068b65/attachment.sig>


More information about the mesa-dev mailing list