From 7be9c43f286671893ff0a9dee13d721a6731255b Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:49:09 -0800 Subject: brad/2744 handle shader errors (#3105) * Partial solution to secondlife/viewer#2744 crash with better error handling. Handles shader compile errors better, and should turn crash into an LL_ERRS assertion failure. Strengthed more assertions and improved shader error line numbers * Even more error handling to get a handle on crash secondlife/viewer#2744 * Improved GLSL correctness on Intel chips that lack OpenGL 4.6 support. secondlife/viewer#2744 * Removed non-working fallback code for gDeferredPostProgram * Fixed incorrect llmax call --- indra/llrender/llglslshader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llrender/llglslshader.cpp') diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 6ba5463acd..45bb24a5b7 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1046,7 +1046,7 @@ void LLGLSLShader::bind() { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - llassert(mProgramObject != 0); + llassert_always(mProgramObject != 0); gGL.flush(); @@ -1069,6 +1069,9 @@ void LLGLSLShader::bind() LLShaderMgr::instance()->updateShaderUniforms(this); mUniformsDirty = false; } + + llassert_always(sCurBoundShaderPtr != nullptr); + llassert_always(sCurBoundShader == mProgramObject); } void LLGLSLShader::bind(U8 variant) -- cgit v1.2.3