radeonsi: Allow PIPE_TEXTURE_2D_ARRAY in si_texture_from_handle
Needed for the following st/mesa fix. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
2f93ecd654
commit
7499e7362d
|
@ -1718,8 +1718,9 @@ static struct pipe_resource *si_texture_from_handle(struct pipe_screen *screen,
|
||||||
unsigned stride = 0, offset = 0;
|
unsigned stride = 0, offset = 0;
|
||||||
|
|
||||||
/* Support only 2D textures without mipmaps */
|
/* Support only 2D textures without mipmaps */
|
||||||
if ((templ->target != PIPE_TEXTURE_2D && templ->target != PIPE_TEXTURE_RECT) ||
|
if ((templ->target != PIPE_TEXTURE_2D && templ->target != PIPE_TEXTURE_RECT &&
|
||||||
templ->depth0 != 1 || templ->last_level != 0)
|
templ->target != PIPE_TEXTURE_2D_ARRAY) ||
|
||||||
|
templ->last_level != 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
buf = sscreen->ws->buffer_from_handle(sscreen->ws, whandle,
|
buf = sscreen->ws->buffer_from_handle(sscreen->ws, whandle,
|
||||||
|
|
Loading…
Reference in New Issue