tree: 722e204437114d94464b837cef58cd16c32dbb77 [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. extra_if_block_autogen.cpp
  16. extra_if_block_dst.spvasm
  17. extra_if_block_src.spvasm
  18. generate_tests.py
  19. index_signedness_autogen.cpp
  20. index_signedness_dst.spvasm
  21. index_signedness_src.spvasm
  22. int_vs_uint_constants_autogen.cpp
  23. int_vs_uint_constants_dst.spvasm
  24. int_vs_uint_constants_src.spvasm
  25. large_functions_large_diffs_autogen.cpp
  26. large_functions_large_diffs_dst.spvasm
  27. large_functions_large_diffs_src.spvasm
  28. large_functions_small_diffs_autogen.cpp
  29. large_functions_small_diffs_dst.spvasm
  30. large_functions_small_diffs_src.spvasm
  31. multiple_different_entry_points_autogen.cpp
  32. multiple_different_entry_points_dst.spvasm
  33. multiple_different_entry_points_src.spvasm
  34. multiple_same_entry_points_autogen.cpp
  35. multiple_same_entry_points_dst.spvasm
  36. multiple_same_entry_points_src.spvasm
  37. OpExtInst_in_dst_only_autogen.cpp
  38. OpExtInst_in_dst_only_dst.spvasm
  39. OpExtInst_in_dst_only_src.spvasm
  40. OpExtInst_in_src_only_autogen.cpp
  41. OpExtInst_in_src_only_dst.spvasm
  42. OpExtInst_in_src_only_src.spvasm
  43. README.md
  44. reordered_if_blocks_autogen.cpp
  45. reordered_if_blocks_dst.spvasm
  46. reordered_if_blocks_src.spvasm
  47. reordered_switch_blocks_autogen.cpp
  48. reordered_switch_blocks_dst.spvasm
  49. reordered_switch_blocks_src.spvasm
  50. small_functions_small_diffs_autogen.cpp
  51. small_functions_small_diffs_dst.spvasm
  52. small_functions_small_diffs_src.spvasm
  53. spec_constant_array_size_autogen.cpp
  54. spec_constant_array_size_dst.spvasm
  55. spec_constant_array_size_src.spvasm
  56. spec_constant_composite_autogen.cpp
  57. spec_constant_composite_dst.spvasm
  58. spec_constant_composite_src.spvasm
  59. unrelated_shaders_autogen.cpp
  60. unrelated_shaders_dst.spvasm
  61. unrelated_shaders_src.spvasm
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.