From c9c11101495c835f2b4144352d71f4446d5f7d07 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Thu, 10 Jul 2025 22:57:42 +0200 Subject: [PATCH] lavapipe: Adjust imageGranularity for block formats The cts tests are wrong. Reviewed-by: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/ci/lvp-fails.txt | 3 +++ src/gallium/frontends/lavapipe/ci/lvp-vkd3d-fails.txt | 4 ---- src/gallium/frontends/lavapipe/lvp_formats.c | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt index c175160fd34..4b094010845 100644 --- a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt +++ b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt @@ -863,3 +863,6 @@ dEQP-VK.pipeline.shader_object_linked_spirv.multisample.sample_rate_a2c.static_a dEQP-VK.pipeline.fast_linked_library.multisample.sample_rate_a2c.static_a2c,Fail dEQP-VK.pipeline.shader_object_linked_binary.multisample.sample_rate_a2c.static_a2c,Fail dEQP-VK.pipeline.shader_object_unlinked_spirv.multisample.sample_rate_a2c.static_a2c,Fail + +dEQP-VK.sparse_resources.image_block_shapes.2d.g8b8g8r8_422_unorm.samples_1,Fail +dEQP-VK.sparse_resources.image_block_shapes.2d_array.g8b8g8r8_422_unorm.samples_1,Fail diff --git a/src/gallium/frontends/lavapipe/ci/lvp-vkd3d-fails.txt b/src/gallium/frontends/lavapipe/ci/lvp-vkd3d-fails.txt index 4748b8e2770..befead5fe4f 100644 --- a/src/gallium/frontends/lavapipe/ci/lvp-vkd3d-fails.txt +++ b/src/gallium/frontends/lavapipe/ci/lvp-vkd3d-fails.txt @@ -1,13 +1,9 @@ -# src/gallium/frontends/lavapipe/lvp_private.h:773: lvp_image_aspects_to_plane: Assertion `!(aspectMask & ~image->vk.aspects)' failed. -test_get_resource_tiling,Crash - # The tests assumes a dubgroup size >= 16 test_shader_waveop_maximal_convergence,Fail test_sampler_feedback_implicit_lod_aniso,Fail -test_get_resource_tiling,Fail test_planar_video_formats,Fail test_rayquery,Fail test_raytracing,Fail diff --git a/src/gallium/frontends/lavapipe/lvp_formats.c b/src/gallium/frontends/lavapipe/lvp_formats.c index ad737bf08c5..755563b1b16 100644 --- a/src/gallium/frontends/lavapipe/lvp_formats.c +++ b/src/gallium/frontends/lavapipe/lvp_formats.c @@ -534,9 +534,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), - .height = util_format_get_tilesize(pformat, type + 1, samples, 1), - .depth = util_format_get_tilesize(pformat, type + 1, samples, 2), + .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), }; }