From: Michel Dänzer Date: Wed, 17 Jul 2019 10:16:15 +0000 (+0200) Subject: radeonsi: Allow PIPE_TEXTURE_2D_ARRAY in si_texture_from_handle X-Git-Tag: upstream/19.3.0~3867 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7499e7362d70c315399731eb20b89478ba794846;p=platform%2Fupstream%2Fmesa.git radeonsi: Allow PIPE_TEXTURE_2D_ARRAY in si_texture_from_handle Needed for the following st/mesa fix. Acked-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Marek Olšák --- diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index 2e31fbe..3a5cd1c 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1718,8 +1718,9 @@ static struct pipe_resource *si_texture_from_handle(struct pipe_screen *screen, unsigned stride = 0, offset = 0; /* Support only 2D textures without mipmaps */ - if ((templ->target != PIPE_TEXTURE_2D && templ->target != PIPE_TEXTURE_RECT) || - templ->depth0 != 1 || templ->last_level != 0) + if ((templ->target != PIPE_TEXTURE_2D && templ->target != PIPE_TEXTURE_RECT && + templ->target != PIPE_TEXTURE_2D_ARRAY) || + templ->last_level != 0) return NULL; buf = sscreen->ws->buffer_from_handle(sscreen->ws, whandle,