Scroll to navigation

SPIRV-REMAP(1) General Commands Manual SPIRV-REMAP(1)

NAME

spirv-remap - a utility to compress of SPIR-V binary files

SYNOPSIS

spirv-remap [OPTION]...

DESCRIPTION

spirv-remap is a utility to improve compression of SPIR-V binary files via entropy reduction, plus optional stripping of debug information and load/store optimization. It transforms SPIR-V to SPIR-V, remapping IDs. The resulting modules have an increased ID range (IDs are not as tightly packed around zero), but will compress better when multiple modules are compressed together, since compressor's dictionary can find better cross module commonality.

Remapping is accomplished via canonicalization. Thus, modules can be compressed one at a time with no loss of quality relative to operating on many modules at once. The command line tool operates on multiple modules only in the trivial repetition sense, for ease of use. The remapper API only accepts a single module at a time.

spirv-remap is currently in an alpha state. Although there are no known remapping defects, it has only been exercised on one real world game shader workload.

OPTIONS

-? --help
shows help
shows version
sets verbosity. With no verbosity, the command is silent.
files to process
output directory
strips all debug info
canonicalizes type IDs / named data / function bodies
removes dead types / functions
optimizes unneeded loads/stores
Synonym for --map all --dce all --opt all --strip all

RETURNS

0 on success

a positive integer error on failure.

EXAMPLES

Perform ID remapping on all shaders in "*.spv", writing new files with the same basenames to /tmp/out_dir.
Perform all possible size reductions

Note that

ALSO SEE

https://github.com/KhronosGroup/glslang

December 2017 User Commands