diff options
author | Karl Tomlinson <karlt+@karlt.net> | 2010-08-21 21:44:39 +1200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2010-09-20 10:11:23 +0200 |
commit | bfebe039af0c0282d04eb6234b6e6d1e02097146 (patch) | |
tree | 5ba21a600f5fdfb8647aa3db644ef0a662b63062 /src/radeon_exa_funcs.c | |
parent | b90cb61ccb0f4f80e0627141f223354a9371d47d (diff) |
DownloadFromScreenCS: download via a scratch BO if pixmap domain is unknown
radeon_bo_is_busy() may return without setting the domain out-parameter.
If this happens, then download via a scratch GTT BO to avoid CPU VRAM read.
Diffstat (limited to 'src/radeon_exa_funcs.c')
-rw-r--r-- | src/radeon_exa_funcs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index 2df6ccbd..a82e416c 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -598,7 +598,7 @@ RADEONDownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w, if (!src_domain) radeon_bo_is_busy(driver_priv->bo, &src_domain); - if (src_domain != RADEON_GEM_DOMAIN_VRAM) { + if (src_domain & ~(uint32_t)RADEON_GEM_DOMAIN_VRAM) { #if X_BYTE_ORDER == X_BIG_ENDIAN /* Can't return FALSE here if we need to swap bytes */ if (swap != RADEON_HOST_DATA_SWAP_NONE) { |