diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 671d33a1656..7da8768a3be 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -422,6 +422,7 @@ driGetConfigAttribIndex(const __DRIconfig *config, __ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits); case __DRI_ATTRIB_LEVEL: case __DRI_ATTRIB_LUMINANCE_SIZE: + case __DRI_ATTRIB_AUX_BUFFERS: *value = 0; break; __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits); @@ -458,7 +459,6 @@ driGetConfigAttribIndex(const __DRIconfig *config, break; __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode); __ATTRIB(__DRI_ATTRIB_STEREO, stereoMode); - __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers); case __DRI_ATTRIB_TRANSPARENT_TYPE: case __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE: /* horrible bc hack */ *value = GLX_NONE; diff --git a/src/mesa/drivers/dri/i915/intel_clear.c b/src/mesa/drivers/dri/i915/intel_clear.c index c9722cbe405..ed9aca9960b 100644 --- a/src/mesa/drivers/dri/i915/intel_clear.c +++ b/src/mesa/drivers/dri/i915/intel_clear.c @@ -48,7 +48,6 @@ static const char *buffer_names[] = { [BUFFER_DEPTH] = "depth", [BUFFER_STENCIL] = "stencil", [BUFFER_ACCUM] = "accum", - [BUFFER_AUX0] = "aux0", [BUFFER_COLOR0] = "color0", [BUFFER_COLOR1] = "color1", [BUFFER_COLOR2] = "color2", diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 60b35d37a6e..f13a7504ada 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -912,8 +912,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv, false, /* never sw depth */ false, /* never sw stencil */ mesaVis->accumRedBits > 0, - false, /* never sw alpha */ - false /* never sw aux */ ); + false /* never sw alpha */); driDrawPriv->driverPrivate = fb; return true; diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c index 667d2dfc6ed..9d6df0fe31d 100644 --- a/src/mesa/drivers/dri/i965/brw_clear.c +++ b/src/mesa/drivers/dri/i965/brw_clear.c @@ -47,7 +47,6 @@ static const char *buffer_names[] = { [BUFFER_DEPTH] = "depth", [BUFFER_STENCIL] = "stencil", [BUFFER_ACCUM] = "accum", - [BUFFER_AUX0] = "aux0", [BUFFER_COLOR0] = "color0", [BUFFER_COLOR1] = "color1", [BUFFER_COLOR2] = "color2", diff --git a/src/mesa/drivers/dri/i965/brw_screen.c b/src/mesa/drivers/dri/i965/brw_screen.c index df420c0f285..0f2b3f11309 100644 --- a/src/mesa/drivers/dri/i965/brw_screen.c +++ b/src/mesa/drivers/dri/i965/brw_screen.c @@ -1857,8 +1857,7 @@ brw_create_buffer(__DRIscreen *dri_screen, false, /* never sw depth */ false, /* never sw stencil */ mesaVis->accumRedBits > 0, - false, /* never sw alpha */ - false /* never sw aux */ ); + false /* never sw alpha */); driDrawPriv->driverPrivate = fb; return true; diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index ba85aacf741..447af094675 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -286,7 +286,7 @@ nouveau_create_buffer(__DRIscreen *dri_screen, /* Software renderbuffers. */ _swrast_add_soft_renderbuffers(fb, GL_FALSE, GL_FALSE, GL_FALSE, visual->accumRedBits > 0, - GL_FALSE, GL_FALSE); + GL_FALSE); drawable->driverPrivate = fb; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index f61fe399c09..f34737c41c1 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -746,8 +746,7 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv, swDepth, swStencil, swAccum, - swAlpha, - GL_FALSE /* aux */); + swAlpha); driDrawPriv->driverPrivate = (void *) rfb; return (driDrawPriv->driverPrivate != NULL); diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 9be0a6f1180..5930ec49e4e 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -65,7 +65,6 @@ supported_buffer_bitmask(const struct gl_context *ctx, } else { /* A window system framebuffer */ - GLint i; mask = BUFFER_BIT_FRONT_LEFT; /* always have this */ if (fb->Visual.stereoMode) { mask |= BUFFER_BIT_FRONT_RIGHT; @@ -76,10 +75,6 @@ supported_buffer_bitmask(const struct gl_context *ctx, else if (fb->Visual.doubleBufferMode) { mask |= BUFFER_BIT_BACK_LEFT; } - - for (i = 0; i < fb->Visual.numAuxBuffers; i++) { - mask |= (BUFFER_BIT_AUX0 << i); - } } return mask; @@ -161,7 +156,6 @@ draw_buffer_enum_to_bitmask(const struct gl_context *ctx, GLenum buffer) case GL_FRONT_LEFT: return BUFFER_BIT_FRONT_LEFT; case GL_AUX0: - return BUFFER_BIT_AUX0; case GL_AUX1: case GL_AUX2: case GL_AUX3: @@ -220,10 +214,9 @@ read_buffer_enum_to_index(const struct gl_context *ctx, GLenum buffer) return BUFFER_FRONT_LEFT; case GL_FRONT_LEFT: return BUFFER_FRONT_LEFT; - case GL_AUX0: - return BUFFER_AUX0; case GL_FRONT_AND_BACK: return BUFFER_FRONT_LEFT; + case GL_AUX0: case GL_AUX1: case GL_AUX2: case GL_AUX3: diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index eef9106a3c3..a8008faab1f 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -305,7 +305,6 @@ _mesa_initialize_visual( struct gl_config *vis, vis->accumBlueBits = accumBlueBits; vis->accumAlphaBits = accumAlphaBits; - vis->numAuxBuffers = 0; vis->sampleBuffers = numSamples > 0 ? 1 : 0; vis->samples = numSamples; diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f12764e156d..92375a9361b 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -374,9 +374,6 @@ get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, return &fb->Attachment[BUFFER_BACK_LEFT]; return NULL; case GL_AUX0: - if (fb->Visual.numAuxBuffers == 1) { - return &fb->Attachment[BUFFER_AUX0]; - } return NULL; /* Page 336 (page 352 of the PDF) of the OpenGL 3.0 spec says: diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index eb0170f4291..c4511269256 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -701,7 +701,7 @@ descriptor=[ [ "ALPHA_SCALE", "CONTEXT_FLOAT(Pixel.AlphaScale), NO_EXTRA" ], [ "ATTRIB_STACK_DEPTH", "CONTEXT_INT(AttribStackDepth), NO_EXTRA" ], [ "AUTO_NORMAL", "CONTEXT_BOOL(Eval.AutoNormal), NO_EXTRA" ], - [ "AUX_BUFFERS", "BUFFER_INT(Visual.numAuxBuffers), NO_EXTRA" ], + [ "AUX_BUFFERS", "CONST(0), NO_EXTRA" ], [ "BLUE_BIAS", "CONTEXT_FLOAT(Pixel.BlueBias), NO_EXTRA" ], [ "BLUE_SCALE", "CONTEXT_FLOAT(Pixel.BlueScale), NO_EXTRA" ], [ "CLIENT_ATTRIB_STACK_DEPTH", "CONTEXT_INT(ClientAttribStackDepth), NO_EXTRA" ], diff --git a/src/mesa/main/menums.h b/src/mesa/main/menums.h index d0a1dc48740..b78fb2634b3 100644 --- a/src/mesa/main/menums.h +++ b/src/mesa/main/menums.h @@ -122,8 +122,6 @@ typedef enum BUFFER_DEPTH, BUFFER_STENCIL, BUFFER_ACCUM, - /* optional aux buffer */ - BUFFER_AUX0, /* generic renderbuffers */ BUFFER_COLOR0, BUFFER_COLOR1, diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index e2046883062..33f87b2ee80 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -119,10 +119,6 @@ _mesa_varying_slot_in_fs(gl_varying_slot slot) #define BUFFER_BIT_BACK_LEFT (1 << BUFFER_BACK_LEFT) #define BUFFER_BIT_FRONT_RIGHT (1 << BUFFER_FRONT_RIGHT) #define BUFFER_BIT_BACK_RIGHT (1 << BUFFER_BACK_RIGHT) -#define BUFFER_BIT_AUX0 (1 << BUFFER_AUX0) -#define BUFFER_BIT_AUX1 (1 << BUFFER_AUX1) -#define BUFFER_BIT_AUX2 (1 << BUFFER_AUX2) -#define BUFFER_BIT_AUX3 (1 << BUFFER_AUX3) #define BUFFER_BIT_DEPTH (1 << BUFFER_DEPTH) #define BUFFER_BIT_STENCIL (1 << BUFFER_STENCIL) #define BUFFER_BIT_ACCUM (1 << BUFFER_ACCUM) @@ -142,7 +138,6 @@ _mesa_varying_slot_in_fs(gl_varying_slot slot) BUFFER_BIT_BACK_LEFT | \ BUFFER_BIT_FRONT_RIGHT | \ BUFFER_BIT_BACK_RIGHT | \ - BUFFER_BIT_AUX0 | \ BUFFER_BIT_COLOR0 | \ BUFFER_BIT_COLOR1 | \ BUFFER_BIT_COLOR2 | \ @@ -175,8 +170,6 @@ struct gl_config GLint depthBits; GLint stencilBits; - GLint numAuxBuffers; - /* EXT_visual_rating / GLX 1.2 */ GLint visualRating; diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c index e409be3c05f..91a19f1bb80 100644 --- a/src/mesa/swrast/s_clear.c +++ b/src/mesa/swrast/s_clear.c @@ -290,8 +290,7 @@ _swrast_Clear(struct gl_context *ctx, GLbitfield buffers) BUFFER_BIT_BACK_RIGHT | BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL | - BUFFER_BIT_ACCUM | - BUFFER_BIT_AUX0; + BUFFER_BIT_ACCUM; assert((buffers & (~legalBits)) == 0); } #endif diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c index 27e2fce3cb0..22122c239cf 100644 --- a/src/mesa/swrast/s_renderbuffer.c +++ b/src/mesa/swrast/s_renderbuffer.c @@ -428,50 +428,6 @@ add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, -/** - * Add a software-based aux renderbuffer to the given framebuffer. - * This is a helper routine for device drivers when creating a - * window system framebuffer (not a user-created render/framebuffer). - * Once this function is called, you can basically forget about this - * renderbuffer; core Mesa will handle all the buffer management and - * rendering! - * - * NOTE: color-index aux buffers not supported. - */ -static GLboolean -add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, - GLuint colorBits, GLuint numBuffers) -{ - GLuint i; - - if (colorBits > 16) { - _mesa_problem(ctx, - "Unsupported colorBits in add_aux_renderbuffers"); - return GL_FALSE; - } - - assert(numBuffers <= MAX_AUX_BUFFERS); - - for (i = 0; i < numBuffers; i++) { - struct gl_renderbuffer *rb = _swrast_new_soft_renderbuffer(ctx, 0); - - assert(fb->Attachment[BUFFER_AUX0 + i].Renderbuffer == NULL); - - if (!rb) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating aux buffer"); - return GL_FALSE; - } - - assert (colorBits <= 8); - rb->InternalFormat = GL_RGBA; - - rb->AllocStorage = soft_renderbuffer_storage; - _mesa_attach_and_own_rb(fb, BUFFER_AUX0 + i, rb); - } - return GL_TRUE; -} - - /** * Create/attach software-based renderbuffers to the given framebuffer. * This is a helper routine for device drivers. Drivers can just as well @@ -483,8 +439,7 @@ _swrast_add_soft_renderbuffers(struct gl_framebuffer *fb, GLboolean depth, GLboolean stencil, GLboolean accum, - GLboolean alpha, - GLboolean aux) + GLboolean alpha) { GLboolean frontLeft = GL_TRUE; GLboolean backLeft = fb->Visual.doubleBufferMode; @@ -536,18 +491,6 @@ _swrast_add_soft_renderbuffers(struct gl_framebuffer *fb, fb->Visual.accumBlueBits, fb->Visual.accumAlphaBits); } - - if (aux) { - assert(fb->Visual.numAuxBuffers > 0); - add_aux_renderbuffers(NULL, fb, fb->Visual.redBits, - fb->Visual.numAuxBuffers); - } - -#if 0 - if (multisample) { - /* maybe someday */ - } -#endif } diff --git a/src/mesa/swrast/s_renderbuffer.h b/src/mesa/swrast/s_renderbuffer.h index 9238d8afa49..e3b6b4d2857 100644 --- a/src/mesa/swrast/s_renderbuffer.h +++ b/src/mesa/swrast/s_renderbuffer.h @@ -60,8 +60,7 @@ _swrast_add_soft_renderbuffers(struct gl_framebuffer *fb, GLboolean depth, GLboolean stencil, GLboolean accum, - GLboolean alpha, - GLboolean aux); + GLboolean alpha); #endif /* S_RENDERBUFFER_H */