Commit Graph

1 Commits

Author SHA1 Message Date
David Neto 58a3624935 Add --dump-spirv option to tint_unittests
The --dump-spirv option tells tint_unittests to output the
SPIR-V assembly text for a module which did not make the SPIR-V reader
fail.  This lets us get extract a corpus of SPIR-V modules, and
lets us more easily verify that the test shaders are valid in the first
place.

Also:
- Add test/extract-spvasm.py to split that output to separate SPIR-V
  assembly files
- Add optional second argument test/test-all.sh to specify a directory
  look for input files.
- BUILD.gn:  Add dependency from //test:tint_unittests_main to
  //test:tint_unittests_config to pick up source dependency on
  the internal header of the SPIRV-Tools optimizer, needed by
  the indirection through src/reader/spirv/parser_impl_test_helper.h

This is useful for bulk testing

Fixed: tint:756
Change-Id: I4fe232ac736003f7d9be35544328302d652381ea
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49605
Auto-Submit: David Neto <dneto@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-05-05 09:46:31 +00:00