summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-11-19 10:49:09 -0800
committerGitHub <noreply@github.com>2024-11-19 10:49:09 -0800
commit7be9c43f286671893ff0a9dee13d721a6731255b (patch)
treeb49f62290187b2b719d1fb3b2cdbb467c64b4bfd /indra/newview/llviewershadermgr.cpp
parentc654dac4b7593355a5754042d0b43e03924b3efb (diff)
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
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index f5af9cc397..cdebb08b18 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -2501,7 +2501,14 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gCASProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
gCASProgram.mShaderFiles.push_back(make_pair("deferred/CASF.glsl", GL_FRAGMENT_SHADER));
gCASProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
- gCASProgram.createShader();
+ success = gCASProgram.createShader();
+ // llassert(success);
+ if (!success)
+ {
+ LL_WARNS() << "Failed to create shader '" << gCASProgram.mName << "', disabling!" << LL_ENDL;
+ // continue as if this shader never happened
+ success = true;
+ }
}
if (success)