summaryrefslogtreecommitdiffstats
path: root/thirdparty/glslang/SPIRV/SpvTools.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-10-15 12:04:10 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-10-15 12:29:42 +0200
commit148ad49c939f2413532ebecf92b60ce8dbc8cb8b (patch)
tree304312bd872998f9f65ed86d416440bb0c01f378 /thirdparty/glslang/SPIRV/SpvTools.h
parentb84f9b00681526afe39484129672e21917659084 (diff)
downloadredot-engine-148ad49c939f2413532ebecf92b60ce8dbc8cb8b.tar.gz
vulkan: Sync loader, headers and glslang to sdk-1.2.154.0
Actually sdk-1.2.154.1 for Vulkan-Loader. glslang is updated to bacaef3237c515e40d1a24722be48c0a0b30f75f which is the known-good version for Vulkan-ValidationLayers 1.2.154.0. COPYRIGHT.txt was synced with the current version of the glslang LICENSE.txt, and `glslang/register_types.cpp` now uses the upstream definition for its default builtin resource instead of hardcoding it.
Diffstat (limited to 'thirdparty/glslang/SPIRV/SpvTools.h')
-rw-r--r--thirdparty/glslang/SPIRV/SpvTools.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/thirdparty/glslang/SPIRV/SpvTools.h b/thirdparty/glslang/SPIRV/SpvTools.h
index 59c914da0b..7779dfa779 100644
--- a/thirdparty/glslang/SPIRV/SpvTools.h
+++ b/thirdparty/glslang/SPIRV/SpvTools.h
@@ -52,9 +52,10 @@
namespace glslang {
struct SpvOptions {
- SpvOptions() : generateDebugInfo(false), disableOptimizer(true),
+ SpvOptions() : generateDebugInfo(false), stripDebugInfo(false), disableOptimizer(true),
optimizeSize(false), disassemble(false), validate(false) { }
bool generateDebugInfo;
+ bool stripDebugInfo;
bool disableOptimizer;
bool optimizeSize;
bool disassemble;
@@ -70,10 +71,15 @@ void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& s
void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
spv::SpvBuildLogger*, bool prelegalization);
-// Apply the SPIRV-Tools optimizer to generated SPIR-V, for the purpose of
-// legalizing HLSL SPIR-V.
-void SpirvToolsLegalize(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
- spv::SpvBuildLogger*, const SpvOptions*);
+// Apply the SPIRV-Tools optimizer to generated SPIR-V. HLSL SPIR-V is legalized in the process.
+void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
+ spv::SpvBuildLogger*, const SpvOptions*);
+
+// Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by
+// SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
+// optimization is disabled.
+void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate,
+ std::vector<unsigned int>& spirv, spv::SpvBuildLogger*);
#endif