nv30: use correct helper to get blocks in y direction
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 27 Dec 2018 15:27:43 +0000 (10:27 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 31 Dec 2018 04:32:21 +0000 (23:32 -0500)
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 <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv30/nv30_miptree.c

index a75072b7eeab854a73f4e950569d28f61490bd1f..d103ec133b5ad8492804203f972e8eaacb92663d 100644 (file)
@@ -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;