[llvm] [DirectX] Add support for implicit binding to DXILForwardHandleAccesses pass (PR #142061)
Helena Kotas via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 19:02:34 PDT 2025
================
@@ -1,9 +1,11 @@
; RUN: opt -S -dxil-forward-handle-accesses -mtriple=dxil--shadermodel6.3-library %s | FileCheck %s
%__cblayout_CB = type <{ float, i32, i32 }>
+%__cblayout_CB2 = type <{ float }>
%struct.Scalars = type { float, i32, i32 }
@CB.cb = local_unnamed_addr global target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 12, 0, 4, 8)) poison
+ at CB2.cb = local_unnamed_addr global target("dx.CBuffer", target("dx.Layout", %__cblayout_CB2, 4, 0)) poison
----------------
hekota wrote:
The list of numbers in "dx.Layout" target type encodes its size and layout - the first number is the size of the structure followed by a list of byte offsets of each field. Since`__cblayout_CB` struct has 3 fields, it has more numbers than `__cblayout_CB2` with just one field.
https://github.com/llvm/llvm-project/pull/142061
More information about the llvm-commits
mailing list