diff options
author | Dave Airlie <airlied@redhat.com> | 2012-09-03 13:08:37 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-09-03 13:08:37 +1000 |
commit | ca8b61e916998458203dfa4b9d0c997fa7d90ba9 (patch) | |
tree | b6af2205f6996cb7cb10b5d4228f7c93d0a4e14a /src/radeon_bo_helper.c | |
parent | 8c1bf9d8fe3948b72795984e625ef46b2f0bf654 (diff) |
radeon: allocated shared pixmaps as untiled gtt.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/radeon_bo_helper.c')
-rw-r--r-- | src/radeon_bo_helper.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c index ccdf7ebe..593c6904 100644 --- a/src/radeon_bo_helper.c +++ b/src/radeon_bo_helper.c @@ -73,7 +73,7 @@ radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth, uint32_t tiling = 0; struct radeon_surface surface; struct radeon_bo *bo; - + int domain = RADEON_GEM_DOMAIN_VRAM; if (usage_hint) { if (info->allowColorTiling) { if (usage_hint & RADEON_CREATE_PIXMAP_TILING_MACRO) @@ -84,6 +84,12 @@ radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth, if (usage_hint & RADEON_CREATE_PIXMAP_DEPTH) tiling |= RADEON_TILING_MACRO | RADEON_TILING_MICRO; +#ifdef CREATE_PIXMAP_USAGE_SHARED + if ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED) { + tiling = 0; + domain = RADEON_GEM_DOMAIN_GTT; + } +#endif } /* Small pixmaps must not be macrotiled on R300, hw cannot sample them @@ -166,7 +172,7 @@ radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth, } bo = radeon_bo_open(info->bufmgr, 0, size, base_align, - RADEON_GEM_DOMAIN_VRAM, 0); + domain, 0); if (bo && tiling && radeon_bo_set_tiling(bo, tiling, pitch) == 0) *new_tiling = tiling; |