diff options
author | Marek Olšák <[email protected]> | 2014-07-25 23:06:18 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-07-28 23:57:08 +0200 |
commit | ecbd3a545a3cb5f2c112ae0b02abfcbb3240ec6f (patch) | |
tree | 5a06f1c2a2dcdc9a31d3ae62394817684699a937 /src/gallium/drivers/radeon/r600_texture.c | |
parent | 04f2c88f45e26d7050cc88aaaac8e8154d6018d0 (diff) |
r600g,radeonsi: add debug flags which disable tiling
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 6dd84a4f255..34ecfabfc51 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -737,6 +737,13 @@ static unsigned r600_choose_tiling(struct r600_common_screen *rscreen, * Compressed textures must always be tiled. */ if (!(templ->flags & R600_RESOURCE_FLAG_FORCE_TILING) && !util_format_is_compressed(templ->format)) { + /* Not everything can be linear, so we cannot enforce it + * for all textures. */ + if ((rscreen->debug_flags & DBG_NO_TILING) && + (!util_format_is_depth_or_stencil(templ->format) || + !(templ->flags & R600_RESOURCE_FLAG_FLUSHED_DEPTH))) + return RADEON_SURF_MODE_LINEAR_ALIGNED; + /* Tiling doesn't work with the 422 (SUBSAMPLED) formats on R600+. */ if (desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) return RADEON_SURF_MODE_LINEAR_ALIGNED; @@ -763,7 +770,8 @@ static unsigned r600_choose_tiling(struct r600_common_screen *rscreen, } /* Make small textures 1D tiled. */ - if (templ->width0 <= 16 || templ->height0 <= 16) + if (templ->width0 <= 16 || templ->height0 <= 16 || + (rscreen->debug_flags & DBG_NO_2D_TILING)) return RADEON_SURF_MODE_1D; /* The allocator will switch to 1D if needed. */ |