diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-08-21 08:47:18 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-21 05:47:18 +0000 |
| commit | 35f8e092f2aa3ed5e3cf03387e712f798ff4850e (patch) | |
| tree | bdafc75e4df90157568758ebf7b8128ecd066f0c /include | |
| parent | 05f0f5603561daed2c134e13bc64649362759968 (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 'include')
| -rw-r--r-- | include/slang-deprecated.h | 2 | ||||
| -rw-r--r-- | include/slang.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/slang-deprecated.h b/include/slang-deprecated.h index 32db65007..c81ae8537 100644 --- a/include/slang-deprecated.h +++ b/include/slang-deprecated.h @@ -1608,6 +1608,8 @@ struct ICompileRequest : public ISlangUnknown virtual SLANG_NO_THROW void SLANG_MCALL setTargetEmbedDownstreamIR(int targetIndex, bool value) = 0; + + virtual SLANG_NO_THROW void SLANG_MCALL setTargetForceCLayout(int targetIndex, bool value) = 0; }; #define SLANG_UUID_ICompileRequest ICompileRequest::getTypeGuid() diff --git a/include/slang.h b/include/slang.h index 02f6bdce6..3c2a31413 100644 --- a/include/slang.h +++ b/include/slang.h @@ -1053,6 +1053,8 @@ typedef uint32_t SlangSizeT; // Bitfield options UseMSVCStyleBitfieldPacking, // bool + ForceCLayout, // bool + CountOf, }; |
