intel/isl: Add a row_pitch parameter to surf_get_ccs_surf
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Jun 2017 20:35:15 +0000 (13:35 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 17 Jul 2017 20:48:38 +0000 (13:48 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/intel/isl/isl.c
src/intel/isl/isl.h
src/intel/vulkan/anv_image.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 1026fe94952d6540eca7814002332ad9eb1b2c43..12ffe3bb510be72359ec0b78dc8fe7ffc25f9f9b 100644 (file)
@@ -1688,7 +1688,8 @@ isl_surf_get_mcs_surf(const struct isl_device *dev,
 bool
 isl_surf_get_ccs_surf(const struct isl_device *dev,
                       const struct isl_surf *surf,
-                      struct isl_surf *ccs_surf)
+                      struct isl_surf *ccs_surf,
+                      uint32_t row_pitch)
 {
    assert(surf->samples == 1 && surf->msaa_layout == ISL_MSAA_LAYOUT_NONE);
    assert(ISL_DEV_GEN(dev) >= 7);
@@ -1750,6 +1751,7 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,
                         .levels = levels,
                         .array_len = array_len,
                         .samples = 1,
+                        .row_pitch = row_pitch,
                         .usage = ISL_SURF_USAGE_CCS_BIT,
                         .tiling_flags = ISL_TILING_CCS_BIT);
 }
index dd550c349a77d075094b4c5af4522cb02d554af7..d81df31a372771c415ca6488d6b28d9db16f9aad 100644 (file)
@@ -1630,7 +1630,8 @@ isl_surf_get_mcs_surf(const struct isl_device *dev,
 bool
 isl_surf_get_ccs_surf(const struct isl_device *dev,
                       const struct isl_surf *surf,
-                      struct isl_surf *ccs_surf);
+                      struct isl_surf *ccs_surf,
+                      uint32_t row_pitch /**< Ignored if 0 */);
 
 #define isl_surf_fill_state(dev, state, ...) \
    isl_surf_fill_state_s((dev), (state), \
index f555db807b6bd69c63083b246caf2e8a6c5839c8..149e1f20334dca213939224f6181518dd8b4828e 100644 (file)
@@ -211,7 +211,7 @@ make_surface(const struct anv_device *dev,
       if (!unlikely(INTEL_DEBUG & DEBUG_NO_RBC)) {
          assert(image->aux_surface.isl.size == 0);
          ok = isl_surf_get_ccs_surf(&dev->isl_dev, &anv_surf->isl,
-                                    &image->aux_surface.isl);
+                                    &image->aux_surface.isl, 0);
          if (ok) {
             add_surface(image, &image->aux_surface);
 
index f08c3e343a8e3d397826c7b9811f9e8befafa5bb..47475689f9c394baf01fe2f156b1c60084cee3f9 100644 (file)
@@ -1836,7 +1836,8 @@ intel_miptree_alloc_ccs(struct brw_context *brw,
     * calculate equivalent CCS surface against it.
     */
    intel_miptree_get_isl_surf(brw, mt, &temp_main_surf);
-   if (!isl_surf_get_ccs_surf(&brw->isl_dev, &temp_main_surf, &temp_ccs_surf))
+   if (!isl_surf_get_ccs_surf(&brw->isl_dev, &temp_main_surf,
+                              &temp_ccs_surf, 0))
       return false;
 
    assert(temp_ccs_surf.size &&