Finally found the bug. In the context of the r128 there is a bit that,
when set, disables all auxiliary clip rectangles. This bit appears to
be set by default in dp_gui_master_cntl_c. This means that if a new
context got uploaded without changing the clip rectangles, userspace
would assume the old ones were still valid.

The fix is simple, whenever R128_UPLOAD_CONTEXT is set, mark the
cliprects as invalidated. Compiled, installed, tested, works like a
charm.

Thanks to all the people who helped me track this down, Now we can get
back to regular performance improvements, like why
r128WriteDepthPixelsLocked() is being called a hundred times a frame.
--
Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/
diff -ur Mesa-6.4.2/src/mesa/drivers/dri/r128/r128_state.c mesa-6.4.2/src/mesa/drivers/dri/r128/r128_state.c
--- Mesa-6.4.2/src/mesa/drivers/dri/r128/r128_state.c	2005-05-04 22:11:38.000000000 +0200
+++ mesa-6.4.2/src/mesa/drivers/dri/r128/r128_state.c	2006-07-02 14:16:48.000000000 +0200
@@ -950,6 +971,15 @@
 			R128_UPLOAD_WINDOW |
 			R128_UPLOAD_CORE) ) {
       memcpy( &sarea->context_state, regs, sizeof(sarea->context_state) );
+      
+      if( rmesa->dirty & R128_UPLOAD_CONTEXT )
+      {
+         /* One possible side-effect of uploading a new context is the
+          * setting of the R128_GMC_AUX_CLIP_DIS bit, which causes all
+          * auxilliary cliprects to be disabled. So the next command must
+          * upload them again. */
+         rmesa->dirty |= R128_UPLOAD_CLIPRECTS;
+      }
    }
 
    if ( (rmesa->dirty & R128_UPLOAD_TEX0) && t0 ) {
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to