Merged in graham_linden/viewer-cougar-graham (pull request #36)

SL-10005

Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
master
Andrey Lihatskiy 2018-11-05 18:47:38 +00:00
commit 72bd727c42
1 changed files with 4 additions and 1 deletions

View File

@ -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();