radeonsi: fix extra_md handling with fmask

Setting metadata on textures with fmask isn't allowed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2023-11-20 09:17:01 +01:00 committed by Marge Bot
parent 5371fca829
commit 981fbafa18

View file

@ -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);
}