Issue 239858
Summary [HLSL] Assertion fails when using `this` in a member function of a struct with a resource
Labels HLSL
Assignees
Reporter hekota
    Assert fails when using `this` in a member function of a struct with a resource:

```
struct A {
  RWBuffer<int> Buf;

  int get(uint Index) {
    return this.Buf[Index];
  }
};

[[vk::binding(5)]]
A a1 : register(u5);

A a2; // will bind to register u0

[numthreads(8, 1, 1)]
void main(uint3 ID : SV_GroupThreadID) {
  a2.Buf[ID.x] = a1.get(ID.x) + a2.get(ID.x);
}
```
https://godbolt.org/z/bjWbGnssh

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

Reply via email to