From 553f5759a6587d7fe77a62d4d1159ad786b336ee Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 13 Aug 2007 16:46:27 +1000 Subject: [PATCH] nouveau: Lets only do private buffers. --- src/mesa/drivers/dri/nouveau/nouveau_screen.c | 52 ++++++++----------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 053680be8d1..4d22ecc83e5 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -154,36 +154,30 @@ nouveauCreateBuffer(__DRIscreenPrivate *driScrnPriv, nouveauSpanSetFunctions(nrb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &nrb->mesa); - if (0 /* unified buffers if we choose to support them.. */) { - } else { - if (mesaVis->doubleBufferMode) { - nrb = nouveau_renderbuffer_new(color_format, NULL, - 0, 0, - NULL); - nouveauSpanSetFunctions(nrb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &nrb->mesa); - } + if (mesaVis->doubleBufferMode) { + nrb = nouveau_renderbuffer_new(color_format, NULL, 0, 0, NULL); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &nrb->mesa); + } - if (mesaVis->depthBits == 24 && mesaVis->stencilBits == 8) { - nrb = nouveau_renderbuffer_new(GL_DEPTH24_STENCIL8_EXT, NULL, - 0, 0, - NULL); - nouveauSpanSetFunctions(nrb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); - _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &nrb->mesa); - } else if (mesaVis->depthBits == 24) { - nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT24, NULL, - 0, 0, - NULL); - nouveauSpanSetFunctions(nrb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); - } else if (mesaVis->depthBits == 16) { - nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT16, NULL, - 0, 0, - NULL); - nouveauSpanSetFunctions(nrb, mesaVis); - _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); - } + if (mesaVis->depthBits == 24 && mesaVis->stencilBits == 8) { + nrb = nouveau_renderbuffer_new(GL_DEPTH24_STENCIL8_EXT, NULL, + 0, 0, NULL); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); + _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &nrb->mesa); + } else + if (mesaVis->depthBits == 24) { + nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT24, NULL, + 0, 0, NULL); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); + } else + if (mesaVis->depthBits == 16) { + nrb = nouveau_renderbuffer_new(GL_DEPTH_COMPONENT16, NULL, + 0, 0, NULL); + nouveauSpanSetFunctions(nrb, mesaVis); + _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &nrb->mesa); } _mesa_add_soft_renderbuffers(fb, -- 2.30.2