summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-01 17:36:26 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-01 19:44:56 +0300
commitd357bf7ae5c5e0b6e66e7d82ce1677360b4cb990 (patch)
treef2a63bd541a05732273f66668936f16ab69f1629 /indra/llrender/llglslshader.cpp
parent022ff9819336a9beab744f2d25baa51a249e998e (diff)
SL-14990 Turn on shader init logging after crash
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 74cfa60b27..4351f6e2c8 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -396,10 +396,18 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
mLightHash = 0xFFFFFFFF;
llassert_always(!mShaderFiles.empty());
- BOOL success = TRUE;
// Create program
mProgramObject = glCreateProgramObjectARB();
+ if (mProgramObject == 0)
+ {
+ // Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist.
+ LL_SHADER_LOADING_WARNS() << "Failed to create handle for shader: " << mName << LL_ENDL;
+ unloadInternal();
+ return FALSE;
+ }
+
+ BOOL success = TRUE;
#if LL_DARWIN
// work-around missing mix(vec3,vec3,bvec3)