From ae30535602d8b2f10a31feb133331c0c985b8b41 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Mon, 5 Oct 2015 16:58:25 -0700 Subject: [PATCH] vk: Drop anv_attachment_view::extent It's duplicated by anv_attachment_view::image_view::extent. --- src/vulkan/anv_meta.c | 12 ++++++------ src/vulkan/anv_private.h | 1 - src/vulkan/gen7_state.c | 2 +- src/vulkan/gen8_state.c | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index 1574830e0b8..085acc7a318 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -842,8 +842,8 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer, .layout = VK_IMAGE_LAYOUT_GENERAL } }, - .width = dest_aview->extent.width, - .height = dest_aview->extent.height, + .width = dest_iview->extent.width, + .height = dest_iview->extent.height, .layers = 1 }, &fb); @@ -1574,8 +1574,8 @@ void anv_CmdClearColorImage( .layout = VK_IMAGE_LAYOUT_GENERAL } }, - .width = aview->extent.width, - .height = aview->extent.height, + .width = iview->extent.width, + .height = iview->extent.height, .layers = 1 }, &fb); @@ -1622,8 +1622,8 @@ void anv_CmdClearColorImage( .renderArea = { .offset = { 0, 0, }, .extent = { - .width = aview->extent.width, - .height = aview->extent.height, + .width = iview->extent.width, + .height = iview->extent.height, }, }, .renderPass = pass, diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 8c4c9efdc6f..b290fcc75b7 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -1258,7 +1258,6 @@ enum anv_attachment_view_type { struct anv_attachment_view { enum anv_attachment_view_type attachment_type; - VkExtent3D extent; }; struct anv_color_attachment_view { diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index 5031db5edea..d65c1a373f0 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -381,7 +381,7 @@ gen7_color_attachment_view_init(struct anv_color_attachment_view *cview, iview->offset = image->offset + surface->offset; iview->format = anv_format_for_vk_format(pCreateInfo->format); - aview->extent = (VkExtent3D) { + iview->extent = (VkExtent3D) { .width = anv_minify(image->extent.width, pCreateInfo->mipLevel), .height = anv_minify(image->extent.height, pCreateInfo->mipLevel), .depth = anv_minify(image->extent.depth, pCreateInfo->mipLevel), diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 2b820a3177d..8e9b43cab05 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -307,7 +307,7 @@ gen8_color_attachment_view_init(struct anv_color_attachment_view *cview, iview->offset = image->offset + surface->offset; iview->format = anv_format_for_vk_format(pCreateInfo->format); - aview->extent = (VkExtent3D) { + iview->extent = (VkExtent3D) { .width = anv_minify(image->extent.width, pCreateInfo->mipLevel), .height = anv_minify(image->extent.height, pCreateInfo->mipLevel), .depth = anv_minify(image->extent.depth, pCreateInfo->mipLevel), @@ -346,7 +346,7 @@ gen8_color_attachment_view_init(struct anv_color_attachment_view *cview, * indicates the extent of the accessible 'R' coordinates minus 1 on * the LOD currently being rendered to. */ - rt_view_extent = aview->extent.depth; + rt_view_extent = iview->extent.depth; break; default: unreachable(!"bad VkImageType"); -- 2.30.2