summaryrefslogtreecommitdiff
path: root/vcl/source/opengl/OpenGLContext.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-07-25 14:33:12 +0900
committerTomaž Vajngerl <quikee@gmail.com>2016-07-25 14:36:41 +0000
commitc27d56b2a9ae4fb2f0a69d919339af0bbccae5a6 (patch)
treeb113fb48e1a19b1a54268ecc2c848b65e4f7a0ad /vcl/source/opengl/OpenGLContext.cxx
parent884590333127173f19bac6871e2f2998ac0ba3fd (diff)
opengl: log device/driver info, remove unneeded info messages
Change-Id: Ica3698d0dbff1ee7a1e822d2765eb4019ccef224 Reviewed-on: https://gerrit.libreoffice.org/27498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/opengl/OpenGLContext.cxx')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index e5a63c0a0aaa..979e2bf32a98 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -213,9 +213,12 @@ debug_callback(GLenum source, GLenum type, GLuint id,
#endif
)
{
- // ignore Nvidia's : "Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches."
+ // ignore Nvidia's 131218: "Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches."
// the GLSL compiler is a bit too aggressive in optimizing the state based on the current OpenGL state
- if (id == 131218)
+
+ // ignore 131185: "Buffer detailed info: Buffer object x (bound to GL_ARRAY_BUFFER_ARB,
+ // usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations."
+ if (id == 131218 || id == 131185)
return;
SAL_WARN("vcl.opengl", "OpenGL debug message: source: " << getSourceString(source) << ", type: "
@@ -264,6 +267,19 @@ bool OpenGLContext::ImplInit()
return false;
}
+OUString getGLString(GLenum eGlEnum)
+{
+ OUString sString;
+ const GLubyte* pString = glGetString(eGlEnum);
+ if (pString)
+ {
+ sString = OUString::createFromAscii(reinterpret_cast<const sal_Char*>(pString));
+ }
+
+ CHECK_GL_ERROR();
+ return sString;
+}
+
bool OpenGLContext::InitGLEW()
{
static bool bGlewInit = false;
@@ -282,7 +298,8 @@ bool OpenGLContext::InitGLEW()
bGlewInit = true;
}
- VCL_GL_INFO("OpenGLContext::ImplInit----end, GL version: " << OpenGLHelper::getGLVersion());
+ VCL_GL_INFO("OpenGLContext::ImplInit----end");
+ VCL_GL_INFO("Vendor: " << getGLString(GL_VENDOR) << " Renderer: " << getGLString(GL_RENDERER) << " GL version: " << OpenGLHelper::getGLVersion());
mbInitialized = true;
// I think we need at least GL 3.0