summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-11-05 18:47:38 +0000
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-11-05 18:47:38 +0000
commit72bd727c4294615f090b68c93c09cd5903d016a2 (patch)
treedc41699c732f3f288e3027ceaa01d7b210d2917f /indra
parentfc2cdf62f186784548934b64ac4a559c32146614 (diff)
parentb6e59f09cbc359ba1a84e9e61d30406875acd02b (diff)
Merged in graham_linden/viewer-cougar-graham (pull request #36)
SL-10005 Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
Diffstat (limited to 'indra')
-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();