tree: 18d2cdeb4304e30add6572eee8724adbc2fd2dc3 [path history] [tgz]
  1. .gitignore
  2. basic_autogen.cpp
  3. basic_dst.spvasm
  4. basic_src.spvasm
  5. diff_test_files_autogen.cmake
  6. different_decorations_fragment_autogen.cpp
  7. different_decorations_fragment_dst.spvasm
  8. different_decorations_fragment_src.spvasm
  9. different_decorations_vertex_autogen.cpp
  10. different_decorations_vertex_dst.spvasm
  11. different_decorations_vertex_src.spvasm
  12. extra_if_block_autogen.cpp
  13. extra_if_block_dst.spvasm
  14. extra_if_block_src.spvasm
  15. generate_tests.py
  16. index_signedness_autogen.cpp
  17. index_signedness_dst.spvasm
  18. index_signedness_src.spvasm
  19. int_vs_uint_constants_autogen.cpp
  20. int_vs_uint_constants_dst.spvasm
  21. int_vs_uint_constants_src.spvasm
  22. large_functions_large_diffs_autogen.cpp
  23. large_functions_large_diffs_dst.spvasm
  24. large_functions_large_diffs_src.spvasm
  25. large_functions_small_diffs_autogen.cpp
  26. large_functions_small_diffs_dst.spvasm
  27. large_functions_small_diffs_src.spvasm
  28. multiple_different_entry_points_autogen.cpp
  29. multiple_different_entry_points_dst.spvasm
  30. multiple_different_entry_points_src.spvasm
  31. multiple_same_entry_points_autogen.cpp
  32. multiple_same_entry_points_dst.spvasm
  33. multiple_same_entry_points_src.spvasm
  34. OpExtInst_in_dst_only_autogen.cpp
  35. OpExtInst_in_dst_only_dst.spvasm
  36. OpExtInst_in_dst_only_src.spvasm
  37. OpExtInst_in_src_only_autogen.cpp
  38. OpExtInst_in_src_only_dst.spvasm
  39. OpExtInst_in_src_only_src.spvasm
  40. README.md
  41. reordered_if_blocks_autogen.cpp
  42. reordered_if_blocks_dst.spvasm
  43. reordered_if_blocks_src.spvasm
  44. reordered_switch_blocks_autogen.cpp
  45. reordered_switch_blocks_dst.spvasm
  46. reordered_switch_blocks_src.spvasm
  47. small_functions_small_diffs_autogen.cpp
  48. small_functions_small_diffs_dst.spvasm
  49. small_functions_small_diffs_src.spvasm
  50. unrelated_shaders_autogen.cpp
  51. unrelated_shaders_dst.spvasm
  52. 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.