xref: /aosp_15_r20/external/skia/tests/sksl/shared/MatricesNonsquare.skrp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1289 instructions
2
3[immutable slots]
4i0 = 0x40000000 (2.0)
5i1 = 0
6i2 = 0
7i3 = 0
8i4 = 0x40000000 (2.0)
9i5 = 0
10i6 = 0x40400000 (3.0)
11i7 = 0
12i8 = 0
13i9 = 0
14i10 = 0
15i11 = 0x40400000 (3.0)
16i12 = 0
17i13 = 0
18i14 = 0x40800000 (4.0)
19i15 = 0
20i16 = 0
21i17 = 0x40800000 (4.0)
22i18 = 0
23i19 = 0
24i20 = 0x41000000 (8.0)
25i21 = 0
26i22 = 0
27i23 = 0x41000000 (8.0)
28i24 = 0x40400000 (3.0)
29i25 = 0x3F800000 (1.0)
30i26 = 0x3F800000 (1.0)
31i27 = 0x3F800000 (1.0)
32i28 = 0x40400000 (3.0)
33i29 = 0x3F800000 (1.0)
34i30 = 0x40000000 (2.0)
35i31 = 0xC0000000 (-2.0)
36i32 = 0xC0000000 (-2.0)
37i33 = 0x40000000 (2.0)
38i34 = 0xC0000000 (-2.0)
39i35 = 0xC0000000 (-2.0)
40i36 = 0x3F400000 (0.75)
41i37 = 0
42i38 = 0
43i39 = 0
44i40 = 0
45i41 = 0x3F400000 (0.75)
46i42 = 0
47i43 = 0
48i44 = 0x40A00000 (5.0)
49i45 = 0
50i46 = 0
51i47 = 0
52i48 = 0
53i49 = 0x40A00000 (5.0)
54i50 = 0
55i51 = 0
56i52 = 0
57i53 = 0
58i54 = 0x40A00000 (5.0)
59i55 = 0
60i56 = 0x40C00000 (6.0)
61i57 = 0
62i58 = 0
63i59 = 0x40C00000 (6.0)
64i60 = 0
65i61 = 0
66i62 = 0
67i63 = 0
68i64 = 0x40E00000 (7.0)
69i65 = 0
70i66 = 0
71i67 = 0
72i68 = 0x40E00000 (7.0)
73i69 = 0
74i70 = 0
75i71 = 0
76i72 = 0x40E00000 (7.0)
77i73 = 0
78i74 = 0
79i75 = 0
80i76 = 0x420C0000 (35.0)
81i77 = 0
82i78 = 0
83i79 = 0
84i80 = 0x420C0000 (35.0)
85i81 = 0
86i82 = 0
87i83 = 0
88i84 = 0x420C0000 (35.0)
89
90store_src_rg                   coords = src.rg
91init_lane_masks                CondMask = LoopMask = RetMask = true
92copy_constant                  _0_ok = 0xFFFFFFFF
93copy_4_immutables_unmasked     _1_m23(0..3) = i0..3 [0x40000000 (2.0), 0, 0, 0]
94copy_2_immutables_unmasked     _1_m23(4..5) = i4..5 [0x40000000 (2.0), 0]
95copy_4_slots_unmasked          $0..3 = _0_ok, _1_m23(0..2)
96copy_3_slots_unmasked          $4..6 = _1_m23(3..5)
97copy_4_immutables_unmasked     $7..10 = i0..3 [0x40000000 (2.0), 0, 0, 0]
98copy_2_immutables_unmasked     $11..12 = i4..5 [0x40000000 (2.0), 0]
99cmpeq_n_floats                 $1..6 = equal($1..6, $7..12)
100bitwise_and_3_ints             $1..3 &= $4..6
101bitwise_and_int                $2 &= $3
102bitwise_and_int                $1 &= $2
103bitwise_and_int                $0 &= $1
104copy_slot_unmasked             _0_ok = $0
105copy_4_immutables_unmasked     _2_m24(0..3) = i6..9 [0x40400000 (3.0), 0, 0, 0]
106copy_4_immutables_unmasked     _2_m24(4..7) = i10..13 [0, 0x40400000 (3.0), 0, 0]
107copy_slot_unmasked             $0 = _0_ok
108copy_4_slots_unmasked          $1..4 = _2_m24(0..3)
109copy_4_slots_unmasked          $5..8 = _2_m24(4..7)
110copy_4_immutables_unmasked     $9..12 = i6..9 [0x40400000 (3.0), 0, 0, 0]
111copy_4_immutables_unmasked     $13..16 = i10..13 [0, 0x40400000 (3.0), 0, 0]
112cmpeq_n_floats                 $1..8 = equal($1..8, $9..16)
113bitwise_and_4_ints             $1..4 &= $5..8
114bitwise_and_2_ints             $1..2 &= $3..4
115bitwise_and_int                $1 &= $2
116bitwise_and_int                $0 &= $1
117copy_slot_unmasked             _0_ok = $0
118copy_4_immutables_unmasked     _3_m32(0..3) = i14..17 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)]
119splat_2_constants              _3_m32(4..5) = 0
120copy_slot_unmasked             $0 = _0_ok
121copy_4_slots_unmasked          $1..4 = _3_m32(0..3)
122copy_2_slots_unmasked          $5..6 = _3_m32(4..5)
123copy_4_immutables_unmasked     $7..10 = i14..17 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)]
124splat_2_constants              $11..12 = 0
125cmpeq_n_floats                 $1..6 = equal($1..6, $7..12)
126bitwise_and_3_ints             $1..3 &= $4..6
127bitwise_and_int                $2 &= $3
128bitwise_and_int                $1 &= $2
129bitwise_and_int                $0 &= $1
130copy_slot_unmasked             _0_ok = $0
131copy_4_slots_unmasked          $4..7 = _3_m32(0..3)
132copy_2_slots_unmasked          $8..9 = _3_m32(4..5)
133copy_4_slots_unmasked          $10..13 = _1_m23(0..3)
134copy_2_slots_unmasked          $14..15 = _1_m23(4..5)
135matrix_multiply_3              mat2x2($0..3) = mat3x2($4..9) * mat2x3($10..15)
136copy_4_slots_unmasked          _7_m22 = $0..3
137copy_slot_unmasked             $0 = _0_ok
138copy_4_slots_unmasked          $1..4 = _7_m22
139copy_4_immutables_unmasked     $5..8 = i20..23 [0x41000000 (8.0), 0, 0, 0x41000000 (8.0)]
140cmpeq_4_floats                 $1..4 = equal($1..4, $5..8)
141bitwise_and_2_ints             $1..2 &= $3..4
142bitwise_and_int                $1 &= $2
143bitwise_and_int                $0 &= $1
144copy_slot_unmasked             _0_ok = $0
145copy_4_slots_unmasked          $0..3 = _1_m23(0..3)
146copy_2_slots_unmasked          $4..5 = _1_m23(4..5)
147splat_4_constants              $6..9 = 0x3F800000 (1.0)
148splat_2_constants              $10..11 = 0x3F800000 (1.0)
149add_n_floats                   $0..5 += $6..11
150copy_4_slots_unmasked          _1_m23(0..3) = $0..3
151copy_2_slots_unmasked          _1_m23(4..5) = $4..5
152copy_4_slots_unmasked          $0..3 = _0_ok, _1_m23(0..2)
153copy_3_slots_unmasked          $4..6 = _1_m23(3..5)
154copy_4_immutables_unmasked     $7..10 = i24..27 [0x40400000 (3.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)]
155copy_2_immutables_unmasked     $11..12 = i28..29 [0x40400000 (3.0), 0x3F800000 (1.0)]
156cmpeq_n_floats                 $1..6 = equal($1..6, $7..12)
157bitwise_and_3_ints             $1..3 &= $4..6
158bitwise_and_int                $2 &= $3
159bitwise_and_int                $1 &= $2
160bitwise_and_int                $0 &= $1
161copy_slot_unmasked             _0_ok = $0
162copy_4_slots_unmasked          $0..3 = _3_m32(0..3)
163copy_2_slots_unmasked          $4..5 = _3_m32(4..5)
164splat_4_constants              $6..9 = 0x40000000 (2.0)
165splat_2_constants              $10..11 = 0x40000000 (2.0)
166sub_n_floats                   $0..5 -= $6..11
167copy_4_slots_unmasked          _3_m32(0..3) = $0..3
168copy_2_slots_unmasked          _3_m32(4..5) = $4..5
169copy_slot_unmasked             $0 = _0_ok
170copy_4_slots_unmasked          $1..4 = _3_m32(0..3)
171copy_2_slots_unmasked          $5..6 = _3_m32(4..5)
172copy_4_immutables_unmasked     $7..10 = i30..33 [0x40000000 (2.0), 0xC0000000 (-2.0), 0xC0000000 (-2.0), 0x40000000 (2.0)]
173splat_2_constants              $11..12 = 0xC0000000 (-2.0)
174cmpeq_n_floats                 $1..6 = equal($1..6, $7..12)
175bitwise_and_3_ints             $1..3 &= $4..6
176bitwise_and_int                $2 &= $3
177bitwise_and_int                $1 &= $2
178bitwise_and_int                $0 &= $1
179copy_slot_unmasked             _0_ok = $0
180copy_4_slots_unmasked          $0..3 = _2_m24(0..3)
181copy_4_slots_unmasked          $4..7 = _2_m24(4..7)
182splat_4_constants              $8..11 = 0x3E800000 (0.25)
183splat_4_constants              $12..15 = 0x3E800000 (0.25)
184mul_n_floats                   $0..7 *= $8..15
185copy_4_slots_unmasked          _2_m24(0..3) = $0..3
186copy_4_slots_unmasked          _2_m24(4..7) = $4..7
187copy_slot_unmasked             $0 = _0_ok
188copy_4_slots_unmasked          $1..4 = _2_m24(0..3)
189copy_4_slots_unmasked          $5..8 = _2_m24(4..7)
190copy_4_immutables_unmasked     $9..12 = i36..39 [0x3F400000 (0.75), 0, 0, 0]
191copy_4_immutables_unmasked     $13..16 = i40..43 [0, 0x3F400000 (0.75), 0, 0]
192cmpeq_n_floats                 $1..8 = equal($1..8, $9..16)
193bitwise_and_4_ints             $1..4 &= $5..8
194bitwise_and_2_ints             $1..2 &= $3..4
195bitwise_and_int                $1 &= $2
196bitwise_and_int                $0 &= $1
197copy_slot_unmasked             _0_ok = $0
198store_condition_mask           $34 = CondMask
199copy_slot_unmasked             $35 = _0_ok
200copy_constant                  $0 = 0
201merge_condition_mask           CondMask = $34 & $35
202branch_if_no_lanes_active      branch_if_no_lanes_active +172 (label 1 at #285)
203copy_constant                  ok = 0xFFFFFFFF
204copy_4_immutables_unmasked     m23(0..3) = i0..3 [0x40000000 (2.0), 0, 0, 0]
205copy_2_immutables_unmasked     m23(4..5) = i4..5 [0x40000000 (2.0), 0]
206copy_4_slots_unmasked          $1..4 = ok, m23(0..2)
207copy_3_slots_unmasked          $5..7 = m23(3..5)
208copy_4_immutables_unmasked     $8..11 = i0..3 [0x40000000 (2.0), 0, 0, 0]
209copy_2_immutables_unmasked     $12..13 = i4..5 [0x40000000 (2.0), 0]
210cmpeq_n_floats                 $2..7 = equal($2..7, $8..13)
211bitwise_and_3_ints             $2..4 &= $5..7
212bitwise_and_int                $3 &= $4
213bitwise_and_int                $2 &= $3
214bitwise_and_int                $1 &= $2
215copy_slot_masked               ok = Mask($1)
216copy_4_immutables_unmasked     m24(0..3) = i6..9 [0x40400000 (3.0), 0, 0, 0]
217copy_4_immutables_unmasked     m24(4..7) = i10..13 [0, 0x40400000 (3.0), 0, 0]
218copy_slot_unmasked             $1 = ok
219copy_4_slots_unmasked          $2..5 = m24(0..3)
220copy_4_slots_unmasked          $6..9 = m24(4..7)
221copy_4_immutables_unmasked     $10..13 = i6..9 [0x40400000 (3.0), 0, 0, 0]
222copy_4_immutables_unmasked     $14..17 = i10..13 [0, 0x40400000 (3.0), 0, 0]
223cmpeq_n_floats                 $2..9 = equal($2..9, $10..17)
224bitwise_and_4_ints             $2..5 &= $6..9
225bitwise_and_2_ints             $2..3 &= $4..5
226bitwise_and_int                $2 &= $3
227bitwise_and_int                $1 &= $2
228copy_slot_masked               ok = Mask($1)
229copy_4_immutables_unmasked     m32(0..3) = i14..17 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)]
230splat_2_constants              m32(4..5) = 0
231copy_slot_unmasked             $1 = ok
232copy_4_slots_unmasked          $2..5 = m32(0..3)
233copy_2_slots_unmasked          $6..7 = m32(4..5)
234copy_4_immutables_unmasked     $8..11 = i14..17 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)]
235splat_2_constants              $12..13 = 0
236cmpeq_n_floats                 $2..7 = equal($2..7, $8..13)
237bitwise_and_3_ints             $2..4 &= $5..7
238bitwise_and_int                $3 &= $4
239bitwise_and_int                $2 &= $3
240bitwise_and_int                $1 &= $2
241copy_slot_masked               ok = Mask($1)
242copy_slot_unmasked             $1 = ok
243copy_4_immutables_unmasked     $2..5 = i44..47 [0x40A00000 (5.0), 0, 0, 0]
244copy_4_immutables_unmasked     $6..9 = i48..51 [0, 0x40A00000 (5.0), 0, 0]
245copy_4_immutables_unmasked     $10..13 = i52..55 [0, 0, 0x40A00000 (5.0), 0]
246copy_4_immutables_unmasked     $14..17 = i44..47 [0x40A00000 (5.0), 0, 0, 0]
247copy_4_immutables_unmasked     $18..21 = i48..51 [0, 0x40A00000 (5.0), 0, 0]
248copy_4_immutables_unmasked     $22..25 = i52..55 [0, 0, 0x40A00000 (5.0), 0]
249cmpeq_n_floats                 $2..13 = equal($2..13, $14..25)
250bitwise_and_4_ints             $6..9 &= $10..13
251bitwise_and_4_ints             $2..5 &= $6..9
252bitwise_and_2_ints             $2..3 &= $4..5
253bitwise_and_int                $2 &= $3
254bitwise_and_int                $1 &= $2
255copy_slot_masked               ok = Mask($1)
256copy_slot_unmasked             $1 = ok
257copy_4_immutables_unmasked     $2..5 = i56..59 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)]
258splat_4_constants              $6..9 = 0
259copy_4_immutables_unmasked     $10..13 = i56..59 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)]
260splat_4_constants              $14..17 = 0
261cmpeq_n_floats                 $2..9 = equal($2..9, $10..17)
262bitwise_and_4_ints             $2..5 &= $6..9
263bitwise_and_2_ints             $2..3 &= $4..5
264bitwise_and_int                $2 &= $3
265bitwise_and_int                $1 &= $2
266copy_slot_masked               ok = Mask($1)
267copy_slot_unmasked             $1 = ok
268copy_4_immutables_unmasked     $2..5 = i64..67 [0x40E00000 (7.0), 0, 0, 0]
269copy_4_immutables_unmasked     $6..9 = i68..71 [0x40E00000 (7.0), 0, 0, 0]
270copy_4_immutables_unmasked     $10..13 = i72..75 [0x40E00000 (7.0), 0, 0, 0]
271copy_4_immutables_unmasked     $14..17 = i64..67 [0x40E00000 (7.0), 0, 0, 0]
272copy_4_immutables_unmasked     $18..21 = i68..71 [0x40E00000 (7.0), 0, 0, 0]
273copy_4_immutables_unmasked     $22..25 = i72..75 [0x40E00000 (7.0), 0, 0, 0]
274cmpeq_n_floats                 $2..13 = equal($2..13, $14..25)
275bitwise_and_4_ints             $6..9 &= $10..13
276bitwise_and_4_ints             $2..5 &= $6..9
277bitwise_and_2_ints             $2..3 &= $4..5
278bitwise_and_int                $2 &= $3
279bitwise_and_int                $1 &= $2
280copy_slot_masked               ok = Mask($1)
281copy_4_slots_unmasked          $5..8 = m32(0..3)
282copy_2_slots_unmasked          $9..10 = m32(4..5)
283copy_4_slots_unmasked          $11..14 = m23(0..3)
284copy_2_slots_unmasked          $15..16 = m23(4..5)
285matrix_multiply_3              mat2x2($1..4) = mat3x2($5..10) * mat2x3($11..16)
286copy_4_slots_unmasked          m22 = $1..4
287copy_slot_unmasked             $1 = ok
288copy_4_slots_unmasked          $2..5 = m22
289copy_4_immutables_unmasked     $6..9 = i20..23 [0x41000000 (8.0), 0, 0, 0x41000000 (8.0)]
290cmpeq_4_floats                 $2..5 = equal($2..5, $6..9)
291bitwise_and_2_ints             $2..3 &= $4..5
292bitwise_and_int                $2 &= $3
293bitwise_and_int                $1 &= $2
294copy_slot_masked               ok = Mask($1)
295copy_4_immutables_unmasked     $10..13 = i64..67 [0x40E00000 (7.0), 0, 0, 0]
296copy_4_immutables_unmasked     $14..17 = i68..71 [0x40E00000 (7.0), 0, 0, 0]
297copy_4_immutables_unmasked     $18..21 = i72..75 [0x40E00000 (7.0), 0, 0, 0]
298copy_4_immutables_unmasked     $22..25 = i44..47 [0x40A00000 (5.0), 0, 0, 0]
299copy_4_immutables_unmasked     $26..29 = i48..51 [0, 0x40A00000 (5.0), 0, 0]
300copy_4_immutables_unmasked     $30..33 = i52..55 [0, 0, 0x40A00000 (5.0), 0]
301matrix_multiply_4              mat3x3($1..9) = mat4x3($10..21) * mat3x4($22..33)
302copy_4_slots_unmasked          m33(0..3) = $1..4
303copy_4_slots_unmasked          m33(4..7) = $5..8
304copy_slot_unmasked             m33(8) = $9
305copy_slot_unmasked             $1 = ok
306copy_4_slots_unmasked          $2..5 = m33(0..3)
307copy_4_slots_unmasked          $6..9 = m33(4..7)
308copy_slot_unmasked             $10 = m33(8)
309copy_4_immutables_unmasked     $11..14 = i76..79 [0x420C0000 (35.0), 0, 0, 0]
310copy_4_immutables_unmasked     $15..18 = i80..83 [0x420C0000 (35.0), 0, 0, 0]
311copy_constant                  $19 = 0x420C0000 (35.0)
312cmpeq_n_floats                 $2..10 = equal($2..10, $11..19)
313bitwise_and_4_ints             $3..6 &= $7..10
314bitwise_and_2_ints             $3..4 &= $5..6
315bitwise_and_int                $3 &= $4
316bitwise_and_int                $2 &= $3
317bitwise_and_int                $1 &= $2
318copy_slot_masked               ok = Mask($1)
319copy_4_slots_unmasked          $1..4 = m23(0..3)
320copy_2_slots_unmasked          $5..6 = m23(4..5)
321splat_4_constants              $7..10 = 0x3F800000 (1.0)
322splat_2_constants              $11..12 = 0x3F800000 (1.0)
323add_n_floats                   $1..6 += $7..12
324copy_4_slots_masked            m23(0..3) = Mask($1..4)
325copy_2_slots_masked            m23(4..5) = Mask($5..6)
326copy_4_slots_unmasked          $1..4 = ok, m23(0..2)
327copy_3_slots_unmasked          $5..7 = m23(3..5)
328copy_4_immutables_unmasked     $8..11 = i24..27 [0x40400000 (3.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)]
329copy_2_immutables_unmasked     $12..13 = i28..29 [0x40400000 (3.0), 0x3F800000 (1.0)]
330cmpeq_n_floats                 $2..7 = equal($2..7, $8..13)
331bitwise_and_3_ints             $2..4 &= $5..7
332bitwise_and_int                $3 &= $4
333bitwise_and_int                $2 &= $3
334bitwise_and_int                $1 &= $2
335copy_slot_masked               ok = Mask($1)
336copy_4_slots_unmasked          $1..4 = m32(0..3)
337copy_2_slots_unmasked          $5..6 = m32(4..5)
338splat_4_constants              $7..10 = 0x40000000 (2.0)
339splat_2_constants              $11..12 = 0x40000000 (2.0)
340sub_n_floats                   $1..6 -= $7..12
341copy_4_slots_masked            m32(0..3) = Mask($1..4)
342copy_2_slots_masked            m32(4..5) = Mask($5..6)
343copy_slot_unmasked             $1 = ok
344copy_4_slots_unmasked          $2..5 = m32(0..3)
345copy_2_slots_unmasked          $6..7 = m32(4..5)
346copy_4_immutables_unmasked     $8..11 = i30..33 [0x40000000 (2.0), 0xC0000000 (-2.0), 0xC0000000 (-2.0), 0x40000000 (2.0)]
347splat_2_constants              $12..13 = 0xC0000000 (-2.0)
348cmpeq_n_floats                 $2..7 = equal($2..7, $8..13)
349bitwise_and_3_ints             $2..4 &= $5..7
350bitwise_and_int                $3 &= $4
351bitwise_and_int                $2 &= $3
352bitwise_and_int                $1 &= $2
353copy_slot_masked               ok = Mask($1)
354copy_4_slots_unmasked          $1..4 = m24(0..3)
355copy_4_slots_unmasked          $5..8 = m24(4..7)
356splat_4_constants              $9..12 = 0x3E800000 (0.25)
357splat_4_constants              $13..16 = 0x3E800000 (0.25)
358mul_n_floats                   $1..8 *= $9..16
359copy_4_slots_masked            m24(0..3) = Mask($1..4)
360copy_4_slots_masked            m24(4..7) = Mask($5..8)
361copy_slot_unmasked             $1 = ok
362copy_4_slots_unmasked          $2..5 = m24(0..3)
363copy_4_slots_unmasked          $6..9 = m24(4..7)
364copy_4_immutables_unmasked     $10..13 = i36..39 [0x3F400000 (0.75), 0, 0, 0]
365copy_4_immutables_unmasked     $14..17 = i40..43 [0, 0x3F400000 (0.75), 0, 0]
366cmpeq_n_floats                 $2..9 = equal($2..9, $10..17)
367bitwise_and_4_ints             $2..5 &= $6..9
368bitwise_and_2_ints             $2..3 &= $4..5
369bitwise_and_int                $2 &= $3
370bitwise_and_int                $1 &= $2
371copy_slot_masked               ok = Mask($1)
372label                          label 0x00000002
373copy_slot_masked               $0 = Mask($1)
374label                          label 0x00000001
375load_condition_mask            CondMask = $34
376swizzle_4                      $0..3 = ($0..3).xxxx
377copy_4_uniforms                $4..7 = colorRed
378copy_4_uniforms                $8..11 = colorGreen
379mix_4_ints                     $0..3 = mix($4..7, $8..11, $0..3)
380load_src                       src.rgba = $0..3
381