From da72b6296cfa5c5fa92d840d8a69c55df19d13f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 28 Aug 2018 15:49:31 -0400 Subject: [PATCH] r600: fix HTILE for NPOT textures with mipmapping MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Cc: 18.1 18.2 Tested-by: Dieter Nützel --- src/gallium/drivers/r600/r600_texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 08db6bab04c..d08c6e5637c 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -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; -- 2.30.2