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 <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 6 years ago committed by Jakob Bornecrantz
parent 04f2080d89
commit 75a0b464b6
  1. 4
      src/vrend_renderer.c

@ -6156,9 +6156,11 @@ static void vrend_resource_copy_fallback(struct vrend_resource *src_res,
} else { } else {
switch (elsize) { switch (elsize) {
case 1: case 1:
case 3:
glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1);
break; break;
case 2: case 2:
case 6:
glPixelStorei(GL_PACK_ALIGNMENT, 2); glPixelStorei(GL_PACK_ALIGNMENT, 2);
break; break;
case 4: case 4:
@ -6192,9 +6194,11 @@ static void vrend_resource_copy_fallback(struct vrend_resource *src_res,
glPixelStorei(GL_PACK_ALIGNMENT, 4); glPixelStorei(GL_PACK_ALIGNMENT, 4);
switch (elsize) { switch (elsize) {
case 1: case 1:
case 3:
glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
break; break;
case 2: case 2:
case 6:
glPixelStorei(GL_UNPACK_ALIGNMENT, 2); glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
break; break;
case 4: case 4:

Loading…
Cancel
Save