summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-08-28 15:49:31 -0400
committerAndres Gomez <[email protected]>2018-09-12 00:52:29 +0300
commitf5807386559f116d45377a7a42cd5881888868ca (patch)
tree158c4e2be64ffb8ec76a7e8343d9d24dc803dcf1
parent1aa9e7f97305d988f7b25e094ce973a240527419 (diff)
r600: fix HTILE for NPOT textures with mipmapping
Cc: 18.1 18.2 <[email protected]> Tested-by: Dieter Nützel <[email protected]> (cherry picked from commit da72b6296cfa5c5fa92d840d8a69c55df19d13f5)
-rw-r--r--src/gallium/drivers/r600/r600_texture.c4
1 files 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;