nv50: fix tile size calculations

This commit is contained in:
Christoph Bumiller
2011-03-02 19:21:46 +01:00
parent 223d98bb8d
commit 669de7016c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 */
+1 -1
View File
@@ -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))