Skip to content

[DirectX] Unable to use global resource handles with -O0 #140819

Open
@Icohedron

Description

@Icohedron

With -O0, global resource handles can not be used due to error error: Load of "" is not a global resource handle.

// RUN: clang-dxc -E CSMain -T cs_6_7 -O0 %s
RWBuffer<uint> output : register(u0);
[numthreads(1,1,1)]
void CSMain() { 
    output[0] = 0;
}

Reproduction: https://godbolt.org/z/6vP5xxYsE

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions