summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-11-02 22:39:04 +0100
committerGraham Linden <graham@lindenlab.com>2018-11-02 22:39:04 +0100
commitb6e59f09cbc359ba1a84e9e61d30406875acd02b (patch)
tree76da80ea79b50233d157c69f15110809b1bf0577 /indra/newview
parentf3a42d070ecf27acc51e53d4ca8632c7036459ff (diff)
parent060a0bc350f279c6023b061255653b575156b009 (diff)
Merge SL-10005 fix
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index dbb79e8e63..a666979689 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2654,9 +2654,12 @@ void LLPipeline::downsampleDepthBuffer(LLRenderTarget& source, LLRenderTarget& d
if (scratch_space)
{
+ GLint bits = 0;
+ bits |= (source.hasStencil() && dest.hasStencil()) ? GL_STENCIL_BUFFER_BIT : 0;
+ bits |= GL_DEPTH_BUFFER_BIT;
scratch_space->copyContents(source,
0, 0, source.getWidth(), source.getHeight(),
- 0, 0, scratch_space->getWidth(), scratch_space->getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
+ 0, 0, scratch_space->getWidth(), scratch_space->getHeight(), bits, GL_NEAREST);
}
dest.bindTarget();