GL_EXT_vulkan_glsl_relaxed - retarget gl_VertexID to gl_VertexIndex
instead of allowing for multiple declarations of the variable in the resulting SPIR-V, instead use a retargeted mechanism to cause references to gl_VertexID and gl_InstanceID to use the gl_VertexIndex and gl_InstanceIndex symbol.
This commit is contained in:
@@ -25,7 +25,7 @@ vec4 foo() {
|
||||
void main() {
|
||||
|
||||
vec4 v = foo();
|
||||
v = v + s[gl_VertexID];
|
||||
v.x = v.x - float(gl_InstanceID);
|
||||
v = v + s[gl_VertexID - gl_VertexIndex];
|
||||
v.x = v.x - float(gl_InstanceID - gl_InstanceIndex);
|
||||
io = v;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user