xref: /aosp_15_r20/external/skia/tests/sksl/shared/MatrixIndexStore.skrp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1176 instructions
2
3[immutable slots]
4i0 = 0x3F800000 (1.0)
5i1 = 0x40000000 (2.0)
6i2 = 0x40400000 (3.0)
7i3 = 0x3F800000 (1.0)
8i4 = 0x40000000 (2.0)
9i5 = 0x40400000 (3.0)
10i6 = 0x40800000 (4.0)
11
12store_device_xy01              $35..38 = DeviceCoords.xy01
13cmpeq_imm_float                $35 = equal($35, 0x3F000000 (0.5))
14cmpeq_imm_float                $36 = equal($36, 0x3F000000 (0.5))
15bitwise_and_int                $35 &= $36
16store_src_rg                   coords = src.rg
17init_lane_masks                CondMask = LoopMask = RetMask = true
18copy_4_uniforms                colorGreen = colorGreen
19trace_var                      TraceVar(colorGreen) when $35 is true
20copy_4_uniforms                colorRed = colorRed
21trace_var                      TraceVar(colorRed) when $35 is true
22copy_4_uniforms                testMatrix3x3(0..3) = testMatrix3x3(0..3)
23copy_4_uniforms                testMatrix3x3(4..7) = testMatrix3x3(4..7)
24copy_uniform                   testMatrix3x3(8) = testMatrix3x3(8)
25trace_var                      TraceVar(testMatrix3x3) when $35 is true
26copy_4_uniforms                testMatrix4x4(0..3) = testMatrix4x4(0..3)
27copy_4_uniforms                testMatrix4x4(4..7) = testMatrix4x4(4..7)
28copy_4_uniforms                testMatrix4x4(8..11) = testMatrix4x4(8..11)
29copy_4_uniforms                testMatrix4x4(12..15) = testMatrix4x4(12..15)
30trace_var                      TraceVar(testMatrix4x4) when $35 is true
31trace_enter                    TraceEnter(half4 main(float2 coords)) when $35 is true
32trace_var                      TraceVar(coords) when $35 is true
33copy_constant                  $0 = 0
34copy_slot_unmasked             $1 = $35
35copy_slot_masked               $0 = Mask($1)
36trace_scope                    TraceScope(+1) when $0 is true
37trace_line                     TraceLine(28) when $35 is true
38store_condition_mask           $39 = CondMask
39branch_if_no_lanes_active      branch_if_no_lanes_active +68 (label 2 at #96)
40trace_enter                    TraceEnter(bool test3x3()) when $35 is true
41copy_constant                  $40 = 0
42copy_slot_unmasked             $41 = $35
43copy_slot_masked               $40 = Mask($41)
44trace_scope                    TraceScope(+1) when $40 is true
45trace_line                     TraceLine(8) when $35 is true
46splat_4_constants              matrix(0..3) = 0
47splat_4_constants              matrix(4..7) = 0
48copy_constant                  matrix(8) = 0
49trace_var                      TraceVar(matrix) when $35 is true
50trace_line                     TraceLine(9) when $35 is true
51copy_3_immutables_unmasked     values = i0..2 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)]
52trace_var                      TraceVar(values) when $35 is true
53copy_constant                  $41 = 0
54copy_slot_unmasked             $42 = $35
55copy_slot_masked               $41 = Mask($42)
56trace_scope                    TraceScope(+1) when $41 is true
57branch_if_no_lanes_active      branch_if_no_lanes_active +31 (label 3 at #77)
58trace_line                     TraceLine(10) when $35 is true
59copy_constant                  index = 0
60trace_var                      TraceVar(index) when $35 is true
61label                          label 0x00000004
62copy_constant                  $42 = 0
63copy_slot_unmasked             $43 = $35
64copy_slot_masked               $42 = Mask($43)
65trace_scope                    TraceScope(+1) when $42 is true
66trace_line                     TraceLine(11) when $35 is true
67copy_slot_unmasked             $59 = index
68mul_imm_int                    $59 *= 0x00000003
69copy_3_slots_unmasked          $43..45 = values
70copy_to_indirect_masked        Indirect(matrix(0..2) + $59) = Mask($43..45)
71trace_var                      TraceVar(matrix(0..2) + $59) when $35 is true
72trace_line                     TraceLine(12) when $35 is true
73copy_3_slots_unmasked          $43..45 = values
74splat_3_constants              $46..48 = 0x40400000 (3.0)
75add_3_floats                   $43..45 += $46..48
76copy_3_slots_masked            values = Mask($43..45)
77trace_var                      TraceVar(values) when $35 is true
78trace_scope                    TraceScope(-1) when $42 is true
79trace_line                     TraceLine(10) when $35 is true
80copy_slot_unmasked             $42 = index
81add_imm_int                    $42 += 0x00000001
82copy_slot_masked               index = Mask($42)
83trace_var                      TraceVar(index) when $35 is true
84copy_slot_unmasked             $42 = index
85cmplt_imm_int                  $42 = lessThan($42, 0x00000003)
86stack_rewind
87branch_if_no_active_lanes_eq   branch -26 (label 4 at #50) if no lanes of $42 == 0
88label                          label 0x00000003
89trace_scope                    TraceScope(-1) when $41 is true
90trace_line                     TraceLine(14) when $35 is true
91copy_4_slots_unmasked          $41..44 = matrix(0..3)
92copy_4_slots_unmasked          $45..48 = matrix(4..7)
93copy_slot_unmasked             $49 = matrix(8)
94copy_4_uniforms                $50..53 = testMatrix3x3(0..3)
95copy_4_uniforms                $54..57 = testMatrix3x3(4..7)
96copy_uniform                   $58 = testMatrix3x3(8)
97cmpeq_n_floats                 $41..49 = equal($41..49, $50..58)
98bitwise_and_4_ints             $42..45 &= $46..49
99bitwise_and_2_ints             $42..43 &= $44..45
100bitwise_and_int                $42 &= $43
101bitwise_and_int                $41 &= $42
102copy_slot_masked               [test3x3].result = Mask($41)
103trace_var                      TraceVar([test3x3].result) when $35 is true
104trace_scope                    TraceScope(-1) when $40 is true
105trace_exit                     TraceExit(bool test3x3()) when $35 is true
106copy_slot_unmasked             $40 = [test3x3].result
107label                          label 0x00000002
108copy_constant                  $1 = 0
109merge_condition_mask           CondMask = $39 & $40
110branch_if_no_lanes_active      branch_if_no_lanes_active +74 (label 1 at #173)
111trace_enter                    TraceEnter(bool test4x4()) when $35 is true
112copy_constant                  $2 = 0
113copy_slot_unmasked             $3 = $35
114copy_slot_masked               $2 = Mask($3)
115trace_scope                    TraceScope(+1) when $2 is true
116trace_line                     TraceLine(18) when $35 is true
117splat_4_constants              matrix₁(0..3) = 0
118splat_4_constants              matrix₁(4..7) = 0
119splat_4_constants              matrix₁(8..11) = 0
120splat_4_constants              matrix₁(12..15) = 0
121trace_var                      TraceVar(matrix₁) when $35 is true
122trace_line                     TraceLine(19) when $35 is true
123copy_4_immutables_unmasked     values₁ = i3..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)]
124trace_var                      TraceVar(values₁) when $35 is true
125copy_constant                  $3 = 0
126copy_slot_unmasked             $4 = $35
127copy_slot_masked               $3 = Mask($4)
128trace_scope                    TraceScope(+1) when $3 is true
129branch_if_no_lanes_active      branch_if_no_lanes_active +31 (label 6 at #149)
130trace_line                     TraceLine(20) when $35 is true
131copy_constant                  index₁ = 0
132trace_var                      TraceVar(index₁) when $35 is true
133label                          label 0x00000007
134copy_constant                  $4 = 0
135copy_slot_unmasked             $5 = $35
136copy_slot_masked               $4 = Mask($5)
137trace_scope                    TraceScope(+1) when $4 is true
138trace_line                     TraceLine(21) when $35 is true
139copy_slot_unmasked             $59 = index₁
140mul_imm_int                    $59 *= 0x00000004
141copy_4_slots_unmasked          $5..8 = values₁
142copy_to_indirect_masked        Indirect(matrix₁(0..3) + $59) = Mask($5..8)
143trace_var                      TraceVar(matrix₁(0..3) + $59) when $35 is true
144trace_line                     TraceLine(22) when $35 is true
145copy_4_slots_unmasked          $5..8 = values₁
146splat_4_constants              $9..12 = 0x40800000 (4.0)
147add_4_floats                   $5..8 += $9..12
148copy_4_slots_masked            values₁ = Mask($5..8)
149trace_var                      TraceVar(values₁) when $35 is true
150trace_scope                    TraceScope(-1) when $4 is true
151trace_line                     TraceLine(20) when $35 is true
152copy_slot_unmasked             $4 = index₁
153add_imm_int                    $4 += 0x00000001
154copy_slot_masked               index₁ = Mask($4)
155trace_var                      TraceVar(index₁) when $35 is true
156copy_slot_unmasked             $4 = index₁
157cmplt_imm_int                  $4 = lessThan($4, 0x00000004)
158stack_rewind
159branch_if_no_active_lanes_eq   branch -26 (label 7 at #122) if no lanes of $4 == 0
160label                          label 0x00000006
161trace_scope                    TraceScope(-1) when $3 is true
162trace_line                     TraceLine(24) when $35 is true
163copy_4_slots_unmasked          $3..6 = matrix₁(0..3)
164copy_4_slots_unmasked          $7..10 = matrix₁(4..7)
165copy_4_slots_unmasked          $11..14 = matrix₁(8..11)
166copy_4_slots_unmasked          $15..18 = matrix₁(12..15)
167copy_4_uniforms                $19..22 = testMatrix4x4(0..3)
168copy_4_uniforms                $23..26 = testMatrix4x4(4..7)
169copy_4_uniforms                $27..30 = testMatrix4x4(8..11)
170copy_4_uniforms                $31..34 = testMatrix4x4(12..15)
171cmpeq_n_floats                 $3..18 = equal($3..18, $19..34)
172bitwise_and_4_ints             $11..14 &= $15..18
173bitwise_and_4_ints             $7..10 &= $11..14
174bitwise_and_4_ints             $3..6 &= $7..10
175bitwise_and_2_ints             $3..4 &= $5..6
176bitwise_and_int                $3 &= $4
177copy_slot_masked               [test4x4].result = Mask($3)
178trace_var                      TraceVar([test4x4].result) when $35 is true
179trace_scope                    TraceScope(-1) when $2 is true
180trace_exit                     TraceExit(bool test4x4()) when $35 is true
181copy_slot_unmasked             $2 = [test4x4].result
182label                          label 0x00000005
183copy_slot_masked               $1 = Mask($2)
184label                          label 0x00000001
185load_condition_mask            CondMask = $39
186swizzle_4                      $1..4 = ($1..4).xxxx
187copy_4_uniforms                $5..8 = colorRed
188copy_4_uniforms                $9..12 = colorGreen
189mix_4_ints                     $1..4 = mix($5..8, $9..12, $1..4)
190copy_4_slots_unmasked          [main].result = $1..4
191trace_var                      TraceVar([main].result) when $35 is true
192trace_scope                    TraceScope(-1) when $0 is true
193trace_exit                     TraceExit(half4 main(float2 coords)) when $35 is true
194load_src                       src.rgba = [main].result
195