Mesa (master): gallium/radeon: adjust the rule for using the LINEAR_ALIGNED layout
Marek Olšák
mareko at kemper.freedesktop.org
Mon Jan 23 22:48:47 UTC 2017
Module: Mesa
Branch: master
Commit: 7b32ae4df5bc19c378598d6a950a6019fa64ece6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b32ae4df5bc19c378598d6a950a6019fa64ece6
Author: Marek Olšák <marek.olsak at amd.com>
Date: Fri Jan 20 17:57:38 2017 +0100
gallium/radeon: adjust the rule for using the LINEAR_ALIGNED layout
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/drivers/radeon/r600_texture.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index cba4e7d..0b77c82 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1184,7 +1184,9 @@ r600_choose_tiling(struct r600_common_screen *rscreen,
/* Textures with a very small height are recommended to be linear. */
if (templ->target == PIPE_TEXTURE_1D ||
templ->target == PIPE_TEXTURE_1D_ARRAY ||
- templ->height0 <= 4)
+ /* Only very thin and long 2D textures should benefit from
+ * linear_aligned. */
+ (templ->width0 > 8 && templ->height0 <= 2))
return RADEON_SURF_MODE_LINEAR_ALIGNED;
/* Textures likely to be mapped often. */
More information about the mesa-commit
mailing list