From 7499e7362d70c315399731eb20b89478ba794846 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 17 Jul 2019 12:16:15 +0200 Subject: [PATCH] radeonsi: Allow PIPE_TEXTURE_2D_ARRAY in si_texture_from_handle MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Needed for the following st/mesa fix. Acked-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_texture.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index 2e31fbe94ad..3a5cd1cb187 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, -- 2.30.2