diff options
author | Dave Parks <davep@lindenlab.com> | 2022-10-06 18:40:01 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-10-06 18:40:01 -0500 |
commit | 9448db5d4af7bba094e5bc51f85e5c2491d3f5a1 (patch) | |
tree | 98e3c28316a892512ecf26661a564c8a81832a39 /indra/llrender/llrendertarget.cpp | |
parent | 2b28fecf4893e103e99328e5b4a13c607498396d (diff) |
SL-18190 Water shader WIP. Better parallax correction for sphere probes. Reduce probe memory footprint. Remove framebuffer copies and move to deprecate stencil buffer usage.
Diffstat (limited to 'indra/llrender/llrendertarget.cpp')
-rw-r--r-- | indra/llrender/llrendertarget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 7fcb130ac6..01ccf3d314 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -150,6 +150,7 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo if (mDepth) { glBindFramebuffer(GL_FRAMEBUFFER, mFBO); + llassert(!mStencil); // use of stencil buffer is deprecated (performance penalty) if (mStencil) { glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); @@ -370,6 +371,7 @@ void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target) glBindFramebuffer(GL_FRAMEBUFFER, target.mFBO); stop_glerror(); + llassert(!mStencil); // deprecated -- performance penalty if (mStencil) { glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); @@ -417,6 +419,7 @@ void LLRenderTarget::release() if (mUseDepth) { //detach shared depth buffer + llassert(!mStencil); //deprecated, performance penalty if (mStencil) { //attached as a renderbuffer glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); @@ -515,7 +518,8 @@ void LLRenderTarget::clear(U32 mask_in) U32 mask = GL_COLOR_BUFFER_BIT; if (mUseDepth) { - mask |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; + mask |= GL_DEPTH_BUFFER_BIT; // stencil buffer is deprecated, performance pnealty | GL_STENCIL_BUFFER_BIT; + } if (mFBO) { |