diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2025-07-31 15:23:13 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-31 07:23:13 +0000 |
| commit | 66301ab9068c5705e5a2bcbf2eaadfb28e8bb084 (patch) | |
| tree | 3682e0224df6706bcf70f58e37873c1d078c785c /source/slang/slang-options.cpp | |
| parent | db59c22cfb774e984a207a074f13870b78ec0071 (diff) | |
msvc style bitfield packing (#7963)
Closes https://github.com/shader-slang/slang/issues/3646
New tests rather than just adding another TEST line to existing tests so
that we get the msvc- prefix in the output of slang-test
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 0ada33697..c3f2ad055 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -566,7 +566,12 @@ void initCommandOptions(CommandOptions& options) {OptionKind::EmitReflectionJSON, "-reflection-json", "-reflection-json <path>", - "Emit reflection data in JSON format to a file."}}; + "Emit reflection data in JSON format to a file."}, + {OptionKind::UseMSVCStyleBitfieldPacking, + "-msvc-style-bitfield-packing", + nullptr, + "Pack bitfields according to MSVC rules (msb first, new field when underlying type size " + "changes) rather than gcc-style (lsb first)"}}; _addOptions(makeConstArrayView(generalOpts), options); @@ -2264,6 +2269,7 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv) case OptionKind::LoopInversion: case OptionKind::UnscopedEnum: case OptionKind::PreserveParameters: + case OptionKind::UseMSVCStyleBitfieldPacking: linkage->m_optionSet.set(optionKind, true); break; case OptionKind::MatrixLayoutRow: |
