summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2014-07-22 18:37:59 +0900
committerMichel Dänzer <[email protected]>2014-08-01 11:04:16 +0900
commit8898fff46cbf62baf4f924b6e8f537a9b1b26fa5 (patch)
tree625364498524e6f2cdc72fe292b7f0872135c52a /src
parent095c37e47230125d7fdc4a6b148b8e5cdc2f7262 (diff)
r600g/radeonsi: Reduce or even drop special treatment of persistent mappings
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 4e6b8978efb..154c33d7391 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -127,13 +127,17 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
break;
}
- /* Use GTT for all persistent mappings, because they are
- * always cached and coherent. */
- if (res->b.b.target == PIPE_BUFFER &&
+ /* Use GTT for all persistent mappings with older kernels, because they
+ * didn't always flush the HDP cache before CS execution.
+ *
+ * Write-combined CPU mappings are fine, the kernel ensures all CPU
+ * writes finish before the GPU executes a command stream.
+ */
+ if (rscreen->info.drm_minor < 40 &&
+ res->b.b.target == PIPE_BUFFER &&
res->b.b.flags & (PIPE_RESOURCE_FLAG_MAP_PERSISTENT |
PIPE_RESOURCE_FLAG_MAP_COHERENT)) {
res->domains = RADEON_DOMAIN_GTT;
- flags = 0;
}
/* Tiled textures are unmappable. Always put them in VRAM. */