isl/state: Emit no-op mip tail setup on SKL
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 7 Jun 2016 01:22:21 +0000 (18:22 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 22 Jun 2016 19:26:43 +0000 (12:26 -0700)
This hasn't ever been a problem in the past but it is recommended by the
hardware docs.

Reviewed-by: Chad Versace <chad.versace@intel.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/intel/isl/isl_surface_state.c

index 5e512ac0c4af917a8519f4f61e610b971df2a3e6..f64d96ca0591da8f0d9e0a256372a3856bc0a9d7 100644 (file)
@@ -292,6 +292,14 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
       s.MIPCountLOD = MAX(info->view->levels, 1) - 1;
    }
 
+#if GEN_GEN >= 9
+   /* We don't use miptails yet.  The PRM recommends that you set "Mip Tail
+    * Start LOD" to 15 to prevent the hardware from trying to use them.
+    */
+   s.TiledResourceMode = NONE;
+   s.MipTailStartLOD = 15;
+#endif
+
    const struct isl_extent3d image_align = get_image_alignment(info->surf);
    s.SurfaceVerticalAlignment = isl_to_gen_valign[image_align.height];
    s.SurfaceHorizontalAlignment = isl_to_gen_halign[image_align.width];