Don't delete program before we try to print the link errors

This commit is contained in:
baldurk
2019-01-30 23:03:23 +00:00
parent 5854810fd4
commit 19c7af5e35
+3 -3
View File
@@ -249,6 +249,9 @@ GLuint MakeSeparableShaderProgram(WrappedOpenGL &drv, GLenum type, vector<string
if(attempt == 1)
{
drv.glDeleteProgram(sepProg);
sepProg = 0;
RDCLOG("Attempting to pre-process shader with glslang to allow patching");
glslang::TShader sh(EShLanguage(ShaderIdx(type)));
@@ -492,9 +495,6 @@ GLuint MakeSeparableShaderProgram(WrappedOpenGL &drv, GLenum type, vector<string
if(status == 1)
break;
drv.glDeleteProgram(sepProg);
sepProg = 0;
RDCWARN("Couldn't patch separability into shader, attempt #%d", attempt + 1);
}
}