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 f8782b6e848d9944f713413b829373bdcd41d049..e83358a002d306bee55031307e223e236dc0e133 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 d121857352d057455f4108feb512170dc5cd862b..16ca0f5ce488dc7ac63f81b4ef7ae0fb0f98d6cc 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. */