From 75a0b464b674ebfc27cc11e938d7017c4b705d91 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Fri, 15 Jun 2018 19:50:56 +0200 Subject: [PATCH] vrend: Correctly set pack alignment for three component textures For rgb8 and rgb16 textures the element size is 3 and 6 respectively, and the packing must correspond to the component size (1 and 2). Fixes: dEQP-GLES3.functional.texture.specification.basic_teximage3d.rgb16i_3d dEQP-GLES3.functional.texture.specification.basic_teximage3d.rgb16ui_3d dEQP-GLES3.functional.texture.specification.basic_teximage3d.rgb8i_3d dEQP-GLES3.functional.texture.specification.basic_teximage3d.rgb8ui_3d Reviewed-by: Gurchetan Singh Signed-off-by: Gert Wollny Signed-off-by: Jakob Bornecrantz --- src/vrend_renderer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 869be04..001a6f5 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -6156,9 +6156,11 @@ static void vrend_resource_copy_fallback(struct vrend_resource *src_res, } else { switch (elsize) { case 1: + case 3: glPixelStorei(GL_PACK_ALIGNMENT, 1); break; case 2: + case 6: glPixelStorei(GL_PACK_ALIGNMENT, 2); break; case 4: @@ -6192,9 +6194,11 @@ static void vrend_resource_copy_fallback(struct vrend_resource *src_res, glPixelStorei(GL_PACK_ALIGNMENT, 4); switch (elsize) { case 1: + case 3: glPixelStorei(GL_UNPACK_ALIGNMENT, 1); break; case 2: + case 6: glPixelStorei(GL_UNPACK_ALIGNMENT, 2); break; case 4: