<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 10:03 AM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
<br>
This field is no longer needed.<br>
<br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
 src/intel/isl/isl.h               |  9 ---------<br>
 src/intel/isl/isl_surface_state.c |  8 ++++----<br>
 src/intel/vulkan/anv_image.c      | 33 +++------------------------------<br>
 3 files changed, 7 insertions(+), 43 deletions(-)<br>
<br>
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h<br>
index 5a48bce..248a94d 100644<br>
--- a/src/intel/isl/isl.h<br>
+++ b/src/intel/isl/isl.h<br>
@@ -773,15 +773,6 @@ struct isl_surf_fill_state_info {<br>
    uint32_t mocs;<br>
<br>
    /**<br>
-    * This allows the caller to over-ride the dimensions of the surface.<br>
-    * This is used at the moment for compressed surfaces to let us hack<br>
-    * around the fact that we can't actually render to them.<br>
-    *<br>
-    * FIXME: We really need to get rid of this.  It's a lie.<br>
-    */<br>
-   struct isl_extent4d level0_extent_px;<br>
-<br>
-   /**<br>
     * The clear color for this surface<br>
     *<br>
     * Valid values depend on hardware generation.<br>
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c<br>
index 1607aa6..fe8f07c 100644<br>
--- a/src/intel/isl/isl_surface_state.c<br>
+++ b/src/intel/isl/isl_surface_state.c<br>
@@ -257,8 +257,8 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,<br>
       .SurfaceQPitch = get_qpitch(info->surf) >> 2,<br>
 #endif<br>
<br>
-      .Width = info->level0_extent_px.width - 1,<br>
-      .Height = info->level0_extent_px.height - 1,<br>
+      .Width = info->surf->logical_level0_px.width - 1,<br>
+      .Height = info->surf->logical_level0_px.height - 1,<br>
       .Depth = 0, /* TEMPLATE */<br>
<br>
       .SurfacePitch = info->surf->row_pitch - 1,<br>
@@ -338,7 +338,7 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,<br>
        *    If the volume texture is MIP-mapped, this field specifies the<br>
        *    depth of the base MIP level.<br>
        */<br>
-      s.Depth = info->level0_extent_px.depth - 1;<br>
+      s.Depth = info->surf->logical_level0_px.depth - 1;<br>
<br>
       /* From the Broadwell PRM >> RENDER_SURFACE_STATE::RenderTargetViewExtent:<br>
        *<br>
@@ -346,7 +346,7 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,<br>
        *    indicates the extent of the accessible 'R' coordinates minus 1 on<br>
        *    the LOD currently being rendered to.<br>
        */<br>
-      s.RenderTargetViewExtent = info->level0_extent_px.depth - 1;<br>
+      s.RenderTargetViewExtent = info->surf->logical_level0_px.depth - 1;<br>
       break;<br>
    default:<br>
       unreachable(!"bad SurfaceType");<br>
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c<br>
index dc1ea9c..c76a5f6 100644<br>
--- a/src/intel/vulkan/anv_image.c<br>
+++ b/src/intel/vulkan/anv_image.c<br>
@@ -540,30 +540,6 @@ anv_image_view_init(struct anv_image_view *iview,<br>
       },<br>
    };<br>
<br>
-   struct isl_extent4d level0_extent_px;<br>
-<br>
-   if (!isl_format_is_compressed(format) &&<br>
-       isl_format_is_compressed(image->format->isl_format)) {<br>
-      /* Scale the ImageView extent by the backing Image. This is used<br>
-       * internally when an uncompressed ImageView is created on a<br>
-       * compressed Image. The ImageView can therefore be used for copying<br>
-       * data from a source Image to a destination Image.<br>
-       */<br>
-      const struct isl_format_layout * isl_layout = image->format->isl_layout;<br>
-<br>
-      level0_extent_px.depth  = anv_minify(image->extent.depth, range->baseMipLevel);<br>
-      level0_extent_px.depth  = DIV_ROUND_UP(level0_extent_px.depth, isl_layout->bd);<br>
-<br>
-      level0_extent_px.height = isl_surf_get_array_pitch_el_rows(&surface->isl) * image->array_size;<br>
-      level0_extent_px.width  = isl_surf_get_row_pitch_el(&surface->isl);<br>
-      isl_view.base_level = 0;<br>
-      isl_view.base_array_layer = 0;<br>
-   } else {<br>
-      level0_extent_px.width  = image->extent.width;<br>
-      level0_extent_px.height = image->extent.height;<br>
-      level0_extent_px.depth  = image->extent.depth;<br>
-   }<br>
-<br>
    iview->extent = (VkExtent3D) {<br>
       .width  = anv_minify(image->extent.width , range->baseMipLevel),<br>
       .height = anv_minify(image->extent.height, range->baseMipLevel),<br>
@@ -586,8 +562,7 @@ anv_image_view_init(struct anv_image_view *iview,<br>
                           iview->sampler_surface_state.map,<br>
                           .surf = &surface->isl,<br>
                           .view = &isl_view,<br>
-                          .mocs = device->default_mocs,<br>
-                          .level0_extent_px = level0_extent_px);<br>
+                          .mocs = device->default_mocs);<br>
<br>
       if (!device->info.has_llc)<br>
          anv_state_clflush(iview->sampler_surface_state);<br>
@@ -603,8 +578,7 @@ anv_image_view_init(struct anv_image_view *iview,<br>
                           iview->color_rt_surface_state.map,<br>
                           .surf = &surface->isl,<br>
                           .view = &isl_view,<br>
-                          .mocs = device->default_mocs,<br>
-                          .level0_extent_px = level0_extent_px);<br>
+                          .mocs = device->default_mocs);<br>
<br>
       if (!device->info.has_llc)<br>
          anv_state_clflush(iview->color_rt_surface_state);<br>
@@ -621,8 +595,7 @@ anv_image_view_init(struct anv_image_view *iview,<br>
                              iview->storage_surface_state.map,<br>
                              .surf = &surface->isl,<br>
                              .view = &isl_view,<br>
-                             .mocs = device->default_mocs,<br>
-                             .level0_extent_px = level0_extent_px);<br>
+                             .mocs = device->default_mocs);<br>
       } else {<br>
          anv_fill_buffer_surface_state(device, iview->storage_surface_state,<br>
                                        ISL_FORMAT_RAW,<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>