summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-glslang-compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler-core/slang-glslang-compiler.cpp')
-rw-r--r--source/compiler-core/slang-glslang-compiler.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/source/compiler-core/slang-glslang-compiler.cpp b/source/compiler-core/slang-glslang-compiler.cpp
index e754cbdbc..e893ef0ea 100644
--- a/source/compiler-core/slang-glslang-compiler.cpp
+++ b/source/compiler-core/slang-glslang-compiler.cpp
@@ -256,20 +256,13 @@ SlangResult GlslangDownstreamCompiler::disassemble(SlangCompileTarget sourceBlob
// On unix systems we need to ensure pthread is loaded first.
// TODO(JS):
// There is an argument that this should be performed through the loader....
+ // NOTE! We don't currently load through a dependent library, as it is *assumed* something as core as 'ptheads'
+ // isn't going to be distributed with the shader compiler.
ComPtr<ISlangSharedLibrary> pthreadLibrary;
DefaultSharedLibraryLoader::load(loader, path, "pthread", pthreadLibrary.writeRef());
#endif
- // If the user supplies a path to their preferred version of FXC,
- // we just use this.
- if (path.getLength() != 0)
- {
- SLANG_RETURN_ON_FAIL(loader->loadSharedLibrary(path.getBuffer(), library.writeRef()));
- }
- else
- {
- SLANG_RETURN_ON_FAIL(loader->loadSharedLibrary("slang-glslang", library.writeRef()));
- }
+ SLANG_RETURN_ON_FAIL(DownstreamCompilerUtil::loadSharedLibrary(path, loader, nullptr, "slang-glslang", library));
SLANG_ASSERT(library);
if (!library)