aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_screen.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-09-01 03:54:34 +0000
committerBrian Paul <[email protected]>2005-09-01 03:54:34 +0000
commit982e8e4d5c95e9e9040b4b70d7322a2a8a9396d9 (patch)
treef367c54ff9697263e3a94847eb4bb952c7dc532b /src/mesa/drivers/dri/radeon/radeon_screen.c
parent8e5479c7f806ffd57eed26c147e3ca227a39f0a7 (diff)
Finish up some of the gl_renderbuffer work.
Use driRenderbuffer's offset, pitch fields in the span routines. Remove the SetBuffer driver function. Consolidate the code for setting CTX_RB3D_COLOROFFSET and CTX_RB3D_COLORPITCH state in new radeonUpdateDrawBuffer() function.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_screen.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index b3a768c2851..e32cfda0599 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -472,16 +472,9 @@ radeonCreateBuffer( __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,
@@ -490,6 +483,7 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
_mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base);
}
+ /* back color renderbuffer */
if (mesaVis->doubleBufferMode) {
driRenderbuffer *backRb
= driNewRenderbuffer(GL_RGBA, screen->cpp,
@@ -498,12 +492,14 @@ radeonCreateBuffer( __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);
radeonSetSpanFunctions(depthRb, mesaVis);
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base);
+ depthRb->depthHasSurface = screen->depthHasSurface;
}
else if (mesaVis->depthBits == 24) {
driRenderbuffer *depthRb
@@ -511,8 +507,10 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
screen->depthOffset, screen->depthPitch);
radeonSetSpanFunctions(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,
@@ -529,7 +527,7 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
swAlpha,
GL_FALSE /* aux */);
driDrawPriv->driverPrivate = (void *) fb;
-#endif
+
return (driDrawPriv->driverPrivate != NULL);
}
}