From 981fbafa187b0d040be8acd22de962cd23de6cbb Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 20 Nov 2023 09:17:01 +0100 Subject: [PATCH] radeonsi: fix extra_md handling with fmask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting metadata on textures with fmask isn't allowed. Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index 084dca54d6a..1c27dd3bd7a 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1372,7 +1372,8 @@ si_texture_create_with_modifier(struct pipe_screen *screen, last_plane->buffer.b.b.next = &tex->buffer.b.b; last_plane = tex; } - if (i == 0 && !is_zs && sscreen->debug_flags & DBG(EXTRA_METADATA)) + if (i == 0 && !is_zs && tex->surface.fmask_size == 0 && + sscreen->debug_flags & DBG(EXTRA_METADATA)) si_set_tex_bo_metadata(sscreen, tex); }