OSDN Git Service

d48c3db1eba96d377ec32e473e1736fc708c6c95
[android-x86/external-mesa.git] / src / mesa / drivers / dri / i965 / test_blorp_blit_eu_gen.cpp
1 /*
2  * Copyright © 2013 Intel Corporation
3  *
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:
10  *
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
13  * Software.
14  *
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
21  * IN THE SOFTWARE.
22  */
23
24 #include "brw_context.h"
25 #include "brw_blorp.h"
26 #include "brw_reg.h"
27 #include <stdio.h>
28
29 const unsigned *
30 brw_blorp_blit_test_compile(struct brw_context *brw,
31                             const brw_blorp_blit_prog_key *key,
32                             FILE *out);
33
34 static char *
35 fcopy(FILE *f, size_t *len)
36 {
37    char *res;
38    *len = (size_t)ftell(f);
39
40    if (!*len)
41       return NULL;
42
43    res = (char *)malloc(*len);
44
45    (void)fseek(f, 0L, SEEK_SET);
46
47    if (fread(res, 1, *len, f) != *len) {
48       fclose(f);
49       free(res);
50       return NULL;
51    }
52
53    fclose(f);
54
55    return res;
56 }
57
58 static bool
59 check(struct brw_context *brw, const brw_blorp_blit_prog_key *key,
60       const char *expected, size_t expected_len)
61 {
62    char *s;
63    size_t len;
64    FILE *tmp = tmpfile();
65
66    if (!tmp) {
67       printf("failed to create temporary file for the dump\n");
68       return false;
69    }
70
71    brw_blorp_blit_test_compile(brw, key, tmp);
72
73    s = fcopy(tmp, &len);
74    if (!s)
75       return false;
76
77    if (expected_len != len) {
78       printf("length (%lu) mismatch (%lu expected)\n", len, expected_len);
79       fwrite(s, 1, len, stdout);
80       free(s);
81       return false;
82    }
83
84    if (memcmp(s, expected, len)) {
85       printf("content mismatch\n");
86       fwrite(s, 1, len, stdout);
87       free(s);
88       return false;
89    }
90
91    return true;
92 }
93
94 /**
95  * One of the flavours gotten when running piglit test:
96  * "ext_framebuffer_multisample-blit-scaled 8"
97  */
98 static bool
99 test_gen7_blend_scaled_msaa_8(struct brw_context *brw)
100 {
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) 2                     null            0x00000002UD    { 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) 2                     null            0x00000002UD    { 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) 2                     null            0x00000002UD    { 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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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 1Q };\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;
297
298    key.tex_samples = 8;
299    key.tex_layout = INTEL_MSAA_LAYOUT_UMS;
300    key.src_samples = 8;
301    key.src_layout = INTEL_MSAA_LAYOUT_UMS;
302    key.rt_samples = 0;
303    key.dst_samples = 0;
304    key.texture_data_type = BRW_REGISTER_TYPE_F;
305    key.src_tiled_w = false;
306    key.dst_tiled_w = false;
307    key.blend = true;
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;
314
315    return check(brw, &key, expected, sizeof(expected) - 1);
316 }
317
318 int
319 main(int argc, char **argv)
320 {
321    bool pass = true;
322    struct brw_context brw;
323
324    memset(&brw, 0, sizeof(brw));
325    brw.gen = 7;
326
327    pass = test_gen7_blend_scaled_msaa_8(&brw) && pass;
328
329    /* Test suite expects zero for success */
330    return !pass;
331 }