[clang] [HLSL] Define CBuffer field alignment for matrix types (PR #179836)

Ashley Coleman via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 6 13:50:29 PST 2026


================
@@ -0,0 +1,71 @@
+// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -fsyntax-only -verify -verify-ignore-unexpected=warning
+
+cbuffer MatArr0Pass {
+  float2x4 A0p[2] : packoffset(c0.x);
+  float    a0tail : packoffset(c4.x);
+}
+
+cbuffer MatArr0Fail {
----------------
V-FEXrt wrote:

Have you seen one of the best community tools out there? https://maraneshi.github.io/HLSL-ConstantBufferLayoutVisualizer/

https://github.com/llvm/llvm-project/pull/179836


More information about the cfe-commits mailing list