.\" Initially generated by help2man 1.47.4. .TH SPIRV-REMAP "1" "December 2017" "User Commands" .SH NAME spirv-remap \- a utility to compress of SPIR-V binary files .SH SYNOPSIS .B spirv\-remap [\fI\,OPTION\/\fR]... .SH 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. .SH OPTIONS .TP \fB-?\fR \fB--help\fR shows help .TP \fB-V\fR \fB--version\fR shows version .TP \fB-v\fR \fB-vv\fR ... \fB--verbose\fR [int] sets verbosity. With no verbosity, the command is silent. .TP \fB-i\fR \fB--input\fR file1 [file2...] files to process .TP \fB-o\fR \fB--output\fR DESTDIR output directory .TP \fB-s\fR --strip-all \fB--strip\fR all strips all debug info .TP \fB--map\fR (all|types|names|funcs) canonicalizes type IDs / named data / function bodies .TP \fB--dce\fR (all|types|funcs) removes dead types / functions .TP \fB--opt\fR (all|loadstore) optimizes unneeded loads/stores .TP \fB--do-everything\fR Synonym for \fB--map all --dce all --opt all --strip all\fR .SH RETURNS 0 on success a positive integer error on failure. .SH EXAMPLES .TP spirv-remap -v --map all --input *.spv --output /tmp/out_dir Perform ID remapping on all shaders in "*.spv", writing new files with the same basenames to /tmp/out_dir. .TP spirv-remap-linux-64 -v --do-everything --input *.spv --output /tmp/out_dir Perform all possible size reductions Note that .SH ALSO SEE https://github.com/KhronosGroup/glslang