Skip to content

Commit

Permalink
Give more useful log info on Memoryless errors
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Dec 5, 2024
1 parent c91c2ab commit ec8a981
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
15 changes: 14 additions & 1 deletion OgreMain/src/Compositor/Pass/OgreCompositorPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: '" +

This comment has been minimized.

Copy link
@cryham

cryham Dec 5, 2024

Contributor

Nice 👍

mParentNode->getDefinition()->getNameStr() + "' in Workspace: '" +
mParentNode->getWorkspace()->getDefinition()->getNameStr() +
"' threw the following Exception:",
LML_CRITICAL );
throw;
}
}
//-----------------------------------------------------------------------------------
void CompositorPass::setupRenderPassTarget( RenderPassTargetBase *renderPassTargetAttachment,
Expand Down
10 changes: 7 additions & 3 deletions OgreMain/src/OgreRenderPassDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
}

Expand All @@ -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" );
}
}
Expand All @@ -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" );
}
}
Expand Down

0 comments on commit ec8a981

Please sign in to comment.