diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-02-26 23:05:09 +0200 | 
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-02-27 17:07:36 +0200 | 
| commit | f40c5b209b48b6dd1f8e345598104691ce6c932c (patch) | |
| tree | 1597a8699e7b18d1499e6b8e29bd56395af79f12 /indra/llrender | |
| parent | 39610cbfb381eec0b144f22cd1b34a4ff6911322 (diff) | |
#3597 Fix crash when RenderDebugGLSession is True
Diffstat (limited to 'indra/llrender')
| -rw-r--r-- | indra/llrender/llgl.cpp | 15 | 
1 files changed, 9 insertions, 6 deletions
| diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 1bc5e79835..1966e48f2e 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2458,12 +2458,15 @@ void LLGLState::checkStates(GLboolean writeAlpha)          return;      } -    GLint src; -    GLint dst; -    glGetIntegerv(GL_BLEND_SRC, &src); -    glGetIntegerv(GL_BLEND_DST, &dst); -    llassert_always(src == GL_SRC_ALPHA); -    llassert_always(dst == GL_ONE_MINUS_SRC_ALPHA); +    GLint srcRGB, dstRGB, srcAlpha, dstAlpha; +    glGetIntegerv(GL_BLEND_SRC_RGB, &srcRGB); +    glGetIntegerv(GL_BLEND_DST_RGB, &dstRGB); +    glGetIntegerv(GL_BLEND_SRC_ALPHA, &srcAlpha); +    glGetIntegerv(GL_BLEND_DST_ALPHA, &dstAlpha); +    llassert_always(srcRGB == GL_SRC_ALPHA); +    llassert_always(srcAlpha == GL_SRC_ALPHA); +    llassert_always(dstRGB == GL_ONE_MINUS_SRC_ALPHA); +    llassert_always(dstAlpha == GL_ONE_MINUS_SRC_ALPHA);      // disable for now until usage is consistent      //GLboolean colorMask[4]; | 
