diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-17 14:05:18 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-17 14:05:18 -0500 |
commit | fb5ff6a5388dc9622089e9937e8d81bc319cf3dd (patch) | |
tree | c11022867d250223ca098af6f0fc9cd82f04166c /indra/newview/pipeline.cpp | |
parent | 18b0aa03717cd8209b6c239457bcf69f0d39ecf7 (diff) |
SL-17287 Slightly less hacky and much less crash cube snapshot render target allocation.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 8bac5131cf..028a0db95c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -436,7 +436,7 @@ void LLPipeline::init() { refreshCachedSettings(); - mRT = new RenderTargetPack(); + mRT = &mMainRT; gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity"); gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize"); @@ -696,9 +696,6 @@ void LLPipeline::cleanup() mDeferredVB = NULL; mCubeVB = NULL; - - delete mRT; - mRT = nullptr; } //============================================================================ @@ -840,6 +837,16 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY) bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; + if (mRT == &mMainRT) + { // hacky -- allocate auxillary buffer + gCubeSnapshot = TRUE; + mRT = &mAuxillaryRT; + U32 res = LL_REFLECTION_PROBE_RESOLUTION * 2; + allocateScreenBuffer(res, res, 0); + mRT = &mMainRT; + gCubeSnapshot = FALSE; + } + // remember these dimensions mRT->width = resX; mRT->height = resY; |