Kaydet (Commit) 431c4dc7 authored tarafından Miklos Vajna's avatar Miklos Vajna

vcl opengl windows: fix error handling in tryShaders()

Both of my GPUs failed to start with GL enabled in an enable-symbols
build, but they were fine in a dbgutil build.

It seems the problem was that in case CHECK_GL_ERROR() expands to an
error reporting code, then we already correctly checked the error of the
last GL call at the end of tryShaders() -- but in case it expanded to
nothing, then previous (unrelated) errors signaled that shader
compilation went wrong, even if it did not.

Given that we have error handling right before glDeleteProgram(), clear
the GL error queue before calling glDeleteProgram().

Change-Id: If58188d06a0b7009a71af82c476b5aa77823d9b0
Reviewed-on: https://gerrit.libreoffice.org/58852
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 67649406
......@@ -424,6 +424,10 @@ bool tryShaders(const OUString& rVertexShader, const OUString& rFragmentShader,
}
if (!nId)
return false;
// We're intersted in the error returned by glDeleteProgram().
glGetError();
glDeleteProgram(nId);
return glGetError() == GL_NO_ERROR;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment