diff options
author | Jason Ekstrand <[email protected]> | 2016-10-25 10:48:12 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-17 12:03:24 -0800 |
commit | 1ba2f05bc039a19768d893a8ffa98488697a7b20 (patch) | |
tree | 455de0e98bddfa8ff5cb1f0f84eaf891e84937b8 /src/intel | |
parent | 7c560e8ccc60f26c145fbbcb281e431e65bbce55 (diff) |
intel/blorp: Take a fast_clear_op in ccs_resolve
Eventually, we may want to just have a single blorp_ccs_op function that
does both clears and resolves. For now we'll stick to just making the
ccs_resolve function we have now a bit more configurable.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/blorp/blorp.h | 10 | ||||
-rw-r--r-- | src/intel/blorp/blorp_clear.c | 12 | ||||
-rw-r--r-- | src/intel/blorp/blorp_priv.h | 7 |
3 files changed, 15 insertions, 14 deletions
diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h index 4e5a3a33ad6..823475b6075 100644 --- a/src/intel/blorp/blorp.h +++ b/src/intel/blorp/blorp.h @@ -167,10 +167,18 @@ blorp_clear_attachments(struct blorp_batch *batch, bool clear_depth, float depth_value, uint8_t stencil_mask, uint8_t stencil_value); +enum blorp_fast_clear_op { + BLORP_FAST_CLEAR_OP_NONE = 0, + BLORP_FAST_CLEAR_OP_CLEAR, + BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL, + BLORP_FAST_CLEAR_OP_RESOLVE_FULL, +}; + void blorp_ccs_resolve(struct blorp_batch *batch, struct blorp_surf *surf, uint32_t level, uint32_t layer, - enum isl_format format); + enum isl_format format, + enum blorp_fast_clear_op resolve_op); /** * 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 5c40e2f0557..83ec57e556c 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -543,7 +543,8 @@ blorp_clear_attachments(struct blorp_batch *batch, void blorp_ccs_resolve(struct blorp_batch *batch, struct blorp_surf *surf, uint32_t level, uint32_t layer, - enum isl_format format) + enum isl_format format, + enum blorp_fast_clear_op resolve_op) { struct blorp_params params; blorp_params_init(¶ms); @@ -586,14 +587,13 @@ blorp_ccs_resolve(struct blorp_batch *batch, params.y1 = ALIGN(params.y1, y_scaledown) / y_scaledown; if (batch->blorp->isl_dev->info->gen >= 9) { - if (params.dst.aux_usage == ISL_AUX_USAGE_CCS_E) - params.fast_clear_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL; - else - params.fast_clear_op = BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL; + assert(resolve_op == BLORP_FAST_CLEAR_OP_RESOLVE_FULL || + resolve_op == BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL); } else { /* Broadwell and earlier do not have a partial resolve */ - params.fast_clear_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL; + assert(resolve_op == BLORP_FAST_CLEAR_OP_RESOLVE_FULL); } + params.fast_clear_op = resolve_op; /* Note: there is no need to initialize push constants because it doesn't * matter what data gets dispatched to the render target. However, we must diff --git a/src/intel/blorp/blorp_priv.h b/src/intel/blorp/blorp_priv.h index 71805ade157..409c69d2332 100644 --- a/src/intel/blorp/blorp_priv.h +++ b/src/intel/blorp/blorp_priv.h @@ -44,13 +44,6 @@ enum { BLORP_NUM_BT_ENTRIES }; -enum blorp_fast_clear_op { - BLORP_FAST_CLEAR_OP_NONE = 0, - BLORP_FAST_CLEAR_OP_CLEAR, - BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL, - BLORP_FAST_CLEAR_OP_RESOLVE_FULL, -}; - struct brw_blorp_surface_info { bool enabled; |