Skip to content

Commit

Permalink
Fix build errors with OGRE_SHADER_COMPILATION_THREADING_MODE = 2
Browse files Browse the repository at this point in the history
Additionally fix race conditions as some ParticleSystme code was
usingthe wrong tid parameter.
  • Loading branch information
darksylinc committed Jul 27, 2024
1 parent aa6117b commit 5545cb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Components/Hlms/Pbs/src/OgreHlmsPbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ namespace Ogre
// This is a regular property!
setProperty( tid, "samplerStateStart", samplerStateStart );

if( getProperty( HlmsBaseProp::ParticleSystem ) )
if( getProperty( tid, HlmsBaseProp::ParticleSystem ) )
{
setProperty( tid, "particleSystemConstSlot", mParticleSystemConstSlot );
if( mVaoManager->readOnlyIsTexBuffer() )
Expand All @@ -1396,10 +1396,10 @@ namespace Ogre

if( !casterPass )
{
setProperty( kNoTid, HlmsBaseProp::Normal, 1 );
setProperty( kNoTid, HlmsBaseProp::Tangent, 1 );
setProperty( tid, HlmsBaseProp::Normal, 1 );
setProperty( tid, HlmsBaseProp::Tangent, 1 );
}
setProperty( kNoTid, HlmsBaseProp::UvCount, 1 );
setProperty( tid, HlmsBaseProp::UvCount, 1 );
}
}
//-----------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Components/Hlms/Unlit/src/OgreHlmsUnlit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ namespace Ogre
}
}

if( getProperty( HlmsBaseProp::ParticleSystem ) )
if( getProperty( tid, HlmsBaseProp::ParticleSystem ) )
{
setProperty( tid, "particleSystemConstSlot", mParticleSystemConstSlot );
if( mVaoManager->readOnlyIsTexBuffer() )
Expand Down

0 comments on commit 5545cb1

Please sign in to comment.