Make sure glCreateShaderProgramv creates a re-linkable sep program

* We have a separable program for each shader that we can use to mess
  about with and relink for doing overlay/analysis type stuff. We need
  to make sure we create it properly and don't use re-use the separable
  program that is the 'real' version.
This commit is contained in:
baldurk
2015-02-21 22:04:30 +00:00
parent 53b24791e5
commit bf5980b6e9
@@ -330,6 +330,9 @@ bool WrappedOpenGL::Serialise_glCreateShaderProgramv(GLuint program, GLenum type
sources[i] = &src[i][0];
GLuint real = m_Real.glCreateShaderProgramv(Type, Count, sources);
// we want a separate program that we can mess about with for making overlays
// and relink without having to worry about restoring the 'real' program state.
GLuint sepprog = MakeSeparableShaderProgram(m_Real, Type, src, NULL);
delete[] sources;
@@ -349,7 +352,7 @@ bool WrappedOpenGL::Serialise_glCreateShaderProgramv(GLuint program, GLenum type
shadDetails.type = Type;
shadDetails.sources.swap(src);
shadDetails.prog = real;
shadDetails.prog = sepprog;
MakeShaderReflection(m_Real, Type, real, shadDetails.reflection, pointSizeUsed, clipDistanceUsed);
create_array_uninit(shadDetails.reflection.DebugInfo.files, shadDetails.sources.size());