Kaydet (Commit) c27d56b2 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

opengl: log device/driver info, remove unneeded info messages

Change-Id: Ica3698d0dbff1ee7a1e822d2765eb4019ccef224
Reviewed-on: https://gerrit.libreoffice.org/27498Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 88459033
...@@ -81,6 +81,7 @@ inline bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nT ...@@ -81,6 +81,7 @@ inline bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nT
default: default:
break; break;
} }
SAL_WARN("vcl.opengl", "Could not determine the appropriate texture format for input bits '" << nBits << "'");
return false; return false;
} }
......
...@@ -213,9 +213,12 @@ debug_callback(GLenum source, GLenum type, GLuint id, ...@@ -213,9 +213,12 @@ debug_callback(GLenum source, GLenum type, GLuint id,
#endif #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 // 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; return;
SAL_WARN("vcl.opengl", "OpenGL debug message: source: " << getSourceString(source) << ", type: " SAL_WARN("vcl.opengl", "OpenGL debug message: source: " << getSourceString(source) << ", type: "
...@@ -264,6 +267,19 @@ bool OpenGLContext::ImplInit() ...@@ -264,6 +267,19 @@ bool OpenGLContext::ImplInit()
return false; 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() bool OpenGLContext::InitGLEW()
{ {
static bool bGlewInit = false; static bool bGlewInit = false;
...@@ -282,7 +298,8 @@ bool OpenGLContext::InitGLEW() ...@@ -282,7 +298,8 @@ bool OpenGLContext::InitGLEW()
bGlewInit = true; 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; mbInitialized = true;
// I think we need at least GL 3.0 // I think we need at least GL 3.0
......
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