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/mesa | |
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/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 2771f1466db..95a2bb7bb3c 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -943,10 +943,23 @@ brw_blorp_resolve_color(struct brw_context *brw, struct intel_mipmap_tree *mt) unsigned level = 0; blorp_surf_for_miptree(brw, &surf, mt, true, &level, isl_tmp); + enum blorp_fast_clear_op resolve_op; + if (brw->gen >= 9) { + if (surf.aux_usage == ISL_AUX_USAGE_CCS_E) + resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL; + else + resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL; + } else { + assert(surf.aux_usage == ISL_AUX_USAGE_CCS_D); + /* Broadwell and earlier do not have a partial resolve */ + resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL; + } + struct blorp_batch batch; blorp_batch_init(&brw->blorp, &batch, brw, 0); blorp_ccs_resolve(&batch, &surf, 0 /* level */, 0 /* layer */, - brw_blorp_to_isl_format(brw, format, true)); + brw_blorp_to_isl_format(brw, format, true), + resolve_op); blorp_batch_finish(&batch); mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_RESOLVED; |