diff options
author | Nanley Chery <[email protected]> | 2016-12-06 09:08:09 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2017-01-12 20:52:20 -0800 |
commit | b62d8ad2aee2f67fb290332b285a0a5aa93e7724 (patch) | |
tree | d59531cb85f177bb0ece96d0e5fdda0c1a500fcb /src/intel/vulkan/anv_blorp.c | |
parent | 968ffd6c868af7226e8f889573eef709888151cb (diff) |
anv: Avoid resolves incurred by fast depth clears
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_blorp.c')
-rw-r--r-- | src/intel/vulkan/anv_blorp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index f7aaa22554d..4394323a6bc 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -1265,6 +1265,12 @@ anv_cmd_buffer_clear_subpass(struct anv_cmd_buffer *cmd_buffer) render_area.offset.y + render_area.extent.height)) { clear_with_hiz = false; + } else if (clear_att.clearValue.depthStencil.depth != + ANV_HZ_FC_VAL) { + /* Don't enable fast depth clears for any color not equal to + * ANV_HZ_FC_VAL. + */ + clear_with_hiz = false; } } @@ -1636,8 +1642,7 @@ anv_gen8_hiz_op_resolve(struct anv_cmd_buffer *cmd_buffer, }; surf.aux_usage = ISL_AUX_USAGE_HIZ; - surf.clear_color.u32[0] = (uint32_t) - cmd_state->attachments[ds].clear_value.depthStencil.depth; + surf.clear_color.u32[0] = (uint32_t) ANV_HZ_FC_VAL; blorp_gen6_hiz_op(&batch, &surf, 0, 0, op); blorp_batch_finish(&batch); |