summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmapmanager.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-06-17 14:05:18 -0500
committerDave Parks <davep@lindenlab.com>2022-06-17 14:05:18 -0500
commitfb5ff6a5388dc9622089e9937e8d81bc319cf3dd (patch)
treec11022867d250223ca098af6f0fc9cd82f04166c /indra/newview/llreflectionmapmanager.cpp
parent18b0aa03717cd8209b6c239457bcf69f0d39ecf7 (diff)
SL-17287 Slightly less hacky and much less crash cube snapshot render target allocation.
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r--indra/newview/llreflectionmapmanager.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 48ed22d79f..752427f0fa 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -38,11 +38,6 @@
extern BOOL gCubeSnapshot;
extern BOOL gTeleportDisplay;
-//#pragma optimize("", off)
-
-// experimental pipeline render target override, if this works, do something less hacky
-LLPipeline::RenderTargetPack gProbeRT;
-
LLReflectionMapManager::LLReflectionMapManager()
{
for (int i = 0; i < LL_REFLECTION_PROBE_COUNT; ++i)
@@ -95,15 +90,6 @@ void LLReflectionMapManager::update()
const bool use_stencil_buffer = true;
U32 targetRes = LL_REFLECTION_PROBE_RESOLUTION * 2; // super sample
mRenderTarget.allocate(targetRes, targetRes, color_fmt, use_depth_buffer, use_stencil_buffer, LLTexUnit::TT_RECT_TEXTURE);
-
- // hack to allocate render targets using gPipeline code
- gCubeSnapshot = TRUE;
- auto* old_rt = gPipeline.mRT;
- gPipeline.mRT = &gProbeRT;
- gPipeline.allocateScreenBuffer(targetRes, targetRes);
- gPipeline.allocateShadowBuffer(targetRes, targetRes);
- gPipeline.mRT = old_rt;
- gCubeSnapshot = FALSE;
}
if (mMipChain.empty())
@@ -404,10 +390,9 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
{
mRenderTarget.bindTarget();
// hacky hot-swap of camera specific render targets
- auto* old_rt = gPipeline.mRT;
- gPipeline.mRT = &gProbeRT;
+ gPipeline.mRT = &gPipeline.mAuxillaryRT;
probe->update(mRenderTarget.getWidth(), face);
- gPipeline.mRT = old_rt;
+ gPipeline.mRT = &gPipeline.mMainRT;
mRenderTarget.flush();
// generate mipmaps