summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-02-28 04:37:45 +0000
committerDave Airlie <[email protected]>2018-02-28 04:59:37 +0000
commita5853a33332d51382cae42397f353817e47cccc9 (patch)
treef54a03e8ec23f37025e74b542a5ffb3ef39d77d6 /src/gallium/drivers/r600
parent0c1f37cc2d8555223ade73b244a3ee374be8d9cd (diff)
r600: partly revert disabling tiling for 1d texture.
Previously we had a check for 1d of narrow 2D textures, however narrow 2d textures caused gpu hangs, but it was correct for 1d textures. This fixes a bunch of 1D image piglits for me. Fixes: 7b8e1c089d (r600/texture: drop lowering 1d/2d images to linear.) Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 03cdcd22eee..1fbb682d671 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -1053,6 +1053,11 @@ r600_choose_tiling(struct r600_common_screen *rscreen,
if (templ->bind & PIPE_BIND_LINEAR)
return RADEON_SURF_MODE_LINEAR_ALIGNED;
+ /* 1D textures should be linear - fixes image operations on 1d */
+ if (templ->target == PIPE_TEXTURE_1D ||
+ templ->target == PIPE_TEXTURE_1D_ARRAY)
+ return RADEON_SURF_MODE_LINEAR_ALIGNED;
+
/* Textures likely to be mapped often. */
if (templ->usage == PIPE_USAGE_STAGING ||
templ->usage == PIPE_USAGE_STREAM)