Open Ipotrick opened 2 years ago
Thanks for the report @ipotrick! Welcome to DXC!
Using an integer vector as the type for an enum is not allowed. We should produce an error here just as we do if you try to use float.
Just a note for @jaebaek and @sudonatalie that this issue is not limited to SPIRV.
@pow2clk Thank you for letting us know :)
Some added context here. This crashes for DXIL and SPIR-V.
Enum type specifier must be an integral basic type. It cannot be a vector, floating-point type, struct or array.
Hi, I am using the DXC c++ interface to compile hlsl to spirv. I found an internal compiler crash inside the "Compile" function of DxcCompiler3. I am using the msvc clang toolchain version 13.0.0 to compile. I downloaded the latest version of dxc from the repository (dbd8db0e84420e063f6f7da974a32d58aa79b64b). I can compile other code just fine and i also get error messages for other mistakes in my hlsl. Here are my used arguments: -Zpc -spirv -fspv-target-env=vulkan1.1 _o3 -E -T cs_6_0 -HV 2021. Minimal example that causes the compiler crash (reading illegal memory address, address varies from run to run):
I am new to dxc and hlsl and i dont even know if it is legal to use a uint3 as a "Supper" for an enum, but i am sure it should NOT crash when i give a missinput like that.