[Mesa-dev] [PATCH 03/15] r600: fix HTILE for NPOT textures with mipmapping
Marek Olšák
maraeo at gmail.com
Wed Aug 29 20:12:59 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
Cc: 18.1 18.2 <mesa-stable at lists.freedesktop.org>
---
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
@@ -767,22 +767,22 @@ static void r600_texture_get_htile_size(struct r600_common_screen *rscreen,
break;
case 16:
cl_width = 128;
cl_height = 64;
break;
default:
assert(0);
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;
pipe_interleave_bytes = rscreen->info.pipe_interleave_bytes;
base_align = num_pipes * pipe_interleave_bytes;
rtex->surface.htile_alignment = base_align;
rtex->surface.htile_size =
util_num_layers(&rtex->resource.b.b, 0) *
--
2.17.1
More information about the mesa-dev
mailing list