Name Date Size

..25-Oct-20244 KiB

.gitignoreH A D25-Oct-2024169

basic_autogen.cppH A D25-Oct-202410.5 KiB

basic_dst.spvasmH A D25-Oct-20241.2 KiB

basic_src.spvasmH A D25-Oct-20241.3 KiB

constant_array_size_autogen.cppH A D25-Oct-20247.9 KiB

constant_array_size_dst.spvasmH A D25-Oct-20241.2 KiB

constant_array_size_src.spvasmH A D25-Oct-20241.3 KiB

diff_test_files_autogen.cmakeH A D25-Oct-20242.1 KiB

different_decorations_fragment_autogen.cppH A D25-Oct-202445.3 KiB

different_decorations_fragment_dst.spvasmH A D25-Oct-20245.5 KiB

different_decorations_fragment_src.spvasmH A D25-Oct-20245.5 KiB

different_decorations_vertex_autogen.cppH A D25-Oct-202435.4 KiB

different_decorations_vertex_dst.spvasmH A D25-Oct-20244.1 KiB

different_decorations_vertex_src.spvasmH A D25-Oct-20244.1 KiB

different_function_parameter_count_autogen.cppH A D25-Oct-20249.9 KiB

different_function_parameter_count_dst.spvasmH A D25-Oct-20241.7 KiB

different_function_parameter_count_src.spvasmH A D25-Oct-20241.6 KiB

extra_if_block_autogen.cppH A D25-Oct-202428.3 KiB

extra_if_block_dst.spvasmH A D25-Oct-20245 KiB

extra_if_block_src.spvasmH A D25-Oct-20245.1 KiB

generate_tests.pyH A D25-Oct-20249.7 KiB

index_signedness_autogen.cppH A D25-Oct-202424.1 KiB

index_signedness_dst.spvasmH A D25-Oct-20244 KiB

index_signedness_src.spvasmH A D25-Oct-20244.1 KiB

int_vs_uint_constants_autogen.cppH A D25-Oct-202410.3 KiB

int_vs_uint_constants_dst.spvasmH A D25-Oct-20241.2 KiB

int_vs_uint_constants_src.spvasmH A D25-Oct-20241.4 KiB

large_functions_large_diffs_autogen.cppH A D25-Oct-202447.5 KiB

large_functions_large_diffs_dst.spvasmH A D25-Oct-20247.5 KiB

large_functions_large_diffs_src.spvasmH A D25-Oct-20248.1 KiB

large_functions_small_diffs_autogen.cppH A D25-Oct-202443 KiB

large_functions_small_diffs_dst.spvasmH A D25-Oct-20248 KiB

large_functions_small_diffs_src.spvasmH A D25-Oct-20247.9 KiB

multiple_different_entry_points_autogen.cppH A D25-Oct-202410.4 KiB

multiple_different_entry_points_dst.spvasmH A D25-Oct-20241.7 KiB

multiple_different_entry_points_src.spvasmH A D25-Oct-20241.9 KiB

multiple_same_entry_points_autogen.cppH A D25-Oct-202410.2 KiB

multiple_same_entry_points_dst.spvasmH A D25-Oct-20241.4 KiB

multiple_same_entry_points_src.spvasmH A D25-Oct-20241.5 KiB

OpExtInst_in_dst_only_autogen.cppH A D25-Oct-20247.7 KiB

OpExtInst_in_dst_only_dst.spvasmH A D25-Oct-20241.2 KiB

OpExtInst_in_dst_only_src.spvasmH A D25-Oct-20241.3 KiB

OpExtInst_in_src_only_autogen.cppH A D25-Oct-20247.6 KiB

OpExtInst_in_src_only_dst.spvasmH A D25-Oct-20241.1 KiB

OpExtInst_in_src_only_src.spvasmH A D25-Oct-20241.4 KiB

OpTypeForwardPointer_basic_autogen.cppH A D25-Oct-20244.6 KiB

OpTypeForwardPointer_basic_dst.spvasmH A D25-Oct-2024697

OpTypeForwardPointer_basic_src.spvasmH A D25-Oct-2024595

OpTypeForwardPointer_intertwined_autogen.cppH A D25-Oct-20244.6 KiB

OpTypeForwardPointer_intertwined_dst.spvasmH A D25-Oct-2024553

OpTypeForwardPointer_intertwined_src.spvasmH A D25-Oct-2024635

OpTypeForwardPointer_mismatching_class_autogen.cppH A D25-Oct-20243.5 KiB

OpTypeForwardPointer_mismatching_class_dst.spvasmH A D25-Oct-2024345

OpTypeForwardPointer_mismatching_class_src.spvasmH A D25-Oct-2024452

OpTypeForwardPointer_mismatching_type_autogen.cppH A D25-Oct-20243.5 KiB

OpTypeForwardPointer_mismatching_type_dst.spvasmH A D25-Oct-2024322

OpTypeForwardPointer_mismatching_type_src.spvasmH A D25-Oct-2024439

OpTypeForwardPointer_nested_autogen.cppH A D25-Oct-20244 KiB

OpTypeForwardPointer_nested_dst.spvasmH A D25-Oct-2024439

OpTypeForwardPointer_nested_src.spvasmH A D25-Oct-2024583

OpTypeForwardPointer_onesided_debug_autogen.cppH A D25-Oct-20244.2 KiB

OpTypeForwardPointer_onesided_debug_dst.spvasmH A D25-Oct-2024499

OpTypeForwardPointer_onesided_debug_src.spvasmH A D25-Oct-2024632

ray_query_types_autogen.cppH A D25-Oct-20243.7 KiB

ray_query_types_dst.spvasmH A D25-Oct-2024400

ray_query_types_src.spvasmH A D25-Oct-2024425

README.mdH A D25-Oct-2024989

reordered_if_blocks_autogen.cppH A D25-Oct-202419 KiB

reordered_if_blocks_dst.spvasmH A D25-Oct-20243.3 KiB

reordered_if_blocks_src.spvasmH A D25-Oct-20243.3 KiB

reordered_switch_blocks_autogen.cppH A D25-Oct-202417.3 KiB

reordered_switch_blocks_dst.spvasmH A D25-Oct-20243 KiB

reordered_switch_blocks_src.spvasmH A D25-Oct-20243.1 KiB

small_functions_small_diffs_autogen.cppH A D25-Oct-202420.8 KiB

small_functions_small_diffs_dst.spvasmH A D25-Oct-20243 KiB

small_functions_small_diffs_src.spvasmH A D25-Oct-20243.1 KiB

spec_constant_array_size_autogen.cppH A D25-Oct-20248 KiB

spec_constant_array_size_dst.spvasmH A D25-Oct-20241.2 KiB

spec_constant_array_size_src.spvasmH A D25-Oct-20241.3 KiB

spec_constant_composite_autogen.cppH A D25-Oct-20245.9 KiB

spec_constant_composite_dst.spvasmH A D25-Oct-2024863

spec_constant_composite_src.spvasmH A D25-Oct-2024903

spec_constant_op_autogen.cppH A D25-Oct-20245.2 KiB

spec_constant_op_dst.spvasmH A D25-Oct-2024655

spec_constant_op_src.spvasmH A D25-Oct-2024701

spec_constant_specid_autogen.cppH A D25-Oct-20244.1 KiB

spec_constant_specid_dst.spvasmH A D25-Oct-2024467

spec_constant_specid_src.spvasmH A D25-Oct-2024549

unrelated_shaders_autogen.cppH A D25-Oct-20246.9 KiB

unrelated_shaders_dst.spvasmH A D25-Oct-20241.1 KiB

unrelated_shaders_src.spvasmH A D25-Oct-2024863

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