summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/pipeline.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 18dd694246..691d155a3c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -121,7 +121,7 @@
#include "SMAAAreaTex.h"
#include "SMAASearchTex.h"
-
+#include "llerror.h"
#ifndef LL_WINDOWS
#define A_GCC 1
#pragma GCC diagnostic ignored "-Wunused-function"
@@ -727,6 +727,29 @@ void LLPipeline::requestResizeShadowTexture()
void LLPipeline::resizeShadowTexture()
{
+ // A static counter to keep track of skipped frames
+ static int sSkippedFrameCount = 0;
+
+ if (!mRT || mRT->width == 0 || mRT->height == 0)
+ {
+ sSkippedFrameCount++;
+ LL_WARNS("Render") << "Shadow texture resizing aborted: render target dimensions invalid. Skipped "
+ << sSkippedFrameCount << " frame(s) so far." << LL_ENDL;
+ return;
+ }
+
+ // If there were skipped frames before mRT became valid, log that information.
+ if (sSkippedFrameCount > 0)
+ {
+ LL_INFOS("Render") << "Render target now valid after "
+ << sSkippedFrameCount << " skipped frame(s)." << LL_ENDL;
+ sSkippedFrameCount = 0;
+ }
+
+ LL_WARNS() << "LLPipeline::resizeShadowTexture() called." << LL_ENDL;
+ LL_INFOS() << "Resizing shadow texture. mRT->width = "
+ << mRT->width << " mRT->height = " << mRT->height << LL_ENDL;
+
releaseSunShadowTargets();
releaseSpotShadowTargets();
allocateShadowBuffer(mRT->width, mRT->height);