mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-21 19:20:07 +00:00
opt: Add TrimCapabilities pass to spirv-opt tool (#5545)
Add an option to the spirv-opt tool to run the TrimCapabilitiesPass.
This commit is contained in:
parent
b951948eaa
commit
0a6f0d1893
@ -623,6 +623,8 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag,
|
||||
pass_args.c_str());
|
||||
return false;
|
||||
}
|
||||
} else if (pass_name == "trim-capabilities") {
|
||||
RegisterPass(CreateTrimCapabilitiesPass());
|
||||
} else {
|
||||
Errorf(consumer(), nullptr, {},
|
||||
"Unknown flag '--%s'. Use --help for a list of valid flags",
|
||||
|
@ -525,6 +525,10 @@ Options (in lexicographical order):)",
|
||||
USR/SYS time are returned by getrusage() and can have a small
|
||||
error.)");
|
||||
printf(R"(
|
||||
--trim-capabilities
|
||||
Remove unnecessary capabilities and extensions declared within the
|
||||
module.)");
|
||||
printf(R"(
|
||||
--upgrade-memory-model
|
||||
Upgrades the Logical GLSL450 memory model to Logical VulkanKHR.
|
||||
Transforms memory, image, atomic and barrier operations to conform
|
||||
|
Loading…
Reference in New Issue
Block a user