From 3ab24753507b65bcd77a5bf4014a766eb81268c1 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Thu, 5 Sep 2024 11:51:57 +0200 Subject: [PATCH] lavapipe: Do not adjust imageGranularity for different block sizes Fixes: d747c4a ("lavapipe: Implement sparse buffers and images") Reviewed-By: Mike Blumenkrantz Reviewed-by: Dave Airlie Part-of: (cherry picked from commit a53f11261f43455dc977cbe1daaa45121cea62da) --- .pick_status.json | 2 +- src/gallium/frontends/lavapipe/lvp_formats.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0fdd47f35ba..1145c5a219a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3224,7 +3224,7 @@ "description": "lavapipe: Do not adjust imageGranularity for different block sizes", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d747c4a8746834d3c9a6fbd7b455b7ce9441fb38", "notes": null diff --git a/src/gallium/frontends/lavapipe/lvp_formats.c b/src/gallium/frontends/lavapipe/lvp_formats.c index d8f2111744a..a69cf2cf88f 100644 --- a/src/gallium/frontends/lavapipe/lvp_formats.c +++ b/src/gallium/frontends/lavapipe/lvp_formats.c @@ -518,9 +518,9 @@ fill_sparse_image_format_properties(struct lvp_physical_device *pdev, VkImageTyp prop->aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; prop->flags = 0; prop->imageGranularity = (VkExtent3D){ - .width = util_format_get_tilesize(pformat, type + 1, samples, 0) * util_format_get_blockwidth(pformat), - .height = util_format_get_tilesize(pformat, type + 1, samples, 1) * util_format_get_blockheight(pformat), - .depth = util_format_get_tilesize(pformat, type + 1, samples, 2) * util_format_get_blockdepth(pformat), + .width = util_format_get_tilesize(pformat, type + 1, samples, 0), + .height = util_format_get_tilesize(pformat, type + 1, samples, 1), + .depth = util_format_get_tilesize(pformat, type + 1, samples, 2), }; }