skia2/tests/sksl/runtime
Mike Klein aebcf73404 always init function fReturnValue
It's not sound to pass undefined (skvm::NA) values into select(),
but this is working today because the F32a argument is 'fixing' it.

The first time through this snippet updating fReturn value,

    int i = 0;
    for (skvm::Val& slot : currentFunction().fReturnValue) {
        slot = select(returnsHere, f32(val[i]), f32(slot)).id;
        i++;
    }

the call to f32(slot) creates an F32{builder, NA}.  We pass that to
select() and that argument's F32a(F32) constructor, resulting in
F32a{builder, NA, 0.0f}.  Then when we need that as an F32, we resolve
it as splat(0.0f) because the F32a's id field is NA.

In short, best to remove F32a. :)

Added some SkASSERTs that would have caught this.

Change-Id: I67324cf20ad39ca555e69b9c407f379d14046043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353838
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-14 17:22:04 +00:00
..
golden always init function fReturnValue 2021-01-14 17:22:04 +00:00
ConversionConstructors.rte Add SkVM support for conversion constructors to and from boolean. 2021-01-06 15:23:09 +00:00
LoopFloat.rte Add unit tests for for-loop unrolling 2021-01-14 14:38:16 +00:00
LoopInt.rte Add unit tests for for-loop unrolling 2021-01-14 14:38:16 +00:00
SampleWithConstantMatrix.rte Add .rte -> .skvm unit test framework 2020-12-22 17:59:42 +00:00
SampleWithExplicitCoord.rte Add .rte -> .skvm unit test framework 2020-12-22 17:59:42 +00:00
SampleWithUniformMatrix.rte Add .rte -> .skvm unit test framework 2020-12-22 17:59:42 +00:00
SampleWithVariableMatrix.rte Add .rte -> .skvm unit test framework 2020-12-22 17:59:42 +00:00