mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Don't call glBindFragDataLocation on GLES even if we have a func pointer
* The function is illegal to call regardless of whether we get a non-NULL function pointer. Core GLES doesn't support glBindFragDataLocation but fortunately we don't need to call it ourselves unless the user has done some dynamic binding - which assumes glBindFragDataLocation is available.
This commit is contained in:
@@ -1339,16 +1339,12 @@ bool CopyProgramFragDataBindings(GLuint progsrc, GLuint progdst, ShaderReflectio
|
||||
|
||||
used |= mask;
|
||||
|
||||
if(GL.glBindFragDataLocation)
|
||||
// glBindFragDataLocation is not core GLES. However when it's not available that means the
|
||||
// user must have explicitly specified locations so we don't need to set them.
|
||||
if(!IsGLES && GL.glBindFragDataLocation)
|
||||
{
|
||||
GL.glBindFragDataLocation(progdst, (GLuint)idx, refl->outputSignature[i].varName.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// glBindFragDataLocation is not core GLES, but it is in GL_EXT_blend_func_extended
|
||||
// TODO what to do if that extension is not supported
|
||||
RDCWARN("glBindFragDataLocation is not supported!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1445,16 +1441,12 @@ bool SerialiseProgramBindings(SerialiserType &ser, CaptureState state,
|
||||
}
|
||||
else
|
||||
{
|
||||
if(GL.glBindFragDataLocation)
|
||||
// glBindFragDataLocation is not core GLES. However when it's not available that means
|
||||
// the user must have explicitly specified locations so we don't need to set them.
|
||||
if(!IsGLES && GL.glBindFragDataLocation)
|
||||
{
|
||||
GL.glBindFragDataLocation(prog, (GLuint)bind.Binding, bind.Name.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// glBindFragDataLocation is not core GLES, but it is in GL_EXT_blend_func_extended
|
||||
// TODO what to do if that extension is not supported
|
||||
RDCWARN("glBindFragDataLocation is not supported!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user