diff options
| author | Yong He <yonghe@outlook.com> | 2023-10-09 14:03:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-09 14:03:43 -0700 |
| commit | 67e186f0169591c48d24bd8ff7e4e4e715e8fa45 (patch) | |
| tree | 9b46dc35145d18d5b25d9b3b16759c9b7343615c /source/compiler-core/slang-downstream-compiler-util.cpp | |
| parent | 17c7163c2ae8fc290e70b43d8700b68ef18b1ee1 (diff) | |
Run curated spirv-opt passes through slang-glslang. (#3266)
* Run curated spirv-opt passes through slang-glslang.
* Cleanup.
* Replace spirv-dis downstream compiler with glslang.
* delete slang-spirv-opt.cpp.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/compiler-core/slang-downstream-compiler-util.cpp')
| -rw-r--r-- | source/compiler-core/slang-downstream-compiler-util.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/compiler-core/slang-downstream-compiler-util.cpp b/source/compiler-core/slang-downstream-compiler-util.cpp index 44d750be8..52bf03acc 100644 --- a/source/compiler-core/slang-downstream-compiler-util.cpp +++ b/source/compiler-core/slang-downstream-compiler-util.cpp @@ -23,7 +23,6 @@ #include "slang-dxc-compiler.h" #include "slang-glslang-compiler.h" #include "slang-llvm-compiler.h" -#include "slang-spirv-dis-compiler.h" namespace Slang { @@ -55,6 +54,7 @@ struct DownstreamCompilerInfos infos.infos[int(SLANG_PASS_THROUGH_DXC)] = Info(SourceLanguageFlag::HLSL); infos.infos[int(SLANG_PASS_THROUGH_FXC)] = Info(SourceLanguageFlag::HLSL); infos.infos[int(SLANG_PASS_THROUGH_GLSLANG)] = Info(SourceLanguageFlag::GLSL); + infos.infos[int(SLANG_PASS_THROUGH_SPIRV_OPT)] = Info(SourceLanguageFlag::SPIRV); return infos; } @@ -327,8 +327,9 @@ DownstreamCompilerMatchVersion DownstreamCompilerUtil::getCompiledVersion() outFuncs[int(SLANG_PASS_THROUGH_DXC)] = &DXCDownstreamCompilerUtil::locateCompilers; outFuncs[int(SLANG_PASS_THROUGH_FXC)] = &FXCDownstreamCompilerUtil::locateCompilers; outFuncs[int(SLANG_PASS_THROUGH_GLSLANG)] = &GlslangDownstreamCompilerUtil::locateCompilers; + outFuncs[int(SLANG_PASS_THROUGH_SPIRV_OPT)] = &SpirvOptDownstreamCompilerUtil::locateCompilers; outFuncs[int(SLANG_PASS_THROUGH_LLVM)] = &LLVMDownstreamCompilerUtil::locateCompilers; - outFuncs[int(SLANG_PASS_THROUGH_SPIRV_DIS)] = &SPIRVDisDownstreamCompilerUtil::locateCompilers; + outFuncs[int(SLANG_PASS_THROUGH_SPIRV_DIS)] = &SpirvDisDownstreamCompilerUtil::locateCompilers; } static String _getParentPath(const String& path) |
