Explicitly skip system builtin inputs in GL reflection

* Some drivers (e.g. macOS) will still return a location even for gl_.. builtins
This commit is contained in:
baldurk
2019-02-01 15:57:48 +00:00
parent b178ae800c
commit acbe682392
+4
View File
@@ -2277,6 +2277,10 @@ void GetBindpointMapping(GLuint curProg, int shadIdx, ShaderReflection *refl,
{
for(int32_t i = 0; i < refl->inputSignature.count(); i++)
{
// skip system inputs, as some drivers will return a location for them
if(refl->inputSignature[i].systemValue != ShaderBuiltin::Undefined)
continue;
GLint loc = GL.glGetAttribLocation(curProg, refl->inputSignature[i].varName.c_str());
if(loc >= 0 && loc < numVAttribBindings)