Issue 124178
Summary [HLSL] Update layout struct code to ignore interfaces
Labels HLSL
Assignees
Reporter hekota
    Once interfaces are added to Clang, the code that creates layout structs for constant buffer needs to be updated to ignore them. Currently the code assumes there can only be one base struct/class.

The following code should fail on an `assert` after interfaces are added:

```
interface A {
 void AAA();
};

struct B {
    float a;
};

struct Foo : A, B {
 float b;
    void AAA(){}
    RWBuffer<float> Buf;
};

cbuffer CB1 {
 Foo foo;
}

RWBuffer<float> Buf;

[numthreads(4,1,1)]
void main() {
 Buf[0] = foo.a + foo.b;
}
```
https://godbolt.org/z/831jTjzax
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to