MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / print_usage

Function print_usage

tools/diff/diff.cpp:38–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36#endif
37
38void print_usage(const char* argv0) {
39 printf(R"(%s - Compare two SPIR-V files
40
41Usage: %s <src_filename> <dst_filename>
42
43The SPIR-V binary is read from <src_filename> and <dst_filename>. If either
44file ends in .spvasm, the SPIR-V is read as text and disassembled.
45
46The contents of the SPIR-V modules are analyzed and a diff is produced showing a
47logical transformation from src to dst, in src's id-space.
48
49 -h, --help Print this help.
50 --version Display diff version information.
51
52 --color Force color output. The default when printing to a terminal.
53 If both --color and --no-color is present, --no-color prevails.
54 --no-color Don't print in color. The default when output goes to
55 something other than a terminal (e.g. a pipe, or a shell
56 redirection).
57 If both --color and --no-color is present, --no-color prevails.
58
59 --no-indent Don't indent instructions.
60
61 --no-header Don't output the header as leading comments.
62
63 --with-id-map Also output the mapping between src and dst outputs.
64
65 --ignore-set-binding
66 Don't use set/binding decorations for variable matching.
67 --ignore-location
68 Don't use location decorations for variable matching.
69)",
70 argv0, argv0);
71}
72
73bool is_assembly(const char* path) {
74 const char* suffix = strrchr(path, '.');

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected