Ian Romanick wrote:
Roland Scheidegger wrote:

Slightly OT, but here's an article comparing XiG Summit, dri cvs and the ATI driver on a radeon 9000pro.
http://homepage.hispeed.ch/rscheidegger/atilinux_oct03/ati_linux_comp_oct03.html



And to get this fully on-topic, is there a specific reason why the dri driver is quite a bit slower (up to 50% in some subtests) in SpecViewPerf compared to the cvs version of july? Could this be related to the changes with GLX_NV_vertex_array_range, GLX_MESA_agp_offset, GLX_MESA_allocate_memory (the only extensions which changed in that timeframe) or must this be something else?


It is probably because some code paths were disabled in the r200 driver due to serious bugs. This bugs prevented UT 2k3 from running at all.

The problem is (probably) due to excessive flushing introduced by the changes Ian referenced. I had time to put together a patch, but at that point was having real issues getting CVS to compile. These are probably at my end, but before they were resolved I got sidetracked again.


I've attached the patch if someone wants to run with it in the meantime. It hasn't been tested at all.

Keith
? diff
? mine
? r200_bitmap.diff
? r200_dlist.c
? sleeping-state.diff
Index: r200_tcl.c
===================================================================
RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/r200/r200_tcl.c,v
retrieving revision 1.11
diff -u -r1.11 r200_tcl.c
--- r200_tcl.c  16 Sep 2003 20:45:08 -0000      1.11
+++ r200_tcl.c  20 Oct 2003 21:29:00 -0000
@@ -140,18 +140,34 @@
 
 static GLushort *r200AllocElts( r200ContextPtr rmesa, GLuint nr ) 
 {
-   if (rmesa->dma.flush)
-      rmesa->dma.flush( rmesa );
+   if (rmesa->dma.flush == r200FlushElts &&
+       rmesa->store.cmd_used + nr*2 < R200_CMD_BUF_SZ) {
 
-   r200EmitAOS( rmesa,
-               rmesa->tcl.aos_components,
-               rmesa->tcl.nr_aos_components, 0 );
+      GLushort *dest = (GLushort *)(rmesa->store.cmd_buf +
+                                   rmesa->store.cmd_used);
+
+      rmesa->store.cmd_used += nr*2;
+
+      return dest;
+   }
+   else {
+      if (rmesa->dma.flush)
+        rmesa->dma.flush( rmesa );
 
-   return r200AllocEltsOpenEnded( rmesa, rmesa->tcl.hw_primitive, nr );
+      r200EmitAOS( rmesa,
+                  rmesa->tcl.aos_components,
+                  rmesa->tcl.nr_aos_components, 0 );
+      
+      return r200AllocEltsOpenEnded( rmesa, rmesa->tcl.hw_primitive, nr );
+   }
 }
 
 
-#define CLOSE_ELTS()  R200_NEWPRIM( rmesa )
+#define CLOSE_ELTS()                           \
+do {                                           \
+   if (0) R200_NEWPRIM( rmesa );               \
+}                                              \
+while (0)
 
 
 /* TODO: Try to extend existing primitive if both are identical,

Reply via email to