Kenneth Graunke <kenn...@whitecape.org> writes: > Neil, in case you were wondering, I suggested the above organization > of vertex elements because it would let us only upload 1 in the common > case. Looking in shader-db, there are 3579 shaders that use > gl_InstanceID, 186 shaders that use gl_VertexID, and 0 shaders that > use gl_BaseVertex, gl_BaseInstance, or gl_DrawID. > > It looks like your patches kicked gl_BaseVertex off to VE2 instead of > gl_BaseInstance. I suppose that works too, I just figured that keeping > VertexID/FirstVertex/BaseVertex together would make sense. If it's > more convenient to move gl_BaseVertex, I suppose I'm fine with that > too...
Yes, Antia forwarded me your emails with the previous suggestion. The order we came up with for this patch series is: VE 1: <offset for vertex ID, BaseInstance, VertexID, InstanceID> VE 2: <Draw ID, BaseVertex, 0, 0> The “offset for vertex ID” corresponds to what we were previously (incorrectly) sending for gl_BaseVertex, so effectively the values in VE1 have not changed at all. This also means we can continue to directly take these two values from the indirect draw params buffer. I believe your previous suggestion ended up needing a register store to put the values in the right place so with this ordering we get to avoid that. VE1 now contains everything needed for the most common values VertexID and InstanceID. VE2 is only needed for the rare cases that use gl_DrawID or gl_BaseVertex. On Vulkan VE2 won’t even be needed for the BaseVertex builtin because the semantics are different and in that case it corresponds to “offset for vertex ID”. I haven’t looked into too much detail about reordering the patches yet, but it does sound reasonable to try and avoid intermediate breakages. Thanks for looking at the series. Regards, - Neil
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev