Name Date Size #Lines LOC

..--

.gitignoreH A D25-Apr-2025169 43

OpExtInst_in_dst_only_autogen.cppH A D25-Apr-20257.7 KiB243213

OpExtInst_in_dst_only_dst.spvasmH A D25-Apr-20251.2 KiB3432

OpExtInst_in_dst_only_src.spvasmH A D25-Apr-20251.3 KiB3432

OpExtInst_in_src_only_autogen.cppH A D25-Apr-20257.6 KiB241211

OpExtInst_in_src_only_dst.spvasmH A D25-Apr-20251.1 KiB3129

OpExtInst_in_src_only_src.spvasmH A D25-Apr-20251.4 KiB3735

OpTypeForwardPointer_basic_autogen.cppH A D25-Apr-20254.6 KiB137112

OpTypeForwardPointer_basic_dst.spvasmH A D25-Apr-2025697 1615

OpTypeForwardPointer_basic_src.spvasmH A D25-Apr-2025595 1413

OpTypeForwardPointer_intertwined_autogen.cppH A D25-Apr-20254.6 KiB139113

OpTypeForwardPointer_intertwined_dst.spvasmH A D25-Apr-2025553 1413

OpTypeForwardPointer_intertwined_src.spvasmH A D25-Apr-2025635 1615

OpTypeForwardPointer_mismatching_class_autogen.cppH A D25-Apr-20253.5 KiB11791

OpTypeForwardPointer_mismatching_class_dst.spvasmH A D25-Apr-2025345 109

OpTypeForwardPointer_mismatching_class_src.spvasmH A D25-Apr-2025452 1211

OpTypeForwardPointer_mismatching_type_autogen.cppH A D25-Apr-20253.5 KiB11287

OpTypeForwardPointer_mismatching_type_dst.spvasmH A D25-Apr-2025322 98

OpTypeForwardPointer_mismatching_type_src.spvasmH A D25-Apr-2025439 1110

OpTypeForwardPointer_nested_autogen.cppH A D25-Apr-20254 KiB128102

OpTypeForwardPointer_nested_dst.spvasmH A D25-Apr-2025439 1211

OpTypeForwardPointer_nested_src.spvasmH A D25-Apr-2025583 1413

OpTypeForwardPointer_onesided_debug_autogen.cppH A D25-Apr-20254.2 KiB12599

OpTypeForwardPointer_onesided_debug_dst.spvasmH A D25-Apr-2025499 1211

OpTypeForwardPointer_onesided_debug_src.spvasmH A D25-Apr-2025632 1514

README.mdH A D25-Apr-2025989 1813

basic_autogen.cppH A D25-Apr-202510.5 KiB408382

basic_dst.spvasmH A D25-Apr-20251.2 KiB5049

basic_src.spvasmH A D25-Apr-20251.3 KiB5150

constant_array_size_autogen.cppH A D25-Apr-20257.9 KiB307281

constant_array_size_dst.spvasmH A D25-Apr-20251.2 KiB4847

constant_array_size_src.spvasmH A D25-Apr-20251.3 KiB4948

diff_test_files_autogen.cmakeH A D25-Apr-20252.1 KiB4947

different_decorations_fragment_autogen.cppH A D25-Apr-202545.3 KiB1,6171,588

different_decorations_fragment_dst.spvasmH A D25-Apr-20255.5 KiB200199

different_decorations_fragment_src.spvasmH A D25-Apr-20255.5 KiB199197

different_decorations_vertex_autogen.cppH A D25-Apr-202535.4 KiB1,3161,287

different_decorations_vertex_dst.spvasmH A D25-Apr-20254.1 KiB160159

different_decorations_vertex_src.spvasmH A D25-Apr-20254.1 KiB156154

different_function_parameter_count_autogen.cppH A D25-Apr-20259.9 KiB338311

different_function_parameter_count_dst.spvasmH A D25-Apr-20251.7 KiB5351

different_function_parameter_count_src.spvasmH A D25-Apr-20251.6 KiB4746

extra_if_block_autogen.cppH A D25-Apr-202528.3 KiB868839

extra_if_block_dst.spvasmH A D25-Apr-20255 KiB137135

extra_if_block_src.spvasmH A D25-Apr-20255.1 KiB138136

generate_tests.pyH A D25-Apr-20259.7 KiB305213

index_signedness_autogen.cppH A D25-Apr-202524.1 KiB734706

index_signedness_dst.spvasmH A D25-Apr-20254 KiB111109

index_signedness_src.spvasmH A D25-Apr-20254.1 KiB112110

int_vs_uint_constants_autogen.cppH A D25-Apr-202510.3 KiB397369

int_vs_uint_constants_dst.spvasmH A D25-Apr-20251.2 KiB4746

int_vs_uint_constants_src.spvasmH A D25-Apr-20251.4 KiB5049

large_functions_large_diffs_autogen.cppH A D25-Apr-202547.5 KiB1,5351,507

large_functions_large_diffs_dst.spvasmH A D25-Apr-20257.5 KiB214212

large_functions_large_diffs_src.spvasmH A D25-Apr-20258.1 KiB231229

large_functions_small_diffs_autogen.cppH A D25-Apr-202543 KiB1,3651,337

large_functions_small_diffs_dst.spvasmH A D25-Apr-20258 KiB230228

large_functions_small_diffs_src.spvasmH A D25-Apr-20257.9 KiB227225

multiple_different_entry_points_autogen.cppH A D25-Apr-202510.4 KiB331289

multiple_different_entry_points_dst.spvasmH A D25-Apr-20251.7 KiB5045

multiple_different_entry_points_src.spvasmH A D25-Apr-20251.9 KiB5247

multiple_same_entry_points_autogen.cppH A D25-Apr-202510.2 KiB373335

multiple_same_entry_points_dst.spvasmH A D25-Apr-20251.4 KiB4642

multiple_same_entry_points_src.spvasmH A D25-Apr-20251.5 KiB4743

ray_query_types_autogen.cppH A D25-Apr-20253.7 KiB149123

ray_query_types_dst.spvasmH A D25-Apr-2025400 1918

ray_query_types_src.spvasmH A D25-Apr-2025425 1716

reordered_if_blocks_autogen.cppH A D25-Apr-202519 KiB567540

reordered_if_blocks_dst.spvasmH A D25-Apr-20253.3 KiB8886

reordered_if_blocks_src.spvasmH A D25-Apr-20253.3 KiB8887

reordered_switch_blocks_autogen.cppH A D25-Apr-202517.3 KiB581556

reordered_switch_blocks_dst.spvasmH A D25-Apr-20253 KiB9291

reordered_switch_blocks_src.spvasmH A D25-Apr-20253.1 KiB9392

small_functions_small_diffs_autogen.cppH A D25-Apr-202520.8 KiB748719

small_functions_small_diffs_dst.spvasmH A D25-Apr-20253 KiB9391

small_functions_small_diffs_src.spvasmH A D25-Apr-20253.1 KiB9492

spec_constant_array_size_autogen.cppH A D25-Apr-20258 KiB311285

spec_constant_array_size_dst.spvasmH A D25-Apr-20251.2 KiB4847

spec_constant_array_size_src.spvasmH A D25-Apr-20251.3 KiB4948

spec_constant_composite_autogen.cppH A D25-Apr-20255.9 KiB187162

spec_constant_composite_dst.spvasmH A D25-Apr-2025863 2322

spec_constant_composite_src.spvasmH A D25-Apr-2025903 2423

spec_constant_op_autogen.cppH A D25-Apr-20255.2 KiB163138

spec_constant_op_dst.spvasmH A D25-Apr-2025655 1817

spec_constant_op_src.spvasmH A D25-Apr-2025701 1818

spec_constant_specid_autogen.cppH A D25-Apr-20254.1 KiB142117

spec_constant_specid_dst.spvasmH A D25-Apr-2025467 1413

spec_constant_specid_src.spvasmH A D25-Apr-2025549 1615

unrelated_shaders_autogen.cppH A D25-Apr-20256.9 KiB231203

unrelated_shaders_dst.spvasmH A D25-Apr-20251.1 KiB3230

unrelated_shaders_src.spvasmH A D25-Apr-2025863 2624

README.md

1# Diff tests
2
3This directory contains files used to ensure correctness of the `spirv-diff` implementation.  The
4`generate_tests.py` script takes `name_src.spvasm` and `name_dst.spvasm` (for each `name`) and
5produces unit test files in the form of `name_autogen.cpp`.
6
7The unit test files test the diff between the src and dst inputs, as well as between debug-stripped
8versions of those.  Additionally, based on the `{variant}_TESTS` lists defined in
9`generate_tests.py`, extra unit tests are added to exercise different options of spirv-diff.
10
11New tests are added simply by placing a new `name_src.spvasm` and `name_dst.spvasm` pair in this
12directory and running `generate_tests.py`.  Note that this script needs the path to the spirv-diff
13executable that is built.
14
15The `generate_tests.py` script additionally expects `name_src.spvasm` to include a heading where the
16purpose of the test is explained.  This heading is parsed as a block of lines starting with `;;` at
17the top of the file.
18