[Libreoffice-commits] core.git: vcl/opengl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 13 07:10:11 UTC 2018
vcl/opengl/win/gdiimpl.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 431c4dc7dae68c28018ec19dd1c2b3e6b058c019
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Fri Aug 10 18:10:12 2018 +0200
Commit: Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Aug 13 09:09:51 2018 +0200
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: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index 5d4158c3b3d7..70e20367f27f 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -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;
}
More information about the Libreoffice-commits
mailing list