Skip to content

[Crash] Assertion failure assigning resource to static local resource #8580

Description

@bob80905
RWByteAddressBuffer gBuf0 : register(u0);

uint Pass_StaticLocal(uint idx) {
    static RWByteAddressBuffer buf = gBuf0;
    buf.Store(idx * 4, 1);

    return 1;
}

[numthreads(1,1,1)]
void main(uint3 tid : SV_DispatchThreadID) {
    Pass_StaticLocal(tid.x);
}

https://godbolt.org/z/dv4718TeW
There is an assertion failure of

Internal Compiler error: cast<X>() argument of incompatible type!

Compiler returned: 29

When compiling and codegen target is DXIL, but it does not trigger when the codegen target is SPIRV.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions