Performs output validation with spirv-val for SPIR-V (as before), HLSL
validation with DXC, and MSL validation with the Metal Shader Compiler.
Disable HLSL tests that fail to validate
Bug: tint:812
Change-Id: If78c351b4e23c7fb50d333eacf9ee7cc81d18564
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51280
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Change-Id: I7807cb372e5b278397a37fe3e685a6a919b278e4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51380
Commit-Queue: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Makes future development easier.
New features:
* A more compact and cleaner results view
* Concurrent testing, much quicker across multiple cores
* Supports comparing output against an expected file, including a text diff of differences. Also has a flag for updating the expected outputs
* Advanced file-globbing support, including scanning for files in subdirectories
* Skip lists are now no longer hidden away in the tool, but defined as a SKIP header in the *.expected.* file
Change-Id: I4fac80bb084a720ec9a307b4acf9f73792973a1d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50903
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
If a directory is specified, then check shader source files there.
Otherwise, use shader source files in the same directory as the test
script.
Enhance error checking and messages.
Change-Id: I6ea40e2a44128ba3ce103faaad5326b89bbf4ed7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49841
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
It's the second argument
This moves the subdirectory argument to the third position.
Change-Id: I91f7a8171f6de51e697a04c1407a1992b5c1c0db
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49642
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
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>
Perform a program clone at the end of parsing to remove any unreachable AST nodes.
Actually fixing the parser to never create these looks like a huge amount of work.
Fixed: tint:749
Change-Id: Ib956634257e0933c9702d6be22f79942f7cf4c51
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49520
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Update test-all.sh to grep for and test spvasm files.
Bug: tint:740
Change-Id: Ic43faeda35b0b1fd98e42dac2f8a515f118c5ce7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48690
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Checks that all the .wgsl test files actually compile with tint
Change-Id: Iea31f0f58fe0580fca55b07cf3b3ffc24cebcf9d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44870
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>