Mesa (10.3): r600g,radeonsi: Always use GTT again for PIPE_USAGE_STREAM buffers
Emil Velikov
evelikov at kemper.freedesktop.org
Mon Oct 13 01:03:16 UTC 2014
Module: Mesa
Branch: 10.3
Commit: 64c2bdc334ba472603b1e7cd2c3046cfbce285b6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=64c2bdc334ba472603b1e7cd2c3046cfbce285b6
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Tue Aug 26 18:21:50 2014 +0900
r600g,radeonsi: Always use GTT again for PIPE_USAGE_STREAM buffers
Putting those in VRAM can cause long pauses due to buffers being moved
into / out of VRAM.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84662
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
(cherry picked from commit 7b4276d7acf2e0f77044cb50caa6ad936fa78786)
---
src/gallium/drivers/radeon/r600_buffer_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index ee05776..acdabc0 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -110,11 +110,13 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
enum radeon_bo_flag flags = 0;
switch (res->b.b.usage) {
+ case PIPE_USAGE_STREAM:
+ flags = RADEON_FLAG_GTT_WC;
+ /* fall through */
case PIPE_USAGE_STAGING:
/* Transfers are likely to occur more often with these resources. */
res->domains = RADEON_DOMAIN_GTT;
break;
- case PIPE_USAGE_STREAM:
case PIPE_USAGE_DYNAMIC:
/* Older kernels didn't always flush the HDP cache before
* CS execution
More information about the mesa-commit
mailing list