diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2012-09-13 19:50:35 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2012-09-13 19:50:35 +0200 |
commit | 8637f772347c958fa3beea6c0dc9c22255db70e5 (patch) | |
tree | f8759ff787f50a9071d11b403d7cc2c61b247f5a /src | |
parent | 40b87f0e9db2642ca8a70e994fb4d3742e199640 (diff) |
glamor: Force acceleration for DRI2 copies.
Improves performance of non-pageflipped 3D apps on SI.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon.h | 1 | ||||
-rw-r--r-- | src/radeon_dri2.c | 2 | ||||
-rw-r--r-- | src/radeon_glamor.c | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/radeon.h b/src/radeon.h index eb46db29..9c2073fe 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -402,6 +402,7 @@ struct radeon_accel_state { int vline_y1; int vline_y2; + Bool force; }; typedef struct { diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 7c5898c1..1e04b85a 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -633,10 +633,12 @@ radeon_dri2_copy_region2(ScreenPtr pScreen, /* Driver option "SwapbuffersWait" defines if we vsync DRI2 copy-swaps. */ info->accel_state->vsync = info->swapBuffersWait; + info->accel_state->force = TRUE; (*gc->ops->CopyArea)(src_drawable, dst_drawable, gc, 0, 0, drawable->width, drawable->height, off_x, off_y); + info->accel_state->force = FALSE; info->accel_state->vsync = vsync; FreeScratchGC(gc); diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 12dfd38c..99bc6665 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -151,8 +151,12 @@ Bool radeon_glamor_prepare_access(PixmapPtr pixmap, glamor_access_t access) struct radeon_bo *bo; int ret; - if (access == GLAMOR_GPU_ACCESS_RW || access == GLAMOR_GPU_ACCESS_RO) - return info->ChipFamily < CHIP_FAMILY_TAHITI; + if (access == GLAMOR_GPU_ACCESS_RW || access == GLAMOR_GPU_ACCESS_RO) { + if (info->ChipFamily < CHIP_FAMILY_TAHITI) + return TRUE; + + return info->accel_state->force; + } bo = radeon_get_pixmap_bo(pixmap); if (bo) { |