summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-01-13 16:50:15 +1000
committerDave Airlie <airlied@redhat.com>2009-01-13 16:50:15 +1000
commit4b9a09e9f63791787fb9a276a4efd685b399be52 (patch)
treefc26683fb76a31b3c33063930fbf0d722f101d83 /src/mesa/drivers
parentd67987b0d144bb754215784cf347512806f15496 (diff)
radeon: use bo_wait to wait for all buffers to be rendered to
Not 100% sure this is correct, but its what Intel does and its better than CP_IDLE.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/radeon_ioctl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_ioctl.c b/src/mesa/drivers/dri/r300/radeon_ioctl.c
index c8d6bf99bc..8712317050 100644
--- a/src/mesa/drivers/dri/r300/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/r300/radeon_ioctl.c
@@ -366,10 +366,19 @@ void radeonFlush(GLcontext * ctx)
void radeonFinish(GLcontext * ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ struct gl_framebuffer *fb = ctx->DrawBuffer;
+ int i;
radeonFlush(ctx);
- if (radeon->do_irqs) {
+ if (radeon->radeonScreen->kernel_mm) {
+ for (i = 0; i < fb->_NumColorDrawBuffers; i++) {
+ struct radeon_renderbuffer *rrb;
+ rrb = (struct radeon_renderbuffer *)fb->_ColorDrawBuffers[i];
+ if (rrb->bo)
+ radeon_bo_wait(rrb->bo);
+ }
+ } else if (radeon->do_irqs) {
LOCK_HARDWARE(radeon);
radeonEmitIrqLocked(radeon);
UNLOCK_HARDWARE(radeon);