skia2/tests/sksl
John Stiles f2bd501ce3 Use references instead of pointers for Metal out params.
Pointers require decorating the variable with a * to read back the
value, which the code generator did not properly handle. There was a
special case to add the * but it only supported assignment into the
variable, not reading back. References require no special decoration.

This change fixes compile errors in Functions.sksl with the "bar"
function. (This test marks `x` as an inout but never actually mutates
it.) It also allows us to remove a special-case workaround for `frexp`,
an intrinsic function which uses a reference for its out-parameter.

Additionally, this CL adds a non-inlining copy of "OutParams.sksl" to
the Metal test directory, as most of our tests which use out-parameters
end up inlining all the code, which hides these sorts of bugs.

Change-Id: I31c4db04f6b512b4cd4fe65b3347b82bdbf039cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341000
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-12-04 20:22:55 +00:00
..
blend Fix SPIR-V and Metal support for enum types. 2020-11-30 18:05:48 +00:00
errors Disallow identifier names that overlap existing types. 2020-12-04 16:52:01 +00:00
fp Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
inliner Add global struct definitions to SkSL. 2020-11-30 15:26:14 +00:00
metal Use references instead of pointers for Metal out params. 2020-12-04 20:22:55 +00:00
shared Use references instead of pointers for Metal out params. 2020-12-04 20:22:55 +00:00
spirv Disallow global variables containing arrays of opaque types. 2020-12-01 20:04:14 +00:00
workarounds Avoid inlining functions that are called repeatedly. 2020-11-23 21:51:43 +00:00