Commit Graph

7 Commits

Author SHA1 Message Date
John Stiles
c7c49f5656 Mark symbols starting with gl_ as reserved words.
Change-Id: I01d82447658c7acc5fe9eb230eb7020b49fa6c4f
Bug: skia:12498
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466447
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-11-01 22:43:44 +00:00
John Stiles
409bb0195f Fix up the last of the ES2 conformance tests.
Four of the tests relied on approximate floating values to pass.
One of the tests is legitimately not passing in SkSL yet (we don't
reject keywords beginning with gl_, and it breaks existing code if we
do).

Change-Id: I2d5b3896787689dad16bd7b2805c0aa6a4c45603
Bug: skia:12498, skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459879
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-10-15 19:32:48 +00:00
John Stiles
ee36412765 Add ES2 conformance test harness to dm.
This CL adds a few more exceptions to our ES2 test import, and adds the
dm code which actually runs the tests.

Change-Id: If6691dd35931f4f10262d3a1eff020c2c347ca59
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459124
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-10-14 14:50:06 +00:00
John Stiles
fedb3957a9 Add exception list for GLSL tests which fail under SkSL.
SkSL intentionally differs from GLSL in some edge case behaviors.
For instance, we intentionally disallow functions that can exit without
returning a value, and reject constructors that shrink the size of a
vector (swizzles can do this in a more intentional way). In these cases,
we update the test's expected outcome from "pass" to "fail."

Change-Id: I671d6eb7d9ae06caa2895c3310356a399b36b2bf
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458596
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-10-12 21:01:26 +00:00
John Stiles
9c0b844173 Output Runtime Effect files from import_conformance_tests.
Previously the results were dumped to stdout.

Change-Id: I20a634744f287f97e660912549f429ebea479162
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454636
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-09-30 16:56:42 +00:00
John Stiles
9b428d1d3f Convert ES2 conformance tests to usable SkSL.
This generates usable code, but emits it all to stdout. The next step
should be automation of testing.

The output from the script:
http://go/diid/1kg7HB-DxUQ5qsKkq5LsI4nnSkmDcLd7G/view

Change-Id: I638f33dcccaf9b36b79b77ae04cb65950042dc01
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453947
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-09-29 17:36:47 +00:00
John Stiles
31a94580b7 Implement parser for ES2 conformance '.test' files.
This parser can decode all of the .test files that we are interested in.
(It struggles with linkage.test, but we will not be using that one
anyway.)

Input files can be found here:
https://github.com/KhronosGroup/VK-GL-CTS/tree/master/data/gles2/shaders

Change-Id: I254033ea2af219581c676daa30238c42f6de926b
Bug: skia:12484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453757
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-09-29 16:48:14 +00:00