On Thu, 2009-02-12 at 11:00 +0100, Michel Dänzer wrote:
> On Thu, 2009-02-12 at 05:29 +0000, Dave Airlie wrote:
> > 
> > So far I've been working on getting the legacy buffer/command code into 
> > shape so I can merge this in place of the current drivers without 
> > suffering any major regressions. Then start adding the code necessary for 
> > DRI2/GEM/FBOs on top of it. I think this code is pretty close to read to 
> > merge, I'd like people to bash on it, and report any major regressions 
> > above the current r100/r200/r300 codebases with these drivers.
> 
> With the endianness fix below, it basically works for me. However, page
> flipping is broken, looks like it always renders to the same buffer
> regardless of which one is being displayed.
> 
> With gliv, I got quite broken rendering (though that could just be due
> to the page flipping issues), several different error messages from the
> 3D driver and eventually a lockup (so unfortunately I lost the error
> messages).
> 
> So I'm not sure it's quite ready to merge yet, but I have to say it's
> amazing what you guys have achieved. :)

Things seem to have improved nicely over the last month. :)

With the fix below, the only issue I noticed in a quick test of compiz,
xmoto and gliv is that there's a lot of messages like

CS section size missmatch start at (r300_cmdbuf.c,emit_tex_offsets,186)
4 vs 2
CS section end at (r300_cmdbuf.c,emit_tex_offsets,206)

(with 4 vs 2 sometimes replaced by other pairs of x vs x/2)

I briefly looked into fixing this but couldn't figure it out.

Once this is fixed though, the branch looks good to merge from my POV.


>From 9b92c57c969fea3d32145a2b284d011735a0be20 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Michel=20D=C3=A4nzer?= <daen...@vmware.com>
Date: Thu, 5 Mar 2009 11:52:49 +0100
Subject: radeon: Take the hardware lock for swaps and flips.

Otherwise they fail with AIGLX at least.
---
 src/mesa/drivers/dri/radeon/radeon_common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c 
b/src/mesa/drivers/dri/radeon/radeon_common.c
index 99270c9..5ee8627 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -420,6 +420,7 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
                fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, (void *) 
rmesa->glCtx );
        }
 
+       LOCK_HARDWARE( rmesa );
        nbox = dPriv->numClipRects; /* must be in locked region */
 
        for ( i = 0 ; i < nbox ; ) {
@@ -509,6 +510,8 @@ static GLboolean radeonPageFlip( __DRIdrawablePrivate 
*dPriv )
 
        psp = dPriv->driScreenPriv;
 
+       LOCK_HARDWARE( radeon );
+
        if ( RADEON_DEBUG & DEBUG_IOCTL ) {
                fprintf(stderr, "%s: pfCurrentPage: %d %d\n", __FUNCTION__,
                        radeon->sarea->pfCurrentPage, radeon->sarea->pfState);
-- 
1.6.2



-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to