mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-01 19:46:27 +00:00
Handle cases where fragdata or attrib location idx is -1
* This can happen when we're copying from a source program to a dest program where the source is non-separable and had an attribute optimised out entirely, but the destination is separable and so still wants that attribute. In this case it'll come out in the wash and we can just skip it.
This commit is contained in:
1 parent
75f58d19e8
commit
0796e5fbdf
1 file changed
+4
-2
@@ -1576,7 +1576,8 @@ void CopyProgramAttribBindings(const GLHookSet &gl, GLuint progsrc, GLuint progd
|
||||
continue;
|
||||
|
||||
GLint idx = gl.glGetAttribLocation(progsrc, refl->InputSig[i].varName.elems);
|
||||
gl.glBindAttribLocation(progdst, (GLuint)idx, refl->InputSig[i].varName.elems);
|
||||
if(idx >= 0)
|
||||
gl.glBindAttribLocation(progdst, (GLuint)idx, refl->InputSig[i].varName.elems);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1590,7 +1591,8 @@ void CopyProgramFragDataBindings(const GLHookSet &gl, GLuint progsrc, GLuint pro
|
||||
continue;
|
||||
|
||||
GLint idx = gl.glGetFragDataLocation(progsrc, refl->OutputSig[i].varName.elems);
|
||||
gl.glBindFragDataLocation(progdst, (GLuint)idx, refl->OutputSig[i].varName.elems);
|
||||
if(idx >= 0)
|
||||
gl.glBindFragDataLocation(progdst, (GLuint)idx, refl->OutputSig[i].varName.elems);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user