From ec8a9811a8db8ea56499ec2d13196ccf054a80f0 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Thu, 5 Dec 2024 18:58:08 -0300 Subject: [PATCH] Give more useful log info on Memoryless errors --- .../src/Compositor/Pass/OgreCompositorPass.cpp | 15 ++++++++++++++- OgreMain/src/OgreRenderPassDescriptor.cpp | 10 +++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/OgreMain/src/Compositor/Pass/OgreCompositorPass.cpp b/OgreMain/src/Compositor/Pass/OgreCompositorPass.cpp index e8280314261..d28cd88c422 100644 --- a/OgreMain/src/Compositor/Pass/OgreCompositorPass.cpp +++ b/OgreMain/src/Compositor/Pass/OgreCompositorPass.cpp @@ -312,7 +312,20 @@ namespace Ogre postRenderPassDescriptorSetup( renderPassDesc ); - renderPassDesc->entriesModified( RenderPassDescriptor::All ); + try + { + renderPassDesc->entriesModified( RenderPassDescriptor::All ); + } + catch( Exception &e ) + { + LogManager::getSingleton().logMessage( + "The compositor pass '" + mDefinition->mProfilingId + "' from Node: '" + + mParentNode->getDefinition()->getNameStr() + "' in Workspace: '" + + mParentNode->getWorkspace()->getDefinition()->getNameStr() + + "' threw the following Exception:", + LML_CRITICAL ); + throw; + } } //----------------------------------------------------------------------------------- void CompositorPass::setupRenderPassTarget( RenderPassTargetBase *renderPassTargetAttachment, diff --git a/OgreMain/src/OgreRenderPassDescriptor.cpp b/OgreMain/src/OgreRenderPassDescriptor.cpp index c8e36e78549..1ae4d9a5cf2 100644 --- a/OgreMain/src/OgreRenderPassDescriptor.cpp +++ b/OgreMain/src/OgreRenderPassDescriptor.cpp @@ -177,7 +177,8 @@ namespace Ogre OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS, "Texture '" + texture->getNameStr() + "' is TilerMemoryless. For load actions it can only use clear, " - "dont_care or clear_on_tilers.", + "dont_care or clear_on_tilers. Alternatively, launch OgreNext with 'Allow " + "Memoryless RTT' set to No. See Ogre.log for more info.", "RenderPassDescriptor::validateMemorylessTexture" ); } @@ -187,7 +188,9 @@ namespace Ogre { OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS, "Texture '" + texture->getNameStr() + - "' is TilerMemoryless. For store actions it can only use dont_care.", + "' is TilerMemoryless. For store actions it can only use dont_care. " + "Alternatively, launch OgreNext with 'Allow Memoryless RTT' set to No." + " See Ogre.log for more info.", "RenderPassDescriptor::validateMemorylessTexture" ); } } @@ -198,7 +201,8 @@ namespace Ogre OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS, "MSAA Texture '" + texture->getNameStr() + "' is TilerMemoryless. For store actions it can only use dont_care " - "or resolve.", + "or resolve. Alternatively, launch OgreNext with 'Allow Memoryless " + "RTT' set to No. See Ogre.log for more info.", "RenderPassDescriptor::validateMemorylessTexture" ); } }