nvc0: fix address offset when images have multiple levels
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 9 Apr 2016 18:31:45 +0000 (20:31 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 26 Apr 2016 17:47:49 +0000 (19:47 +0200)
This fixes arb_shader_image_load_store-level.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c

index 5faa2cd5c12c3277c3919739e6589047ebb9a529..9fddc75cb3f3628509b4c0d765cc738ec0da6e6d 100644 (file)
@@ -883,6 +883,7 @@ nve4_set_surface_info(struct nouveau_pushbuf *push,
             address += mt->layer_stride * z;
          }
       }
+      address += lvl->offset;
 
       info[0]  = address >> 8;
       info[2]  = width - 1;