From 0cb3ace969d5fe63669aa835a3cc4bf3ee5d8731 Mon Sep 17 00:00:00 2001 From: Ganesh Belgur Ramachandra Date: Sat, 20 Jul 2024 00:24:29 +0530 Subject: [PATCH] radeonsi: fix eptich on chips without image opcodes (e.g. gfx940) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes VAAPI decode corruption issues. Fixes: 26cd3a1718c ("ac,radv,radeonsi: add a helper to set mutable tex desc fields") Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_descriptors.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 6f2a386939c..9d323211e56 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -303,6 +303,9 @@ void si_set_mutable_tex_desc_fields(struct si_screen *sscreen, struct si_texture ac_set_mutable_tex_desc_fields(&sscreen->info, &ac_state, state); + if (!sscreen->info.has_image_opcodes) + return; + if (sscreen->info.gfx_level == GFX9 && !is_stencil) { uint32_t hw_format = G_008F14_DATA_FORMAT(state[1]); uint16_t epitch = tex->surface.u.gfx9.epitch;