summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-12 11:50:31 -0700
committerBrian Paul <[email protected]>2011-11-15 07:49:25 -0700
commitdff2394e08651304d924ef9df796ff0ac6b844c3 (patch)
tree063e6f925ebd7ee65d4b34f046278cea3c662003 /src
parent6d68855df133bdd4891e8aa428787b520739e0fe (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/x11/xm_api.c20
-rw-r--r--src/mesa/drivers/x11/xm_line.c2
-rw-r--r--src/mesa/drivers/x11/xm_tri.c3
-rw-r--r--src/mesa/drivers/x11/xmesaP.h2
4 files changed, 1 insertions, 26 deletions
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
@@ -391,21 +391,6 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type,
}
/*
- * 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)
*/
_mesa_add_soft_renderbuffers(&b->mesa_buffer,
@@ -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 */