skia2/tests/sksl
John Stiles 9078a89b26 Avoid mix-up between MAIN_COORDS and FRAGCOORD.
When compiling test shaders, we were setting SK_FRAGCOORD_BUILTIN on the
`coords` parameter to main() instead of SK_MAIN_COORDS_BUILTIN. These
two built-ins don't have the same type (float2 vs. float4) and don't
mean quite the same thing.

The SPIR-V code generator saw a variable with the SK_FRAGCOORD_BUILTIN
builtin value and assumed the presence of a global variable named
`sk_FragCoord`, which didn't exist (because it was never referenced in
the code, so it was never cloned in from the sksl_frag module).

This is only a concern when compiling test shaders with skslc; real
shaders don't hit these code paths. The generated code here is still
imperfect; if you look closely, you'll see the GLSL and Metal code is
referencing the `coords` variable but it's never declared anywhere.

Change-Id: I3ad249469927ff35eb1e75d6536f95317502708f
Bug: skia:12340
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440520
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-18 20:11:19 +00:00
..
blend Remove SkBlendMode from SkSL 2021-06-16 21:01:30 +00:00
errors Add $es3 modifier to SkSL. 2021-08-13 14:07:40 +00:00
folding Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
glsl When force-high-precision is enabled, change default precision 2021-07-07 19:56:36 +00:00
inliner Remove enum support from SkSL 2021-07-09 14:03:15 +00:00
intrinsics Avoid mix-up between MAIN_COORDS and FRAGCOORD. 2021-08-18 20:11:19 +00:00
metal Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +00:00
runtime Add tests for array assignment with narrowing conversions. 2021-08-11 12:56:40 +00:00
runtime_errors Include non-ES2 numeric types in the root symbol table. 2021-08-17 17:36:43 +00:00
shared Honor component type in Metal matrix helper functions. 2021-08-16 14:34:15 +00:00
spirv Improve SPIR-V handling of RTFlip when running the fuzzer. 2021-08-17 22:31:10 +00:00
workarounds Reland "Don't key progams/pipelines on origin."" 2021-07-07 14:50:10 +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.