diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-02 22:28:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-02 22:28:02 -0800 |
| commit | 14764896c34b230a5563f48d8b8e565de2f3aa10 (patch) | |
| tree | 2f105d3f6222103f458054f1cd38e280b6fb52b4 /source/slang/slang-compiler.cpp | |
| parent | c15e7ade4e27e1649d5b98f5854e9e52bb9e60ae (diff) | |
Capability type checking. (#3530)
* Capability type checking.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-compiler.cpp')
| -rw-r--r-- | source/slang/slang-compiler.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index fbdb91ac7..f8ad95108 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -359,6 +359,26 @@ namespace Slang return lookUp(UnownedTerminatedStringSlice(name)); } + List<CapabilityName> Profile::getCapabilityName() + { + List<CapabilityName> result; + switch (getVersion()) + { + #define PROFILE_VERSION(TAG, NAME) case ProfileVersion::TAG: result.add(CapabilityName::TAG); break; + #include "slang-profile-defs.h" + default: + break; + } + switch (getStage()) + { +#define PROFILE_STAGE(TAG, NAME, VAL) case Stage::TAG: result.add(CapabilityName::NAME); break; +#include "slang-profile-defs.h" + default: + break; + } + return result; + } + char const* Profile::getName() { switch( raw ) @@ -711,7 +731,7 @@ namespace Slang // to clobber it with something to get a default. // // TODO: This is a huge hack... - profile.setVersion(ProfileVersion::DX_5_0); + profile.setVersion(ProfileVersion::DX_5_1); break; } @@ -755,9 +775,6 @@ namespace Slang { #define CASE(TAG, SUFFIX) case ProfileVersion::TAG: versionSuffix = #SUFFIX; break CASE(DX_4_0, _4_0); - CASE(DX_4_0_Level_9_0, _4_0_level_9_0); - CASE(DX_4_0_Level_9_1, _4_0_level_9_1); - CASE(DX_4_0_Level_9_3, _4_0_level_9_3); CASE(DX_4_1, _4_1); CASE(DX_5_0, _5_0); CASE(DX_5_1, _5_1); |
