50d0d097c3
Previously, when converting a program, the pipeline stage could assume that an input to main() of type half4/float4 was always the input color. This was a good assumption since the only possible inputs were coordinates, or the input color. This CL now recognizes that when a second float4 is passed to the main() function, it should be a SK_DEST_COLOR_BUILTIN. This will let blend functions pass in two colors. ProgramToSkVM now takes a dest-color argument as well, but existing call sites won't reference it (since they aren't for blend functions). I've just passed the input-color a second time, since the value will never actually be accessed. Change-Id: I4214586bda605c6d287aa25b1b099e6ef5ba15a4 Bug: skia:12080 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417261 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
29 lines
637 B
Plaintext
29 lines
637 B
Plaintext
10 registers, 26 instructions:
|
|
0 r0 = uniform32 ptr0 4
|
|
1 r1 = uniform32 ptr0 8
|
|
2 r2 = uniform32 ptr0 C
|
|
3 r3 = uniform32 ptr0 10
|
|
4 r4 = uniform32 ptr0 14
|
|
5 r5 = uniform32 ptr0 18
|
|
6 r6 = uniform32 ptr0 1C
|
|
7 r7 = uniform32 ptr0 20
|
|
8 r8 = splat 3F800000 (1)
|
|
9 r9 = sub_f32 r8 r3
|
|
10 r4 = sub_f32 r8 r4
|
|
11 r5 = sub_f32 r8 r5
|
|
12 r6 = sub_f32 r8 r6
|
|
13 r7 = sub_f32 r8 r7
|
|
14 r4 = mul_f32 r9 r4
|
|
15 r5 = mul_f32 r9 r5
|
|
16 r6 = mul_f32 r9 r6
|
|
17 r7 = mul_f32 r9 r7
|
|
18 r4 = add_f32 r0 r4
|
|
19 r5 = add_f32 r1 r5
|
|
20 r6 = add_f32 r2 r6
|
|
21 r7 = add_f32 r3 r7
|
|
loop:
|
|
22 store32 ptr1 r4
|
|
23 store32 ptr2 r5
|
|
24 store32 ptr3 r6
|
|
25 store32 ptr4 r7
|