Description
isDescriptorHeapCounterUnsupported (SpirvEmitter.cpp) only recognizes heap-sourced objects via the alias map. A direct-cast form such as ((RWStructuredBuffer<uint>)ResourceDescriptorHeap[i]).IncrementCounter() has no alias-map entry, so the check returns false and the call falls through to an unrelated fatal "array of buffers in a struct" error instead of the intended unsupported-counter diagnostic.
Fix
Replace the alias-map check with spirvOptions.useDescriptorHeap && isHeapSourcedValue(object->IgnoreParenCasts()) so both direct accesses and recorded aliases receive the correct diagnostic.
References
Description
isDescriptorHeapCounterUnsupported(SpirvEmitter.cpp) only recognizes heap-sourced objects via the alias map. A direct-cast form such as((RWStructuredBuffer<uint>)ResourceDescriptorHeap[i]).IncrementCounter()has no alias-map entry, so the check returns false and the call falls through to an unrelated fatal "array of buffers in a struct" error instead of the intended unsupported-counter diagnostic.Fix
Replace the alias-map check with
spirvOptions.useDescriptorHeap && isHeapSourcedValue(object->IgnoreParenCasts())so both direct accesses and recorded aliases receive the correct diagnostic.References