From 6a1098b2c2577b1a1b40c92d47e58d636ba39923 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg=20Kristensen?= Date: Tue, 25 Aug 2015 10:48:43 -0700 Subject: [PATCH] vk/gen7: Use TILEWALK_XMAJOR for linear surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/vulkan/gen7_state.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index 4cab54f2d36..042c4224c5f 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -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, -- 2.30.2