@@ -7750,28 +7750,25 @@ ShaderDebugTrace *Debugger::BeginDebug(uint32_t eventId, const DXBC::DXBCContain
7750
7750
globalVar.var .name = n;
7751
7751
globalVar.id = gv->ssaId ;
7752
7752
globalMemory.AllocateMemoryForType (gv->type , globalVar.id , true , globalVar.var );
7753
- if (gv->flags & GlobalFlags::IsConst )
7753
+ if (gv->initialiser )
7754
7754
{
7755
- if (gv->initialiser )
7755
+ const Constant *initialData = gv->initialiser ;
7756
+ if (!initialData->isNULL ())
7756
7757
{
7757
- const Constant *initialData = gv->initialiser ;
7758
- if (!initialData->isNULL ())
7758
+ RDCASSERT (ConvertDXILConstantToShaderVariable (initialData, globalVar.var ));
7759
+ // Write ShaderVariable data back to memory
7760
+ auto itAlloc = globalMemory.m_Allocations .find (globalVar.id );
7761
+ if (itAlloc != globalMemory.m_Allocations .end ())
7759
7762
{
7760
- RDCASSERT (ConvertDXILConstantToShaderVariable (initialData, globalVar.var ));
7761
- // Write ShaderVariable data back to memory
7762
- auto itAlloc = globalMemory.m_Allocations .find (globalVar.id );
7763
- if (itAlloc != globalMemory.m_Allocations .end ())
7764
- {
7765
- const MemoryTracking::Allocation &allocation = itAlloc->second ;
7766
- void *allocMemoryBackingPtr = allocation.backingMemory ;
7767
- uint64_t allocSize = allocation.size ;
7768
- state.UpdateBackingMemoryFromVariable (allocMemoryBackingPtr, allocSize, globalVar.var );
7769
- RDCASSERTEQUAL (allocSize, 0 );
7770
- }
7771
- else
7772
- {
7773
- RDCERR (" Unknown memory allocation for GlobalVariable Id %u" , globalVar.id );
7774
- }
7763
+ const MemoryTracking::Allocation &allocation = itAlloc->second ;
7764
+ void *allocMemoryBackingPtr = allocation.backingMemory ;
7765
+ uint64_t allocSize = allocation.size ;
7766
+ state.UpdateBackingMemoryFromVariable (allocMemoryBackingPtr, allocSize, globalVar.var );
7767
+ RDCASSERTEQUAL (allocSize, 0 );
7768
+ }
7769
+ else
7770
+ {
7771
+ RDCERR (" Unknown memory allocation for GlobalVariable Id %u" , globalVar.id );
7775
7772
}
7776
7773
}
7777
7774
}
0 commit comments