diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-08-24 13:09:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-24 10:09:07 -0700 |
| commit | 0b808453407f8feef8574cae99afd90771712185 (patch) | |
| tree | 01698f8a4354d836205731762619e5b4205d31e7 /tools/slang-test/slangc-tool.cpp | |
| parent | f5755019246504ad4da4614d1e34a00d74970ea7 (diff) | |
Use enums with backing types in Slang API (#2375)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Use enum types and specify backing rather than use typedefs so as to get enum type safety.
* Add version of TextureFlavor that uses internal types.
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/slang-test/slangc-tool.cpp')
| -rw-r--r-- | tools/slang-test/slangc-tool.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/slang-test/slangc-tool.cpp b/tools/slang-test/slangc-tool.cpp index e538cde09..a62ea6975 100644 --- a/tools/slang-test/slangc-tool.cpp +++ b/tools/slang-test/slangc-tool.cpp @@ -38,7 +38,8 @@ SlangResult SlangCTool::innerMain(StdWriters* stdWriters, slang::IGlobalSession* // Do any app specific configuration for (int i = 0; i < SLANG_WRITER_CHANNEL_COUNT_OF; ++i) { - compileRequest->setWriter(SlangWriterChannel(i), stdWriters->getWriter(i)); + const auto channel = SlangWriterChannel(i); + compileRequest->setWriter(channel, stdWriters->getWriter(channel)); } compileRequest->setDiagnosticCallback(&_diagnosticCallback, nullptr); |
