diff options
Diffstat (limited to 'src/mesa/drivers/dri/tdfx/tdfx_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_screen.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index ab64f7986de..0a4499cfae7 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -163,51 +163,47 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, return GL_FALSE; /* not implemented */ } else { -#if 0 - driDrawPriv->driverPrivate = (void *) - _mesa_create_framebuffer( mesaVis, - GL_FALSE, /* software depth buffer? */ - mesaVis->stencilBits > 0, - mesaVis->accumRedBits > 0, - GL_FALSE /* software alpha channel? */ ); -#else struct gl_framebuffer *fb = _mesa_create_framebuffer(mesaVis); { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, screen->cpp, - screen->fbOffset, screen->width); + = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + screen->fbOffset, screen->width, driDrawPriv); tdfxSetSpanFunctions(frontRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base); } if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, screen->cpp, - screen->backOffset, screen->width); + = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + screen->backOffset, screen->width, + driDrawPriv); tdfxSetSpanFunctions(backRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base); } if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, screen->cpp, - screen->depthOffset, screen->width); + = driNewRenderbuffer(GL_DEPTH_COMPONENT16, NULL, screen->cpp, + screen->depthOffset, screen->width, + driDrawPriv); tdfxSetSpanFunctions(depthRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, screen->cpp, - screen->depthOffset, screen->width); + = driNewRenderbuffer(GL_DEPTH_COMPONENT24, NULL, screen->cpp, + screen->depthOffset, screen->width, + driDrawPriv); tdfxSetSpanFunctions(depthRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); } if (mesaVis->stencilBits > 0) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, screen->cpp, - screen->depthOffset, screen->width); + = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, NULL, screen->cpp, + screen->depthOffset, screen->width, + driDrawPriv); tdfxSetSpanFunctions(stencilRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &stencilRb->Base); } @@ -220,7 +216,7 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, GL_FALSE, /* alpha */ GL_FALSE /* aux */); driDrawPriv->driverPrivate = (void *) fb; -#endif + return (driDrawPriv->driverPrivate != NULL); } } |