Skip to content

Commit

Permalink
better fix for HlmsLowLevel::createShaderCacheEntry() - get casterPas…
Browse files Browse the repository at this point in the history
…s from passCache rather then from ThreadDataVec
  • Loading branch information
dyunchik authored and eugenegff committed Oct 23, 2024
1 parent 99a76ae commit 12eef28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions OgreMain/src/OgreHlms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3660,13 +3660,8 @@ namespace Ogre
// Low level is a special case because it doesn't (yet?) support parallel compilation
if( !parallelQueue || mType == HLMS_LOW_LEVEL )
{
bool saveShadowCasterProp = getProperty( kNoTid, HlmsBaseProp::ShadowCaster );
if( saveShadowCasterProp != casterPass )
setProperty( kNoTid, HlmsBaseProp::ShadowCaster, casterPass );
lastReturnedValue = createShaderCacheEntry( hash[0], passCache, finalHash,
queuedRenderable, nullptr, kNoTid );
if( saveShadowCasterProp != casterPass )
setProperty( kNoTid, HlmsBaseProp::ShadowCaster, saveShadowCasterProp );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion OgreMain/src/OgreHlmsLowLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace Ogre
if( pass->hasFragmentProgram() )
pso.pixelShader = pass->getFragmentProgram();

bool casterPass = getProperty( tid, HlmsBaseProp::ShadowCaster ) != 0;
bool casterPass = getProperty( passCache.setProperties, HlmsBaseProp::ShadowCaster ) != 0;

const HlmsDatablock *datablock = queuedRenderable.renderable->getDatablock();
pso.macroblock = datablock->getMacroblock( casterPass );
Expand Down

0 comments on commit 12eef28

Please sign in to comment.