aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2018-03-09 16:08:57 -0500
committerLei Zhang <antiagainst@google.com>2018-03-15 21:20:42 -0400
commit844e186cf7382df84684bf6afbf5b412641d8e47 (patch)
treed402cca48bb898a033c9796b5025b26302c07da0 /include
parent2e3aec23cac907c661bf6a0a612a653e3f76cea0 (diff)
downloadspirv-tools-844e186cf7382df84684bf6afbf5b412641d8e47.tar.gz
Add --strip-reflect pass
Strips reflection info. This is limited to decorations and decoration instructions related to the SPV_GOOGLE_hlsl_functionality1 extension. It will remove the OpExtension for SPV_GOOGLE_hlsl_functionality1. It will also remove the OpExtension for SPV_GOOGLE_decorate_string if there are no further remaining uses of OpDecorateStringGOOGLE. Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/1398
Diffstat (limited to 'include')
-rw-r--r--include/spirv-tools/optimizer.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/spirv-tools/optimizer.hpp b/include/spirv-tools/optimizer.hpp
index bedf436e..03eb1c29 100644
--- a/include/spirv-tools/optimizer.hpp
+++ b/include/spirv-tools/optimizer.hpp
@@ -133,6 +133,13 @@ Optimizer::PassToken CreateNullPass();
// Section 3.32.2 of the SPIR-V spec) of the SPIR-V module to be optimized.
Optimizer::PassToken CreateStripDebugInfoPass();
+// Creates a strip-reflect-info pass.
+// A strip-reflect-info pass removes all reflections instructions.
+// For now, this is limited to removing decorations defined in
+// SPV_GOOGLE_hlsl_functionality1. The coverage may expand in
+// the future.
+Optimizer::PassToken CreateStripReflectInfoPass();
+
// Creates an eliminate-dead-functions pass.
// An eliminate-dead-functions pass will remove all functions that are not in
// the call trees rooted at entry points and exported functions. These