Issue 132309
Summary [HLSL] Constant buffer codegen crashes when `cbuffer` contains a class
Labels bug, HLSL
Assignees
Reporter hekota
    ```
class Foo {
  float x;
};

cbuffer cb {
    Foo foo;
}
RWBuffer<float> Buf : register(u0);

[numthreads(4,1,1)]
void main() {
      Buf[0] = foo.x;
}
```
https://godbolt.org/z/K87MTMzq5

The codegen crashes in `clang::CodeGen::HLSLBufferLayoutBuilder::layoutField` because the layout code is not handling classes, only structs.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to