diff options
author | Marek Olšák <maraeo@gmail.com> | 2013-04-24 20:39:45 +0200 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2013-05-15 19:15:42 +0200 |
commit | e5e51c2110ebf6e1edaa14b7567c5d6a79008a90 (patch) | |
tree | 3eeeddbe4c9edd4513a3085b4e8ef5e4ae434ded | |
parent | 96e90aabc4c0238de2f2d245899f991a3b996587 (diff) |
radeon: add RADEON_SURF_FMASK flag which disables 2D->1D tiling transition
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | radeon/radeon_surface.c | 9 | ||||
-rw-r--r-- | radeon/radeon_surface.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index d1fdc4bf..a74064c4 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -159,7 +159,8 @@ static void surf_minify(struct radeon_surface *surf, surflevel->nblk_x = (surflevel->npix_x + surf->blk_w - 1) / surf->blk_w; surflevel->nblk_y = (surflevel->npix_y + surf->blk_h - 1) / surf->blk_h; surflevel->nblk_z = (surflevel->npix_z + surf->blk_d - 1) / surf->blk_d; - if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D) { + if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D && + !(surf->flags & RADEON_SURF_FMASK)) { if (surflevel->nblk_x < xalign || surflevel->nblk_y < yalign) { surflevel->mode = RADEON_SURF_MODE_1D; return; @@ -565,7 +566,8 @@ static void eg_surf_minify(struct radeon_surface *surf, surflevel->nblk_x = (surflevel->npix_x + surf->blk_w - 1) / surf->blk_w; surflevel->nblk_y = (surflevel->npix_y + surf->blk_h - 1) / surf->blk_h; surflevel->nblk_z = (surflevel->npix_z + surf->blk_d - 1) / surf->blk_d; - if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D) { + if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D && + !(surf->flags & RADEON_SURF_FMASK)) { if (surflevel->nblk_x < mtilew || surflevel->nblk_y < mtileh) { surflevel->mode = RADEON_SURF_MODE_1D; return; @@ -1459,7 +1461,8 @@ static void si_surf_minify_2d(struct radeon_surface *surf, surflevel->nblk_z = (surflevel->npix_z + surf->blk_d - 1) / surf->blk_d; } - if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D) { + if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D && + !(surf->flags & RADEON_SURF_FMASK)) { if (surflevel->nblk_x < xalign || surflevel->nblk_y < yalign) { surflevel->mode = RADEON_SURF_MODE_1D; return; diff --git a/radeon/radeon_surface.h b/radeon/radeon_surface.h index 2babfd71..bbed56f8 100644 --- a/radeon/radeon_surface.h +++ b/radeon/radeon_surface.h @@ -56,6 +56,7 @@ #define RADEON_SURF_SBUFFER (1 << 18) #define RADEON_SURF_HAS_SBUFFER_MIPTREE (1 << 19) #define RADEON_SURF_HAS_TILE_MODE_INDEX (1 << 20) +#define RADEON_SURF_FMASK (1 << 21) #define RADEON_SURF_GET(v, field) (((v) >> RADEON_SURF_ ## field ## _SHIFT) & RADEON_SURF_ ## field ## _MASK) #define RADEON_SURF_SET(v, field) (((v) & RADEON_SURF_ ## field ## _MASK) << RADEON_SURF_ ## field ## _SHIFT) |