Skip to content

[SPIR-V] Generated "OpConstantNull %type_2d_image" when using with RayQuery #3267

Closed
@Evil-Ryu

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    spirvWork related to SPIR-V

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions