diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-05-03 20:16:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-03 20:16:58 -0400 |
| commit | c9ef8d58a135061262fd321a82061d27dc733cf5 (patch) | |
| tree | 888bee92d8519fe80ec9d5dbb95c2dc8da985865 /source/compiler-core | |
| parent | bf2b05528d6edbbf1beb87552f447d29f92eee47 (diff) | |
HLSL->Vulkan binding support (#2865)
* WIP around VK shift binding.
* Refactor around options parsing.
* Remove needless passing around of sink.
* Some more tidying around OptionsParser.
* Handle vulkan shift parsing.
* Fix small issue around vk binding and "all".
* Fixing some small issues. Missing break.
* Split out VulkanLayoutOptions
* WIP binding taking into account HLSL->Vulkan options.
* First attempt at making binding work with HLSLVulkanOptions.
* VulkanLayoutOptions -> HLSLToVulkanLayoutOptions
* WIP with HLSL-Vulkan binding.
* Some more testing around vk-shift.
* Improvements around global binding.
More tests.
* Improve test coverage.
Improve checking for requirements around default space.
* Update command line options.
* Small fixes.
* Small fix in options reporting.
* Fix warning issue.
* Some fixes for isDefault for HLSLToVulkanLayoutOptions.
* Update hlsl-to-vulkan-shift output. The difference was due to default handling if shift isn't specified, and not being specified was not correctly tracked.
Diffstat (limited to 'source/compiler-core')
| -rw-r--r-- | source/compiler-core/slang-command-line-args.h | 16 | ||||
| -rw-r--r-- | source/compiler-core/slang-diagnostic-sink.h | 2 |
2 files changed, 8 insertions, 10 deletions
diff --git a/source/compiler-core/slang-command-line-args.h b/source/compiler-core/slang-command-line-args.h index 31807cd48..b2bd48c61 100644 --- a/source/compiler-core/slang-command-line-args.h +++ b/source/compiler-core/slang-command-line-args.h @@ -109,17 +109,15 @@ struct CommandLineReader /// Set the current index void setIndex(Index index) { SLANG_ASSERT(index >= 0 && index <= m_args->getArgCount()); m_index = index; } + void init(CommandLineArgs* args, DiagnosticSink* sink) { m_args = args; m_sink = sink; m_index = 0; } + /// Set up reader with args - CommandLineReader(CommandLineArgs* args, DiagnosticSink* sink): - m_args(args), - m_index(0), - m_sink(sink) - { - } + CommandLineReader(CommandLineArgs* args, DiagnosticSink* sink) { init(args, sink); } + CommandLineReader() = default; - DiagnosticSink* m_sink; - CommandLineArgs* m_args; - Index m_index; + DiagnosticSink* m_sink = nullptr; + CommandLineArgs* m_args = nullptr; + Index m_index = 0; }; struct DownstreamArgs diff --git a/source/compiler-core/slang-diagnostic-sink.h b/source/compiler-core/slang-diagnostic-sink.h index 5131e5194..ebd43b456 100644 --- a/source/compiler-core/slang-diagnostic-sink.h +++ b/source/compiler-core/slang-diagnostic-sink.h @@ -255,7 +255,7 @@ public: /// Default Ctor DiagnosticSink(): m_sourceManager(nullptr), - m_sourceLocationLexer (nullptr) + m_sourceLocationLexer(nullptr) { } |
