tree: e7bfac7d43dd7894a31c67bedda10561d9d3bce5 [path history] [tgz]
  1. .gitignore
  2. basic_autogen.cpp
  3. basic_dst.spvasm
  4. basic_src.spvasm
  5. constant_array_size_autogen.cpp
  6. constant_array_size_dst.spvasm
  7. constant_array_size_src.spvasm
  8. diff_test_files_autogen.cmake
  9. different_decorations_fragment_autogen.cpp
  10. different_decorations_fragment_dst.spvasm
  11. different_decorations_fragment_src.spvasm
  12. different_decorations_vertex_autogen.cpp
  13. different_decorations_vertex_dst.spvasm
  14. different_decorations_vertex_src.spvasm
  15. different_function_parameter_count_autogen.cpp
  16. different_function_parameter_count_dst.spvasm
  17. different_function_parameter_count_src.spvasm
  18. extra_if_block_autogen.cpp
  19. extra_if_block_dst.spvasm
  20. extra_if_block_src.spvasm
  21. function_group_by_full_type_autogen.cpp
  22. function_group_by_full_type_dst.spvasm
  23. function_group_by_full_type_src.spvasm
  24. function_group_by_mapped_id_autogen.cpp
  25. function_group_by_mapped_id_dst.spvasm
  26. function_group_by_mapped_id_src.spvasm
  27. generate_tests.py
  28. index_signedness_autogen.cpp
  29. index_signedness_dst.spvasm
  30. index_signedness_src.spvasm
  31. int_vs_uint_constants_autogen.cpp
  32. int_vs_uint_constants_dst.spvasm
  33. int_vs_uint_constants_src.spvasm
  34. large_functions_large_diffs_autogen.cpp
  35. large_functions_large_diffs_dst.spvasm
  36. large_functions_large_diffs_src.spvasm
  37. large_functions_small_diffs_autogen.cpp
  38. large_functions_small_diffs_dst.spvasm
  39. large_functions_small_diffs_src.spvasm
  40. multiple_different_entry_points_autogen.cpp
  41. multiple_different_entry_points_dst.spvasm
  42. multiple_different_entry_points_src.spvasm
  43. multiple_same_entry_points_autogen.cpp
  44. multiple_same_entry_points_dst.spvasm
  45. multiple_same_entry_points_src.spvasm
  46. OpExtInst_in_dst_only_autogen.cpp
  47. OpExtInst_in_dst_only_dst.spvasm
  48. OpExtInst_in_dst_only_src.spvasm
  49. OpExtInst_in_src_only_autogen.cpp
  50. OpExtInst_in_src_only_dst.spvasm
  51. OpExtInst_in_src_only_src.spvasm
  52. OpTypeForwardPointer_basic_autogen.cpp
  53. OpTypeForwardPointer_basic_dst.spvasm
  54. OpTypeForwardPointer_basic_src.spvasm
  55. OpTypeForwardPointer_intertwined_autogen.cpp
  56. OpTypeForwardPointer_intertwined_dst.spvasm
  57. OpTypeForwardPointer_intertwined_src.spvasm
  58. OpTypeForwardPointer_mismatching_class_autogen.cpp
  59. OpTypeForwardPointer_mismatching_class_dst.spvasm
  60. OpTypeForwardPointer_mismatching_class_src.spvasm
  61. OpTypeForwardPointer_mismatching_type_autogen.cpp
  62. OpTypeForwardPointer_mismatching_type_dst.spvasm
  63. OpTypeForwardPointer_mismatching_type_src.spvasm
  64. OpTypeForwardPointer_nested_autogen.cpp
  65. OpTypeForwardPointer_nested_dst.spvasm
  66. OpTypeForwardPointer_nested_src.spvasm
  67. OpTypeForwardPointer_onesided_debug_autogen.cpp
  68. OpTypeForwardPointer_onesided_debug_dst.spvasm
  69. OpTypeForwardPointer_onesided_debug_src.spvasm
  70. ray_query_types_autogen.cpp
  71. ray_query_types_dst.spvasm
  72. ray_query_types_src.spvasm
  73. README.md
  74. reordered_if_blocks_autogen.cpp
  75. reordered_if_blocks_dst.spvasm
  76. reordered_if_blocks_src.spvasm
  77. reordered_switch_blocks_autogen.cpp
  78. reordered_switch_blocks_dst.spvasm
  79. reordered_switch_blocks_src.spvasm
  80. small_functions_small_diffs_autogen.cpp
  81. small_functions_small_diffs_dst.spvasm
  82. small_functions_small_diffs_src.spvasm
  83. spec_constant_array_size_autogen.cpp
  84. spec_constant_array_size_dst.spvasm
  85. spec_constant_array_size_src.spvasm
  86. spec_constant_composite_autogen.cpp
  87. spec_constant_composite_dst.spvasm
  88. spec_constant_composite_src.spvasm
  89. spec_constant_op_autogen.cpp
  90. spec_constant_op_dst.spvasm
  91. spec_constant_op_src.spvasm
  92. spec_constant_specid_autogen.cpp
  93. spec_constant_specid_dst.spvasm
  94. spec_constant_specid_src.spvasm
  95. string_in_ext_inst_autogen.cpp
  96. string_in_ext_inst_dst.spvasm
  97. string_in_ext_inst_src.spvasm
  98. unrelated_shaders_autogen.cpp
  99. unrelated_shaders_dst.spvasm
  100. unrelated_shaders_src.spvasm
third_party/SPIRV-Tools/test/diff/diff_files/README.md

Diff tests

This directory contains files used to ensure correctness of the spirv-diff implementation. The generate_tests.py script takes name_src.spvasm and name_dst.spvasm (for each name) and produces unit test files in the form of name_autogen.cpp.

The unit test files test the diff between the src and dst inputs, as well as between debug-stripped versions of those. Additionally, based on the {variant}_TESTS lists defined in generate_tests.py, extra unit tests are added to exercise different options of spirv-diff.

New tests are added simply by placing a new name_src.spvasm and name_dst.spvasm pair in this directory and running generate_tests.py. Note that this script needs the path to the spirv-diff executable that is built.

The generate_tests.py script additionally expects name_src.spvasm to include a heading where the purpose of the test is explained. This heading is parsed as a block of lines starting with ;; at the top of the file.