summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmap.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-05-20 19:05:28 -0500
committerDave Parks <davep@lindenlab.com>2022-05-20 19:05:28 -0500
commit6eaf8521abae0deeb1162f9c61747183110176b0 (patch)
tree50d1c68ff0e0380339b46ee267f408cf3513e611 /indra/newview/llreflectionmap.cpp
parent6c6d9a10f830e264cf75603949b54a12256cab78 (diff)
SL-17287 Instrument and optimize cubemap render. Fix for cubemap snapshots doing a full resolution render instead of a 512x512 render.
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r--indra/newview/llreflectionmap.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 4ac2803208..54a627efd4 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -47,8 +47,8 @@ void LLReflectionMap::update(U32 resolution, U32 face)
llassert(LLPipeline::sRenderDeferred);
// make sure we don't walk off the edge of the render target
- while (resolution > gPipeline.mDeferredScreen.getWidth() ||
- resolution > gPipeline.mDeferredScreen.getHeight())
+ while (resolution > gPipeline.mRT->deferredScreen.getWidth() ||
+ resolution > gPipeline.mRT->deferredScreen.getHeight())
{
resolution /= 2;
}
@@ -57,17 +57,11 @@ void LLReflectionMap::update(U32 resolution, U32 face)
bool LLReflectionMap::shouldUpdate()
{
- const F32 UPDATE_INTERVAL = 10.f; // update no more than this often
const F32 TIMEOUT_INTERVAL = 30.f; // update no less than this often
const F32 RENDER_TIMEOUT = 1.f; // don't update if hasn't been used for rendering for this long
if (mLastBindTime > gFrameTimeSeconds - RENDER_TIMEOUT)
{
- if (mDirty && mLastUpdateTime < gFrameTimeSeconds - UPDATE_INTERVAL)
- {
- return true;
- }
-
if (mLastUpdateTime < gFrameTimeSeconds - TIMEOUT_INTERVAL)
{
return true;