[Mesa-dev] [PATCH 5/9] anv/blorp: Use blorp_ccs_op for everything
Jason Ekstrand
jason at jlekstrand.net
Tue May 15 22:28:08 UTC 2018
---
src/intel/vulkan/anv_blorp.c | 28 ++--------------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 7c4a022..d71a648 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -1704,12 +1704,6 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
assert(base_layer + layer_count <=
anv_image_aux_layers(image, aspect, level));
- uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
- uint32_t width_div = image->format->planes[plane].denominator_scales[0];
- uint32_t height_div = image->format->planes[plane].denominator_scales[1];
- uint32_t level_width = anv_minify(image->extent.width, level) / width_div;
- uint32_t level_height = anv_minify(image->extent.height, level) / height_div;
-
struct blorp_batch batch;
blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer,
predicate ? BLORP_BATCH_PREDICATE_ENABLE : 0);
@@ -1752,26 +1746,8 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
cmd_buffer->state.pending_pipe_bits |=
ANV_PIPE_RENDER_TARGET_CACHE_FLUSH_BIT | ANV_PIPE_CS_STALL_BIT;
- switch (ccs_op) {
- case ISL_AUX_OP_FAST_CLEAR:
- blorp_fast_clear(&batch, &surf, surf.surf->format,
- level, base_layer, layer_count,
- 0, 0, level_width, level_height);
- break;
- case ISL_AUX_OP_FULL_RESOLVE:
- case ISL_AUX_OP_PARTIAL_RESOLVE:
- blorp_ccs_op(&batch, &surf, level, base_layer, layer_count,
- surf.surf->format, ccs_op);
- break;
- case ISL_AUX_OP_AMBIGUATE:
- for (uint32_t a = 0; a < layer_count; a++) {
- const uint32_t layer = base_layer + a;
- blorp_ccs_ambiguate(&batch, &surf, level, layer);
- }
- break;
- default:
- unreachable("Unsupported CCS operation");
- }
+ blorp_ccs_op(&batch, &surf, level, base_layer, layer_count,
+ surf.surf->format, ccs_op);
cmd_buffer->state.pending_pipe_bits |=
ANV_PIPE_RENDER_TARGET_CACHE_FLUSH_BIT | ANV_PIPE_CS_STALL_BIT;
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list