nouveau: nv10: only one color buffer atm
authorPatrice Mandin <pmandin@caramail.com>
Sun, 19 Aug 2007 18:12:26 +0000 (20:12 +0200)
committerPatrice Mandin <pmandin@caramail.com>
Sun, 19 Aug 2007 18:12:26 +0000 (20:12 +0200)
src/mesa/drivers/dri/nouveau/nouveau_context.h
src/mesa/drivers/dri/nouveau/nv10_state.c

index 65ecf21cab830405ef774491e2f307e9815fd22e..778c4401e428d1bab1bd6ef438782ee8e63d23dc 100644 (file)
@@ -124,7 +124,7 @@ typedef struct nouveau_context {
        GLuint vertex_attr_count;
 
        /* Color and depth renderbuffers */
-       nouveau_renderbuffer_t *color_buffer[2];
+       nouveau_renderbuffer_t *color_buffer;
        nouveau_renderbuffer_t *depth_buffer;
 
        /* Color buffer clear value */
index 4a3646ea4f1d5b6ed366a0bf61fa93ae4bb28d20..0e48784084bd26e2ca52b337f6a0871221ed894a 100644 (file)
@@ -149,12 +149,8 @@ static void nv10Clear(GLcontext *ctx, GLbitfield mask)
 {
        nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
 
-       if (mask & (BUFFER_BIT_FRONT_LEFT)) {
-               nv10ClearBuffer(ctx, nmesa->color_buffer[0],
-                       nmesa->clear_color_value, 0xffffffff);
-       }
-       if (mask & (BUFFER_BIT_BACK_LEFT)) {
-               nv10ClearBuffer(ctx, nmesa->color_buffer[1],
+       if (mask & (BUFFER_BIT_FRONT_LEFT|BUFFER_BIT_BACK_LEFT)) {
+               nv10ClearBuffer(ctx, nmesa->color_buffer,
                        nmesa->clear_color_value, 0xffffffff);
        }
        /* FIXME: check depth bits */
@@ -769,8 +765,7 @@ static GLboolean nv10BindBuffers(nouveauContextPtr nmesa, int num_color,
        GLuint pitch, format, depth_pitch;
 
        /* Store buffer pointers in context */
-       nmesa->color_buffer[0] = color[0];
-       nmesa->color_buffer[1] = color[1];
+       nmesa->color_buffer = color[0];
        nmesa->depth_buffer = depth;
 
        w = color[0]->mesa.Width;