From 5dd55b088156533c1a8f5901334f5691550f7a29 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 21 Jul 2021 17:54:39 -0500 Subject: [PATCH] anv/blorp: Use the isl_surf for computing level_width/height in anv_image_ccs_op Don't manually monkey around with the denominator scales. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_blorp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index ee405cce5f6..7e53ee6ddac 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -1889,10 +1889,6 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer, 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, @@ -1905,6 +1901,9 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer, image->planes[plane].aux_usage, &surf); + uint32_t level_width = anv_minify(surf.surf->logical_level0_px.w, level); + uint32_t level_height = anv_minify(surf.surf->logical_level0_px.h, level); + /* Blorp will store the clear color for us if we provide the clear color * address and we are doing a fast clear. So we save the clear value into * the blorp surface.