[clang] [HLSL] support packoffset in clang codeGen (PR #91999)
Xiang Li via cfe-commits
cfe-commits at lists.llvm.org
Wed May 15 16:22:00 PDT 2024
python3kgae wrote:
> I'm a little concerned about the strategy here. LLVM generally doesn't explicitly capture padding it relies on the data layout rules to capture that.
>
> If this is the approach we're going with you can't put any vectors or matrices into the cbuffer structure type and we need to account for all the padding bytes explicitly.
Could you explain more about can't put any vectors or matrices into the cbuffer structure type?
The issue is packoffset might generate gap in the layout.
The datalayout cannot express the gap.
If we cannot implement it with padding, the other option will be metadata.
https://github.com/llvm/llvm-project/pull/91999
More information about the cfe-commits
mailing list