skia2/resources/sksl/runtime
John Stiles cb40008b43 Implement switch in SkVM.
SkVM implements switches as a pseudo-loop; breaks are handled with the
condition mask just like a for loop. Fallthrough is handled via a
scratch Value in a temporary slot. `writeStore` neeeded to be refactored
to support writing into slot(s) without an associated Variable.

At IR generation time, SwitchStatements are now emitted without error
even in strict-ES2 mode. The GLSL code generator currently reports these
as an error in strict-ES2 mode, but this will be fixed in a followup
coming shortly (the switch will be rewritten as ifs inside a one-shot
loop, similar to our IR-rewrite strategy).

Change-Id: I5507257246c42a35d2f46b4b9a89492a5ffeff9b
Bug: skia:12450
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451421
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-09-23 19:58:55 +00:00
..
AllowNarrowingConversions.rts Add test for Runtime Effects and narrowing conversions. 2021-08-03 15:58:46 +00:00
ArrayIndexing.rts Remove flexible runtime effects entirely 2021-04-29 16:02:27 +00:00
ArrayNarrowingConversions.rts Add tests for array assignment with narrowing conversions. 2021-08-11 12:56:40 +00:00
Blend.rtb Add dest-color support to the Pipeline stage. 2021-06-09 22:09:21 +00:00
ConstPreservation.rts Remove usage of sqrt() as an optimization barrier in tests. 2021-05-24 17:18:54 +00:00
ConversionConstructors.rts Remove flexible runtime effects entirely 2021-04-29 16:02:27 +00:00
GlobalVariables.rts Remove flexible runtime effects entirely 2021-04-29 16:02:27 +00:00
GLSLTypeNames.rts Remove flexible runtime effects entirely 2021-04-29 16:02:27 +00:00
LargeProgram_BlocklessLoops.rts Add program-too-large test using for loops without blocks. 2021-09-15 14:19:00 +00:00
LargeProgram_FlatLoop.rts Enforce an upper bound on Runtime Effect program size. 2021-09-02 14:44:34 +00:00
LargeProgram_Functions.rts Enforce an upper bound on Runtime Effect program size. 2021-09-02 14:44:34 +00:00
LargeProgram_NestedLoops.rts Enforce an upper bound on Runtime Effect program size. 2021-09-02 14:44:34 +00:00
LargeProgram_SplitLoops.rts Enforce an upper bound on Runtime Effect program size. 2021-09-02 14:44:34 +00:00
LargeProgram_StackDepth.rts Reject programs which exceed 50 stack frames during size analysis. 2021-09-03 02:41:34 +00:00
LargeProgram_ZeroIterFor.rts Enforce an upper bound on Runtime Effect program size. 2021-09-02 14:44:34 +00:00
LoopFloat.rts Add GetConstantValue, fix const-variable ES2 loop bounds 2021-09-23 16:30:12 +00:00
LoopInt.rts Add GetConstantValue, fix const-variable ES2 loop bounds 2021-09-23 16:30:12 +00:00
PrecisionQualifiers.rts Enable comparison of arrays of different precision types. 2021-08-06 12:57:10 +00:00
SampleWithExplicitCoord.rts Convert internal SkSL to use .eval() 2021-09-03 15:54:54 +00:00
Switch.rts Reland "Add switch statement support to PipelineStage." 2021-09-21 13:07:50 +00:00
SwitchDefaultOnly.rts Implement switch in SkVM. 2021-09-23 19:58:55 +00:00
SwitchWithFallthrough.rts Implement switch in SkVM. 2021-09-23 19:58:55 +00:00
SwitchWithLoops.rts Implement switch in SkVM. 2021-09-23 19:58:55 +00:00
VectorIndexing.rts Remove flexible runtime effects entirely 2021-04-29 16:02:27 +00:00