diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-05-19 15:57:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-19 12:57:11 -0700 |
| commit | 61e9154cb797cffe19cfbf3205b4a5a614e8b552 (patch) | |
| tree | 94270d53c8189d25e6d11dee14860704759b7129 /source/slang/slang-check.cpp | |
| parent | d5e8044d0a9723bb0bbd7ae1738d1157265da783 (diff) | |
Glslang as DownstreamCompiler (#1846)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP Fxc as downstream compiler.
* First pass FXC downstream compiler working.
* GCC compile fix.
* Fix FXC parsing issue.
* Special case filesystem access.
* Use StringUtil getSlice.
* Fix isses with not emitting source for FXC.
* WIP on DXC.
* Small fixes for DXBC handling.
* Removed DXC from ParseDiagnosticUtil (can use generic)
Try to improve output for notes from DXC.
* FIrst pass of Glslang as DownstreamCompiler
* Fix some problems with parsing for glslang replacement.
* Add slang-glslang-compiler.cpp/.h
* Fix downstream for spir-v output.
* dissassemble -> disassemble
* Fix typo and improve some naming/comments.
* Remove getSharedLibrary from DownstreamCompiler
* Removed some no longer used diagnostics.
Diffstat (limited to 'source/slang/slang-check.cpp')
| -rw-r--r-- | source/slang/slang-check.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp index a5701aa90..55306a0da 100644 --- a/source/slang/slang-check.cpp +++ b/source/slang/slang-check.cpp @@ -62,18 +62,6 @@ namespace Slang } // anonymous - static FunctionInfo _getFunctionInfo(Session::SharedLibraryFuncType funcType) - { - typedef Session::SharedLibraryFuncType FuncType; - - switch (funcType) - { - case FuncType::Glslang_Compile_1_0: return { "glslang_compile", PassThroughMode::Glslang} ; - case FuncType::Glslang_Compile_1_1: return { "glslang_compile_1_1", PassThroughMode::Glslang} ; - case FuncType::Dxc_DxcCreateInstance: return { "DxcCreateInstance", PassThroughMode::Dxc }; - default: return { nullptr, PassThroughMode::None }; - } - } void Session::_setSharedLibraryLoader(ISlangSharedLibraryLoader* loader) { @@ -88,9 +76,6 @@ namespace Slang m_downstreamCompilers[i].setNull(); } - // Clear all of the functions - ::memset(m_sharedLibraryFunctions, 0, sizeof(m_sharedLibraryFunctions)); - // Set the loader m_sharedLibraryLoader = loader; } @@ -179,47 +164,6 @@ namespace Slang return compiler; } - SlangFuncPtr Session::getSharedLibraryFunc(SharedLibraryFuncType type, DiagnosticSink* sink) - { - if (m_sharedLibraryFunctions[int(type)]) - { - return m_sharedLibraryFunctions[int(type)]; - } - // do we have the library - FunctionInfo info = _getFunctionInfo(type); - if (info.name == nullptr) - { - return nullptr; - } - // Try loading the library - DownstreamCompiler* compiler = getOrLoadDownstreamCompiler(info.compilerType, sink); - if (!compiler) - { - return nullptr; - } - ISlangSharedLibrary* sharedLibrary = compiler->getSharedLibrary(); - if (!sharedLibrary) - { - return nullptr; - } - - // Okay now access the func - SlangFuncPtr func = sharedLibrary->findFuncByName(info.name); - if (!func) - { - if (sink) - { - UnownedStringSlice compilerName = TypeTextUtil::getPassThroughName(SlangPassThrough(info.compilerType)); - sink->diagnose(SourceLoc(), Diagnostics::failedToFindFunctionForCompiler, info.name, compilerName); - } - return nullptr; - } - - // Store in the function cache - m_sharedLibraryFunctions[int(type)] = func; - return func; - } - void checkTranslationUnit( TranslationUnitRequest* translationUnit) { |
