Skip to content

[SPIR-V] generated SPIR-V is invalid with -fspv-debug=vulkan-with-source #7338

@webez

Description

@webez

Description
The following shader, when using -fspv-debug=vulkan-with-source

struct Data {
  uint value[1];
};

StructuredBuffer<Data> source : register(t0);
RWByteAddressBuffer dest : register(u0);

[numthreads(1, 1, 1)]
void cs_main() {
    const Data data = source[0];
    for (uint i = 0; i < 1; ++i) {
        dest.Store(0, data.value[i]);
    }
}

Steps to Reproduce
https://godbolt.org/z/4WGdYaoxT

Actual Behavior
fatal error: generated SPIR-V is invalid: ID '99[%99]' has not been defined
%98 = OpExtInst %void %1 DebugValue %55 %99 %72 %int_0

Environment

  • DXC version Trunk

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashspirvWork related to SPIR-V

Type

No type

Projects

Status

Done

Status

Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions