From 4e00e1c3d01a2b6ca09ce39f384f11cf059507ea 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 Part-of: --- 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 ------------ 6 files changed, 8 insertions(+), 61 deletions(-) diff --git a/src/amd/vulkan/meta/radv_meta_copy.c b/src/amd/vulkan/meta/radv_meta_copy.c index 2e4600e1085..1b39fffd4f4 100644 --- a/src/amd/vulkan/meta/radv_meta_copy.c +++ b/src/amd/vulkan/meta/radv_meta_copy.c @@ -842,7 +842,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 2820601f6fe..64d037934ff 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt @@ -1,15 +1,3 @@ glx@glx-multi-window-single-context,Fail spec@egl_mesa_configless_context@basic,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