2 * Copyright © 2013 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 #include "brw_context.h"
25 #include "brw_blorp.h"
30 brw_blorp_blit_test_compile(struct brw_context
*brw
,
31 const brw_blorp_blit_prog_key
*key
,
35 fcopy(FILE *f
, size_t *len
)
38 *len
= (size_t)ftell(f
);
43 res
= (char *)malloc(*len
);
45 (void)fseek(f
, 0L, SEEK_SET
);
47 if (fread(res
, 1, *len
, f
) != *len
) {
59 check(struct brw_context
*brw
, const brw_blorp_blit_prog_key
*key
,
60 const char *expected
, size_t expected_len
)
64 FILE *tmp
= tmpfile();
67 printf("failed to create temporary file for the dump\n");
71 brw_blorp_blit_test_compile(brw
, key
, tmp
);
77 if (expected_len
!= len
) {
78 printf("length (%lu) mismatch (%lu expected)\n", len
, expected_len
);
79 fwrite(s
, 1, len
, stdout
);
84 if (memcmp(s
, expected
, len
)) {
85 printf("content mismatch\n");
86 fwrite(s
, 1, len
, stdout
);
95 * One of the flavours gotten when running piglit test:
96 * "ext_framebuffer_multisample-blit-scaled 8"
99 test_gen7_blend_scaled_msaa_8(struct brw_context
*brw
)
101 static const char expected
[] =
102 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
103 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
104 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
105 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
106 "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
107 "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
108 "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
109 "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
110 "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
111 "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
112 "0x000000a0: mul(16) g48<1>F g48<8,8,1>F 2F { align1 WE_normal 1H };\n"
113 "0x000000b0: mul(16) g50<1>F g50<8,8,1>F 4F { align1 WE_normal 1H };\n"
114 "0x000000c0: add(16) g48<1>F g48<8,8,1>F -0.5F { align1 WE_normal 1H };\n"
115 "0x000000d0: add(16) g50<1>F g50<8,8,1>F -0.5F { align1 WE_normal 1H };\n"
116 "0x000000e0: cmp.l.f0(16) null g48<8,8,1>F 0F { align1 WE_normal 1H switch };\n"
117 "0x000000f0: (+f0) mov(16) g48<1>F 0F { align1 WE_normal 1H };\n"
118 "0x00000100: cmp.g.f0(16) null g48<8,8,1>F g2.4<0,1,0>F { align1 WE_normal 1H switch };\n"
119 "0x00000110: (+f0) mov(16) g48<1>F g2.4<0,1,0>F { align1 WE_normal 1H };\n"
120 "0x00000120: cmp.l.f0(16) null g50<8,8,1>F 0F { align1 WE_normal 1H switch };\n"
121 "0x00000130: (+f0) mov(16) g50<1>F 0F { align1 WE_normal 1H };\n"
122 "0x00000140: cmp.g.f0(16) null g50<8,8,1>F g2.5<0,1,0>F { align1 WE_normal 1H switch };\n"
123 "0x00000150: (+f0) mov(16) g50<1>F g2.5<0,1,0>F { align1 WE_normal 1H };\n"
124 "0x00000160: frc(16) g56<1>F g48<8,8,1>F { align1 WE_normal 1H };\n"
125 "0x00000170: frc(16) g58<1>F g50<8,8,1>F { align1 WE_normal 1H };\n"
126 "0x00000180: rndd(16) g44<1>F g48<8,8,1>F { align1 WE_normal 1H };\n"
127 "0x00000190: rndd(16) g46<1>F g50<8,8,1>F { align1 WE_normal 1H };\n"
128 "0x000001a0: mul(16) g48<1>F g44<8,8,1>F 0.5F { align1 WE_normal 1H };\n"
129 "0x000001b0: mul(16) g50<1>F g46<8,8,1>F 0.25F { align1 WE_normal 1H };\n"
130 "0x000001c0: add(16) g52<1>F g48<8,8,1>F 0F { align1 WE_normal 1H };\n"
131 "0x000001d0: add(16) g54<1>F g50<8,8,1>F 0F { align1 WE_normal 1H };\n"
132 "0x000001e0: mov(16) g44<1>UD g52<8,8,1>F { align1 WE_normal 1H };\n"
133 "0x000001f0: mov(16) g46<1>UD g54<8,8,1>F { align1 WE_normal 1H };\n"
134 "0x00000200: frc(16) g62<1>F g52<8,8,1>F { align1 WE_normal 1H };\n"
135 "0x00000210: frc(16) g64<1>F g54<8,8,1>F { align1 WE_normal 1H };\n"
136 "0x00000220: mul(16) g62<1>F g62<8,8,1>F 2F { align1 WE_normal 1H };\n"
137 "0x00000230: mul(16) g64<1>F g64<8,8,1>F 8F { align1 WE_normal 1H };\n"
138 "0x00000240: add(16) g62<1>F g62<8,8,1>F g64<8,8,1>F { align1 WE_normal 1H };\n"
139 "0x00000250: mov(16) g60<1>UD g62<8,8,1>F { align1 WE_normal 1H };\n"
140 "0x00000260: cmp.l.f0(16) null g60<8,8,1>UD 4D { align1 WE_normal 1H switch };\n"
141 "0x00000270: (+f0) if(16) 32 18 null 0x00200012UD { align1 WE_normal 1H switch };\n"
142 "0x00000280: mov(16) g64<1>UD 5D { align1 WE_normal 1H };\n"
143 "0x00000290: cmp.e.f0(16) null g60<8,8,1>UD 1D { align1 WE_normal 1H switch };\n"
144 "0x000002a0: (+f0) mov(16) g64<1>UD 2D { align1 WE_normal 1H };\n"
145 "0x000002b0: cmp.e.f0(16) null g60<8,8,1>UD 2D { align1 WE_normal 1H switch };\n"
146 "0x000002c0: (+f0) mov(16) g64<1>UD 4D { align1 WE_normal 1H };\n"
147 "0x000002d0: cmp.e.f0(16) null g60<8,8,1>UD 3D { align1 WE_normal 1H switch };\n"
148 "0x000002e0: (+f0) mov(16) g64<1>UD 6D { align1 WE_normal 1H };\n"
149 "0x000002f0: else(16) 16 null 0x00000010UD { align1 WE_normal 1H switch };\n"
150 "0x00000300: mov(16) g64<1>UD 0D { align1 WE_normal 1H };\n"
151 "0x00000310: cmp.e.f0(16) null g60<8,8,1>UD 5D { align1 WE_normal 1H switch };\n"
152 "0x00000320: (+f0) mov(16) g64<1>UD 3D { align1 WE_normal 1H };\n"
153 "0x00000330: cmp.e.f0(16) null g60<8,8,1>UD 6D { align1 WE_normal 1H switch };\n"
154 "0x00000340: (+f0) mov(16) g64<1>UD 7D { align1 WE_normal 1H };\n"
155 "0x00000350: cmp.e.f0(16) null g60<8,8,1>UD 7D { align1 WE_normal 1H switch };\n"
156 "0x00000360: (+f0) mov(16) g64<1>UD 1D { align1 WE_normal 1H };\n"
157 "0x00000370: endif(16) 50 null 0x00000032UD { align1 WE_normal 1H switch };\n"
158 "0x00000380: mov(16) g60<1>UD g64<8,8,1>UD { align1 WE_normal 1H };\n"
159 "0x00000390: mov(16) g114<1>UD g60<8,8,1>UD { align1 WE_normal 1H };\n"
160 "0x000003a0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
161 "0x000003b0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
162 "0x000003c0: send(16) g4<1>UW g114<8,8,1>F\n"
163 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
164 "0x000003d0: add(16) g52<1>F g48<8,8,1>F 0.5F { align1 WE_normal 1H };\n"
165 "0x000003e0: add(16) g54<1>F g50<8,8,1>F 0F { align1 WE_normal 1H };\n"
166 "0x000003f0: mov(16) g44<1>UD g52<8,8,1>F { align1 WE_normal 1H };\n"
167 "0x00000400: mov(16) g46<1>UD g54<8,8,1>F { align1 WE_normal 1H };\n"
168 "0x00000410: frc(16) g62<1>F g52<8,8,1>F { align1 WE_normal 1H };\n"
169 "0x00000420: frc(16) g64<1>F g54<8,8,1>F { align1 WE_normal 1H };\n"
170 "0x00000430: mul(16) g62<1>F g62<8,8,1>F 2F { align1 WE_normal 1H };\n"
171 "0x00000440: mul(16) g64<1>F g64<8,8,1>F 8F { align1 WE_normal 1H };\n"
172 "0x00000450: add(16) g62<1>F g62<8,8,1>F g64<8,8,1>F { align1 WE_normal 1H };\n"
173 "0x00000460: mov(16) g60<1>UD g62<8,8,1>F { align1 WE_normal 1H };\n"
174 "0x00000470: cmp.l.f0(16) null g60<8,8,1>UD 4D { align1 WE_normal 1H switch };\n"
175 "0x00000480: (+f0) if(16) 32 18 null 0x00200012UD { align1 WE_normal 1H switch };\n"
176 "0x00000490: mov(16) g64<1>UD 5D { align1 WE_normal 1H };\n"
177 "0x000004a0: cmp.e.f0(16) null g60<8,8,1>UD 1D { align1 WE_normal 1H switch };\n"
178 "0x000004b0: (+f0) mov(16) g64<1>UD 2D { align1 WE_normal 1H };\n"
179 "0x000004c0: cmp.e.f0(16) null g60<8,8,1>UD 2D { align1 WE_normal 1H switch };\n"
180 "0x000004d0: (+f0) mov(16) g64<1>UD 4D { align1 WE_normal 1H };\n"
181 "0x000004e0: cmp.e.f0(16) null g60<8,8,1>UD 3D { align1 WE_normal 1H switch };\n"
182 "0x000004f0: (+f0) mov(16) g64<1>UD 6D { align1 WE_normal 1H };\n"
183 "0x00000500: else(16) 16 null 0x00000010UD { align1 WE_normal 1H switch };\n"
184 "0x00000510: mov(16) g64<1>UD 0D { align1 WE_normal 1H };\n"
185 "0x00000520: cmp.e.f0(16) null g60<8,8,1>UD 5D { align1 WE_normal 1H switch };\n"
186 "0x00000530: (+f0) mov(16) g64<1>UD 3D { align1 WE_normal 1H };\n"
187 "0x00000540: cmp.e.f0(16) null g60<8,8,1>UD 6D { align1 WE_normal 1H switch };\n"
188 "0x00000550: (+f0) mov(16) g64<1>UD 7D { align1 WE_normal 1H };\n"
189 "0x00000560: cmp.e.f0(16) null g60<8,8,1>UD 7D { align1 WE_normal 1H switch };\n"
190 "0x00000570: (+f0) mov(16) g64<1>UD 1D { align1 WE_normal 1H };\n"
191 "0x00000580: endif(16) 50 null 0x00000032UD { align1 WE_normal 1H switch };\n"
192 "0x00000590: mov(16) g60<1>UD g64<8,8,1>UD { align1 WE_normal 1H };\n"
193 "0x000005a0: mov(16) g114<1>UD g60<8,8,1>UD { align1 WE_normal 1H };\n"
194 "0x000005b0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
195 "0x000005c0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
196 "0x000005d0: send(16) g12<1>UW g114<8,8,1>F\n"
197 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
198 "0x000005e0: add(16) g52<1>F g48<8,8,1>F 0F { align1 WE_normal 1H };\n"
199 "0x000005f0: add(16) g54<1>F g50<8,8,1>F 0.25F { align1 WE_normal 1H };\n"
200 "0x00000600: mov(16) g44<1>UD g52<8,8,1>F { align1 WE_normal 1H };\n"
201 "0x00000610: mov(16) g46<1>UD g54<8,8,1>F { align1 WE_normal 1H };\n"
202 "0x00000620: frc(16) g62<1>F g52<8,8,1>F { align1 WE_normal 1H };\n"
203 "0x00000630: frc(16) g64<1>F g54<8,8,1>F { align1 WE_normal 1H };\n"
204 "0x00000640: mul(16) g62<1>F g62<8,8,1>F 2F { align1 WE_normal 1H };\n"
205 "0x00000650: mul(16) g64<1>F g64<8,8,1>F 8F { align1 WE_normal 1H };\n"
206 "0x00000660: add(16) g62<1>F g62<8,8,1>F g64<8,8,1>F { align1 WE_normal 1H };\n"
207 "0x00000670: mov(16) g60<1>UD g62<8,8,1>F { align1 WE_normal 1H };\n"
208 "0x00000680: cmp.l.f0(16) null g60<8,8,1>UD 4D { align1 WE_normal 1H switch };\n"
209 "0x00000690: (+f0) if(16) 32 18 null 0x00200012UD { align1 WE_normal 1H switch };\n"
210 "0x000006a0: mov(16) g64<1>UD 5D { align1 WE_normal 1H };\n"
211 "0x000006b0: cmp.e.f0(16) null g60<8,8,1>UD 1D { align1 WE_normal 1H switch };\n"
212 "0x000006c0: (+f0) mov(16) g64<1>UD 2D { align1 WE_normal 1H };\n"
213 "0x000006d0: cmp.e.f0(16) null g60<8,8,1>UD 2D { align1 WE_normal 1H switch };\n"
214 "0x000006e0: (+f0) mov(16) g64<1>UD 4D { align1 WE_normal 1H };\n"
215 "0x000006f0: cmp.e.f0(16) null g60<8,8,1>UD 3D { align1 WE_normal 1H switch };\n"
216 "0x00000700: (+f0) mov(16) g64<1>UD 6D { align1 WE_normal 1H };\n"
217 "0x00000710: else(16) 16 null 0x00000010UD { align1 WE_normal 1H switch };\n"
218 "0x00000720: mov(16) g64<1>UD 0D { align1 WE_normal 1H };\n"
219 "0x00000730: cmp.e.f0(16) null g60<8,8,1>UD 5D { align1 WE_normal 1H switch };\n"
220 "0x00000740: (+f0) mov(16) g64<1>UD 3D { align1 WE_normal 1H };\n"
221 "0x00000750: cmp.e.f0(16) null g60<8,8,1>UD 6D { align1 WE_normal 1H switch };\n"
222 "0x00000760: (+f0) mov(16) g64<1>UD 7D { align1 WE_normal 1H };\n"
223 "0x00000770: cmp.e.f0(16) null g60<8,8,1>UD 7D { align1 WE_normal 1H switch };\n"
224 "0x00000780: (+f0) mov(16) g64<1>UD 1D { align1 WE_normal 1H };\n"
225 "0x00000790: endif(16) 50 null 0x00000032UD { align1 WE_normal 1H switch };\n"
226 "0x000007a0: mov(16) g60<1>UD g64<8,8,1>UD { align1 WE_normal 1H };\n"
227 "0x000007b0: mov(16) g114<1>UD g60<8,8,1>UD { align1 WE_normal 1H };\n"
228 "0x000007c0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
229 "0x000007d0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
230 "0x000007e0: send(16) g20<1>UW g114<8,8,1>F\n"
231 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
232 "0x000007f0: add(16) g52<1>F g48<8,8,1>F 0.5F { align1 WE_normal 1H };\n"
233 "0x00000800: add(16) g54<1>F g50<8,8,1>F 0.25F { align1 WE_normal 1H };\n"
234 "0x00000810: mov(16) g44<1>UD g52<8,8,1>F { align1 WE_normal 1H };\n"
235 "0x00000820: mov(16) g46<1>UD g54<8,8,1>F { align1 WE_normal 1H };\n"
236 "0x00000830: frc(16) g62<1>F g52<8,8,1>F { align1 WE_normal 1H };\n"
237 "0x00000840: frc(16) g64<1>F g54<8,8,1>F { align1 WE_normal 1H };\n"
238 "0x00000850: mul(16) g62<1>F g62<8,8,1>F 2F { align1 WE_normal 1H };\n"
239 "0x00000860: mul(16) g64<1>F g64<8,8,1>F 8F { align1 WE_normal 1H };\n"
240 "0x00000870: add(16) g62<1>F g62<8,8,1>F g64<8,8,1>F { align1 WE_normal 1H };\n"
241 "0x00000880: mov(16) g60<1>UD g62<8,8,1>F { align1 WE_normal 1H };\n"
242 "0x00000890: cmp.l.f0(16) null g60<8,8,1>UD 4D { align1 WE_normal 1H switch };\n"
243 "0x000008a0: (+f0) if(16) 32 18 null 0x00200012UD { align1 WE_normal 1H switch };\n"
244 "0x000008b0: mov(16) g64<1>UD 5D { align1 WE_normal 1H };\n"
245 "0x000008c0: cmp.e.f0(16) null g60<8,8,1>UD 1D { align1 WE_normal 1H switch };\n"
246 "0x000008d0: (+f0) mov(16) g64<1>UD 2D { align1 WE_normal 1H };\n"
247 "0x000008e0: cmp.e.f0(16) null g60<8,8,1>UD 2D { align1 WE_normal 1H switch };\n"
248 "0x000008f0: (+f0) mov(16) g64<1>UD 4D { align1 WE_normal 1H };\n"
249 "0x00000900: cmp.e.f0(16) null g60<8,8,1>UD 3D { align1 WE_normal 1H switch };\n"
250 "0x00000910: (+f0) mov(16) g64<1>UD 6D { align1 WE_normal 1H };\n"
251 "0x00000920: else(16) 16 null 0x00000010UD { align1 WE_normal 1H switch };\n"
252 "0x00000930: mov(16) g64<1>UD 0D { align1 WE_normal 1H };\n"
253 "0x00000940: cmp.e.f0(16) null g60<8,8,1>UD 5D { align1 WE_normal 1H switch };\n"
254 "0x00000950: (+f0) mov(16) g64<1>UD 3D { align1 WE_normal 1H };\n"
255 "0x00000960: cmp.e.f0(16) null g60<8,8,1>UD 6D { align1 WE_normal 1H switch };\n"
256 "0x00000970: (+f0) mov(16) g64<1>UD 7D { align1 WE_normal 1H };\n"
257 "0x00000980: cmp.e.f0(16) null g60<8,8,1>UD 7D { align1 WE_normal 1H switch };\n"
258 "0x00000990: (+f0) mov(16) g64<1>UD 1D { align1 WE_normal 1H };\n"
259 "0x000009a0: endif(16) 2 null 0x00000002UD { align1 WE_normal 1H switch };\n"
260 "0x000009b0: mov(16) g60<1>UD g64<8,8,1>UD { align1 WE_normal 1H };\n"
261 "0x000009c0: mov(16) g114<1>UD g60<8,8,1>UD { align1 WE_normal 1H };\n"
262 "0x000009d0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
263 "0x000009e0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
264 "0x000009f0: send(16) g28<1>UW g114<8,8,1>F\n"
265 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
266 "0x00000a00: lrp(8) g20<1>F g56<4,1,1>F g28<4,1,1>F g20<4,1,1>F { align16 WE_normal 1Q };\n"
267 "0x00000a10: lrp(8) g21<1>F g57<4,1,1>F g29<4,1,1>F g21<4,1,1>F { align16 WE_normal 2Q };\n"
268 "0x00000a20: lrp(8) g22<1>F g56<4,1,1>F g30<4,1,1>F g22<4,1,1>F { align16 WE_normal 1Q };\n"
269 "0x00000a30: lrp(8) g23<1>F g57<4,1,1>F g31<4,1,1>F g23<4,1,1>F { align16 WE_normal 2Q };\n"
270 "0x00000a40: lrp(8) g24<1>F g56<4,1,1>F g32<4,1,1>F g24<4,1,1>F { align16 WE_normal 1Q };\n"
271 "0x00000a50: lrp(8) g25<1>F g57<4,1,1>F g33<4,1,1>F g25<4,1,1>F { align16 WE_normal 2Q };\n"
272 "0x00000a60: lrp(8) g26<1>F g56<4,1,1>F g34<4,1,1>F g26<4,1,1>F { align16 WE_normal 1Q };\n"
273 "0x00000a70: lrp(8) g27<1>F g57<4,1,1>F g35<4,1,1>F g27<4,1,1>F { align16 WE_normal 2Q };\n"
274 "0x00000a80: lrp(8) g4<1>F g56<4,1,1>F g12<4,1,1>F g4<4,1,1>F { align16 WE_normal 1Q };\n"
275 "0x00000a90: lrp(8) g5<1>F g57<4,1,1>F g13<4,1,1>F g5<4,1,1>F { align16 WE_normal 2Q };\n"
276 "0x00000aa0: lrp(8) g6<1>F g56<4,1,1>F g14<4,1,1>F g6<4,1,1>F { align16 WE_normal 1Q };\n"
277 "0x00000ab0: lrp(8) g7<1>F g57<4,1,1>F g15<4,1,1>F g7<4,1,1>F { align16 WE_normal 2Q };\n"
278 "0x00000ac0: lrp(8) g8<1>F g56<4,1,1>F g16<4,1,1>F g8<4,1,1>F { align16 WE_normal 1Q };\n"
279 "0x00000ad0: lrp(8) g9<1>F g57<4,1,1>F g17<4,1,1>F g9<4,1,1>F { align16 WE_normal 2Q };\n"
280 "0x00000ae0: lrp(8) g10<1>F g56<4,1,1>F g18<4,1,1>F g10<4,1,1>F { align16 WE_normal 1Q };\n"
281 "0x00000af0: lrp(8) g11<1>F g57<4,1,1>F g19<4,1,1>F g11<4,1,1>F { align16 WE_normal 2Q };\n"
282 "0x00000b00: lrp(8) g4<1>F g58<4,1,1>F g20<4,1,1>F g4<4,1,1>F { align16 WE_normal 1Q };\n"
283 "0x00000b10: lrp(8) g5<1>F g59<4,1,1>F g21<4,1,1>F g5<4,1,1>F { align16 WE_normal 2Q };\n"
284 "0x00000b20: lrp(8) g6<1>F g58<4,1,1>F g22<4,1,1>F g6<4,1,1>F { align16 WE_normal 1Q };\n"
285 "0x00000b30: lrp(8) g7<1>F g59<4,1,1>F g23<4,1,1>F g7<4,1,1>F { align16 WE_normal 2Q };\n"
286 "0x00000b40: lrp(8) g8<1>F g58<4,1,1>F g24<4,1,1>F g8<4,1,1>F { align16 WE_normal 1Q };\n"
287 "0x00000b50: lrp(8) g9<1>F g59<4,1,1>F g25<4,1,1>F g9<4,1,1>F { align16 WE_normal 2Q };\n"
288 "0x00000b60: lrp(8) g10<1>F g58<4,1,1>F g26<4,1,1>F g10<4,1,1>F { align16 WE_normal 1Q };\n"
289 "0x00000b70: lrp(8) g11<1>F g59<4,1,1>F g27<4,1,1>F g11<4,1,1>F { align16 WE_normal 2Q };\n"
290 "0x00000b80: mov(16) g114<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
291 "0x00000b90: mov(16) g116<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
292 "0x00000ba0: mov(16) g118<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
293 "0x00000bb0: mov(16) g120<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
294 "0x00000bc0: sendc(16) null g114<8,8,1>F\n"
295 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
296 struct brw_blorp_blit_prog_key key
;
299 key
.tex_layout
= INTEL_MSAA_LAYOUT_UMS
;
301 key
.src_layout
= INTEL_MSAA_LAYOUT_UMS
;
304 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
305 key
.src_tiled_w
= false;
306 key
.dst_tiled_w
= false;
308 key
.use_kill
= false;
309 key
.persample_msaa_dispatch
= false;
310 key
.blit_scaled
= true;
311 key
.x_scale
= 2.000000;
312 key
.y_scale
= 4.000000;
313 key
.bilinear_filter
= false;
315 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
319 * One of the flavours gotten when running piglit test:
320 * "ext_framebuffer_multisample-blit-scaled 8"
323 test_gen7_msaa_8_ums_to_cms(struct brw_context
*brw
)
325 static const char expected
[] =
326 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
327 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
328 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
329 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
330 "0x00000040: and(1) g54<1>UD g0<0,1,0>UD 0x000000c0UD { align1 WE_normal };\n"
331 "0x00000050: shr(1) g54<1>UD g54<0,1,0>UD 0x00000005UD { align1 WE_normal };\n"
332 "0x00000060: mov(16) g56<1>UW 0x00003210V { align1 WE_normal 1H };\n"
333 "0x00000070: add(16) g52<1>UD g54<0,1,0>UW g56<1,4,0>UW { align1 WE_normal 1H };\n"
334 "0x00000080: add(8) g53<1>UD g54<0,1,0>UW g56.2<1,4,0>UW { align1 WE_normal 1Q };\n"
335 "0x00000090: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
336 "0x000000a0: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
337 "0x000000b0: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
338 "0x000000c0: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
339 "0x000000d0: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
340 "0x000000e0: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
341 "0x000000f0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
342 "0x00000100: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
343 "0x00000110: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
344 "0x00000120: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
345 "0x00000130: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
346 "0x00000140: send(16) g4<1>UW g114<8,8,1>F\n"
347 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
348 "0x00000150: mov(16) g114<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
349 "0x00000160: mov(16) g116<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
350 "0x00000170: mov(16) g118<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
351 "0x00000180: mov(16) g120<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
352 "0x00000190: sendc(16) null g114<8,8,1>F\n"
353 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
354 struct brw_blorp_blit_prog_key key
;
357 key
.tex_layout
= INTEL_MSAA_LAYOUT_UMS
;
359 key
.src_layout
= INTEL_MSAA_LAYOUT_UMS
;
361 key
.rt_layout
= INTEL_MSAA_LAYOUT_CMS
;
363 key
.dst_layout
= INTEL_MSAA_LAYOUT_CMS
;
364 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
365 key
.src_tiled_w
= false;
366 key
.dst_tiled_w
= false;
368 key
.use_kill
= false;
369 key
.persample_msaa_dispatch
= true;
370 key
.blit_scaled
= false;
371 key
.x_scale
= 2.000000;
372 key
.y_scale
= 4.000000;
373 key
.bilinear_filter
= false;
375 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
379 test_gen7_msaa_8_cms_to_cms(struct brw_context
*brw
)
381 static const char expected
[] =
382 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
383 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
384 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
385 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
386 "0x00000040: and(1) g54<1>UD g0<0,1,0>UD 0x000000c0UD { align1 WE_normal };\n"
387 "0x00000050: shr(1) g54<1>UD g54<0,1,0>UD 0x00000005UD { align1 WE_normal };\n"
388 "0x00000060: mov(16) g56<1>UW 0x00003210V { align1 WE_normal 1H };\n"
389 "0x00000070: add(16) g52<1>UD g54<0,1,0>UW g56<1,4,0>UW { align1 WE_normal 1H };\n"
390 "0x00000080: add(8) g53<1>UD g54<0,1,0>UW g56.2<1,4,0>UW { align1 WE_normal 1Q };\n"
391 "0x00000090: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
392 "0x000000a0: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
393 "0x000000b0: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
394 "0x000000c0: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
395 "0x000000d0: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
396 "0x000000e0: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
397 "0x000000f0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
398 "0x00000100: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
399 "0x00000110: mov(16) g114<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
400 "0x00000120: mov(16) g116<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
401 "0x00000130: send(16) g36<1>UW g114<8,8,1>F\n"
402 " sampler (0, 0, 29, 2) mlen 4 rlen 8 { align1 WE_normal 1H };\n"
403 "0x00000140: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
404 "0x00000150: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
405 "0x00000160: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
406 "0x00000170: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
407 "0x00000180: send(16) g4<1>UW g114<8,8,1>F\n"
408 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
409 "0x00000190: mov(16) g114<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
410 "0x000001a0: mov(16) g116<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
411 "0x000001b0: mov(16) g118<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
412 "0x000001c0: mov(16) g120<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
413 "0x000001d0: sendc(16) null g114<8,8,1>F\n"
414 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
415 struct brw_blorp_blit_prog_key key
;
418 key
.tex_layout
= INTEL_MSAA_LAYOUT_CMS
;
420 key
.src_layout
= INTEL_MSAA_LAYOUT_CMS
;
422 key
.rt_layout
= INTEL_MSAA_LAYOUT_CMS
;
424 key
.dst_layout
= INTEL_MSAA_LAYOUT_CMS
;
425 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
426 key
.src_tiled_w
= false;
427 key
.dst_tiled_w
= false;
429 key
.use_kill
= false;
430 key
.persample_msaa_dispatch
= true;
431 key
.blit_scaled
= false;
432 key
.x_scale
= 2.000000;
433 key
.y_scale
= 4.000000;
434 key
.bilinear_filter
= false;
436 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
440 * * One of the flavours gotten when running piglit test:
441 * * "ext_framebuffer_multisample-blit-scaled 4"
444 test_gen7_msaa_4_ums_to_cms(struct brw_context
*brw
)
446 static const char expected
[] =
447 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
448 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
449 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
450 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
451 "0x00000040: mov(16) g54<1>UW 0x00003210V { align1 WE_normal 1H };\n"
452 "0x00000050: mov(8) g52<1>UD g54<1,4,0>UW { align1 WE_normal 1Q };\n"
453 "0x00000060: mov(8) g53<1>UD g54.2<1,4,0>UW { align1 WE_normal 1Q };\n"
454 "0x00000070: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
455 "0x00000080: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
456 "0x00000090: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
457 "0x000000a0: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
458 "0x000000b0: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
459 "0x000000c0: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
460 "0x000000d0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
461 "0x000000e0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
462 "0x000000f0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
463 "0x00000100: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
464 "0x00000110: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
465 "0x00000120: send(16) g4<1>UW g114<8,8,1>F\n"
466 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
467 "0x00000130: mov(16) g114<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
468 "0x00000140: mov(16) g116<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
469 "0x00000150: mov(16) g118<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
470 "0x00000160: mov(16) g120<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
471 "0x00000170: sendc(16) null g114<8,8,1>F\n"
472 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
473 struct brw_blorp_blit_prog_key key
;
476 key
.tex_layout
= INTEL_MSAA_LAYOUT_UMS
;
478 key
.src_layout
= INTEL_MSAA_LAYOUT_UMS
;
480 key
.rt_layout
= INTEL_MSAA_LAYOUT_CMS
;
482 key
.dst_layout
= INTEL_MSAA_LAYOUT_CMS
;
483 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
484 key
.src_tiled_w
= false;
485 key
.dst_tiled_w
= false;
487 key
.use_kill
= false;
488 key
.persample_msaa_dispatch
= true;
489 key
.blit_scaled
= false;
490 key
.x_scale
= 2.000000;
491 key
.y_scale
= 2.000000;
492 key
.bilinear_filter
= false;
494 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
498 * Gotten when running piglit test:
499 * "ext_framebuffer_multisample-alpha-blending"
502 test_gen7_alpha_blend(struct brw_context
*brw
)
504 static const char expected
[] =
505 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
506 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
507 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
508 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
509 "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
510 "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
511 "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
512 "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
513 "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
514 "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
515 "0x000000a0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
516 "0x000000b0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
517 "0x000000c0: mov(16) g114<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
518 "0x000000d0: mov(16) g116<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
519 "0x000000e0: send(16) g36<1>UW g114<8,8,1>F\n"
520 " sampler (0, 0, 29, 2) mlen 4 rlen 8 { align1 WE_normal 1H };\n"
521 "0x000000f0: mov(16) g114<1>UD 0x00000000UD { align1 WE_normal 1H };\n"
522 "0x00000100: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
523 "0x00000110: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
524 "0x00000120: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
525 "0x00000130: send(16) g4<1>UW g114<8,8,1>F\n"
526 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
527 "0x00000140: cmp.ne.f0(16) null g36<8,8,1>UD 0x00000000UD { align1 WE_normal 1H switch };\n"
528 "0x00000150: (+f0) if(16) 150 150 null 0x00960096UD { align1 WE_normal 1H switch };\n"
529 "0x00000160: mov(16) g52<1>UD 0x00000001UD { align1 WE_normal 1H };\n"
530 "0x00000170: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
531 "0x00000180: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
532 "0x00000190: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
533 "0x000001a0: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
534 "0x000001b0: send(16) g12<1>UW g114<8,8,1>F\n"
535 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
536 "0x000001c0: add(16) g4<1>F g4<8,8,1>F g12<8,8,1>F { align1 WE_normal 1H };\n"
537 "0x000001d0: add(16) g6<1>F g6<8,8,1>F g14<8,8,1>F { align1 WE_normal 1H };\n"
538 "0x000001e0: add(16) g8<1>F g8<8,8,1>F g16<8,8,1>F { align1 WE_normal 1H };\n"
539 "0x000001f0: add(16) g10<1>F g10<8,8,1>F g18<8,8,1>F { align1 WE_normal 1H };\n"
540 "0x00000200: mov(16) g52<1>UD 0x00000002UD { align1 WE_normal 1H };\n"
541 "0x00000210: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
542 "0x00000220: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
543 "0x00000230: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
544 "0x00000240: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
545 "0x00000250: send(16) g12<1>UW g114<8,8,1>F\n"
546 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
547 "0x00000260: mov(16) g52<1>UD 0x00000003UD { align1 WE_normal 1H };\n"
548 "0x00000270: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
549 "0x00000280: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
550 "0x00000290: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
551 "0x000002a0: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
552 "0x000002b0: send(16) g20<1>UW g114<8,8,1>F\n"
553 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
554 "0x000002c0: add(16) g12<1>F g12<8,8,1>F g20<8,8,1>F { align1 WE_normal 1H };\n"
555 "0x000002d0: add(16) g14<1>F g14<8,8,1>F g22<8,8,1>F { align1 WE_normal 1H };\n"
556 "0x000002e0: add(16) g16<1>F g16<8,8,1>F g24<8,8,1>F { align1 WE_normal 1H };\n"
557 "0x000002f0: add(16) g18<1>F g18<8,8,1>F g26<8,8,1>F { align1 WE_normal 1H };\n"
558 "0x00000300: add(16) g4<1>F g4<8,8,1>F g12<8,8,1>F { align1 WE_normal 1H };\n"
559 "0x00000310: add(16) g6<1>F g6<8,8,1>F g14<8,8,1>F { align1 WE_normal 1H };\n"
560 "0x00000320: add(16) g8<1>F g8<8,8,1>F g16<8,8,1>F { align1 WE_normal 1H };\n"
561 "0x00000330: add(16) g10<1>F g10<8,8,1>F g18<8,8,1>F { align1 WE_normal 1H };\n"
562 "0x00000340: mov(16) g52<1>UD 0x00000004UD { align1 WE_normal 1H };\n"
563 "0x00000350: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
564 "0x00000360: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
565 "0x00000370: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
566 "0x00000380: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
567 "0x00000390: send(16) g12<1>UW g114<8,8,1>F\n"
568 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
569 "0x000003a0: mov(16) g52<1>UD 0x00000005UD { align1 WE_normal 1H };\n"
570 "0x000003b0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
571 "0x000003c0: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
572 "0x000003d0: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
573 "0x000003e0: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
574 "0x000003f0: send(16) g20<1>UW g114<8,8,1>F\n"
575 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
576 "0x00000400: add(16) g12<1>F g12<8,8,1>F g20<8,8,1>F { align1 WE_normal 1H };\n"
577 "0x00000410: add(16) g14<1>F g14<8,8,1>F g22<8,8,1>F { align1 WE_normal 1H };\n"
578 "0x00000420: add(16) g16<1>F g16<8,8,1>F g24<8,8,1>F { align1 WE_normal 1H };\n"
579 "0x00000430: add(16) g18<1>F g18<8,8,1>F g26<8,8,1>F { align1 WE_normal 1H };\n"
580 "0x00000440: mov(16) g52<1>UD 0x00000006UD { align1 WE_normal 1H };\n"
581 "0x00000450: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
582 "0x00000460: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
583 "0x00000470: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
584 "0x00000480: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
585 "0x00000490: send(16) g20<1>UW g114<8,8,1>F\n"
586 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
587 "0x000004a0: mov(16) g52<1>UD 0x00000007UD { align1 WE_normal 1H };\n"
588 "0x000004b0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
589 "0x000004c0: mov(16) g116<1>UD g36<8,8,1>UD { align1 WE_normal 1H };\n"
590 "0x000004d0: mov(16) g118<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
591 "0x000004e0: mov(16) g120<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
592 "0x000004f0: send(16) g28<1>UW g114<8,8,1>F\n"
593 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
594 "0x00000500: add(16) g20<1>F g20<8,8,1>F g28<8,8,1>F { align1 WE_normal 1H };\n"
595 "0x00000510: add(16) g22<1>F g22<8,8,1>F g30<8,8,1>F { align1 WE_normal 1H };\n"
596 "0x00000520: add(16) g24<1>F g24<8,8,1>F g32<8,8,1>F { align1 WE_normal 1H };\n"
597 "0x00000530: add(16) g26<1>F g26<8,8,1>F g34<8,8,1>F { align1 WE_normal 1H };\n"
598 "0x00000540: add(16) g12<1>F g12<8,8,1>F g20<8,8,1>F { align1 WE_normal 1H };\n"
599 "0x00000550: add(16) g14<1>F g14<8,8,1>F g22<8,8,1>F { align1 WE_normal 1H };\n"
600 "0x00000560: add(16) g16<1>F g16<8,8,1>F g24<8,8,1>F { align1 WE_normal 1H };\n"
601 "0x00000570: add(16) g18<1>F g18<8,8,1>F g26<8,8,1>F { align1 WE_normal 1H };\n"
602 "0x00000580: add(16) g4<1>F g4<8,8,1>F g12<8,8,1>F { align1 WE_normal 1H };\n"
603 "0x00000590: add(16) g6<1>F g6<8,8,1>F g14<8,8,1>F { align1 WE_normal 1H };\n"
604 "0x000005a0: add(16) g8<1>F g8<8,8,1>F g16<8,8,1>F { align1 WE_normal 1H };\n"
605 "0x000005b0: add(16) g10<1>F g10<8,8,1>F g18<8,8,1>F { align1 WE_normal 1H };\n"
606 "0x000005c0: mul(16) g4<1>F g4<8,8,1>F 0.125F { align1 WE_normal 1H };\n"
607 "0x000005d0: mul(16) g6<1>F g6<8,8,1>F 0.125F { align1 WE_normal 1H };\n"
608 "0x000005e0: mul(16) g8<1>F g8<8,8,1>F 0.125F { align1 WE_normal 1H };\n"
609 "0x000005f0: mul(16) g10<1>F g10<8,8,1>F 0.125F { align1 WE_normal 1H };\n"
610 "0x00000600: endif(16) 2 null 0x00000002UD { align1 WE_normal 1H switch };\n"
611 "0x00000610: mov(16) g114<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
612 "0x00000620: mov(16) g116<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
613 "0x00000630: mov(16) g118<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
614 "0x00000640: mov(16) g120<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
615 "0x00000650: sendc(16) null g114<8,8,1>F\n"
616 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
617 struct brw_blorp_blit_prog_key key
;
620 key
.tex_layout
= INTEL_MSAA_LAYOUT_CMS
;
622 key
.src_layout
= INTEL_MSAA_LAYOUT_CMS
;
624 key
.rt_layout
= INTEL_MSAA_LAYOUT_NONE
;
626 key
.dst_layout
= INTEL_MSAA_LAYOUT_NONE
;
627 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
628 key
.src_tiled_w
= false;
629 key
.dst_tiled_w
= false;
631 key
.use_kill
= false;
632 key
.persample_msaa_dispatch
= false;
633 key
.blit_scaled
= false;
634 key
.x_scale
= 2.000000;
635 key
.y_scale
= 4.000000;
636 key
.bilinear_filter
= false;
638 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
642 * Gotten when running piglit test:
643 * "ext_framebuffer_multisample-unaligned-blit 8 stencil msaa"
646 test_gen7_unaligned_8_msaa(struct brw_context
*brw
)
648 static const char expected
[] =
649 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
650 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
651 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
652 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
653 "0x00000040: and(16) g54<1>UD g48<8,8,1>UD 0xfff4UW { align1 WE_normal 1H };\n"
654 "0x00000050: shr(16) g54<1>UD g54<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
655 "0x00000060: and(16) g56<1>UD g50<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
656 "0x00000070: shl(16) g56<1>UD g56<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
657 "0x00000080: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
658 "0x00000090: and(16) g56<1>UD g48<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
659 "0x000000a0: or(16) g44<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
660 "0x000000b0: and(16) g54<1>UD g50<8,8,1>UD 0xfffeUW { align1 WE_normal 1H };\n"
661 "0x000000c0: shl(16) g54<1>UD g54<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
662 "0x000000d0: and(16) g56<1>UD g48<8,8,1>UD 0x0008UW { align1 WE_normal 1H };\n"
663 "0x000000e0: shr(16) g56<1>UD g56<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
664 "0x000000f0: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
665 "0x00000100: and(16) g56<1>UD g48<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
666 "0x00000110: shr(16) g56<1>UD g56<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
667 "0x00000120: or(16) g46<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
668 "0x00000130: and(16) g54<1>UD g44<8,8,1>UD 0xfff8UW { align1 WE_normal 1H };\n"
669 "0x00000140: shr(16) g54<1>UD g54<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
670 "0x00000150: and(16) g56<1>UD g44<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
671 "0x00000160: or(16) g48<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
672 "0x00000170: and(16) g54<1>UD g46<8,8,1>UD 0xfffcUW { align1 WE_normal 1H };\n"
673 "0x00000180: shr(16) g54<1>UD g54<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
674 "0x00000190: and(16) g56<1>UD g46<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
675 "0x000001a0: or(16) g50<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
676 "0x000001b0: and(16) g54<1>UD g44<8,8,1>UD 0x0004UW { align1 WE_normal 1H };\n"
677 "0x000001c0: and(16) g56<1>UD g46<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
678 "0x000001d0: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
679 "0x000001e0: and(16) g56<1>UD g44<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
680 "0x000001f0: shr(16) g56<1>UD g56<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
681 "0x00000200: or(16) g52<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
682 "0x00000210: cmp.ge.f0(16) null g48<8,8,1>UD g2<0,1,0>UD { align1 WE_normal 1H switch };\n"
683 "0x00000220: (+f0) cmp.ge.f0(16) null g50<8,8,1>UD g2.2<0,1,0>UD { align1 WE_normal 1H switch };\n"
684 "0x00000230: (+f0) cmp.l.f0(16) null g48<8,8,1>UD g2.1<0,1,0>UD { align1 WE_normal 1H switch };\n"
685 "0x00000240: (+f0) cmp.l.f0(16) null g50<8,8,1>UD g2.3<0,1,0>UD { align1 WE_normal 1H switch };\n"
686 "0x00000250: and(1) g1.14<1>UW f0<0,1,0>UW g1.14<0,1,0>UW { align1 WE_all };\n"
687 "0x00000260: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
688 "0x00000270: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
689 "0x00000280: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
690 "0x00000290: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
691 "0x000002a0: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
692 "0x000002b0: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
693 "0x000002c0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
694 "0x000002d0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
695 "0x000002e0: and(16) g54<1>UD g44<8,8,1>UD 0xfffeUW { align1 WE_normal 1H };\n"
696 "0x000002f0: shl(16) g54<1>UD g54<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
697 "0x00000300: and(16) g56<1>UD g52<8,8,1>UD 0x0004UW { align1 WE_normal 1H };\n"
698 "0x00000310: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
699 "0x00000320: and(16) g56<1>UD g52<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
700 "0x00000330: shl(16) g56<1>UD g56<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
701 "0x00000340: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
702 "0x00000350: and(16) g56<1>UD g44<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
703 "0x00000360: or(16) g48<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
704 "0x00000370: and(16) g54<1>UD g46<8,8,1>UD 0xfffeUW { align1 WE_normal 1H };\n"
705 "0x00000380: shl(16) g54<1>UD g54<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
706 "0x00000390: and(16) g56<1>UD g52<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
707 "0x000003a0: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
708 "0x000003b0: and(16) g56<1>UD g46<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
709 "0x000003c0: or(16) g50<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
710 "0x000003d0: and(16) g54<1>UD g48<8,8,1>UD 0xfffaUW { align1 WE_normal 1H };\n"
711 "0x000003e0: shl(16) g54<1>UD g54<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
712 "0x000003f0: and(16) g56<1>UD g50<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
713 "0x00000400: shl(16) g56<1>UD g56<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
714 "0x00000410: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
715 "0x00000420: and(16) g56<1>UD g50<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
716 "0x00000430: shl(16) g56<1>UD g56<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
717 "0x00000440: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
718 "0x00000450: and(16) g56<1>UD g48<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
719 "0x00000460: or(16) g44<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
720 "0x00000470: and(16) g54<1>UD g50<8,8,1>UD 0xfffcUW { align1 WE_normal 1H };\n"
721 "0x00000480: shr(16) g54<1>UD g54<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
722 "0x00000490: and(16) g56<1>UD g48<8,8,1>UD 0x0004UW { align1 WE_normal 1H };\n"
723 "0x000004a0: shr(16) g56<1>UD g56<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
724 "0x000004b0: or(16) g46<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
725 "0x000004c0: and(16) g54<1>UD g44<8,8,1>UD 0xfff8UW { align1 WE_normal 1H };\n"
726 "0x000004d0: shr(16) g54<1>UD g54<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
727 "0x000004e0: and(16) g56<1>UD g44<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
728 "0x000004f0: or(16) g48<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
729 "0x00000500: and(16) g54<1>UD g46<8,8,1>UD 0xfffcUW { align1 WE_normal 1H };\n"
730 "0x00000510: shr(16) g54<1>UD g54<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
731 "0x00000520: and(16) g56<1>UD g46<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
732 "0x00000530: or(16) g50<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
733 "0x00000540: and(16) g54<1>UD g44<8,8,1>UD 0x0004UW { align1 WE_normal 1H };\n"
734 "0x00000550: and(16) g56<1>UD g46<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
735 "0x00000560: or(16) g54<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
736 "0x00000570: and(16) g56<1>UD g44<8,8,1>UD 0x0002UW { align1 WE_normal 1H };\n"
737 "0x00000580: shr(16) g56<1>UD g56<8,8,1>UD 0x0001UW { align1 WE_normal 1H };\n"
738 "0x00000590: or(16) g52<1>UD g54<8,8,1>UD g56<8,8,1>UD { align1 WE_normal 1H };\n"
739 "0x000005a0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
740 "0x000005b0: mov(16) g118<1>UD g48<8,8,1>UD { align1 WE_normal 1H };\n"
741 "0x000005c0: mov(16) g120<1>UD g50<8,8,1>UD { align1 WE_normal 1H };\n"
742 "0x000005d0: send(16) g4<1>UW g114<8,8,1>F\n"
743 " sampler (0, 0, 30, 2) mlen 8 rlen 8 { align1 WE_normal 1H };\n"
744 "0x000005e0: mov(16) g114<1>UD g0<8,8,1>UD { align1 WE_normal 1H };\n"
745 "0x000005f0: mov(16) g116<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
746 "0x00000600: mov(16) g118<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
747 "0x00000610: mov(16) g120<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
748 "0x00000620: mov(16) g122<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
749 "0x00000630: sendc(16) null g114<8,8,1>F\n"
750 " render ( RT write, 1, 0, 12) mlen 10 rlen 0 { align1 WE_normal 1H EOT };\n";
751 struct brw_blorp_blit_prog_key key
;
754 key
.tex_layout
= INTEL_MSAA_LAYOUT_IMS
;
756 key
.src_layout
= INTEL_MSAA_LAYOUT_IMS
;
758 key
.rt_layout
= INTEL_MSAA_LAYOUT_NONE
;
760 key
.dst_layout
= INTEL_MSAA_LAYOUT_IMS
;
761 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
762 key
.src_tiled_w
= true;
763 key
.dst_tiled_w
= true;
766 key
.persample_msaa_dispatch
= false;
767 key
.blit_scaled
= false;
768 key
.x_scale
= 2.000000;
769 key
.y_scale
= 4.000000;
770 key
.bilinear_filter
= false;
772 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
776 * One of the most common flavours gotten running piglit tests:
777 * "ext_framebuffer_multisample-*"
780 test_gen7_simple_src_samples_zero(struct brw_context
*brw
)
782 static const char expected
[] =
783 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
784 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
785 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
786 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
787 "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
788 "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
789 "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
790 "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
791 "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
792 "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
793 "0x000000a0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
794 "0x000000b0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
795 "0x000000c0: mov(16) g114<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
796 "0x000000d0: mov(16) g116<1>UD 0x00000000UD { align1 WE_normal 1H };\n"
797 "0x000000e0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
798 "0x000000f0: send(16) g4<1>UW g114<8,8,1>F\n"
799 " sampler (0, 0, 7, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
800 "0x00000100: mov(16) g114<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
801 "0x00000110: mov(16) g116<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
802 "0x00000120: mov(16) g118<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
803 "0x00000130: mov(16) g120<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
804 "0x00000140: sendc(16) null g114<8,8,1>F\n"
805 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
806 struct brw_blorp_blit_prog_key key
;
809 key
.tex_layout
= INTEL_MSAA_LAYOUT_NONE
;
811 key
.src_layout
= INTEL_MSAA_LAYOUT_NONE
;
813 key
.rt_layout
= INTEL_MSAA_LAYOUT_NONE
;
815 key
.dst_layout
= INTEL_MSAA_LAYOUT_NONE
;
816 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
817 key
.src_tiled_w
= false;
818 key
.dst_tiled_w
= false;
820 key
.use_kill
= false;
821 key
.persample_msaa_dispatch
= false;
822 key
.blit_scaled
= false;
823 key
.x_scale
= 2.000000;
824 key
.y_scale
= 0.000000;
825 key
.bilinear_filter
= false;
827 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
831 test_gen7_bilinear(struct brw_context
*brw
)
833 static const char expected
[] =
834 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
835 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
836 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
837 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
838 "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
839 "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
840 "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
841 "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
842 "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
843 "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
844 "0x000000a0: mov(16) g114<1>F g48<8,8,1>F { align1 WE_normal 1H };\n"
845 "0x000000b0: mov(16) g116<1>F g50<8,8,1>F { align1 WE_normal 1H };\n"
846 "0x000000c0: send(16) g4<1>UW g114<8,8,1>F\n"
847 " sampler (0, 0, 0, 2) mlen 4 rlen 8 { align1 WE_normal 1H };\n"
848 "0x000000d0: mov(16) g114<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
849 "0x000000e0: mov(16) g116<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
850 "0x000000f0: mov(16) g118<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
851 "0x00000100: mov(16) g120<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
852 "0x00000110: sendc(16) null g114<8,8,1>F\n"
853 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
854 struct brw_blorp_blit_prog_key key
;
857 key
.tex_layout
= INTEL_MSAA_LAYOUT_NONE
;
859 key
.src_layout
= INTEL_MSAA_LAYOUT_NONE
;
861 key
.rt_layout
= INTEL_MSAA_LAYOUT_NONE
;
863 key
.dst_layout
= INTEL_MSAA_LAYOUT_NONE
;
864 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
865 key
.src_tiled_w
= false;
866 key
.dst_tiled_w
= false;
868 key
.use_kill
= false;
869 key
.persample_msaa_dispatch
= false;
870 key
.blit_scaled
= true;
871 key
.x_scale
= 2.000000;
872 key
.y_scale
= 0.000000;
873 key
.bilinear_filter
= true;
875 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
879 test_gen6_alpha_blend(struct brw_context
*brw
)
881 static const char expected
[] =
882 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
883 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
884 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
885 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
886 "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
887 "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
888 "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
889 "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
890 "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
891 "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
892 "0x000000a0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
893 "0x000000b0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
894 "0x000000c0: shl(16) g54<1>UD g44<8,8,1>UD 1W { align1 WE_normal 1H };\n"
895 "0x000000d0: shl(16) g56<1>UD g46<8,8,1>UD 1W { align1 WE_normal 1H };\n"
896 "0x000000e0: add(16) g48<1>UD g54<8,8,1>UD 1W { align1 WE_normal 1H };\n"
897 "0x000000f0: add(16) g50<1>UD g56<8,8,1>UD 1W { align1 WE_normal 1H };\n"
898 "0x00000100: mov(16) m2<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
899 "0x00000110: mov(16) m4<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
900 "0x00000120: send(16) g4<1>UW m2<8,8,1>F\n"
901 " sampler (0, 0, 0, 2) mlen 4 rlen 8 { align1 WE_normal 1H };\n"
902 "0x00000130: mov(16) m2<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
903 "0x00000140: mov(16) m4<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
904 "0x00000150: mov(16) m6<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
905 "0x00000160: mov(16) m8<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
906 "0x00000170: sendc(16) null m2<8,8,1>F\n"
907 " render ( RT write, 1, 0, 12, 0) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
908 struct brw_blorp_blit_prog_key key
;
911 key
.tex_layout
= INTEL_MSAA_LAYOUT_UMS
;
913 key
.src_layout
= INTEL_MSAA_LAYOUT_UMS
;
915 key
.rt_layout
= INTEL_MSAA_LAYOUT_NONE
;
917 key
.dst_layout
= INTEL_MSAA_LAYOUT_NONE
;
918 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
919 key
.src_tiled_w
= false;
920 key
.dst_tiled_w
= false;
922 key
.use_kill
= false;
923 key
.persample_msaa_dispatch
= false;
924 key
.blit_scaled
= false;
925 key
.x_scale
= 2.000000;
926 key
.y_scale
= 4.000000;
927 key
.bilinear_filter
= false;
929 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
933 test_gen6_simple_src_samples_zero(struct brw_context
*brw
)
935 static const char expected
[] =
936 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
937 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
938 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
939 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
940 "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
941 "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
942 "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
943 "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
944 "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
945 "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
946 "0x000000a0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
947 "0x000000b0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
948 "0x000000c0: mov(16) m2<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
949 "0x000000d0: mov(16) m4<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
950 "0x000000e0: send(16) g4<1>UW m2<8,8,1>F\n"
951 " sampler (0, 0, 7, 2) mlen 4 rlen 8 { align1 WE_normal 1H };\n"
952 "0x000000f0: mov(16) m2<1>F g4<8,8,1>F { align1 WE_normal 1H };\n"
953 "0x00000100: mov(16) m4<1>F g6<8,8,1>F { align1 WE_normal 1H };\n"
954 "0x00000110: mov(16) m6<1>F g8<8,8,1>F { align1 WE_normal 1H };\n"
955 "0x00000120: mov(16) m8<1>F g10<8,8,1>F { align1 WE_normal 1H };\n"
956 "0x00000130: sendc(16) null m2<8,8,1>F\n"
957 " render ( RT write, 1, 0, 12, 0) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
958 struct brw_blorp_blit_prog_key key
;
961 key
.tex_layout
= INTEL_MSAA_LAYOUT_NONE
;
963 key
.src_layout
= INTEL_MSAA_LAYOUT_NONE
;
965 key
.rt_layout
= INTEL_MSAA_LAYOUT_NONE
;
967 key
.dst_layout
= INTEL_MSAA_LAYOUT_NONE
;
968 key
.texture_data_type
= BRW_REGISTER_TYPE_F
;
969 key
.src_tiled_w
= false;
970 key
.dst_tiled_w
= false;
972 key
.use_kill
= false;
973 key
.persample_msaa_dispatch
= false;
974 key
.blit_scaled
= false;
975 key
.x_scale
= 2.000000;
976 key
.y_scale
= 0.000000;
977 key
.bilinear_filter
= false;
979 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
983 * Gotten by running piglit test:
984 * "ext_framebuffer_multisample-int-draw-buffers-alpha-to-one 4 -auto"
987 test_gen7_multisample_int(struct brw_context
*brw
)
989 static const char expected
[] =
990 "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
991 "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
992 "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
993 "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
994 "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
995 "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
996 "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
997 "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
998 "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
999 "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
1000 "0x000000a0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
1001 "0x000000b0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
1002 "0x000000c0: mov(16) g114<1>UD 0x00000000UD { align1 WE_normal 1H };\n"
1003 "0x000000d0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
1004 "0x000000e0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
1005 "0x000000f0: send(16) g4<1>UW g114<8,8,1>F\n"
1006 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
1007 "0x00000100: mov(16) g52<1>UD 0x00000001UD { align1 WE_normal 1H };\n"
1008 "0x00000110: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
1009 "0x00000120: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
1010 "0x00000130: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
1011 "0x00000140: send(16) g12<1>UW g114<8,8,1>F\n"
1012 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
1013 "0x00000150: avg(16) g4<1>D g4<8,8,1>D g12<8,8,1>D { align1 WE_normal 1H };\n"
1014 "0x00000160: avg(16) g6<1>D g6<8,8,1>D g14<8,8,1>D { align1 WE_normal 1H };\n"
1015 "0x00000170: avg(16) g8<1>D g8<8,8,1>D g16<8,8,1>D { align1 WE_normal 1H };\n"
1016 "0x00000180: avg(16) g10<1>D g10<8,8,1>D g18<8,8,1>D { align1 WE_normal 1H };\n"
1017 "0x00000190: mov(16) g52<1>UD 0x00000002UD { align1 WE_normal 1H };\n"
1018 "0x000001a0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
1019 "0x000001b0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
1020 "0x000001c0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
1021 "0x000001d0: send(16) g12<1>UW g114<8,8,1>F\n"
1022 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
1023 "0x000001e0: mov(16) g52<1>UD 0x00000003UD { align1 WE_normal 1H };\n"
1024 "0x000001f0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
1025 "0x00000200: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
1026 "0x00000210: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
1027 "0x00000220: send(16) g20<1>UW g114<8,8,1>F\n"
1028 " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
1029 "0x00000230: avg(16) g12<1>D g12<8,8,1>D g20<8,8,1>D { align1 WE_normal 1H };\n"
1030 "0x00000240: avg(16) g14<1>D g14<8,8,1>D g22<8,8,1>D { align1 WE_normal 1H };\n"
1031 "0x00000250: avg(16) g16<1>D g16<8,8,1>D g24<8,8,1>D { align1 WE_normal 1H };\n"
1032 "0x00000260: avg(16) g18<1>D g18<8,8,1>D g26<8,8,1>D { align1 WE_normal 1H };\n"
1033 "0x00000270: avg(16) g4<1>D g4<8,8,1>D g12<8,8,1>D { align1 WE_normal 1H };\n"
1034 "0x00000280: avg(16) g6<1>D g6<8,8,1>D g14<8,8,1>D { align1 WE_normal 1H };\n"
1035 "0x00000290: avg(16) g8<1>D g8<8,8,1>D g16<8,8,1>D { align1 WE_normal 1H };\n"
1036 "0x000002a0: avg(16) g10<1>D g10<8,8,1>D g18<8,8,1>D { align1 WE_normal 1H };\n"
1037 "0x000002b0: mov(16) g114<1>D g4<8,8,1>D { align1 WE_normal 1H };\n"
1038 "0x000002c0: mov(16) g116<1>D g6<8,8,1>D { align1 WE_normal 1H };\n"
1039 "0x000002d0: mov(16) g118<1>D g8<8,8,1>D { align1 WE_normal 1H };\n"
1040 "0x000002e0: mov(16) g120<1>D g10<8,8,1>D { align1 WE_normal 1H };\n"
1041 "0x000002f0: sendc(16) null g114<8,8,1>F\n"
1042 " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
1043 struct brw_blorp_blit_prog_key key
;
1045 key
.tex_samples
= 4;
1046 key
.tex_layout
= INTEL_MSAA_LAYOUT_UMS
;
1047 key
.src_samples
= 4;
1048 key
.src_layout
= INTEL_MSAA_LAYOUT_UMS
;
1050 key
.rt_layout
= INTEL_MSAA_LAYOUT_NONE
;
1051 key
.dst_samples
= 0;
1052 key
.dst_layout
= INTEL_MSAA_LAYOUT_NONE
;
1053 key
.texture_data_type
= BRW_REGISTER_TYPE_D
;
1054 key
.src_tiled_w
= false;
1055 key
.dst_tiled_w
= false;
1057 key
.use_kill
= false;
1058 key
.persample_msaa_dispatch
= false;
1059 key
.blit_scaled
= false;
1060 key
.x_scale
= 2.000000;
1061 key
.y_scale
= 2.000000;
1062 key
.bilinear_filter
= false;
1064 return check(brw
, &key
, expected
, sizeof(expected
) - 1);
1068 main(int argc
, char **argv
)
1071 struct brw_context brw
;
1073 memset(&brw
, 0, sizeof(brw
));
1076 pass
= test_gen7_blend_scaled_msaa_8(&brw
) && pass
;
1077 pass
= test_gen7_msaa_8_ums_to_cms(&brw
) && pass
;
1078 pass
= test_gen7_msaa_8_cms_to_cms(&brw
) && pass
;
1079 pass
= test_gen7_msaa_4_ums_to_cms(&brw
) && pass
;
1080 pass
= test_gen7_alpha_blend(&brw
) && pass
;
1081 pass
= test_gen7_unaligned_8_msaa(&brw
) && pass
;
1082 pass
= test_gen7_simple_src_samples_zero(&brw
) && pass
;
1083 pass
= test_gen7_bilinear(&brw
) && pass
;
1084 pass
= test_gen7_multisample_int(&brw
) && pass
;
1087 pass
= test_gen6_alpha_blend(&brw
) && pass
;
1088 pass
= test_gen6_simple_src_samples_zero(&brw
) && pass
;
1090 /* Test suite expects zero for success */