summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp41
1 files changed, 30 insertions, 11 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 8bb83d4250..1725990e8f 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -86,9 +86,9 @@ void APIENTRY gl_debug_callback(GLenum source,
const GLchar* message,
GLvoid* userParam)
{
- if (severity != GL_DEBUG_SEVERITY_HIGH // &&
- //severity != GL_DEBUG_SEVERITY_MEDIUM &&
- //severity != GL_DEBUG_SEVERITY_LOW
+ if (severity != GL_DEBUG_SEVERITY_HIGH &&
+ severity != GL_DEBUG_SEVERITY_MEDIUM &&
+ severity != GL_DEBUG_SEVERITY_LOW
)
{ //suppress out-of-spec messages sent by nvidia driver (mostly vertexbuffer hints)
return;
@@ -112,10 +112,28 @@ void APIENTRY gl_debug_callback(GLenum source,
glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &vao);
GLint vbo = 0;
glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &vbo);
+ GLint vbo_size = 0;
+ if (vbo != 0)
+ {
+ glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &vbo_size);
+ }
GLint ibo = 0;
glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &ibo);
-
- if (severity == GL_DEBUG_SEVERITY_HIGH)
+ GLint ibo_size = 0;
+ if (ibo != 0)
+ {
+ glGetBufferParameteriv(GL_ELEMENT_ARRAY_BUFFER, GL_BUFFER_SIZE, &ibo_size);
+ }
+ GLint ubo = 0;
+ glGetIntegerv(GL_UNIFORM_BUFFER_BINDING, &ubo);
+ GLint ubo_size = 0;
+ GLint ubo_immutable = 0;
+ if (ubo != 0)
+ {
+ glGetBufferParameteriv(GL_UNIFORM_BUFFER, GL_BUFFER_SIZE, &ubo_size);
+ glGetBufferParameteriv(GL_UNIFORM_BUFFER, GL_BUFFER_IMMUTABLE_STORAGE, &ubo_immutable);
+ }
+ //if (severity == GL_DEBUG_SEVERITY_HIGH)
{
LL_ERRS() << "Halting on GL Error" << LL_ENDL;
}
@@ -2393,12 +2411,13 @@ void LLGLState::checkStates(GLboolean writeAlpha)
llassert_always(src == GL_SRC_ALPHA);
llassert_always(dst == GL_ONE_MINUS_SRC_ALPHA);
- GLboolean colorMask[4];
- glGetBooleanv(GL_COLOR_WRITEMASK, colorMask);
- llassert_always(colorMask[0]);
- llassert_always(colorMask[1]);
- llassert_always(colorMask[2]);
- llassert_always(colorMask[3] == writeAlpha);
+ // disable for now until usage is consistent
+ //GLboolean colorMask[4];
+ //glGetBooleanv(GL_COLOR_WRITEMASK, colorMask);
+ //llassert_always(colorMask[0]);
+ //llassert_always(colorMask[1]);
+ //llassert_always(colorMask[2]);
+ // llassert_always(colorMask[3] == writeAlpha);
for (boost::unordered_map<LLGLenum, LLGLboolean>::iterator iter = sStateMap.begin();
iter != sStateMap.end(); ++iter)