Description
Hello,
DXC crashes when compiling a shader that uses inline SPIRV to expose OpGroupNonUniformBallotBitCount.
Specifically, the use of a static const uint for the Group Operation.
Steps to Reproduce
This simple shader will reproduce the issue:
static uint const ReduceOperation = 0;
[[vk::ext_instruction(/* OpGroupNonUniformBallotBitCount */ 342)]]
uint OpGroupNonUniformBallotBitCount(uint scope, [[vk::ext_literal]] uint groupOperation, uint4 ballot);
[numthreads(1, 1, 1)]
void CS()
{
OpGroupNonUniformBallotBitCount(vk::SubgroupScope, ReduceOperation, 0);
}
Issue does not occur when using either an enum or a macro for the ReduceOperation constant.
Godbolt link: https://godbolt.org/z/vcWzGeEG9
Command line: -T cs_6_6 -E CS -spirv -fspv-target-env=vulkan1.3
Actual Behavior
Using the DXC C++ API, I get this crash with no output log from DXC:
Exception thrown at 0x00007FFC468C6552 (dxcompiler.dll) in Samples.exe: 0xC0000005: Access violation writing location 0x0000000000000070.
Compiler explorer simply outputs:
Program terminated with signal: SIGSEGV
Environment
- DXC versions:
- libdxcompiler.so: 1.8(dev;1-af955d60)
- dxcompiler.dll: 1.7 - 1.7.2308.7 (69e54e2); dxil.dll: 1.7(101.7.2308.12)
- Host Operating System: Windows 10
Description
Hello,
DXC crashes when compiling a shader that uses inline SPIRV to expose
OpGroupNonUniformBallotBitCount.Specifically, the use of a
static const uintfor the Group Operation.Steps to Reproduce
This simple shader will reproduce the issue:
Issue does not occur when using either an enum or a macro for the ReduceOperation constant.
Godbolt link: https://godbolt.org/z/vcWzGeEG9
Command line:
-T cs_6_6 -E CS -spirv -fspv-target-env=vulkan1.3Actual Behavior
Using the DXC C++ API, I get this crash with no output log from DXC:
Compiler explorer simply outputs:
Environment