From 23e3c635de49d5b42855d72f70e41484498a3ce1 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Fri, 23 Mar 2018 14:51:05 -0700 Subject: [PATCH] vrend: specify GL_UNPACK_IMAGE_HEIGHT We need it when uploading a 3D texture without a temporary buffer. Fixes: dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex1 dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex2 dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex3 dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex4 --- src/vrend_renderer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 061e50e..4a0e61c 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -5020,6 +5020,7 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx, if (stride && !need_temp) { glPixelStorei(GL_UNPACK_ROW_LENGTH, stride / elsize); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, u_minify(res->base.height0, info->level)); } else glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); @@ -5149,8 +5150,12 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx, glPixelTransferf(GL_DEPTH_SCALE, 1.0); } } - if (stride && !need_temp) + + if (stride && !need_temp) { glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0); + } + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); if (need_temp)