r600g/radeonsi: Reduce or even drop special treatment of persistent mappings

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Michel Dänzer 2014-07-22 18:37:59 +09:00 committed by Michel Dänzer
parent 095c37e472
commit 8898fff46c
1 changed files with 8 additions and 4 deletions

View File

@ -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. */