Skip to content

[SPIR-V] SPV_EXT_descriptor_heap Counter operation on directly-cast heap buffer hits wrong fatal error #8828

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triagespirvWork related to SPIR-V

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions