skia2/tests/sksl
John Stiles 343258fa0c Fix fuzzer-discovered error with sk_SecondaryFragColor in SPIR-V.
sk_SecondaryFragColor corresponds to an ES2-only concept
(gl_SecondaryFragColorEXT) and does not have any SPIR-V equivalent.

Two fixes were needed:
- sk_SecondaryFragColor shouldn't be in SPIR-V code at all. Report it as
  an error when it appears.
- We don't stop compilation when this error is reported, so we need to
  fix up the assertion that the fuzzer initially discovered.
  Specifically, the fuzzer found that the `sk_SecondaryFragColor`
  variable never got a SPIR-V ID assigned to it in fVariableMap, so the
  compiler would assert when assembling an expression containing that
  variable. Now, we make sure to populate fVariableMap with an (unused)
  ID in `writeGlobalVar` to avoid this crash.

Change-Id: Ib86919dfc9a325b2b82a7f4b2054b747dad7c32f
Bug: oss-fuzz:44096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501976
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-01-31 16:21:45 +00:00
..
blend Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
errors Fix fuzzer-discovered error with sk_SecondaryFragColor in SPIR-V. 2022-01-31 16:21:45 +00:00
folding Implement constant folding for componentwise matrix-matrix ops. 2022-01-25 17:52:31 +00:00
glsl Report an error if sk_LastFragColor is referenced without fbFetchSupport 2021-09-15 15:41:49 +00:00
inliner Fix up test SkSLInlineWithInoutArgument. 2022-01-25 21:33:45 +00:00
intrinsics Update out-param semantics in SPIR-V. 2022-01-31 16:07:37 +00:00
metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
runtime Report an error if an out param is never written to. 2022-01-26 21:42:13 +00:00
runtime_errors Update comments in FirstClassArrays test. 2022-01-06 18:53:34 +00:00
shared Update out-param semantics in SPIR-V. 2022-01-31 16:07:37 +00:00
spirv Roll SPIRV-Headers and SPIRV-Tools 2021-11-19 19:22:54 +00:00
workarounds Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
README.txt Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00

This directory contains skslc-compiled output from matching source files
in the /resources/sksl/ directory.