diff options
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 5 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 3 | ||||
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 14 |
3 files changed, 10 insertions, 12 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index e79d67c5c7..f6539b8d03 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1084,7 +1084,7 @@ void LLGLSLShader::bind() { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - llassert(mProgramObject != 0); + llassert_always(mProgramObject != 0); gGL.flush(); @@ -1107,6 +1107,9 @@ void LLGLSLShader::bind() LLShaderMgr::instance()->updateShaderUniforms(this); mUniformsDirty = false; } + + llassert_always(sCurBoundShaderPtr != nullptr); + llassert_always(sCurBoundShader == mProgramObject); } void LLGLSLShader::bind(U8 variant) diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 9178fc16b9..d333a3fd54 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1585,7 +1585,8 @@ void LLRender::flush() if (mCount > 0) { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; - llassert(LLGLSLShader::sCurBoundShaderPtr != nullptr); + llassert_always(LLGLSLShader::sCurBoundShaderPtr != nullptr); + if (!mUIOffset.empty()) { sUICalls++; diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 150277c8df..e02dd4771e 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -559,17 +559,11 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev } else if (major_version == 3) { - if (minor_version < 10) + if (minor_version <= 29) { - shader_code_text[shader_code_count++] = strdup("#version 300\n"); - } - else if (minor_version <= 19) - { - shader_code_text[shader_code_count++] = strdup("#version 310\n"); - } - else if (minor_version <= 29) - { - shader_code_text[shader_code_count++] = strdup("#version 320\n"); + // OpenGL 3.2 had GLSL version 1.50. anything after that the version numbers match. + // https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)#OpenGL_and_GLSL_versions + shader_code_text[shader_code_count++] = strdup("#version 150\n"); } else { |