Mesa (main): anv/blorp: Use the isl_surf for computing level_width/height in anv_image_ccs_op

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 16:19:12 UTC 2021


Module: Mesa
Branch: main
Commit: 5dd55b088156533c1a8f5901334f5691550f7a29
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5dd55b088156533c1a8f5901334f5691550f7a29

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Jul 21 17:54:39 2021 -0500

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 <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141>

---

 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.



More information about the mesa-commit mailing list