summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-10-09 15:07:26 -0700
committerGitHub <noreply@github.com>2023-10-09 15:07:26 -0700
commita83a8b697be057ac56e79aa6b314b032ff2da8b0 (patch)
treedef451c530b227b0438503411fc2424dfb9eba8f
parent67e186f0169591c48d24bd8ff7e4e4e715e8fa45 (diff)
Update prebuilt glslang binaries. (#3267)
* Update prebuilt glslang binaries. * Update spirv-disassembling logic in slang-glslang. --------- Co-authored-by: Yong He <yhe@nvidia.com>
-rw-r--r--deps/target-deps.json2
-rw-r--r--source/slang-glslang/slang-glslang.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/deps/target-deps.json b/deps/target-deps.json
index cf9267bf9..e1f5a5a34 100644
--- a/deps/target-deps.json
+++ b/deps/target-deps.json
@@ -16,7 +16,7 @@
},
{
"name" : "slang-glslang",
- "baseUrl" : "https://github.com/shader-slang/slang-glslang/releases/download/v13.0.0.x-e/slang-glslang-13.0.0.x-e-",
+ "baseUrl" : "https://github.com/shader-slang/slang-glslang/releases/download/v13.0.0.x-f/slang-glslang-13.0.0.x-f-",
"optional" : true,
"packages" :
{
diff --git a/source/slang-glslang/slang-glslang.cpp b/source/slang-glslang/slang-glslang.cpp
index fcaa9e70d..db9f7c0be 100644
--- a/source/slang-glslang/slang-glslang.cpp
+++ b/source/slang-glslang/slang-glslang.cpp
@@ -732,15 +732,15 @@ static int glslang_dissassembleSPIRV(const glslang_CompileRequest_1_2& request)
typedef unsigned int SPIRVWord;
SPIRVWord const* spirvBegin = (SPIRVWord const*)request.inputBegin;
- SPIRVWord const* spirvEnd = (SPIRVWord const*)request.inputEnd;
+ SPIRVWord const* spirvEnd = (SPIRVWord const*)request.inputEnd;
std::vector<SPIRVWord> spirv(spirvBegin, spirvEnd);
- std::stringstream spirvAsmStream;
- spv::Disassemble(spirvAsmStream, spirv);
- std::string result = spirvAsmStream.str();
- dump(result.c_str(), result.length(), request.outputFunc, request.outputUserData, stdout);
+ std::string result;
+ spvtools::SpirvTools spirvTools(SPV_ENV_UNIVERSAL_1_5);
+ spirvTools.Disassemble(spirv, &result, SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES | SPV_BINARY_TO_TEXT_OPTION_COMMENT);
+ dump(result.c_str(), result.length(), request.outputFunc, request.outputUserData, stdout);
return 0;
}