Skip to content

[SPIR-V] Failed to compile ray query shader with -fspv-debug=vulkan-with-source #7300

Closed

Description

@NoSW

Compile using the following cmd, it's OK:

dxc.exe test.hlsl -T cs_6_5 -E main -D SPIRV -O3 -spirv -fspv-target-env=vulkan1.2 -fspv-extension=KHR

Compile using the following cmd, it failed:

dxc.exe test.hlsl -T cs_6_5 -E main -D SPIRV -O3  -spirv -fspv-target-env=vulkan1.2  -fspv-extension=KHR  -fspv-debug=vulkan-with-source

and got

Internal compiler error: access violation. Attempted to read from address 0x0000000000000008

DXC Version: v1.8.2502
test.hlsl

#pragma pack_matrix(row_major)

RaytracingAccelerationStructure SceneBVH : register(t0);
RWTexture2D<uint> u_Output : register(u0);

[numthreads(8, 8, 1)]
void main(uint2 pixel : SV_DispatchThreadID)
{
    RayDesc ray;
    ray.Origin = float3(pixel.x, pixel.y, 0);
    ray.TMin = 0;
    ray.TMax = 1000;
    ray.Direction = float3(0, 1, 0);
    
    uint instanceMask = 0xFF;
    uint rayFlags = 0;
    
    RayQuery<RAY_FLAG_CULL_NON_OPAQUE | RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES> rayQuery;

    rayQuery.TraceRayInline(SceneBVH, rayFlags, instanceMask, ray);

    rayQuery.Proceed();


    if (rayQuery.CommittedStatus() == COMMITTED_TRIANGLE_HIT)
    {
        u_Output[pixel] = 1;
    }
    else
    {
        u_Output[pixel] = 0;
    }
}

Activity

  1. added
    bug
    needs-triage
    spirv
    on Apr 2, 2025
  2. changed the title [-][SPIR-V] Fialed to compile ray query shader with -fspv-debug=vulkan-with-source[/-] [+][SPIR-V] Failed to compile ray query shader with -fspv-debug=vulkan-with-source[/+] on Apr 2, 2025
  3. NoSW commented on Apr 2, 2025

    @NoSW
    Author

    duplicated with #7033

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-triagespirv

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions