diff options
| author | Yong He <yonghe@outlook.com> | 2025-05-29 08:05:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-29 08:05:57 -0700 |
| commit | faf042ecc3e688a1a3ffbe1ac44d18dd7ddf441a (patch) | |
| tree | b54abb2e65b7791d74335ead396cf762f805ab5c /source/slang/slang-compiler.cpp | |
| parent | 45d794f57d453a5564a7360400c5bfc04bf12b31 (diff) | |
Language version + tuple syntax. (#7230)
* Language version + tuple syntax.
* Fix compile error.
* regenerate documentation Table of Contents
* Fix.
* regenerate command line reference
* Fix.
* Fix.
* Fix more test failures.
* revert empty line change,
* Retrigger CI
* #version->#lang
* Update source/core/slang-type-text-util.cpp
Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
* Remove comments.
* Fix parsing logic.
* Fix parser.
* Fix parser.
* update test comment
* Update options.
* regenerate documentation Table of Contents
* regenerate command line reference
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-compiler.cpp')
| -rw-r--r-- | source/slang/slang-compiler.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index d6659e707..86dcf5d7f 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -1175,6 +1175,46 @@ SlangResult passthroughDownstreamDiagnostics( return SLANG_OK; } +bool isValidSlangLanguageVersion(SlangLanguageVersion version) +{ + switch (version) + { + case SLANG_LANGUAGE_VERSION_LEGACY: + case SLANG_LANGUAGE_VERSION_2025: + case SLANG_LANGUAGE_VERSION_2026: + return true; + default: + return false; + } +} + +bool isValidGLSLVersion(int version) +{ + switch (version) + { + case 100: + case 110: + case 120: + case 130: + case 140: + case 150: + case 300: + case 310: + case 320: + case 330: + case 400: + case 410: + case 420: + case 430: + case 440: + case 450: + case 460: + return true; + default: + return false; + } +} + SlangResult CodeGenContext::emitWithDownstreamForEntryPoints(ComPtr<IArtifact>& outArtifact) { outArtifact.setNull(); |
