From 669de7016ce3e95c6d1e4ee8e41b5bfe95f32105 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Wed, 2 Mar 2011 19:21:46 +0100 Subject: [PATCH] nv50: fix tile size calculations --- src/gallium/drivers/nv50/nv50_miptree.c | 2 +- src/gallium/drivers/nv50/nv50_resource.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c index aadffee..ae6b26a 100644 --- a/src/gallium/drivers/nv50/nv50_miptree.c +++ b/src/gallium/drivers/nv50/nv50_miptree.c @@ -61,7 +61,7 @@ static INLINE unsigned calc_zslice_offset(uint32_t tile_mode, unsigned z, unsigned pitch, unsigned nbh) { unsigned tile_h = NV50_TILE_HEIGHT(tile_mode); - unsigned tile_d_shift = NV50_TILE_DIM_SHIFT(tile_mode, 2); + unsigned tile_d_shift = NV50_TILE_DIM_SHIFT(tile_mode, 1); unsigned tile_d = 1 << tile_d_shift; /* stride_2d == to next slice within this volume tile */ diff --git a/src/gallium/drivers/nv50/nv50_resource.h b/src/gallium/drivers/nv50/nv50_resource.h index 7622929..0e9f0a2 100644 --- a/src/gallium/drivers/nv50/nv50_resource.h +++ b/src/gallium/drivers/nv50/nv50_resource.h @@ -21,7 +21,7 @@ nv50_screen_init_resource_functions(struct pipe_screen *pscreen); #define NV50_TILE_HEIGHT(m) ( 4 << NV50_TILE_DIM_SHIFT(m, 0)) #define NV50_TILE_DEPTH(m) ( 1 << NV50_TILE_DIM_SHIFT(m, 1)) -#define NV50_TILE_SIZE_2D(m) ((64 * 8) << \ +#define NV50_TILE_SIZE_2D(m) ((64 * 4) << \ NV50_TILE_DIM_SHIFT(m, 0)) #define NV50_TILE_SIZE(m) (NV50_TILE_SIZE_2D(m) << NV50_TILE_DIM_SHIFT(m, 1)) -- 2.7.4