1 /**
2  * Copyright (C) 2010 Jorge Jimenez (jorge@iryoku.com)
3  * Copyright (C) 2010 Belen Masia (bmasia@unizar.es)
4  * Copyright (C) 2010 Jose I. Echevarria (joseignacioechevarria@gmail.com)
5  * Copyright (C) 2010 Fernando Navarro (fernandn@microsoft.com)
6  * Copyright (C) 2010 Diego Gutierrez (diegog@unizar.es)
7  * Copyright (C) 2011 Lauri Kasanen (cand@gmx.com)
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met:
12  *
13  *    1. Redistributions of source code must retain the above copyright notice,
14  *       this list of conditions and the following disclaimer.
15  *
16  *    2. Redistributions in binary form must reproduce the following statement:
17  *
18  *       "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia,
19  *        Jose I. Echevarria, Fernando Navarro and Diego Gutierrez."
20  *
21  *       Only for use in the Mesa project, this point 2 is filled by naming the
22  *       technique Jimenez's MLAA in the Mesa config options.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
25  * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS
28  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  * The views and conclusions contained in the software and documentation are
37  * those of the authors and should not be interpreted as representing official
38  * policies, either expressed or implied, of the copyright holders.
39  */
40 
41 #ifndef PP_MLAA_H
42 #define PP_MLAA_H
43 
44 #include "postprocess/pp_mlaa_areamap.h"
45 
46 static const char depth1fs[] = "FRAG\n"
47    "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
48    "DCL IN[0], GENERIC[0], PERSPECTIVE\n"
49    "DCL IN[1], GENERIC[10], PERSPECTIVE\n"
50    "DCL IN[2], GENERIC[11], PERSPECTIVE\n"
51    "DCL OUT[0], COLOR\n"
52    "DCL SAMP[0]\n"
53    "DCL TEMP[0..2]\n"
54    "IMM FLT32 {    0.0030,     0.0000,     1.0000,     0.0000}\n"
55    "  0: TEX TEMP[0].x, IN[1].xyyy, SAMP[0], 2D\n"
56    "  1: MOV TEMP[1].x, TEMP[0].xxxx\n"
57    "  2: TEX TEMP[0].x, IN[1].zwww, SAMP[0], 2D\n"
58    "  3: MOV TEMP[1].y, TEMP[0].xxxx\n"
59    "  4: TEX TEMP[0].x, IN[2].xyyy, SAMP[0], 2D\n"
60    "  5: MOV TEMP[1].z, TEMP[0].xxxx\n"
61    "  6: TEX TEMP[0].x, IN[2].zwww, SAMP[0], 2D\n"
62    "  7: MOV TEMP[1].w, TEMP[0].xxxx\n"
63    "  8: TEX TEMP[0].x, IN[0].xyyy, SAMP[0], 2D\n"
64    "  9: ADD TEMP[2], TEMP[0].xxxx, -TEMP[1]\n"
65    " 10: ABS TEMP[0], TEMP[2]\n"
66    " 11: SGE TEMP[2], TEMP[0], IMM[0].xxxx\n"
67    " 12: DP4 TEMP[0].x, TEMP[2], IMM[0].zzzz\n"
68    " 13: SEQ TEMP[1].x, TEMP[0].xxxx, IMM[0].yyyy\n"
69    " 14: IF TEMP[1].xxxx :16\n"
70    " 15:   KILP\n"
71    " 16: ENDIF\n"
72    " 17: MOV OUT[0], TEMP[2]\n"
73    " 18: END\n";
74 
75 
76 static const char color1fs[] = "FRAG\n"
77    "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
78    "DCL IN[0], GENERIC[0], PERSPECTIVE\n"
79    "DCL IN[1], GENERIC[10], PERSPECTIVE\n"
80    "DCL IN[2], GENERIC[11], PERSPECTIVE\n"
81    "DCL OUT[0], COLOR\n"
82    "DCL SAMP[0]\n"
83    "DCL TEMP[0..2]\n"
84    "IMM FLT32 {    0.2126,     0.7152,     0.0722,     0.1000}\n"
85    "IMM FLT32 {    1.0000,     0.0000,     0.0000,     0.0000}\n"
86    "  0: TEX TEMP[1].xyz, IN[1].xyyy, SAMP[0], 2D\n"
87    "  1: DP3 TEMP[0].x, TEMP[1].xyzz, IMM[0]\n"
88    "  2: TEX TEMP[1].xyz, IN[1].zwww, SAMP[0], 2D\n"
89    "  3: DP3 TEMP[0].y, TEMP[1].xyzz, IMM[0].xyzz\n"
90    "  4: TEX TEMP[1].xyz, IN[2].xyyy, SAMP[0], 2D\n"
91    "  5: DP3 TEMP[0].z, TEMP[1].xyzz, IMM[0].xyzz\n"
92    "  6: TEX TEMP[1].xyz, IN[2].zwww, SAMP[0], 2D\n"
93    "  7: DP3 TEMP[0].w, TEMP[1].xyzz, IMM[0].xyzz\n"
94    "  8: TEX TEMP[1].xyz, IN[0].xyyy, SAMP[0], 2D\n"
95    "  9: DP3 TEMP[2].x, TEMP[1].xyzz, IMM[0].xyzz\n"
96    " 10: ADD TEMP[1], TEMP[2].xxxx, -TEMP[0]\n"
97    " 11: ABS TEMP[0], TEMP[1]\n"
98    " 12: SGE TEMP[2], TEMP[0], IMM[0].wwww\n"
99    " 13: DP4 TEMP[0].x, TEMP[2], IMM[1].xxxx\n"
100    " 14: SEQ TEMP[1].x, TEMP[0].xxxx, IMM[1].yyyy\n"
101    " 15: IF TEMP[1].xxxx :17\n"
102    " 16:   KILP\n"
103    " 17: ENDIF\n"
104    " 18: MOV OUT[0], TEMP[2]\n"
105    " 19: END\n";
106 
107 
108 static const char neigh3fs[] = "FRAG\n"
109    "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
110    "DCL IN[0], GENERIC[0], PERSPECTIVE\n"
111    "DCL IN[1], GENERIC[10], PERSPECTIVE\n"
112    "DCL IN[2], GENERIC[11], PERSPECTIVE\n"
113    "DCL OUT[0], COLOR\n"
114    "DCL SAMP[0]\n"
115    "DCL SAMP[1]\n"
116    "DCL TEMP[0..8]\n"
117    "IMM FLT32 {    1.0000,     0.00001,     0.0000,     0.0000}\n"
118    "  0: TEX TEMP[0], IN[0].xyyy, SAMP[1], 2D\n"
119    "  1: MOV TEMP[1].x, TEMP[0].xxxx\n"
120    "  2: TEX TEMP[2].y, IN[2].zwww, SAMP[1], 2D\n"
121    "  3: MOV TEMP[1].y, TEMP[2].yyyy\n"
122    "  4: MOV TEMP[1].z, TEMP[0].zzzz\n"
123    "  5: TEX TEMP[1].w, IN[2].xyyy, SAMP[1], 2D\n"
124    "  6: MUL TEMP[4], TEMP[1], TEMP[1]\n"
125    "  7: MUL TEMP[5], TEMP[4], TEMP[1]\n"
126    "  8: DP4 TEMP[1].x, TEMP[5], IMM[0].xxxx\n"
127    "  9: SLT TEMP[4].x, TEMP[1].xxxx, IMM[0].yyyy\n"
128    " 10: IF TEMP[4].xxxx :12\n"
129    " 11:   KILP\n"
130    " 12: ENDIF\n"
131    " 13: TEX TEMP[4], IN[0].xyyy, SAMP[0], 2D\n"
132    " 14: TEX TEMP[6], IN[1].zwww, SAMP[0], 2D\n"
133    " 15: ADD TEMP[7].x, IMM[0].xxxx, -TEMP[0].xxxx\n"
134    " 16: MUL TEMP[8], TEMP[4], TEMP[7].xxxx\n"
135    " 17: MAD TEMP[7], TEMP[6], TEMP[0].xxxx, TEMP[8]\n"
136    " 18: MUL TEMP[6], TEMP[7], TEMP[5].xxxx\n"
137    " 19: TEX TEMP[7], IN[2].zwww, SAMP[0], 2D\n"
138    " 20: ADD TEMP[8].x, IMM[0].xxxx, -TEMP[2].yyyy\n"
139    " 21: MUL TEMP[3], TEMP[4], TEMP[8].xxxx\n"
140    " 22: MAD TEMP[8], TEMP[7], TEMP[2].yyyy, TEMP[3]\n"
141    " 23: MAD TEMP[2], TEMP[8], TEMP[5].yyyy, TEMP[6]\n"
142    " 24: TEX TEMP[6], IN[1].xyyy, SAMP[0], 2D\n"
143    " 25: ADD TEMP[7].x, IMM[0].xxxx, -TEMP[0].zzzz\n"
144    " 26: MUL TEMP[8], TEMP[4], TEMP[7].xxxx\n"
145    " 27: MAD TEMP[7], TEMP[6], TEMP[0].zzzz, TEMP[8]\n"
146    " 28: MAD TEMP[0], TEMP[7], TEMP[5].zzzz, TEMP[2]\n"
147    " 29: TEX TEMP[2], IN[2].xyyy, SAMP[0], 2D\n"
148    " 30: ADD TEMP[6].x, IMM[0].xxxx, -TEMP[1].wwww\n"
149    " 31: MUL TEMP[7], TEMP[4], TEMP[6].xxxx\n"
150    " 32: MAD TEMP[4], TEMP[2], TEMP[1].wwww, TEMP[7]\n"
151    " 33: MAD TEMP[2], TEMP[4], TEMP[5].wwww, TEMP[0]\n"
152    " 34: RCP TEMP[0].x, TEMP[1].xxxx\n"
153    " 35: MUL OUT[0], TEMP[2], TEMP[0].xxxx\n"
154    " 36: END\n";
155 
156 
157 static const char offsetvs[] = "VERT\n"
158    "DCL IN[0]\n"
159    "DCL IN[1]\n"
160    "DCL OUT[0], POSITION\n"
161    "DCL OUT[1], GENERIC[0]\n"
162    "DCL OUT[2], GENERIC[10]\n"
163    "DCL OUT[3], GENERIC[11]\n"
164    "DCL CONST[0]\n"
165    "IMM FLT32 {    1.0000,     0.0000,    -1.0000,     0.0000}\n"
166    "  0: MOV OUT[0], IN[0]\n"
167    "  1: MOV OUT[1], IN[1]\n"
168    "  2: MAD OUT[2], CONST[0].xyxy, IMM[0].zyyz, IN[1].xyxy\n"
169    "  3: MAD OUT[3], CONST[0].xyxy, IMM[0].xyyx, IN[1].xyxy\n"
170    "  4: END\n";
171 
172 
173 static const char blend2fs_1[] = "FRAG\n"
174    "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n"
175    "DCL IN[0], GENERIC[0], PERSPECTIVE\n"
176    "DCL OUT[0], COLOR\n"
177    "DCL SAMP[0]\n"
178    "DCL SAMP[1]\n"
179    "DCL SAMP[2]\n"
180    "DCL CONST[0]\n"
181    "DCL TEMP[0..6]\n"
182    "IMM FLT32 {    0.0000,    -0.2500,     0.00609756,     0.5000}\n"
183    "IMM FLT32 {   -1.5000,    -2.0000,     0.9000,     1.5000}\n"
184    "IMM FLT32 {    2.0000,     1.0000,     4.0000,    33.0000}\n";
185 
186 static const char blend2fs_2[] =
187    "  0: MOV TEMP[0], IMM[0].xxxx\n"
188    "  1: TEX TEMP[1], IN[0].xyyy, SAMP[1], 2D\n"
189    "  2: MOV TEMP[2].x, TEMP[1]\n"
190    "  3: SNE TEMP[3].x, TEMP[1].yyyy, IMM[0].xxxx\n"
191    "  4: IF TEMP[3].xxxx :76\n"
192    "  5:   MOV TEMP[1].xy, IN[0].xyxx\n"
193    "  6:   MOV TEMP[4].x, IMM[1].xxxx\n"
194    "  7:   BGNLOOP :24\n"
195    "  8:     MUL TEMP[5].x, IMM[1].yyyy, IMM[3].xxxx\n"
196    "  9:     SLE TEMP[6].x, TEMP[4].xxxx, TEMP[5].xxxx\n"
197    " 10:     IF TEMP[6].xxxx :12\n"
198    " 11:       BRK\n"
199    " 12:     ENDIF\n"
200    " 13:     MOV TEMP[4].y, IMM[0].xxxx\n"
201    " 14:     MAD TEMP[3].xyz, CONST[0].xyyy, TEMP[4].xyyy, TEMP[1].xyyy\n"
202    " 15:     MOV TEMP[3].w, IMM[0].xxxx\n"
203    " 16:     TXL TEMP[5], TEMP[3], SAMP[2], 2D\n"
204    " 17:     MOV TEMP[3].x, TEMP[5].yyyy\n"
205    " 18:     SLT TEMP[6].x, TEMP[5].yyyy, IMM[1].zzzz\n"
206    " 19:     IF TEMP[6].xxxx :21\n"
207    " 20:       BRK\n"
208    " 21:     ENDIF\n"
209    " 22:     ADD TEMP[6].x, TEMP[4].xxxx, IMM[1].yyyy\n"
210    " 23:     MOV TEMP[4].x, TEMP[6].xxxx\n"
211    " 24:   ENDLOOP :7\n"
212    " 25:   ADD TEMP[1].x, TEMP[4].xxxx, IMM[1].wwww\n"
213    " 26:   MAD TEMP[6].x, -IMM[2].xxxx, TEMP[3].xxxx, TEMP[1].xxxx\n"
214    " 27:   MUL TEMP[1].x, IMM[1].yyyy, IMM[3].xxxx\n"
215    " 28:   MAX TEMP[4].x, TEMP[6].xxxx, TEMP[1].xxxx\n"
216    " 29:   MOV TEMP[1].x, TEMP[4].xxxx\n"
217    " 30:   MOV TEMP[3].xy, IN[0].xyxx\n"
218    " 31:   MOV TEMP[5].x, IMM[1].wwww\n"
219    " 32:   BGNLOOP :49\n"
220    " 33:     MUL TEMP[6].x, IMM[2].xxxx, IMM[3].xxxx\n"
221    " 34:     SGE TEMP[4].x, TEMP[5].xxxx, TEMP[6].xxxx\n"
222    " 35:     IF TEMP[4].xxxx :37\n"
223    " 36:       BRK\n"
224    " 37:     ENDIF\n"
225    " 38:     MOV TEMP[5].y, IMM[0].xxxx\n"
226    " 39:     MAD TEMP[4].xyz, CONST[0].xyyy, TEMP[5].xyyy, TEMP[3].xyyy\n"
227    " 40:     MOV TEMP[4].w, IMM[0].xxxx\n"
228    " 41:     TXL TEMP[6].xy, TEMP[4], SAMP[2], 2D\n"
229    " 42:     MOV TEMP[4].x, TEMP[6].yyyy\n"
230    " 43:     SLT TEMP[0].x, TEMP[6].yyyy, IMM[1].zzzz\n"
231    " 44:     IF TEMP[0].xxxx :46\n"
232    " 45:       BRK\n"
233    " 46:     ENDIF\n"
234    " 47:     ADD TEMP[6].x, TEMP[5].xxxx, IMM[2].xxxx\n"
235    " 48:     MOV TEMP[5].x, TEMP[6].xxxx\n"
236    " 49:   ENDLOOP :32\n"
237    " 50:   ADD TEMP[3].x, TEMP[5].xxxx, IMM[1].xxxx\n"
238    " 51:   MAD TEMP[5].x, IMM[2].xxxx, TEMP[4].xxxx, TEMP[3].xxxx\n"
239    " 52:   MUL TEMP[3].x, IMM[2].xxxx, IMM[3].xxxx\n"
240    " 53:   MIN TEMP[4].x, TEMP[5].xxxx, TEMP[3].xxxx\n"
241    " 54:   MOV TEMP[3].x, TEMP[1].xxxx\n"
242    " 55:   MOV TEMP[3].y, TEMP[4].xxxx\n"
243    " 56:   MOV TEMP[5].yw, IMM[0].yyyy\n"
244    " 57:   MOV TEMP[5].x, TEMP[1].xxxx\n"
245    " 58:   ADD TEMP[1].x, TEMP[4].xxxx, IMM[2].yyyy\n"
246    " 59:   MOV TEMP[5].z, TEMP[1].xxxx\n"
247    " 60:   MAD TEMP[1], TEMP[5], CONST[0].xyxy, IN[0].xyxy\n"
248    " 61:   MOV TEMP[4], TEMP[1].xyyy\n"
249    " 62:   MOV TEMP[4].w, IMM[0].xxxx\n"
250    " 63:   TXL TEMP[5].x, TEMP[4], SAMP[2], 2D\n"
251    " 64:   MOV TEMP[4].x, TEMP[5].xxxx\n"
252    " 65:   MOV TEMP[5], TEMP[1].zwww\n"
253    " 66:   MOV TEMP[5].w, IMM[0].xxxx\n"
254    " 67:   TXL TEMP[1].x, TEMP[5], SAMP[2], 2D\n"
255    " 68:   MOV TEMP[4].y, TEMP[1].xxxx\n"
256    " 69:   MUL TEMP[5].xy, IMM[2].zzzz, TEMP[4].xyyy\n"
257    " 70:   ROUND TEMP[1].xy, TEMP[5].xyyy\n"
258    " 71:   ABS TEMP[4].xy, TEMP[3].xyyy\n"
259    " 72:   MAD TEMP[3].xy, IMM[2].wwww, TEMP[1].xyyy, TEMP[4].xyyy\n"
260    " 73:   MUL TEMP[5].xyz, TEMP[3].xyyy, IMM[0].zzzz\n"
261    " 74:   MOV TEMP[5].w, IMM[0].xxxx\n"
262    " 75:   TXL TEMP[0].xy, TEMP[5], SAMP[0], 2D\n"
263    " 76: ENDIF\n"
264    " 77: SNE TEMP[1].x, TEMP[2].xxxx, IMM[0].xxxx\n"
265    " 78: IF TEMP[1].xxxx :151\n"
266    " 79:   MOV TEMP[1].xy, IN[0].xyxx\n"
267    " 80:   MOV TEMP[3].x, IMM[1].xxxx\n"
268    " 81:   BGNLOOP :98\n"
269    " 82:     MUL TEMP[4].x, IMM[1].yyyy, IMM[3].xxxx\n"
270    " 83:     SLE TEMP[5].x, TEMP[3].xxxx, TEMP[4].xxxx\n"
271    " 84:     IF TEMP[5].xxxx :86\n"
272    " 85:       BRK\n"
273    " 86:     ENDIF\n"
274    " 87:     MOV TEMP[3].y, IMM[0].xxxx\n"
275    " 88:     MAD TEMP[5].xyz, CONST[0].xyyy, TEMP[3].yxxx, TEMP[1].xyyy\n"
276    " 89:     MOV TEMP[5].w, IMM[0].xxxx\n"
277    " 90:     TXL TEMP[4], TEMP[5], SAMP[2], 2D\n"
278    " 91:     MOV TEMP[2].x, TEMP[4].xxxx\n"
279    " 92:     SLT TEMP[5].x, TEMP[4].xxxx, IMM[1].zzzz\n"
280    " 93:     IF TEMP[5].xxxx :95\n"
281    " 94:       BRK\n"
282    " 95:     ENDIF\n"
283    " 96:     ADD TEMP[4].x, TEMP[3].xxxx, IMM[1].yyyy\n"
284    " 97:     MOV TEMP[3].x, TEMP[4].xxxx\n"
285    " 98:   ENDLOOP :81\n"
286    " 99:   ADD TEMP[1].x, TEMP[3].xxxx, IMM[1].wwww\n"
287    "100:   MAD TEMP[6].x, -IMM[2].xxxx, TEMP[2].xxxx, TEMP[1].xxxx\n"
288    "101:   MUL TEMP[1].x, IMM[1].yyyy, IMM[3].xxxx\n"
289    "102:   MAX TEMP[3].x, TEMP[6].xxxx, TEMP[1].xxxx\n"
290    "103:   MOV TEMP[1].x, TEMP[3].xxxx\n"
291    "104:   MOV TEMP[2].xy, IN[0].xyxx\n"
292    "105:   MOV TEMP[4].x, IMM[1].wwww\n"
293    "106:   BGNLOOP :123\n"
294    "107:     MUL TEMP[5].x, IMM[2].xxxx, IMM[3].xxxx\n"
295    "108:     SGE TEMP[6].x, TEMP[4].xxxx, TEMP[5].xxxx\n"
296    "109:     IF TEMP[6].xxxx :111\n"
297    "110:       BRK\n"
298    "111:     ENDIF\n"
299    "112:     MOV TEMP[4].y, IMM[0].xxxx\n"
300    "113:     MAD TEMP[5].xyz, CONST[0].xyyy, TEMP[4].yxxx, TEMP[2].xyyy\n"
301    "114:     MOV TEMP[5].w, IMM[0].xxxx\n"
302    "115:     TXL TEMP[6], TEMP[5], SAMP[2], 2D\n"
303    "116:     MOV TEMP[3].x, TEMP[6].xxxx\n"
304    "117:     SLT TEMP[5].x, TEMP[6].xxxx, IMM[1].zzzz\n"
305    "118:     IF TEMP[5].xxxx :120\n"
306    "119:       BRK\n"
307    "120:     ENDIF\n"
308    "121:     ADD TEMP[6].x, TEMP[4].xxxx, IMM[2].xxxx\n"
309    "122:     MOV TEMP[4].x, TEMP[6].xxxx\n"
310    "123:   ENDLOOP :106\n"
311    "124:   ADD TEMP[2].x, TEMP[4].xxxx, IMM[1].xxxx\n"
312    "125:   MAD TEMP[4].x, IMM[2].xxxx, TEMP[3].xxxx, TEMP[2].xxxx\n"
313    "126:   MUL TEMP[2].x, IMM[2].xxxx, IMM[3].xxxx\n"
314    "127:   MIN TEMP[3].x, TEMP[4].xxxx, TEMP[2].xxxx\n"
315    "128:   MOV TEMP[2].x, TEMP[1].xxxx\n"
316    "129:   MOV TEMP[2].y, TEMP[3].xxxx\n"
317    "130:   MOV TEMP[4].xz, IMM[0].yyyy\n"
318    "131:   MOV TEMP[4].y, TEMP[1].xxxx\n"
319    "132:   ADD TEMP[1].x, TEMP[3].xxxx, IMM[2].yyyy\n"
320    "133:   MOV TEMP[4].w, TEMP[1].xxxx\n"
321    "134:   MAD TEMP[1], TEMP[4], CONST[0].xyxy, IN[0].xyxy\n"
322    "135:   MOV TEMP[3], TEMP[1].xyyy\n"
323    "136:   MOV TEMP[3].w, IMM[0].xxxx\n"
324    "137:   TXL TEMP[4].y, TEMP[3], SAMP[2], 2D\n"
325    "138:   MOV TEMP[3].x, TEMP[4].yyyy\n"
326    "139:   MOV TEMP[4], TEMP[1].zwww\n"
327    "140:   MOV TEMP[4].w, IMM[0].xxxx\n"
328    "141:   TXL TEMP[1].y, TEMP[4], SAMP[2], 2D\n"
329    "142:   MOV TEMP[3].y, TEMP[1].yyyy\n"
330    "143:   MUL TEMP[4].xy, IMM[2].zzzz, TEMP[3].xyyy\n"
331    "144:   ROUND TEMP[1].xy, TEMP[4].xyyy\n"
332    "145:   ABS TEMP[3].xy, TEMP[2].xyyy\n"
333    "146:   MAD TEMP[2].xy, IMM[2].wwww, TEMP[1].xyyy, TEMP[3].xyyy\n"
334    "147:   MUL TEMP[3].xyz, TEMP[2].xyyy, IMM[0].zzzz\n"
335    "148:   MOV TEMP[3].w, IMM[0].xxxx\n"
336    "149:   TXL TEMP[1].xy, TEMP[3], SAMP[0], 2D\n"
337    "150:   MOV TEMP[0].zw, TEMP[1].yyxy\n"
338    "151: ENDIF\n"
339    "152: MOV OUT[0], TEMP[0]\n"
340    "153: END\n";
341 
342 #endif
343