anv/image_view: Add base mip and base layer fields
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 5 Jan 2016 21:54:02 +0000 (13:54 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jan 2016 23:14:50 +0000 (15:14 -0800)
These will be needed by image_load_store

src/vulkan/anv_image.c
src/vulkan/anv_private.h

index f8782b6..e83358a 100644 (file)
@@ -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),
index d121857..16ca0f5 100644 (file)
@@ -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. */