When compiling HLSL that uses a comma expression to initialize a local resource variable, DXC's SPIRV backend generates invalid SPIR-V:
fatal error: generated SPIR-V is invalid: Cannot load a runtime-sized array %13 = OpLoad %type_RWByteAddressBuffer %gBuf1
Repro:
RWByteAddressBuffer gBuf0 : register(u0);
RWByteAddressBuffer gBuf1 : register(u1);
[numthreads(1,1,1)] void main() {
RWByteAddressBuffer buf = (gBuf0, gBuf1);
buf.Store(0, 42);
}
Command:
dxc.exe -spirv -fspv-target-env=vulkan1.3 -T cs_6_0 -Fo out.spv repro.hlsl
DXC DXIL compiles and runs this correctly. DXC version: main (built from source).
When compiling HLSL that uses a comma expression to initialize a local resource variable, DXC's SPIRV backend generates invalid SPIR-V:
fatal error: generated SPIR-V is invalid: Cannot load a runtime-sized array %13 = OpLoad %type_RWByteAddressBuffer %gBuf1Repro:
Command:
dxc.exe -spirv -fspv-target-env=vulkan1.3 -T cs_6_0 -Fo out.spv repro.hlslDXC DXIL compiles and runs this correctly. DXC version: main (built from source).