summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------external/slang-binaries0
-rw-r--r--premake5.lua11
-rw-r--r--source/slang-glslang/slang-glslang.cpp21
3 files changed, 25 insertions, 7 deletions
diff --git a/external/slang-binaries b/external/slang-binaries
-Subproject fccd120847fb2a8d74a5ad88132b89086bdb986
+Subproject 88c387c86ab847b7b0fec15098d406edc85a0fe
diff --git a/premake5.lua b/premake5.lua
index e78afa354..17313b825 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -1010,8 +1010,8 @@ standardProject "slang-spirv-tools"
addSourceDir("external/spirv-tools/source/val")
filter { "system:linux or macosx" }
- links { "dl", "pthread" }
- buildoptions{"-fPIC", "-pthread"}
+ links { "dl"}
+ buildoptions{"-fPIC"}
--
-- The single most complicated part of our build is our custom version of glslang.
@@ -1048,7 +1048,6 @@ standardProject "slang-glslang"
addSourceDir("external/glslang/glslang/GenericCodeGen")
addSourceDir("external/glslang/glslang/MachineIndependent")
addSourceDir("external/glslang/glslang/MachineIndependent/preprocessor")
- addSourceDir("external/glslang/glslang/OSDependent")
addSourceDir("external/glslang/OGLCompilersDLL")
addSourceDir("external/glslang/SPIRV")
addSourceDir("external/glslang/StandAlone")
@@ -1069,13 +1068,11 @@ standardProject "slang-glslang"
-- On Windows we need to add the platform-specific sources and then
-- remove the `main.cpp` file since it tries to define a `DllMain`
-- and we don't want the default glslang one.
- addSourceDir( "external/glslang/glslang/OSDependent/Windows" )
removefiles { "external/glslang/glslang/OSDependent/Windows/main.cpp" }
filter { "system:linux or macosx" }
- links { "dl", "pthread" }
- addSourceDir("external/glslang/glslang/OSDependent/Unix")
- buildoptions{"-fPIC", "-pthread"}
+ links { "dl" }
+ buildoptions{"-fPIC"}
diff --git a/source/slang-glslang/slang-glslang.cpp b/source/slang-glslang/slang-glslang.cpp
index 80087997c..03bc0a17d 100644
--- a/source/slang-glslang/slang-glslang.cpp
+++ b/source/slang-glslang/slang-glslang.cpp
@@ -588,3 +588,24 @@ int glslang_compile(glslang_CompileRequest_1_0* inRequest)
request.set(*inRequest);
return glslang_compile_1_1(&request);
}
+
+static std::mutex g_globalMutex;
+
+namespace glslang {
+
+void InitGlobalLock()
+{
+
+}
+
+void GetGlobalLock()
+{
+ g_globalMutex.lock();
+}
+
+void ReleaseGlobalLock()
+{
+ g_globalMutex.unlock();
+}
+
+} // namespace glslang