Module: Mesa
Branch: vulkan
Commit: 9d5b8f7709d7cce1493cc0b38c750ad1173f7327
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d5b8f7709d7cce1493cc0b38c750ad1173f7327

Author: Jason Ekstrand <jason.ekstr...@intel.com>
Date:   Sat Feb 20 21:40:25 2016 -0800

anv: Remove unneeded fiels from anv_image_view

---

 src/intel/vulkan/anv_image.c   | 11 ++++++-----
 src/intel/vulkan/anv_private.h |  3 ---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 11ceea3..145db6d 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -514,14 +514,15 @@ anv_image_view_init(struct anv_image_view *iview,
    iview->vk_format = pCreateInfo->format;
 
    struct anv_format_swizzle swizzle;
-   iview->format = anv_get_isl_format(pCreateInfo->format, iview->aspect_mask,
-                                      image->tiling, &swizzle);
+   enum isl_format format = anv_get_isl_format(pCreateInfo->format,
+                                               range->aspectMask,
+                                               image->tiling, &swizzle);
 
    iview->base_layer = range->baseArrayLayer;
    iview->base_mip = range->baseMipLevel;
 
    struct isl_view isl_view = {
-      .format = iview->format,
+      .format = format,
       .base_level = range->baseMipLevel,
       .levels = range->levelCount,
       .base_array_layer = range->baseArrayLayer,
@@ -540,7 +541,7 @@ anv_image_view_init(struct anv_image_view *iview,
 
    struct isl_extent4d level0_extent_px;
 
-   if (!isl_format_is_compressed(iview->format) &&
+   if (!isl_format_is_compressed(format) &&
        isl_format_is_compressed(image->format->isl_format)) {
       /* Scale the ImageView extent by the backing Image. This is used
        * internally when an uncompressed ImageView is created on a
@@ -613,7 +614,7 @@ anv_image_view_init(struct anv_image_view *iview,
    if (image->usage & VK_IMAGE_USAGE_STORAGE_BIT) {
       iview->storage_surface_state = alloc_surface_state(device, cmd_buffer);
 
-      if (has_matching_storage_typed_format(device, iview->format)) {
+      if (has_matching_storage_typed_format(device, format)) {
          isl_view.usage = cube_usage | ISL_SURF_USAGE_STORAGE_BIT;
          isl_surf_fill_state(&device->isl_dev,
                              iview->storage_surface_state.map,
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 2f3a659..e50a6db 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1647,11 +1647,8 @@ struct anv_image_view {
 
    VkImageAspectFlags aspect_mask;
    VkFormat vk_format;
-   VkComponentMapping swizzle;
-   enum isl_format format;
    uint32_t base_layer;
    uint32_t base_mip;
-   VkExtent3D level_0_extent; /**< Extent of ::image's level 0 adjusted for 
::vk_format. */
    VkExtent3D extent; /**< Extent of VkImageViewCreateInfo::baseMipLevel. */
 
    /** RENDER_SURFACE_STATE when using image as a color render target. */

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to