Brian Paul wrote:
I'm checking in the updated radeon and r200 drivers and I'll do the mach64 and r128 drivers next. I've tested the radeon changes, but not the r200. If someone could run the reflect demo on r200 and use the a/s/d/f/c keys to exercise the span routines, that would be good. The readpix and singlebuffer demos are good tests too.

It looks like some r200_screen.c changes got missing. After patching
that, it still doesn't quite work correctly.

- Pageflipping is completely broken. Looks like stuff gets drawn to the
right place only every second frame or something like that (i.e. heavy
flicker).

- Without pageflip, reflect partly works. a/d/f/c look good (though c
looks the same as f), but s is hosed beyond recognition. readpix works,
as does zreaddraw and singlebuffer.

I should add, that stencilbuffer problem only exists with color tiling. It works without color tiling.

Roland
Index: r200_screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r200/r200_screen.c,v
retrieving revision 1.44
diff -u -r1.44 r200_screen.c
--- r200_screen.c       15 Aug 2005 06:59:25 -0000      1.44
+++ r200_screen.c       1 Sep 2005 13:25:19 -0000
@@ -173,7 +173,7 @@
 
     depth_bits_array[0] = depth_bits;
     depth_bits_array[1] = depth_bits;
-    
+
     /* Just like with the accumulation buffer, always provide some modes
      * with a stencil buffer.  It will be a sw fallback, but some apps won't
      * care about that.
@@ -547,16 +547,9 @@
       const GLboolean swAccum = mesaVis->accumRedBits > 0;
       const GLboolean swStencil = mesaVis->stencilBits > 0 &&
          mesaVis->depthBits != 24;
-#if 0
-      driDrawPriv->driverPrivate = (void *)
-         _mesa_create_framebuffer( mesaVis,
-                                   swDepth,
-                                   swStencil,
-                                   swAccum,
-                                   swAlpha );
-#else
       struct gl_framebuffer *fb = _mesa_create_framebuffer(mesaVis);
 
+      /* front color renderbuffer */
       {
          driRenderbuffer *frontRb
             = driNewRenderbuffer(GL_RGBA, screen->cpp,
@@ -565,6 +558,7 @@
          _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base);
       }
 
+      /* back color renderbuffer */
       if (mesaVis->doubleBufferMode) {
          driRenderbuffer *backRb
             = driNewRenderbuffer(GL_RGBA, screen->cpp,
@@ -573,12 +567,14 @@
          _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base);
       }
 
+      /* depth renderbuffer */
       if (mesaVis->depthBits == 16) {
          driRenderbuffer *depthRb
             = driNewRenderbuffer(GL_DEPTH_COMPONENT16, screen->cpp,
                                  screen->depthOffset, screen->depthPitch);
          r200SetSpanFunctions(depthRb, mesaVis);
          _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base);
+        depthRb->depthHasSurface = screen->depthHasSurface;
       }
       else if (mesaVis->depthBits == 24) {
          driRenderbuffer *depthRb
@@ -586,8 +582,10 @@
                                  screen->depthOffset, screen->depthPitch);
          r200SetSpanFunctions(depthRb, mesaVis);
          _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base);
+        depthRb->depthHasSurface = screen->depthHasSurface;
       }
 
+      /* stencil renderbuffer */
       if (mesaVis->stencilBits > 0 && !swStencil) {
          driRenderbuffer *stencilRb
             = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, screen->cpp,
@@ -604,7 +602,7 @@
                                    swAlpha,
                                    GL_FALSE /* aux */);
       driDrawPriv->driverPrivate = (void *) fb;
-#endif
+
       return (driDrawPriv->driverPrivate != NULL);
    }
 }

Reply via email to