Handle matrices when copying program attribute bindings

This commit is contained in:
baldurk
2025-11-24 11:55:31 +00:00
parent 7c438edd2a
commit 910f7ab65f
+6 -2
View File
@@ -1204,9 +1204,13 @@ bool CopyProgramAttribBindings(GLuint progsrc, GLuint progdst, const ShaderRefle
if(sig.systemValue != ShaderBuiltin::Undefined)
continue;
GLint idx = GL.glGetAttribLocation(progsrc, sig.varName.c_str());
rdcstr name = sig.varName;
if(name.endsWith(":col0"))
name.resize(name.size() - 5);
GLint idx = GL.glGetAttribLocation(progsrc, name.c_str());
if(idx >= 0)
GL.glBindAttribLocation(progdst, (GLuint)idx, sig.varName.c_str());
GL.glBindAttribLocation(progdst, (GLuint)idx, name.c_str());
}
return !refl->inputSignature.empty();