skia2/resources/sksl
Brian Osman cbb60bd0b0 Add runtime color filter and shader modes to the SkSL compiler
These enforce stricter rules about the signature of main, and each one
uses a separate pre-include module. That prevents color filters from
being able to reference sk_FragCoord (or coords passed to main) at all.
It also limits the versions of sample() that are exposed.

In the new world, an effect created for a specific stage of the Skia
pipeline can only be used to create instances of that stage (SkShader or
SkColorFilter). For now, SkRuntimeEffect::Make uses kRuntimeEffect,
which continues to be more lenient and allow creation of either shaders
or color filters from a single effect. After we migrate all clients, we
can deprecate and then delete that mode.

Bug: skia:11813
Change-Id: I0afd79a72beeec84da42c86146e8fcd8d0e4c09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395716
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-15 13:30:59 +00:00
..
blend Change sksl tests to avoid SPIR-V validation errors 2021-03-16 13:39:53 +00:00
errors Fix assertion when performing type-coercion with enums. 2021-04-12 16:40:31 +00:00
folding Represent matrix resizes as a dedicated expression type. 2021-04-06 18:35:06 +00:00
fp Fork CPPCodeGenerator into a DSL-based version. 2021-04-13 22:01:09 +00:00
glsl Remove specific blend mode layout qualifiers 2021-02-23 15:45:55 +00:00
inliner Run SkSL inliner tests as part of dm. 2021-03-25 22:58:54 +00:00
intrinsics Mangle function names in GLSL. 2021-03-22 17:18:26 +00:00
metal Allow repeated params in Metal out-params helper. 2021-02-16 15:45:45 +00:00
runtime Add ivec GLSL type aliases to runtime effects 2021-04-12 16:55:41 +00:00
runtime_errors Add runtime color filter and shader modes to the SkSL compiler 2021-04-15 13:30:59 +00:00
shared Add unit test for for-loop with multiple variables. 2021-04-14 20:23:35 +00:00
spirv Revert "Fixed a number of spots where we should have been using RelaxedPrecision" 2021-03-12 18:48:57 +00:00
workarounds Add caps bit for RewriteMatrixVectorMultiply. 2021-03-23 22:40:02 +00:00
README.txt

This directory contains source files for testing skslc compilation.
The compiled output files are in the /tests/sksl/ directory.