Okay it was an old bug resurfaced by the looks of it.. there used to be
code written by Felix in the radeon driver to always emit a zbs atom no
matter what, I've spent two days staring at the driver and the attached
patch looks to fix the gears crapping out ...

I've played q3, ut2003 and ut2004 and ran gears.. all for about 5 mins
each... no problems..

switching OLD_PACKETS off and arrays on doesn't give a speedup with the
hack for zbs (it slows it down..) but adding flush less brings it back
nearly on par with OLD_PACKETS...

There might be a better way to do this workaround... maybe ATI might know
something (docs don't say anything...)

Dave.

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
pam_smb / Linux DECstation / Linux VAX / ILUG person
Index: radeon_ioctl.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.c,v
retrieving revision 1.20
diff -u -r1.20 radeon_ioctl.c
--- radeon_ioctl.c      23 Jan 2005 06:27:08 -0000      1.20
+++ radeon_ioctl.c      23 Jan 2005 11:06:57 -0000
@@ -179,9 +179,6 @@
       rmesa->save_on_next_emit = GL_FALSE;
    }
 
-   if (!rmesa->hw.is_dirty && !rmesa->hw.all_dirty)
-      return;
-
    /* To avoid going across the entire set of states multiple times, just check
     * for enough space for the case of emitting all state, and inline the
     * radeonAllocCmdBuf code here without all the checks.
@@ -189,6 +186,11 @@
    radeonEnsureCmdBufSpace(rmesa, rmesa->hw.max_state_size);
    dest = rmesa->store.cmd_buf + rmesa->store.cmd_used;
 
+   /* From Felix before but for newer setups .. always emit zbs
+      this fixes gears lockups - airlied
+    */
+   rmesa->hw.zbs.dirty=1;
+
    if (RADEON_DEBUG & DEBUG_STATE) {
       foreach(atom, &rmesa->hw.atomlist) {
         if (atom->dirty || rmesa->hw.all_dirty) {

Reply via email to