From ef71a0fd4536363e578c49a05b6f1161f907c150 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sun, 19 Aug 2007 20:12:26 +0200 Subject: [PATCH] nouveau: nv10: only one color buffer atm --- src/mesa/drivers/dri/nouveau/nouveau_context.h | 2 +- src/mesa/drivers/dri/nouveau/nv10_state.c | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 65ecf21cab8..778c4401e42 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -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 */ diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index 4a3646ea4f1..0e48784084b 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -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; -- 2.30.2