r600: fix HTILE for NPOT textures with mipmapping
authorMarek Olšák <marek.olsak@amd.com>
Tue, 28 Aug 2018 19:49:31 +0000 (15:49 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 10 Sep 2018 19:19:56 +0000 (15:19 -0400)
Cc: 18.1 18.2 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/drivers/r600/r600_texture.c

index 08db6bab04cca21343607b24f24fd6e2f9ec7373..d08c6e5637cdd0415799fabfad72ec5d5396ab3f 100644 (file)
@@ -774,8 +774,8 @@ static void r600_texture_get_htile_size(struct r600_common_screen *rscreen,
                return;
        }
 
-       width = align(rtex->resource.b.b.width0, cl_width * 8);
-       height = align(rtex->resource.b.b.height0, cl_height * 8);
+       width = align(rtex->surface.u.legacy.level[0].nblk_x, cl_width * 8);
+       height = align(rtex->surface.u.legacy.level[0].nblk_y, cl_height * 8);
 
        slice_elements = (width * height) / (8 * 8);
        slice_bytes = slice_elements * 4;