Skip to content

[SPIR-V] Ray queries do not work with -fspv-debug=vulkan-with-source #7033

@ChristianReinbold

Description

@ChristianReinbold

Description
When using ray queries together with -fspv-debug=vulkan-with-source, DXC crashes.

Steps to Reproduce
Find a reproducer here: https://godbolt.org/z/oxYerbYPP

Compile

[shader("raygeneration")]
void main() {
    RayQuery<RAY_FLAG_NONE> q;
}

with options -T lib_6_4 -spirv -fspv-target-env=vulkan1.2 -enable-16bit-types -HV 2021 -fspv-debug=vulkan-with-source.

After digging a bit in sources, to me the easiest fix seems to ensure that the spirv ray query type is lowered to an opaque debug type. The attached one-line patch debug_rayquery.patch should do this.

Environment
Recent version on godbolt.org: libdxcompiler.so: 1.8(dev;1-d39324e0); libdxil.so: 1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashspirvWork related to SPIR-V

    Type

    No type

    Projects

    Status

    Triaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions