summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-21 20:34:52 +0100
committerMarek Olšák <[email protected]>2012-12-21 23:43:34 +0100
commit9c6410e5c3ffc74564fae5afcc1b6982759cdd01 (patch)
tree3d1deb4fe6a462c3f5b3b34ae14395de4882d3a4 /src/gallium/drivers/r600/r600_texture.c
parent9b0b4cf05840fd8dcc4973524166024f948a97ec (diff)
r600g: always use a tiled resource as the destination of MSAA resolve
i.e. we have to allocate a temporary tiled resource if dst isn't tiled. This fixes hardlocks on r6xx-r7xx, though using a linear resource is forbidden on later asics as well. NOTE: This is a candidate for the stable branches.
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index f5ce7c113ab..e0d848678d2 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -563,12 +563,14 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
* for fast uploads anyway. */
if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
desc->layout != UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
- if (!(templ->bind & PIPE_BIND_SCANOUT) &&
- templ->usage != PIPE_USAGE_STAGING &&
- templ->usage != PIPE_USAGE_STREAM &&
- templ->target != PIPE_TEXTURE_1D &&
- templ->target != PIPE_TEXTURE_1D_ARRAY &&
- templ->height0 > 3) {
+ if (templ->flags & R600_RESOURCE_FLAG_FORCE_TILING) {
+ array_mode = V_038000_ARRAY_2D_TILED_THIN1;
+ } else if (!(templ->bind & PIPE_BIND_SCANOUT) &&
+ templ->usage != PIPE_USAGE_STAGING &&
+ templ->usage != PIPE_USAGE_STREAM &&
+ templ->target != PIPE_TEXTURE_1D &&
+ templ->target != PIPE_TEXTURE_1D_ARRAY &&
+ templ->height0 > 3) {
array_mode = V_038000_ARRAY_2D_TILED_THIN1;
} else if (util_format_is_compressed(templ->format)) {
array_mode = V_038000_ARRAY_1D_TILED_THIN1;