summaryrefslogtreecommitdiffstats
path: root/docs/command-line-slangc-reference.md
diff options
context:
space:
mode:
authorJulius Ikkala <julius.ikkala@gmail.com>2025-08-21 08:47:18 +0300
committerGitHub <noreply@github.com>2025-08-21 05:47:18 +0000
commit35f8e092f2aa3ed5e3cf03387e712f798ff4850e (patch)
treebdafc75e4df90157568758ebf7b8128ecd066f0c /docs/command-line-slangc-reference.md
parent05f0f5603561daed2c134e13bc64649362759968 (diff)
Introduce CDataLayout & -fvk-use-c-layout (#8136)
Closes #8112. ~~The issue asks for a "C layout", but in this PR I use the term "CPU layout" because this naming was pre-existing in the codebase as `kCPULayoutRulesImpl_`. The primary purpose of this layout is to match CPU-side struct definitions with the shader side. I'm open to better naming suggestions, though.~~ Edit: switched back to using `CDataLayout` & `-fvk-use-c-layout`, as the CPU target depends on the object layout rules of existing CPU layout rules, but they're incompatible with actual shaders. So a new `kCLayoutRulesImpl_` was needed anyway. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'docs/command-line-slangc-reference.md')
-rw-r--r--docs/command-line-slangc-reference.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/command-line-slangc-reference.md b/docs/command-line-slangc-reference.md
index cf858a54c..36947d7b4 100644
--- a/docs/command-line-slangc-reference.md
+++ b/docs/command-line-slangc-reference.md
@@ -474,6 +474,11 @@ Make data accessed through ConstantBuffer, ParameterBlock, StructuredBuffer, Byt
Pack members using FXCs member packing rules when targeting GLSL or SPIRV.
+<a id="fvk-use-c-layout"></a>
+### -fvk-use-c-layout
+Make data accessed through ConstantBuffer, ParameterBlock, StructuredBuffer, ByteAddressBuffer and general pointers follow the C/C++ structure layout rules when targeting SPIRV.
+
+
<a id="fvk-b-shift"></a>
### -fvk-b-shift, -fvk-s-shift, -fvk-t-shift, -fvk-u-shift