From ad251330e858aeab0cee111488b203e993f76b89 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Thu, 27 Dec 2018 10:27:43 -0500 Subject: [PATCH] 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 --- src/gallium/drivers/nouveau/nv30/nv30_miptree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_miptree.c b/src/gallium/drivers/nouveau/nv30/nv30_miptree.c index a75072b..d103ec1 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; -- 2.7.4