[Mesa-dev] [PATCH 26/30] intel/isl: Add a row_pitch parameter to surf_get_ccs_surf
Jason Ekstrand
jason at jlekstrand.net
Fri Jun 16 22:41:48 UTC 2017
---
src/intel/isl/isl.c | 4 +++-
src/intel/isl/isl.h | 3 ++-
src/intel/vulkan/anv_image.c | 2 +-
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 +++++---
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 860fc28..f2ccb71 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1666,7 +1666,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);
@@ -1723,6 +1724,7 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,
.levels = surf->levels,
.array_len = surf->logical_level0_px.array_len,
.samples = 1,
+ .row_pitch = row_pitch,
.usage = ISL_SURF_USAGE_CCS_BIT,
.tiling_flags = ISL_TILING_CCS_BIT);
}
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index dc3eada..40623e0 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -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), \
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 9405a8c..d14ccff 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 608317a..62a9e5f 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -921,7 +921,8 @@ create_ccs_buf_for_image(struct brw_context *brw,
assert(!mt->mcs_buf);
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 <= image->bo->size - image->aux_offset);
@@ -1794,7 +1795,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 &&
@@ -3973,7 +3975,7 @@ intel_miptree_get_aux_isl_surf(struct brw_context *brw,
if (brw->gen >= 8)
assert(mt->halign == 16);
- isl_surf_get_ccs_surf(&brw->isl_dev, surf, surf);
+ isl_surf_get_ccs_surf(&brw->isl_dev, surf, surf, 0);
break;
}
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list