diff options
author | ZHOU He <3.1416f@gmail.com> | 2021-06-29 18:33:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 18:33:58 +0300 |
commit | f9893c4549406eb9643e0eb05a521ab70a320fff (patch) | |
tree | a3e2a21cdf10d55821ce8948030969696a19560b /tools | |
parent | 8442a181294b42d05e365bf3e4e1df13ed69cf99 (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.cpp | 6 |
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 |