Module: Mesa Branch: main Commit: 06a2258b4be8aa9a7095f060000500ba7f7ba415 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=06a2258b4be8aa9a7095f060000500ba7f7ba415
Author: Karol Herbst <kher...@redhat.com> Date: Tue Sep 26 22:55:27 2023 +0200 radeonsi: hack for importing 3D textures Signed-off-by: Karol Herbst <kher...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305> --- src/gallium/drivers/radeonsi/si_texture.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index ebd4d8c07ae..71fb2298088 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1625,6 +1625,10 @@ static struct pipe_resource *si_texture_from_winsys_buffer(struct si_screen *ssc if (r) return NULL; + /* This is a hack to skip alignment checking for 3D textures */ + if (templ->target == PIPE_TEXTURE_3D) + stride = 0; + tex = si_texture_create_object(&sscreen->b, templ, &surface, NULL, buf, offset, stride, 0, 0); if (!tex)