vrend: correct the stride if the client sends it

If the client sends vrend_transfer_send_readpixels a stride (and vtest does),
then it is in bytes, but glPixelStorei(GL_PACK_ROW_LENGTH, stride) expects
the value to be pixels.

Fixes:
   42e2a4ca7d
   vrend: use the row-stride when directly reading back to an IOV

Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 7 years ago committed by Jakob Bornecrantz
parent cd14ff177c
commit c2e457e25e
  1. 2
      src/vrend_renderer.c

@ -5912,7 +5912,7 @@ static int vrend_transfer_send_readpixels(struct vrend_context *ctx,
uint32_t h = u_minify(res->base.height0, info->level);
int elsize = util_format_get_blocksize(res->base.format);
float depth_scale;
int row_stride = info->stride;
int row_stride = info->stride / elsize;
vrend_use_program(ctx, 0);

Loading…
Cancel
Save