Mesa (main): radeonsi: fix resource_copy_region with ETC formats (e.g. for Stoney)
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 17 11:46:13 UTC 2022
Module: Mesa
Branch: main
Commit: ad50daa98233f8958dcb7f4a7344b0d61b87662c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad50daa98233f8958dcb7f4a7344b0d61b87662c
Author: Marek Olšák <marek.olsak at amd.com>
Date: Fri May 13 04:09:37 2022 -0400
radeonsi: fix resource_copy_region with ETC formats (e.g. for Stoney)
Only Stoney, Vega10, Raven, and Raven2 support ETC.
Fixed tests:
dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rgba16i.texture2d_to_texture2d
dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rgba16ui.texture2d_to_texture2d
dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rgba16i.texture2d_to_texture2d
dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rgba16ui.texture2d_to_texture2d
Fixes: cf1e562fdd7 - radeonsi: remove compressed and subsampled gfx copy from resource_copy_region
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6431
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16491>
---
.../drivers/radeonsi/ci/radeonsi-stoney-fails.txt | 32 ----------------------
src/gallium/drivers/radeonsi/si_blit.c | 17 +++++++++---
2 files changed, 13 insertions(+), 36 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt b/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt
index f8691526ef9..7c44c25fe2f 100644
--- a/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt
+++ b/src/gallium/drivers/radeonsi/ci/radeonsi-stoney-fails.txt
@@ -155,38 +155,6 @@ CreateContext/VAAPICreateContext.CreateContext/1630,Crash
CreateContext/VAAPICreateContext.CreateContext/1800,Crash
CreateContext/VAAPICreateContext.CreateContext/2990,Crash
CreateContext/VAAPICreateContext.CreateContext/3160,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rg11_eac_rgba32i.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rg11_eac_rgba32i.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rg11_eac_rgba32ui.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rg11_eac_rgba32ui.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rgba8_etc2_eac_rgba32i.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rgba8_etc2_eac_rgba32i.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rgba8_etc2_eac_rgba32ui.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.rgba8_etc2_eac_rgba32ui.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.signed_rg11_eac_rgba32i.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.signed_rg11_eac_rgba32i.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.signed_rg11_eac_rgba32ui.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.signed_rg11_eac_rgba32ui.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.srgb8_alpha8_etc2_eac_rgba32i.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.srgb8_alpha8_etc2_eac_rgba32i.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.srgb8_alpha8_etc2_eac_rgba32ui.cubemap_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_128_bits_mixed.srgb8_alpha8_etc2_eac_rgba32ui.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rg32i.cubemap_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rg32i.texture2d_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rg32ui.cubemap_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rg32ui.texture2d_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rgba16i.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rgba16i.texture2d_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rgba16ui.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.r11_eac_rgba16ui.texture2d_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rg32i.cubemap_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rg32i.texture2d_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rg32ui.cubemap_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rg32ui.texture2d_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rgba16i.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rgba16i.texture2d_to_texture2d,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rgba16ui.texture2d_to_renderbuffer,Crash
-dEQP-GLES31.functional.copy_image.mixed.viewclass_64_bits_mixed.signed_r11_eac_rgba16ui.texture2d_to_texture2d,Crash
spec@!opengl 1.0 at gl-1.0-user-clip-all-planes,Fail
spec@!opengl 1.1 at texwrap formats bordercolor-swizzled,Fail
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index cbf4e63a890..8a65ad240e2 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -953,10 +953,19 @@ void si_resource_copy_region(struct pipe_context *ctx, struct pipe_resource *dst
si_use_compute_copy_for_float_formats(sctx, dst, dst_level);
- if (si_can_use_compute_blit(sctx, dst->format, dst->nr_samples, true,
- vi_dcc_enabled(sdst, dst_level)) &&
- si_can_use_compute_blit(sctx, src->format, src->nr_samples, false,
- vi_dcc_enabled(ssrc, src_level))) {
+ /* The compute copy is mandatory for compressed and subsampled formats because the gfx copy
+ * doesn't support them. In all other cases, call si_can_use_compute_blit.
+ *
+ * The format is identical (we only need to check the src format) except compressed formats,
+ * which can be paired with an equivalent integer format.
+ */
+ if (util_format_is_compressed(src->format) ||
+ util_format_is_compressed(dst->format) ||
+ util_format_is_subsampled_422(src->format) ||
+ (si_can_use_compute_blit(sctx, dst->format, dst->nr_samples, true,
+ vi_dcc_enabled(sdst, dst_level)) &&
+ si_can_use_compute_blit(sctx, src->format, src->nr_samples, false,
+ vi_dcc_enabled(ssrc, src_level)))) {
si_compute_copy_image(sctx, dst, dst_level, src, src_level, dstx, dsty, dstz,
src_box, false, SI_OP_SYNC_BEFORE_AFTER);
return;
More information about the mesa-commit
mailing list