skia2/resources/sksl
John Stiles ec24154521 Fix SPIR-V bug with swizzled out parameters.
The CL at http://review.skia.org/366399 introduced a bug with
LValue::getPointer. Specifically, getPointer used to return zero when
no pointer is available. (This happens when the LValue is a swizzle.)
That CL changed the error code to -1. However, it did not fix up all
the call sites that checked the return value of getPointer().

This CL fixes up those call sites to use -1 consistently, and adds
TODOs in spots which do not check the result from getPointer() at all
(instead assuming it cannot fail). This will allow swizzled out-
parameters to work in SPIR-V as they did before. (Except in intrinsics,
where they seem to have been broken all along, but those are now marked
with a TODO at least.)

Note that we still do not fully emulate GLSL semantics for out
parameters, as out-parameters should only be copied back to the original
variable at the end of the function call to be fully GLSL compliant.

(This CL also replaces a tuple with a named struct for readability.)

Change-Id: I708dc7a69296a4244ba9ceb85c3e68d1f331bbc9
Bug: skia:11052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368618
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-12 15:21:27 +00:00
..
blend
errors Added detection for non-constant-folded divide by zero errors in 2021-02-06 03:13:16 +00:00
folding Fix alpha channel in SelfAssignment test. 2021-02-11 14:41:15 +00:00
fp Add bool2/bool3/bool4 to GrSLType. 2021-02-02 00:25:29 +00:00
glsl
inliner
intrinsics Revert "Add intrinsic tests for mod() and fract()." 2021-01-30 13:38:31 +00:00
metal Add default uniform binding value for Metal/SPIR-V. 2021-01-28 19:23:49 +00:00
runtime
runtime_errors Reject array-typed vardecls and array ctors in strict ES2 mode. 2021-02-04 19:36:50 +00:00
shared Fix SPIR-V bug with swizzled out parameters. 2021-02-12 15:21:27 +00:00
spirv Improve memory layout handling in SPIRV generator 2021-01-22 22:16:48 +00:00
workarounds
README.txt

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