summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRuslan Teliuk <ruslantproductengine@lindenlab.com>2018-11-08 18:42:12 +0200
committerRuslan Teliuk <ruslantproductengine@lindenlab.com>2018-11-08 18:42:12 +0200
commit62085f9f7904aa20406aa4f0122065aec3a786ee (patch)
treed814a9b8dc35fcaf2d0fcee3533c4b763873d26f /indra/newview
parent755b4a3a6dc6c158f7cfcd6ab8d88b38d3b79fb4 (diff)
parent72bd727c4294615f090b68c93c09cd5903d016a2 (diff)
Merged lindenlab/viewer-cougar into default
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();