tree: 39008c81ccac7dd72695a4622c5f4eff41d76e1e [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. generate_tests.py
  22. index_signedness_autogen.cpp
  23. index_signedness_dst.spvasm
  24. index_signedness_src.spvasm
  25. int_vs_uint_constants_autogen.cpp
  26. int_vs_uint_constants_dst.spvasm
  27. int_vs_uint_constants_src.spvasm
  28. large_functions_large_diffs_autogen.cpp
  29. large_functions_large_diffs_dst.spvasm
  30. large_functions_large_diffs_src.spvasm
  31. large_functions_small_diffs_autogen.cpp
  32. large_functions_small_diffs_dst.spvasm
  33. large_functions_small_diffs_src.spvasm
  34. multiple_different_entry_points_autogen.cpp
  35. multiple_different_entry_points_dst.spvasm
  36. multiple_different_entry_points_src.spvasm
  37. multiple_same_entry_points_autogen.cpp
  38. multiple_same_entry_points_dst.spvasm
  39. multiple_same_entry_points_src.spvasm
  40. OpExtInst_in_dst_only_autogen.cpp
  41. OpExtInst_in_dst_only_dst.spvasm
  42. OpExtInst_in_dst_only_src.spvasm
  43. OpExtInst_in_src_only_autogen.cpp
  44. OpExtInst_in_src_only_dst.spvasm
  45. OpExtInst_in_src_only_src.spvasm
  46. OpTypeForwardPointer_basic_autogen.cpp
  47. OpTypeForwardPointer_basic_dst.spvasm
  48. OpTypeForwardPointer_basic_src.spvasm
  49. OpTypeForwardPointer_intertwined_autogen.cpp
  50. OpTypeForwardPointer_intertwined_dst.spvasm
  51. OpTypeForwardPointer_intertwined_src.spvasm
  52. OpTypeForwardPointer_mismatching_class_autogen.cpp
  53. OpTypeForwardPointer_mismatching_class_dst.spvasm
  54. OpTypeForwardPointer_mismatching_class_src.spvasm
  55. OpTypeForwardPointer_mismatching_type_autogen.cpp
  56. OpTypeForwardPointer_mismatching_type_dst.spvasm
  57. OpTypeForwardPointer_mismatching_type_src.spvasm
  58. OpTypeForwardPointer_nested_autogen.cpp
  59. OpTypeForwardPointer_nested_dst.spvasm
  60. OpTypeForwardPointer_nested_src.spvasm
  61. OpTypeForwardPointer_onesided_debug_autogen.cpp
  62. OpTypeForwardPointer_onesided_debug_dst.spvasm
  63. OpTypeForwardPointer_onesided_debug_src.spvasm
  64. README.md
  65. reordered_if_blocks_autogen.cpp
  66. reordered_if_blocks_dst.spvasm
  67. reordered_if_blocks_src.spvasm
  68. reordered_switch_blocks_autogen.cpp
  69. reordered_switch_blocks_dst.spvasm
  70. reordered_switch_blocks_src.spvasm
  71. small_functions_small_diffs_autogen.cpp
  72. small_functions_small_diffs_dst.spvasm
  73. small_functions_small_diffs_src.spvasm
  74. spec_constant_array_size_autogen.cpp
  75. spec_constant_array_size_dst.spvasm
  76. spec_constant_array_size_src.spvasm
  77. spec_constant_composite_autogen.cpp
  78. spec_constant_composite_dst.spvasm
  79. spec_constant_composite_src.spvasm
  80. unrelated_shaders_autogen.cpp
  81. unrelated_shaders_dst.spvasm
  82. 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.