summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/test_blorp_blit_eu_gen.cpp86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/test_blorp_blit_eu_gen.cpp b/src/mesa/drivers/dri/i965/test_blorp_blit_eu_gen.cpp
index 15451485cf2..8b0cac2aaa7 100644
--- a/src/mesa/drivers/dri/i965/test_blorp_blit_eu_gen.cpp
+++ b/src/mesa/drivers/dri/i965/test_blorp_blit_eu_gen.cpp
@@ -979,6 +979,91 @@ test_gen6_simple_src_samples_zero(struct brw_context *brw)
return check(brw, &key, expected, sizeof(expected) - 1);
}
+/**
+ * Gotten by running piglit test:
+ * "ext_framebuffer_multisample-int-draw-buffers-alpha-to-one 4 -auto"
+ */
+static bool
+test_gen7_multisample_int(struct brw_context *brw)
+{
+ static const char expected[] =
+ "0x00000000: add(16) g44<1>UW g1.4<2,4,0>UW 0x10101010V { align1 WE_normal 1H };\n"
+ "0x00000010: add(16) g46<1>UW g1.5<2,4,0>UW 0x11001100V { align1 WE_normal 1H };\n"
+ "0x00000020: mov(16) g48<1>UD g44<8,8,1>UW { align1 WE_normal 1H };\n"
+ "0x00000030: mov(16) g50<1>UD g46<8,8,1>UW { align1 WE_normal 1H };\n"
+ "0x00000040: mov(16) g44<1>F g48<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000050: mov(16) g46<1>F g50<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000060: mul(16) g48<1>F g44<8,8,1>F g2.6<0,1,0>F { align1 WE_normal 1H };\n"
+ "0x00000070: mul(16) g50<1>F g46<8,8,1>F g3<0,1,0>F { align1 WE_normal 1H };\n"
+ "0x00000080: add(16) g48<1>F g48<8,8,1>F g2.7<0,1,0>F { align1 WE_normal 1H };\n"
+ "0x00000090: add(16) g50<1>F g50<8,8,1>F g3.1<0,1,0>F { align1 WE_normal 1H };\n"
+ "0x000000a0: mov(16) g44<1>UD g48<8,8,1>F { align1 WE_normal 1H };\n"
+ "0x000000b0: mov(16) g46<1>UD g50<8,8,1>F { align1 WE_normal 1H };\n"
+ "0x000000c0: mov(16) g114<1>UD 0x00000000UD { align1 WE_normal 1H };\n"
+ "0x000000d0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x000000e0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x000000f0: send(16) g4<1>UW g114<8,8,1>F\n"
+ " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
+ "0x00000100: mov(16) g52<1>UD 0x00000001UD { align1 WE_normal 1H };\n"
+ "0x00000110: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000120: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000130: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000140: send(16) g12<1>UW g114<8,8,1>F\n"
+ " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
+ "0x00000150: avg(16) g4<1>D g4<8,8,1>D g12<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000160: avg(16) g6<1>D g6<8,8,1>D g14<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000170: avg(16) g8<1>D g8<8,8,1>D g16<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000180: avg(16) g10<1>D g10<8,8,1>D g18<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000190: mov(16) g52<1>UD 0x00000002UD { align1 WE_normal 1H };\n"
+ "0x000001a0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x000001b0: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x000001c0: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x000001d0: send(16) g12<1>UW g114<8,8,1>F\n"
+ " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
+ "0x000001e0: mov(16) g52<1>UD 0x00000003UD { align1 WE_normal 1H };\n"
+ "0x000001f0: mov(16) g114<1>UD g52<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000200: mov(16) g116<1>UD g44<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000210: mov(16) g118<1>UD g46<8,8,1>UD { align1 WE_normal 1H };\n"
+ "0x00000220: send(16) g20<1>UW g114<8,8,1>F\n"
+ " sampler (0, 0, 31, 2) mlen 6 rlen 8 { align1 WE_normal 1H };\n"
+ "0x00000230: avg(16) g12<1>D g12<8,8,1>D g20<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000240: avg(16) g14<1>D g14<8,8,1>D g22<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000250: avg(16) g16<1>D g16<8,8,1>D g24<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000260: avg(16) g18<1>D g18<8,8,1>D g26<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000270: avg(16) g4<1>D g4<8,8,1>D g12<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000280: avg(16) g6<1>D g6<8,8,1>D g14<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x00000290: avg(16) g8<1>D g8<8,8,1>D g16<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x000002a0: avg(16) g10<1>D g10<8,8,1>D g18<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x000002b0: mov(16) g114<1>D g4<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x000002c0: mov(16) g116<1>D g6<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x000002d0: mov(16) g118<1>D g8<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x000002e0: mov(16) g120<1>D g10<8,8,1>D { align1 WE_normal 1H };\n"
+ "0x000002f0: sendc(16) null g114<8,8,1>F\n"
+ " render ( RT write, 1, 0, 12) mlen 8 rlen 0 { align1 WE_normal 1H EOT };\n";
+ struct brw_blorp_blit_prog_key key;
+
+ key.tex_samples = 4;
+ key.tex_layout = INTEL_MSAA_LAYOUT_UMS;
+ key.src_samples = 4;
+ key.src_layout = INTEL_MSAA_LAYOUT_UMS;
+ key.rt_samples = 0;
+ key.rt_layout = INTEL_MSAA_LAYOUT_NONE;
+ key.dst_samples = 0;
+ key.dst_layout = INTEL_MSAA_LAYOUT_NONE;
+ key.texture_data_type = BRW_REGISTER_TYPE_D;
+ key.src_tiled_w = false;
+ key.dst_tiled_w = false;
+ key.blend = true;
+ key.use_kill = false;
+ key.persample_msaa_dispatch = false;
+ key.blit_scaled = false;
+ key.x_scale = 2.000000;
+ key.y_scale = 2.000000;
+ key.bilinear_filter = false;
+
+ return check(brw, &key, expected, sizeof(expected) - 1);
+}
+
int
main(int argc, char **argv)
{
@@ -996,6 +1081,7 @@ main(int argc, char **argv)
pass = test_gen7_unaligned_8_msaa(&brw) && pass;
pass = test_gen7_simple_src_samples_zero(&brw) && pass;
pass = test_gen7_bilinear(&brw) && pass;
+ pass = test_gen7_multisample_int(&brw) && pass;
brw.gen = 6;
pass = test_gen6_alpha_blend(&brw) && pass;