[SPIR-V] Generated "OpConstantNull %type_2d_image" when using with RayQuery #3267
Closed
Description
Hi, I'm compling HLSL to spirv using dxc, got this error:
fatal error: generated SPIR-V is invalid: OpConstantNull Result Type <id> '7[%type_2d_image]' cannot have a null value.
%50 = OpConstantNull %type_2d_image
The command line to compile The Shader:
dxc.exe -Zpr -Od -T ps_6_5 -E main_00000000_00000000 -spirv -fvk-use-dx-position-w -fspv-reflect -fspv-target-env=vulkan1.2 test.hlsl
I used a struct which contains a texture, and declared the struct inside main function.
The error happens only when I also used RayQuery related stuff.
Activity