Always update current binding sets if binding layout has changed

This commit is contained in:
SRSaunders 2025-02-22 00:28:35 -05:00
parent 17d982e664
commit f7d2ae5b9b
2 changed files with 2 additions and 2 deletions

View file

@ -147,7 +147,7 @@ void fhImmediateMode::End()
for( int i = 0; i < layouts->Num(); i++ )
{
if( !tr.backend.currentBindingSets[i] || *tr.backend.currentBindingSets[i]->getDesc() != tr.backend.pendingBindingSetDescs[bindingLayoutType][i] )
if( !tr.backend.currentBindingSets[i] || *tr.backend.currentBindingSets[i]->getDesc() != tr.backend.pendingBindingSetDescs[bindingLayoutType][i] || bindingLayoutType != tr.backend.prevBindingLayoutType )
{
tr.backend.currentBindingSets[i] = tr.backend.bindingCache.GetOrCreateBindingSet( tr.backend.pendingBindingSetDescs[bindingLayoutType][i], ( *layouts )[i] );
}

View file

@ -448,7 +448,7 @@ void idRenderBackend::DrawElementsWithCounters( const drawSurf_t* surf, bool sha
for( int i = 0; i < layouts->Num(); i++ )
{
if( !currentBindingSets[i] || *currentBindingSets[i]->getDesc() != pendingBindingSetDescs[bindingLayoutType][i] )
if( !currentBindingSets[i] || *currentBindingSets[i]->getDesc() != pendingBindingSetDescs[bindingLayoutType][i] || bindingLayoutType != prevBindingLayoutType )
{
currentBindingSets[i] = bindingCache.GetOrCreateBindingSet( pendingBindingSetDescs[bindingLayoutType][i], ( *layouts )[i] );
changeState = true;