On Tue, Nov 22, 2016 at 3:02 PM, Henri Verbeet hverbeet@gmail.com wrote:
On 21 November 2016 at 01:42, Józef Kucia joseph.kucia@gmail.com wrote:
Is it really safe to enable the primitive restart for all D3D versions? Shouldn't we enable it just for D3D10+?
It's probably "safe" in the sense that if previous versions don't have primitive restart, and that seems likely at this point, you'd probably get undefined behaviour instead, and primitive restart is as good of an undefined behaviour as any other. Unless it's a valid index of course, which is certainly a possibility with 16-bit indices in particular, if perhaps not likely.
But regardless, we want to know for sure.
I've written some tests and the results indicate that 0xffff is a valid index in D3D8 and D3D9. I'll submit patches soon.