From: Ilia Mirkin Date: Thu, 27 Dec 2018 15:27:43 +0000 (-0500) Subject: nv30: use correct helper to get blocks in y direction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad251330e858aeab0cee111488b203e993f76b89;p=mesa.git nv30: use correct helper to get blocks in y direction This doesn't matter since all compressed formats supported by this hardware use square blocks, but best to use the correct helper. Signed-off-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/nv30/nv30_miptree.c b/src/gallium/drivers/nouveau/nv30/nv30_miptree.c index a75072b7eea..d103ec133b5 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_miptree.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_miptree.c @@ -456,7 +456,7 @@ nv30_miptree_create(struct pipe_screen *pscreen, for (l = 0; l <= pt->last_level; l++) { struct nv30_miptree_level *lvl = &mt->level[l]; unsigned nbx = util_format_get_nblocksx(pt->format, w); - unsigned nby = util_format_get_nblocksx(pt->format, h); + unsigned nby = util_format_get_nblocksy(pt->format, h); lvl->offset = size; lvl->pitch = mt->uniform_pitch;