skia2/resources/sksl
John Stiles f2b08cc9c8 Fix SPIR-V code generation of dead return statements.
If we encounter code like `return 1; return 2;` we need to synthesize a
label, even though the second return statement isn't actually reachable.
This is harmless and satisfies the SPIR-V validator.

Ideally we'd eliminate the dead code entirely, but this case is rare and
isn't likely to cause any problems as-is.

Change-Id: I2d6219dff6868011353e19a662301bec44a015d6
Bug: skia:12009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409402
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-17 20:23:40 +00:00
..
blend Change sksl tests to avoid SPIR-V validation errors 2021-03-16 13:39:53 +00:00
dslfp Add support for uint types in DSL C++ code generation. 2021-05-10 18:43:52 +00:00
errors Removed early_fragment_tests layout qualifier 2021-05-10 23:21:34 +00:00
folding Optimize not() intrinsic. 2021-05-11 14:08:39 +00:00
fp Remove sample-with-matrix from SkSL 2021-04-28 15:44:35 +00:00
glsl Remove specific blend mode layout qualifiers 2021-02-23 15:45:55 +00:00
inliner Loosen ES3 restrictions in Runtime Effects for debugging. 2021-04-28 19:59:36 +00:00
intrinsics Optimize remaining simple 1-argument intrinsics. 2021-05-11 16:44:09 +00:00
metal Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +00:00
runtime Optimize compound constructors containing constant vars. 2021-05-05 16:42:56 +00:00
runtime_errors Evaluate single-argument generic intrinsics at compile time. 2021-05-10 14:50:50 +00:00
shared Fix SPIR-V code generation of dead return statements. 2021-05-17 20:23:40 +00:00
spirv Enable proper testing of matrix-scalar ops. 2021-05-17 17:36:22 +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.