[PATCH] D132986: [DirectX backend] support legacy cbuffer load.
Xiang Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 18:10:02 PDT 2022
python3kgae created this revision.
python3kgae added reviewers: bogner, beanz, pow2clk, tex3d.
Herald added a subscriber: hiraditya.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
New dxil op CBufferLoadLegacy is added.
Add LegacyCBufferLayout class to calulate address for legacy cbuffer load.
Legacy cbuffer layout is 4 dwords align.
Array/Struct must start from a new 4 dwords.
Vector is align to the element size.
If vector/scalar cannot fit to current 4dwords, start a new 4 dwords.
It is OK to pack vector/scalar after last element of array or end of struct.
Not support dynamic indexing on vector now.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132986
Files:
llvm/lib/Target/DirectX/DXIL.td
llvm/lib/Target/DirectX/DXILCBufferLowering.cpp
llvm/lib/Target/DirectX/DXILOpBuilder.cpp
llvm/lib/Target/DirectX/DXILOpBuilder.h
llvm/test/CodeGen/DirectX/cbuf.ll
llvm/test/CodeGen/DirectX/legacy_cb_layout_0.ll
llvm/test/CodeGen/DirectX/legacy_cb_layout_1.ll
llvm/test/CodeGen/DirectX/legacy_cb_layout_2.ll
llvm/test/CodeGen/DirectX/legacy_cb_layout_3.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132986.456828.patch
Type: text/x-patch
Size: 76017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220831/d57dbe77/attachment.bin>
More information about the llvm-commits
mailing list