diff options
author | Graham Linden <graham@lindenlab.com> | 2018-11-02 22:36:56 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-11-02 22:36:56 +0100 |
commit | 060a0bc350f279c6023b061255653b575156b009 (patch) | |
tree | e291326cd31a8c4ce44336f83c24803f0365df76 | |
parent | 58aef8beaf79dc83546a7b080014ca5030733ac8 (diff) |
SL-10005
Make set of copied bits (depth and/or stencil) match those present in the source and dest.
May avoid driver crash on Intel HD graphics.
-rw-r--r-- | indra/newview/pipeline.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e541c1054e..e2c379102d 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(); |