summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-07-27 14:22:02 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-07-27 14:22:02 +0200
commit5ad2519c2a7c0df389b2cd7cf7151c7e4b7252a8 (patch)
tree614b5dfb500bd7fdfa4ea5c66caabe9ad8117880
parent57f2c83a22f27567506c555af431f89e6031204c (diff)
KMS: Explicitly specify VRAM and GTT domains when allocating BOs for pixmaps.
Without this, apparently they are initially allocated in system RAM (or possibly GTT), so any GPU rendering to them first triggers a copy of the whole uninitialized data to VRAM... We may want to explore more sophisticated schemes in the future, but for now this seems to improve KMS 2D performance quite a bit.
-rw-r--r--src/radeon_exa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index 4f1f9eac..25e3311b 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -391,7 +391,8 @@ void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align)
return new_priv;
new_priv->bo = radeon_bo_open(info->bufmgr, 0, size,
- align, 0, 0);
+ align, RADEON_GEM_DOMAIN_VRAM |
+ RADEON_GEM_DOMAIN_GTT, 0);
if (!new_priv->bo) {
xfree(new_priv);
ErrorF("Failed to alloc memory\n");