summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-11-20 14:24:48 +0800
committerErik Kundiman <erik@megapahit.org>2024-11-20 14:24:48 +0800
commit9e282949a79fe56b12a4fdfa8fa4552338d8a370 (patch)
tree7cfc28e52827565f6955a0bdc9ecf20d6ff65d3b /indra/newview/pipeline.cpp
parent84240037a2c1c7032fe2fdacec7099eabdfe24ac (diff)
parent6c6b38821ef0ea452b640b31006a8ef4f2dfef55 (diff)
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 76b8cebf94..af0bd013b2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1436,15 +1436,24 @@ void LLPipeline::createLUTBuffers()
mPbrBrdfLut.allocate(512, 512, GL_RG16F);
mPbrBrdfLut.bindTarget();
- gDeferredGenBrdfLutProgram.bind();
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.vertex2f(-1, -1);
- gGL.vertex2f(-1, 1);
- gGL.vertex2f(1, -1);
- gGL.vertex2f(1, 1);
- gGL.end();
- gGL.flush();
+
+ if (gDeferredGenBrdfLutProgram.isComplete())
+ {
+ gDeferredGenBrdfLutProgram.bind();
+ llassert_always(LLGLSLShader::sCurBoundShaderPtr != nullptr);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.vertex2f(-1, -1);
+ gGL.vertex2f(-1, 1);
+ gGL.vertex2f(1, -1);
+ gGL.vertex2f(1, 1);
+ gGL.end();
+ gGL.flush();
+ }
+ else
+ {
+ LL_WARNS("Brad") << gDeferredGenBrdfLutProgram.mName << " failed to load, cannot be used!" << LL_ENDL;
+ }
gDeferredGenBrdfLutProgram.unbind();
mPbrBrdfLut.flush();