From: Brian Paul Date: Sat, 12 Nov 2011 18:50:31 +0000 (-0700) Subject: xlib: remove software alpha buffer support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dff2394e08651304d924ef9df796ff0ac6b844c3;p=mesa.git xlib: remove software alpha buffer support Seldom used and this won't work when we move to using Map/UnmapRenderbuffer everywhere. This will let us remove a bunch of core Mesa code too. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 13b35c790c3..5513f68d901 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -390,21 +390,6 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, &b->backxrb->Base); } - /* - * Software alpha planes - */ - if (vis->mesa_visual.alphaBits > 0 - && vis->undithered_pf != PF_8A8B8G8R - && vis->undithered_pf != PF_8A8R8G8B) { - /* Visual has alpha, but pixel format doesn't support it. - * We'll use an alpha renderbuffer wrapper. - */ - b->swAlpha = GL_TRUE; - } - else { - b->swAlpha = GL_FALSE; - } - /* * Other renderbuffer (depth, stencil, etc) */ @@ -413,7 +398,7 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, vis->mesa_visual.haveDepthBuffer, vis->mesa_visual.haveStencilBuffer, vis->mesa_visual.haveAccumBuffer, - b->swAlpha, + GL_FALSE, /* software alpha buffer */ vis->mesa_visual.numAuxBuffers > 0 ); /* GLX_EXT_texture_from_pixmap */ @@ -1865,9 +1850,6 @@ void XMesaSwapBuffers( XMesaBuffer b ) ); /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ } - - if (b->swAlpha) - _mesa_copy_soft_alpha_renderbuffers(ctx, &b->mesa_buffer); } XSync( b->xm_visual->display, False ); } diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c index 04cedcd4ec0..5f60f4bfd7d 100644 --- a/src/mesa/drivers/x11/xm_line.c +++ b/src/mesa/drivers/x11/xm_line.c @@ -581,7 +581,6 @@ get_line_func(struct gl_context *ctx) #if CHAN_BITS == 8 SWcontext *swrast = SWRAST_CONTEXT(ctx); XMesaContext xmesa = XMESA_CONTEXT(ctx); - XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer); const int depth = GET_VISUAL_DEPTH(xmesa->xm_visual); const struct xmesa_renderbuffer *xrb; @@ -594,7 +593,6 @@ get_line_func(struct gl_context *ctx) if (ctx->Light.ShadeModel != GL_FLAT) return (swrast_line_func) NULL; if (ctx->Line.StippleFlag) return (swrast_line_func) NULL; if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_line_func) NULL; - if (xmbuf->swAlpha) return (swrast_line_func) NULL; xrb = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c index 98dece113de..9fc19bb1e8a 100644 --- a/src/mesa/drivers/x11/xm_tri.c +++ b/src/mesa/drivers/x11/xm_tri.c @@ -1453,7 +1453,6 @@ get_triangle_func(struct gl_context *ctx) #if CHAN_BITS == 8 SWcontext *swrast = SWRAST_CONTEXT(ctx); XMesaContext xmesa = XMESA_CONTEXT(ctx); - XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer); const int depth = GET_VISUAL_DEPTH(xmesa->xm_visual); const struct xmesa_renderbuffer *xrb; @@ -1476,8 +1475,6 @@ get_triangle_func(struct gl_context *ctx) if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) return (swrast_tri_func) NULL; - if (xmbuf->swAlpha) - return (swrast_tri_func) NULL; xrb = xmesa_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]->Wrapped); diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 29f070aa040..81dc25d52eb 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -219,8 +219,6 @@ struct xmesa_buffer { GLint db_mode; /* 0 = single buffered */ /* BACK_PIXMAP = use Pixmap for back buffer */ /* BACK_XIMAGE = use XImage for back buffer */ - GLboolean swAlpha; - GLuint shm; /* X Shared Memory extension status: */ /* 0 = not available */ /* 1 = XImage support available */