diff options
author | Mario Kleiner <mario.kleiner@tuebingen.mpg.de> | 2010-11-22 04:11:07 +0100 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-12-01 20:30:36 -0500 |
commit | 122536ee0aeb1eef1a9d80d5e464dcb423dc2837 (patch) | |
tree | 23da02481fa061939261b30f42a8a4f4eb35444f /src/radeon_dri2.c | |
parent | 0de680730294bd623f6b3e189faa7b88a09d3a2a (diff) |
ddx/ati: Add option "SwapbuffersWait" to control vsync of DRI2 swaps.
A new optional kms driver option "SwapbuffersWait" is defined
for xorg.conf, which defaults to "on". If "on", DRI2 bufferswaps
will be synchronized to vsync, otherwise not.
This currently only affects copy-swaps, not pageflipped swaps.
It also requires a swap_interval setting of zero by the OpenGL
client.
Ideally, we'd provide a way for dri2 to pass the current swap
interval to the ddx so we could change this dynamically.
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r-- | src/radeon_dri2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 69f8a480..c28017cd 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -443,7 +443,9 @@ radeon_dri2_copy_region(DrawablePtr drawable, } vsync = info->accel_state->vsync; - info->accel_state->vsync = TRUE; + + /* Driver option "SwapbuffersWait" defines if we vsync DRI2 copy-swaps. */ + info->accel_state->vsync = info->swapBuffersWait; (*gc->ops->CopyArea)(src_drawable, dst_drawable, gc, 0, 0, drawable->width, drawable->height, 0, 0); |