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:
baldurk
2020-08-07 13:39:00 +01:00
parent 9858f516d0
commit 2a138acf6c
+6 -14
View File
@@ -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!");
}
}
}
}