i965/skl: Break down SIMD16 3-source instructions when required.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 4 Mar 2015 20:53:45 +0000 (12:53 -0800)
committerNeil Roberts <neil@linux.intel.com>
Fri, 20 Mar 2015 13:25:41 +0000 (13:25 +0000)
Several steppings of Skylake fail when using SIMD16 with 3-source
instructions (such as MAD).

This implements WaDisableSIMD16On3SrcInstr and fixes ~190 Piglit
tests.

Based on a patch by Neil Roberts.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 6eebee16ed42e7e0fa3b61a8e2aadc8affe5fe86..3aa5c3c664718e62e50e5839437452562740583b 100644 (file)
@@ -1559,6 +1559,12 @@ fs_generator::enable_debug(const char *shader_name)
 static bool
 brw_supports_simd16_3src(const struct brw_context *brw)
 {
+   /* WaDisableSIMD16On3SrcInstr: 3-source instructions don't work in SIMD16
+    * on a few steppings of Skylake.
+    */
+   if (brw->gen == 9)
+      return brw->revision != 2 && brw->revision != 3 && brw->revision != -1;
+
    return brw->is_haswell || brw->gen >= 8;
 }