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@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12141>
This commit is contained in:
parent
9a267be039
commit
5dd55b0881
|
@ -1889,10 +1889,6 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
|
||||||
anv_image_aux_layers(image, aspect, level));
|
anv_image_aux_layers(image, aspect, level));
|
||||||
|
|
||||||
uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
|
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;
|
struct blorp_batch batch;
|
||||||
blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer,
|
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,
|
image->planes[plane].aux_usage,
|
||||||
&surf);
|
&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
|
/* 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
|
* address and we are doing a fast clear. So we save the clear value into
|
||||||
* the blorp surface.
|
* the blorp surface.
|
||||||
|
|
Loading…
Reference in New Issue