vk/gen7: Use TILEWALK_XMAJOR for linear surfaces
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Tue, 25 Aug 2015 17:48:43 +0000 (10:48 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Tue, 25 Aug 2015 17:54:13 +0000 (10:54 -0700)
You wouldn't think the TileWalk mode matters when TiledSurface is
false. However, it has to be TILEWALK_XMAJOR. Make it so.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
src/vulkan/gen7_state.c

index 4cab54f2d36527f1eef55d04cb25048748eb7a5b..042c4224c5f161904ea39a2179b625e910e28e2e 100644 (file)
@@ -322,8 +322,13 @@ gen7_image_view_init(struct anv_image_view *iview,
       .SurfaceFormat = format->surface_format,
       .SurfaceVerticalAlignment = anv_valign[surface->v_align],
       .SurfaceHorizontalAlignment = anv_halign[surface->h_align],
+
+      /* From bspec (DevSNB, DevIVB): "Set Tile Walk to TILEWALK_XMAJOR if
+       * Tiled Surface is False."
+       */
       .TiledSurface = surface->tile_mode > LINEAR,
-      .TileWalk = surface->tile_mode == XMAJOR ? TILEWALK_XMAJOR : TILEWALK_YMAJOR,
+      .TileWalk = surface->tile_mode == YMAJOR ? TILEWALK_YMAJOR : TILEWALK_XMAJOR,
+
       .VerticalLineStride = 0,
       .VerticalLineStrideOffset = 0,
       .RenderCacheReadWriteMode = false,
@@ -415,8 +420,13 @@ gen7_color_attachment_view_init(struct anv_color_attachment_view *aview,
       .SurfaceFormat = view->format->surface_format,
       .SurfaceVerticalAlignment = anv_valign[surface->v_align],
       .SurfaceHorizontalAlignment = anv_halign[surface->h_align],
+
+      /* From bspec (DevSNB, DevIVB): "Set Tile Walk to TILEWALK_XMAJOR if
+       * Tiled Surface is False."
+       */
       .TiledSurface = surface->tile_mode > LINEAR,
-      .TileWalk = surface->tile_mode == XMAJOR ? TILEWALK_XMAJOR : TILEWALK_YMAJOR,
+      .TileWalk = surface->tile_mode == YMAJOR ? TILEWALK_YMAJOR : TILEWALK_XMAJOR,
+
       .VerticalLineStride = 0,
       .VerticalLineStrideOffset = 0,
       .RenderCacheReadWriteMode = WriteOnlyCache,