Skip to content

Commit

Permalink
do not use getPsoRequestsTimeout() for caster passes, otherwise we wi…
Browse files Browse the repository at this point in the history
…ll have to re-render shadowmaps
  • Loading branch information
dyunchik authored and eugenegff committed Feb 5, 2025
1 parent 2f82014 commit 6a77db7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OgreMain/include/OgreRenderQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace Ogre
is false.
@param sceneManager
*/
void start( SceneManager *sceneManager );
void start( SceneManager *sceneManager, bool casterPass );
/** Signals worker threads we won't be submitting more work, so they should stop once they're
done compiling all pending shaders / PSOs.
Expand Down
6 changes: 3 additions & 3 deletions OgreMain/src/OgreRenderQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ namespace Ogre
if( rs->supportsMultithreadedShaderCompilation() && mSceneManager->getNumWorkerThreads() > 1u )
{
parallelCompileQueue = &mParallelHlmsCompileQueue;
mParallelHlmsCompileQueue.start( mSceneManager );
mParallelHlmsCompileQueue.start( mSceneManager, casterPass );
}

bool supportsIndirectBuffers = mVaoManager->supportsIndirectBuffers();
Expand Down Expand Up @@ -1192,10 +1192,10 @@ namespace Ogre
mParallelHlmsCompileQueue.updateThread( threadIdx, mHlmsManager );
}
//-----------------------------------------------------------------------
void ParallelHlmsCompileQueue::start( SceneManager *sceneManager )
void ParallelHlmsCompileQueue::start( SceneManager *sceneManager, bool casterPass )
{
mKeepCompiling = true;
int timeout = Root::getSingleton().getRenderSystem()->getPsoRequestsTimeout();
int timeout = casterPass ? 0 : Root::getSingleton().getRenderSystem()->getPsoRequestsTimeout();
mCompilationDeadline =
timeout <= 0 ? (uint64)-1 : Root::getSingleton().getTimer()->getMilliseconds() + timeout;
mCompilationIncompleteCounter = 0;
Expand Down

0 comments on commit 6a77db7

Please sign in to comment.