diff options
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_screen.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_screen.c b/src/mesa/drivers/dri/r200/r200_screen.c index b4c360c2188..779ce5a531c 100644 --- a/src/mesa/drivers/dri/r200/r200_screen.c +++ b/src/mesa/drivers/dri/r200/r200_screen.c @@ -173,7 +173,7 @@ r200FillInModes( unsigned pixel_bits, unsigned depth_bits, 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 @@ r200CreateBuffer( __DRIscreenPrivate *driScrnPriv, 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 @@ r200CreateBuffer( __DRIscreenPrivate *driScrnPriv, _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 @@ r200CreateBuffer( __DRIscreenPrivate *driScrnPriv, _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 @@ r200CreateBuffer( __DRIscreenPrivate *driScrnPriv, 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 @@ r200CreateBuffer( __DRIscreenPrivate *driScrnPriv, swAlpha, GL_FALSE /* aux */); driDrawPriv->driverPrivate = (void *) fb; -#endif + return (driDrawPriv->driverPrivate != NULL); } } |