Issue 114088
Summary Invalid DXIL IR for library shader is being generated
Labels HLSL
Assignees
Reporter 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.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to