From 4193c10211dfb211dbcba9b9cbdd2ac697978b4d Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Fri, 8 Oct 2021 14:56:23 +0200 Subject: [PATCH] blitter: Correct swizzle used for 1D array blits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes piglit: arb_get_texture_sub_image-get for 1D array blits Signed-off-by: Gert Wollny Reviewed-by: Corentin Noël . --- src/vrend_blitter.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vrend_blitter.c b/src/vrend_blitter.c index b213a06..74065f8 100644 --- a/src/vrend_blitter.c +++ b/src/vrend_blitter.c @@ -205,8 +205,14 @@ static void blit_get_swizzle(int tgsi_tex_target, unsigned flags, if (flags & BLIT_USE_MSAA) { retval->type = "ivec2"; } - /* fallthrough */ + retval->swizzle = ".xy"; + break; case TGSI_TEXTURE_1D_ARRAY: + if (flags & (BLIT_USE_GLES)) { + retval->swizzle = ".xyz"; + break; + } + /* fallthrough */ case TGSI_TEXTURE_2D: case TGSI_TEXTURE_RECT: retval->swizzle = ".xy";