diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-04-25 14:48:16 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-04-25 14:48:16 -0500 |
commit | 5d862c994c18b155bc761fa16dd4070281a1345e (patch) | |
tree | 0fb2e8a75343d3964a2dd6269207e92dfee92882 /indra/newview/pipeline.cpp | |
parent | 741c815966fd32698e8258bfa410d713effe9704 (diff) |
DRTVWR-559 Optimization pass on probe allocation and search. Incidental decruft.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 126924220c..4bb93d675e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6912,7 +6912,8 @@ void LLPipeline::bindScreenToTexture() static LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM("Bloom"); -void LLPipeline::visualizeBuffers(LLRenderTarget* src, LLRenderTarget* dst, U32 bufferIndex) { +void LLPipeline::visualizeBuffers(LLRenderTarget* src, LLRenderTarget* dst, U32 bufferIndex) +{ dst->bindTarget(); gDeferredBufferVisualProgram.bind(); gDeferredBufferVisualProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, false, LLTexUnit::TFO_BILINEAR, bufferIndex); @@ -6929,7 +6930,8 @@ void LLPipeline::visualizeBuffers(LLRenderTarget* src, LLRenderTarget* dst, U32 dst->flush(); } -void LLPipeline::generateLuminance(LLRenderTarget* src, LLRenderTarget* dst) { +void LLPipeline::generateLuminance(LLRenderTarget* src, LLRenderTarget* dst) +{ // luminance sample and mipmap generation { LL_PROFILE_GPU_ZONE("luminance sample"); @@ -7054,7 +7056,8 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) { dst->flush(); } -void LLPipeline::copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* dst) { +void LLPipeline::copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* dst) +{ if (RenderScreenSpaceReflections && !gCubeSnapshot) { @@ -7080,7 +7083,8 @@ void LLPipeline::copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* } } -void LLPipeline::generateGlow(LLRenderTarget* src) { +void LLPipeline::generateGlow(LLRenderTarget* src) +{ if (sRenderGlow) { LL_PROFILE_GPU_ZONE("glow"); @@ -7177,7 +7181,8 @@ void LLPipeline::generateGlow(LLRenderTarget* src) { } } -void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst) { +void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst) +{ { llassert(!gCubeSnapshot); bool multisample = RenderFSAASamples > 1 && mRT->fxaaBuffer.isComplete(); @@ -7257,7 +7262,8 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst) { } } -void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst) { +void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst) +{ LL_PROFILE_GPU_ZONE("copyRenderTarget"); dst->bindTarget(); @@ -7277,7 +7283,8 @@ void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst) { dst->flush(); } -void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst) { +void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst) +{ // Go ahead and do our glow combine here in our destination. We blit this later into the front buffer. dst->bindTarget(); @@ -7296,7 +7303,8 @@ void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst) { dst->flush(); } -void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) { +void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) +{ { bool dof_enabled = (RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) && @@ -7462,10 +7470,12 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) { { // combine result based on alpha dst->bindTarget(); - if (RenderFSAASamples > 1 && mRT->fxaaBuffer.isComplete()) { + if (RenderFSAASamples > 1 && mRT->fxaaBuffer.isComplete()) + { glViewport(0, 0, dst->getWidth(), dst->getHeight()); } - else { + else + { gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft; gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom; gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth(); @@ -7500,6 +7510,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) { void LLPipeline::renderFinalize() { + llassert(!gCubeSnapshot); LLVertexBuffer::unbind(); LLGLState::checkStates(); @@ -7520,22 +7531,20 @@ void LLPipeline::renderFinalize() gGL.setColorMask(true, true); glClearColor(0, 0, 0, 0); - if (!gCubeSnapshot) - { - copyScreenSpaceReflections(&mRT->screen, &mSceneMap); + + copyScreenSpaceReflections(&mRT->screen, &mSceneMap); - generateLuminance(&mRT->screen, &mLuminanceMap); + generateLuminance(&mRT->screen, &mLuminanceMap); - generateExposure(&mLuminanceMap, &mExposureMap); + generateExposure(&mLuminanceMap, &mExposureMap); - gammaCorrect(&mRT->screen, &mPostMap); + gammaCorrect(&mRT->screen, &mPostMap); - LLVertexBuffer::unbind(); - } + LLVertexBuffer::unbind(); - generateGlow(&mPostMap); + generateGlow(&mPostMap); - combineGlow(&mPostMap, &mRT->screen); + combineGlow(&mPostMap, &mRT->screen); gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft; gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom; @@ -7547,7 +7556,8 @@ void LLPipeline::renderFinalize() applyFXAA(&mPostMap, &mRT->screen); LLRenderTarget* finalBuffer = &mRT->screen; - if (RenderBufferVisualization > -1) { + if (RenderBufferVisualization > -1) + { finalBuffer = &mPostMap; switch (RenderBufferVisualization) { |