Mesa (master): intel/blorp: Add plumbing for color resolve slice details

Jason Ekstrand jekstrand at kemper.freedesktop.org
Thu Nov 17 20:04:22 UTC 2016


Module: Mesa
Branch: master
Commit: 7c560e8ccc60f26c145fbbcb281e431e65bbce55
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c560e8ccc60f26c145fbbcb281e431e65bbce55

Author: Pohjolainen, Topi <topi.pohjolainen at gmail.com>
Date:   Tue Oct 11 22:26:35 2016 +0300

intel/blorp: Add plumbing for color resolve slice details

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/blorp/blorp.h               | 3 ++-
 src/intel/blorp/blorp_clear.c         | 9 +++++++--
 src/mesa/drivers/dri/i965/brw_blorp.c | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h
index 1a38cc9..4e5a3a3 100644
--- a/src/intel/blorp/blorp.h
+++ b/src/intel/blorp/blorp.h
@@ -169,7 +169,8 @@ blorp_clear_attachments(struct blorp_batch *batch,
 
 void
 blorp_ccs_resolve(struct blorp_batch *batch,
-                  struct blorp_surf *surf, enum isl_format format);
+                  struct blorp_surf *surf, uint32_t level, uint32_t layer,
+                  enum isl_format format);
 
 /**
  * For an overview of the HiZ operations, see the following sections of the
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index ea80c19..5c40e2f 100644
--- a/src/intel/blorp/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -542,13 +542,18 @@ blorp_clear_attachments(struct blorp_batch *batch,
 
 void
 blorp_ccs_resolve(struct blorp_batch *batch,
-                  struct blorp_surf *surf, enum isl_format format)
+                  struct blorp_surf *surf, uint32_t level, uint32_t layer,
+                  enum isl_format format)
 {
    struct blorp_params params;
    blorp_params_init(&params);
 
+   /* Layered and mipmapped fast clear is only available from Gen8 onwards. */
+   assert(ISL_DEV_GEN(batch->blorp->isl_dev) >= 8 ||
+          (level == 0 && layer == 0));
+
    brw_blorp_surface_info_init(batch->blorp, &params.dst, surf,
-                               0 /* level */, 0 /* layer */, format, true);
+                               level, layer, format, true);
 
    /* From the Ivy Bridge PRM, Vol2 Part1 11.9 "Render Target Resolve":
     *
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index f0ad074..2771f14 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -945,7 +945,7 @@ brw_blorp_resolve_color(struct brw_context *brw, struct intel_mipmap_tree *mt)
 
    struct blorp_batch batch;
    blorp_batch_init(&brw->blorp, &batch, brw, 0);
-   blorp_ccs_resolve(&batch, &surf,
+   blorp_ccs_resolve(&batch, &surf, 0 /* level */, 0 /* layer */,
                      brw_blorp_to_isl_format(brw, format, true));
    blorp_batch_finish(&batch);
 




More information about the mesa-commit mailing list