From: Jason Ekstrand Date: Tue, 5 Jan 2016 21:54:02 +0000 (-0800) Subject: anv/image_view: Add base mip and base layer fields X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa9987a39566e673e4f25e46a257df96f57c9475;p=mesa.git anv/image_view: Add base mip and base layer fields These will be needed by image_load_store --- diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index f8782b6e848..e83358a002d 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -484,6 +484,8 @@ anv_image_view_init(struct anv_image_view *iview, iview->format = anv_get_isl_format(pCreateInfo->format, iview->aspect_mask, image->tiling); + iview->base_layer = range->baseArrayLayer; + iview->base_mip = range->baseMipLevel; iview->extent = (VkExtent3D) { .width = anv_minify(image->extent.width, range->baseMipLevel), .height = anv_minify(image->extent.height, range->baseMipLevel), diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index d121857352d..16ca0f5ce48 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -1567,6 +1567,8 @@ struct anv_image_view { VkImageAspectFlags aspect_mask; VkFormat vk_format; enum isl_format format; + uint32_t base_layer; + uint32_t base_mip; VkExtent3D extent; /**< Extent of VkImageViewCreateInfo::baseMipLevel. */ /** RENDER_SURFACE_STATE when using image as a color render target. */