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 <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40678>
This commit is contained in:
Samuel Pitoiset 2026-03-27 12:58:09 +01:00 committed by Marge Bot
parent 0d08b197f2
commit 4e00e1c3d0
6 changed files with 8 additions and 61 deletions

View file

@ -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; const enum util_format_layout format_layout = radv_format_description(dst_image->vk.format)->layout;
for (unsigned r = 0; r < pCopyImageInfo->regionCount; r++) { for (unsigned r = 0; r < pCopyImageInfo->regionCount; r++) {
VkExtent3D dst_extent = pCopyImageInfo->pRegions[r].extent; 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) * dst_extent.width = dst_extent.width / vk_format_get_blockwidth(src_image->vk.format) *
vk_format_get_blockwidth(dst_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) * dst_extent.height = dst_extent.height / vk_format_get_blockheight(src_image->vk.format) *

View file

@ -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@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 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

View file

@ -8,15 +8,3 @@ spec@egl_mesa_configless_context@basic,Fail
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/12495 # 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,Fail
spec@arb_framebuffer_object@execution@msaa-alpha-to-coverage_alpha-to-one_write-z,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

View file

@ -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_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-sample_yvyu,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,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

View file

@ -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=4,Fail
spec@ext_texture_array@copyteximage 1d_array samples=6,Fail spec@ext_texture_array@copyteximage 1d_array samples=6,Fail
spec@ext_texture_array@copyteximage 1d_array samples=8,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

View file

@ -1,15 +1,3 @@
glx@glx-multi-window-single-context,Fail glx@glx-multi-window-single-context,Fail
spec@egl_mesa_configless_context@basic,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