PENGUINLIONG/spirq-rs

gl_VertexIndex is treated as having location=0

fintelia opened this issue · 2 comments

Due to this line, input/output variables without a location are treated as having location 0. This breaks code that also tries to use location 0 for its own purposes, because the real variable at that location can be overwritten by gl_VertexIndex or similar. I have a commit in my fork which discards these variables instead, but that doesn't seem like a great solution either.

gl_VertexIndex is a built-in variable, which will be decorated with BuiltIn. All variables decorated with BuiltIn should be dropped, since we don't actually have to specify them through APIs. - Although we should be checking for BuiltIn, your solution looks good enough for now.