From bb8c3b1bcc81fd5addc5e214f3efcfdca50c6806 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 24 Feb 2010 19:12:30 -0800 Subject: mesa: Remove ClearIndex and IndexMask from device-driver interface These are used to inform the driver of the clear value for color-index buffers and to control write-masking of bits in color-index buffers. No driver use or need (not even Nouveau) these interfaces. Signed-off-by: Ian Romanick --- src/mesa/drivers/x11/xm_dd.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index d304192f4c..5edafb890b 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -106,18 +106,6 @@ finish_or_flush( GLcontext *ctx ) } -static void -clear_index( GLcontext *ctx, GLuint index ) -{ - if (ctx->DrawBuffer->Name == 0) { - const XMesaContext xmesa = XMESA_CONTEXT(ctx); - XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer); - xmesa->clearpixel = (unsigned long) index; - XMesaSetForeground( xmesa->display, xmbuf->cleargc, (unsigned long) index ); - } -} - - static void clear_color( GLcontext *ctx, const GLfloat color[4] ) { @@ -144,26 +132,6 @@ clear_color( GLcontext *ctx, const GLfloat color[4] ) -/* Set index mask ala glIndexMask */ -static void -index_mask( GLcontext *ctx, GLuint mask ) -{ - const XMesaContext xmesa = XMESA_CONTEXT(ctx); - XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer); - /* not sure this conditional is really needed */ - if (xmbuf->backxrb && xmbuf->backxrb->pixmap) { - unsigned long m; - if (mask==0xffffffff) { - m = ((unsigned long)~0L); - } - else { - m = (unsigned long) mask; - } - XMesaSetPlaneMask( xmesa->display, xmbuf->cleargc, m ); - } -} - - /* Implements glColorMask() */ static void color_mask(GLcontext *ctx, @@ -1143,9 +1111,7 @@ xmesa_init_driver_functions( XMesaVisual xmvisual, driver->GetBufferSize = NULL; /* OBSOLETE */ driver->Flush = finish_or_flush; driver->Finish = finish_or_flush; - driver->ClearIndex = clear_index; driver->ClearColor = clear_color; - driver->IndexMask = index_mask; driver->ColorMask = color_mask; driver->Enable = enable; driver->Viewport = xmesa_viewport; -- cgit v1.2.3