intel/isl: set vertical surface alignment on null surfaces
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 4 Oct 2019 12:51:54 +0000 (15:51 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 5 Oct 2019 20:54:33 +0000 (20:54 +0000)
Just following the spec. Somewhat unclear whether this applies to NULL
surfaces.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/isl/isl_surface_state.c

index 4f61c1012d91fe2848dada3c7a6b6cc9aa7fd0b6..c1e91ffe9637f476fe656fe8173f4a1e8bc411c9 100644 (file)
@@ -803,6 +803,19 @@ isl_genX(null_fill_state)(void *state, struct isl_extent3d size)
 #else
       .TiledSurface = true,
       .TileWalk = TILEWALK_YMAJOR,
+#endif
+#if GEN_GEN == 7
+      /* According to PRMs: "Volume 4 Part 1: Subsystem and Cores – Shared
+       * Functions"
+       *
+       * RENDER_SURFACE_STATE::Surface Vertical Alignment
+       *
+       *    "This field must be set to VALIGN_4 for all tiled Y Render Target
+       *     surfaces."
+       *
+       * Affect IVB, HSW.
+       */
+      .SurfaceVerticalAlignment = VALIGN_4,
 #endif
       .Width = size.width - 1,
       .Height = size.height - 1,