OS Manuals

/usr/bin/spirv-diff

API and commands for processing SPIR-V modules

From spirv-tools 1.4.363.0-r0 (os), captured 2026-11-05 by running spirv-diff --help (exit 0). permalink

/usr/bin/spirv-diff - Compare two SPIR-V files

Usage: /usr/bin/spirv-diff <src_filename> <dst_filename>

The SPIR-V binary is read from <src_filename> and <dst_filename>.  If either
file ends in .spvasm, the SPIR-V is read as text and disassembled.

The contents of the SPIR-V modules are analyzed and a diff is produced showing a
logical transformation from src to dst, in src's id-space.

  -h, --help      Print this help.
  --version       Display diff version information.

  --color         Force color output. The default when printing to a terminal.
                  If both --color and --no-color is present, --no-color prevails.
  --no-color      Don't print in color. The default when output goes to
                  something other than a terminal (e.g. a pipe, or a shell
                  redirection).
                  If both --color and --no-color is present, --no-color prevails.

  --no-indent     Don't indent instructions.

  --no-header     Don't output the header as leading comments.

  --with-id-map   Also output the mapping between src and dst outputs.

  --ignore-set-binding
                  Don't use set/binding decorations for variable matching.
  --ignore-location
                  Don't use location decorations for variable matching.
Options (9)
OptionDescriptionSource
-h, --helpPrint this help.help
--versionDisplay diff version information.help
--colorForce color output.help
--no-colorDon't print in color.help
--no-indentDon't indent instructions.help
--no-headerDon't output the header as leading comments.help
--with-id-mapAlso output the mapping between src and dst outputs.help
--ignore-set-bindingDon't use set/binding decorations for variable matching.help
--ignore-locationDon't use location decorations for variable matching.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.