Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZHOU He <3.1416f@gmail.com>2021-06-29 18:33:58 +0300
committerGitHub <noreply@github.com>2021-06-29 18:33:58 +0300
commitf9893c4549406eb9643e0eb05a521ab70a320fff (patch)
treea3e2a21cdf10d55821ce8948030969696a19560b /tools
parent8442a181294b42d05e365bf3e4e1df13ed69cf99 (diff)
spirv-opt: A pass to removed unused input on OpEntryPoint instructions. (#4275)
The new pass will removed interface variable on the OpEntryPoint instruction when they are not statically referenced in the call tree of the entry point. It can be enabled on the command line using the options `remove-unused-interface-variables`.
Diffstat (limited to 'tools')
-rw-r--r--tools/opt/opt.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index b9339abe0..53bf31d6d 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -406,6 +406,12 @@ Options (in lexicographical order):)",
Removes duplicate types, decorations, capabilities and extension
instructions.)");
printf(R"(
+ --remove-unused-interface-variables
+ Removes variables referenced on the |OpEntryPoint| instruction
+ that are not referenced in the entry point function or any function
+ in its call tree. Note that this could cause the shader interface
+ to no longer match other shader stages.)");
+ printf(R"(
--replace-invalid-opcode
Replaces instructions whose opcode is valid for shader modules,
but not for the current shader stage. To have an effect, all