From 55916383fce5ccdbf0961951a746c79dedf9aff5 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 27 Mar 2026 12:58:09 +0100 Subject: [PATCH] radv/meta: fix computing extent for image->image with both compressed formats If both src and dst are compressed formats, adjusting the extent isn't necessary because it's required that texel block extent matches. The previous division was also wrong because it was truncating partial blocks causing issues in some tests. Cc: mesa-stable Signed-off-by: Samuel Pitoiset (cherry picked from commit 4e00e1c3d01a2b6ca09ce39f384f11cf059507ea) Part-of: --- .pick_status.json | 2 +- src/amd/vulkan/meta/radv_meta_copy.c | 9 ++++++++- .../drivers/zink/ci/zink-radv-gfx1201-fails.txt | 12 ------------ .../drivers/zink/ci/zink-radv-navi10-fails.txt | 12 ------------ .../drivers/zink/ci/zink-radv-navi31-fails.txt | 12 ------------ .../drivers/zink/ci/zink-radv-polaris10-fails.txt | 12 ------------ .../drivers/zink/ci/zink-radv-vangogh-fails.txt | 12 ------------ 7 files changed, 9 insertions(+), 62 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d3a951f68ea..a8e4b05e06d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3044,7 +3044,7 @@ "description": "radv/meta: fix computing extent for image->image with both compressed formats", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/meta/radv_meta_copy.c b/src/amd/vulkan/meta/radv_meta_copy.c index 91f61a491e3..0f3b85a3044 100644 --- a/src/amd/vulkan/meta/radv_meta_copy.c +++ b/src/amd/vulkan/meta/radv_meta_copy.c @@ -759,7 +759,14 @@ radv_CmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2 *pCopyI const enum util_format_layout format_layout = radv_format_description(dst_image->vk.format)->layout; for (unsigned r = 0; r < pCopyImageInfo->regionCount; r++) { VkExtent3D dst_extent = pCopyImageInfo->pRegions[r].extent; - if (src_image->vk.format != dst_image->vk.format) { + + /* The Vulken spec 1.4.347 says: + * + * "VUID-VkCopyImageInfo2-srcImage-09247 + * If the VkFormat of each of srcImage and dstImage is a compressed image format, the + * formats must have the same texel block extent" + */ + if (vk_format_is_compressed(src_image->vk.format) != vk_format_is_compressed(dst_image->vk.format)) { dst_extent.width = dst_extent.width / vk_format_get_blockwidth(src_image->vk.format) * vk_format_get_blockwidth(dst_image->vk.format); dst_extent.height = dst_extent.height / vk_format_get_blockheight(src_image->vk.format) * diff --git a/src/gallium/drivers/zink/ci/zink-radv-gfx1201-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-gfx1201-fails.txt index b59670ec253..980964d5274 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-gfx1201-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-gfx1201-fails.txt @@ -40,15 +40,3 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvyu,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail spec@arb_pipeline_statistics_query@arb_pipeline_statistics_query-clip,Fail - -# New failures with ES CTS 3.2.13.0 -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.r11_eac_signed_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.signed_r11_eac_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.rg11_eac_signed_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.signed_rg11_eac_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.rgba8_etc2_eac_srgb8_alpha8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.srgb8_alpha8_etc2_eac_rgba8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.rgb8_etc2_srgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.srgb8_etc2_rgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.rgb8_punchthrough_alpha1_etc2_srgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.srgb8_punchthrough_alpha1_etc2_rgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt index 8dedac32e62..b9ed6b003e9 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt @@ -8,15 +8,3 @@ spec@egl_mesa_configless_context@basic,Fail # https://gitlab.freedesktop.org/mesa/mesa/-/issues/12495 spec@arb_framebuffer_object@execution@msaa-alpha-to-coverage_alpha-to-one,Fail spec@arb_framebuffer_object@execution@msaa-alpha-to-coverage_alpha-to-one_write-z,Fail - -# New failures with ES CTS 3.2.13.0 -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.r11_eac_signed_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.signed_r11_eac_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.rg11_eac_signed_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.signed_rg11_eac_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.rgba8_etc2_eac_srgb8_alpha8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.srgb8_alpha8_etc2_eac_rgba8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.rgb8_etc2_srgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.srgb8_etc2_rgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.rgb8_punchthrough_alpha1_etc2_srgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.srgb8_punchthrough_alpha1_etc2_rgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-navi31-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-navi31-fails.txt index 5ecbf8991d6..14ed4df1653 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-navi31-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-navi31-fails.txt @@ -36,15 +36,3 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuv420,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvyu,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail - -# New failures with ES CTS 3.2.13.0 -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.r11_eac_signed_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.signed_r11_eac_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.rg11_eac_signed_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.signed_rg11_eac_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.rgba8_etc2_eac_srgb8_alpha8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.srgb8_alpha8_etc2_eac_rgba8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.rgb8_etc2_srgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.srgb8_etc2_rgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.rgb8_punchthrough_alpha1_etc2_srgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.srgb8_punchthrough_alpha1_etc2_rgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt index 773e57de452..e60215aa1ac 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt @@ -228,15 +228,3 @@ spec@ext_texture_array@copyteximage 1d_array samples=2,Fail spec@ext_texture_array@copyteximage 1d_array samples=4,Fail spec@ext_texture_array@copyteximage 1d_array samples=6,Fail spec@ext_texture_array@copyteximage 1d_array samples=8,Fail - -# New failures with ES CTS 3.2.13.0 -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.r11_eac_signed_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.signed_r11_eac_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.rg11_eac_signed_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.signed_rg11_eac_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.rgba8_etc2_eac_srgb8_alpha8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.srgb8_alpha8_etc2_eac_rgba8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.rgb8_etc2_srgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.srgb8_etc2_rgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.rgb8_punchthrough_alpha1_etc2_srgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.srgb8_punchthrough_alpha1_etc2_rgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt index d90473cdb9e..06a65656176 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt @@ -5,15 +5,3 @@ spec@egl_mesa_configless_context@basic,Fail # Delta over NAVI10 spec@!opengl 1.1@depthstencil-default_fb-blit samples=6,Fail spec@!opengl 1.1@depthstencil-default_fb-blit samples=8,Fail - -# New failures with ES CTS 3.2.13.0 -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.r11_eac_signed_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_r11.signed_r11_eac_r11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.rg11_eac_signed_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_eac_rg11.signed_rg11_eac_rg11_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.rgba8_etc2_eac_srgb8_alpha8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_eac_rgba.srgb8_alpha8_etc2_eac_rgba8_etc2_eac.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.rgb8_etc2_srgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgb.srgb8_etc2_rgb8_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.rgb8_punchthrough_alpha1_etc2_srgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail -dEQP-GLES31.functional.copy_image.compressed.viewclass_etc2_rgba.srgb8_punchthrough_alpha1_etc2_rgb8_punchthrough_alpha1_etc2.texture2d_to_texture2d,Fail