From: Samuel Pitoiset Date: Sat, 9 Apr 2016 18:15:13 +0000 (+0200) Subject: nvc0: shift address with blocksize for image buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da8171dc7580db75d65e0f89e1c20ee45c3ef3e7;p=mesa.git nvc0: shift address with blocksize for image buffers This fixes a bunch of dEQP image buffers related tests. Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c index 9fddc75cb3f..efeb4e387c1 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c @@ -859,6 +859,10 @@ nve4_set_surface_info(struct nouveau_pushbuf *push, #endif if (res->base.target == PIPE_BUFFER) { + unsigned blocksize = util_format_get_blocksize(view->format); + + address += view->u.buf.first_element * blocksize; + info[0] = address >> 8; info[2] = width - 1; info[2] |= (0xff & nve4_su_format_aux_map[view->format]) << 22;