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
macos/master
Gurchetan Singh 7 years ago committed by Dave Airlie
parent e4b943eeaf
commit 23e3c635de
  1. 7
      src/vrend_renderer.c

@ -5020,6 +5020,7 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx,
if (stride && !need_temp) { if (stride && !need_temp) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, stride / elsize); glPixelStorei(GL_UNPACK_ROW_LENGTH, stride / elsize);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, u_minify(res->base.height0, info->level));
} else } else
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); 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); glPixelTransferf(GL_DEPTH_SCALE, 1.0);
} }
} }
if (stride && !need_temp)
if (stride && !need_temp) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0);
}
glPixelStorei(GL_UNPACK_ALIGNMENT, 4); glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
if (need_temp) if (need_temp)

Loading…
Cancel
Save