[virglrenderer-devel] [PATCH 4/5] vrend: Correctly set pack alignment for three component textures
Gert Wollny
gert.wollny at collabora.com
Fri Jun 15 17:50:56 UTC 2018
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
Signed-off-by: Jakob Bornecrantz <jakob at collabora.com>
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/vrend_renderer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index bce84d2..e36f89e 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -6148,9 +6148,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:
@@ -6184,9 +6186,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:
--
2.17.1
More information about the virglrenderer-devel
mailing list