Skip to content

Invalid DXIL IR for library shader is being generated #114088

Open
@coopp

Description

@coopp

A shader that is compiled as a library shade that references a RWBuffer and a Test( ) function is generating odd DXIL IR.

https://godbolt.org/z/cKbeM6438

RWBuffer<float4> my_buffer : register(u2, space4);

export float4 test()
{
    return my_buffer[0];
}

A function is generated with extra ( ).

define <4 x float> @test()() local_unnamed_addr #0 !dbg !51 {
.
.
.
}

Changing compilation to have a compute shader entrypoint and specifying cs_6_6 fixes this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HLSLHLSL Language SupportbugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions