Module: Mesa Branch: main Commit: 1cb2d2a5eedd2962297e877850242260c93dd804 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1cb2d2a5eedd2962297e877850242260c93dd804
Author: Iago Toral Quiroga <[email protected]> Date: Mon May 22 13:55:14 2023 +0200 v3dv: store slice dimensions in pixels Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23180> --- src/broadcom/vulkan/v3dv_image.c | 3 +++ src/broadcom/vulkan/v3dv_private.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/broadcom/vulkan/v3dv_image.c b/src/broadcom/vulkan/v3dv_image.c index 168f74c9934..8e9227d4f96 100644 --- a/src/broadcom/vulkan/v3dv_image.c +++ b/src/broadcom/vulkan/v3dv_image.c @@ -122,6 +122,9 @@ v3d_setup_plane_slices(struct v3dv_image *image, uint8_t plane, level_height = u_minify(pot_height, i); } + slice->width = level_width; + slice->height = level_height; + if (i < 1) level_depth = u_minify(depth, i); else diff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h index ef7118ac586..359de317a71 100644 --- a/src/broadcom/vulkan/v3dv_private.h +++ b/src/broadcom/vulkan/v3dv_private.h @@ -670,6 +670,8 @@ struct v3d_resource_slice { uint32_t offset; uint32_t stride; uint32_t padded_height; + uint32_t width; + uint32_t height; /* Size of a single pane of the slice. For 3D textures, there will be * a number of panes equal to the minified, power-of-two-aligned * depth.
