From b45af1ec61473ad3a576fc0cb564a4f71fbab7f5 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 27 Feb 2010 16:38:09 -0800 Subject: mach64: Add asserts to check for null pointer dereferences. --- src/mesa/drivers/dri/mach64/mach64_texmem.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/drivers/dri/mach64') diff --git a/src/mesa/drivers/dri/mach64/mach64_texmem.c b/src/mesa/drivers/dri/mach64/mach64_texmem.c index 46cee4320d..b09954ce23 100644 --- a/src/mesa/drivers/dri/mach64/mach64_texmem.c +++ b/src/mesa/drivers/dri/mach64/mach64_texmem.c @@ -305,6 +305,7 @@ void mach64UploadTexImages( mach64ContextPtr mmesa, mach64TexObjPtr t ) t->heap = heap; /* Set the base offset of the texture image */ + assert(t->base.memBlock); t->bufAddr = mmesa->mach64Screen->texOffset[heap] + t->base.memBlock->ofs; /* Force loading the new state into the hardware */ @@ -457,7 +458,9 @@ void mach64UploadMultiTexImages( mach64ContextPtr mmesa, } /* Set the base offset of the texture image */ + assert(t0->base.memBlock); t0->bufAddr = mmesa->mach64Screen->texOffset[heap] + t0->base.memBlock->ofs; + assert(t1->base.memBlock); t1->bufAddr = mmesa->mach64Screen->texOffset[heap] + t1->base.memBlock->ofs; /* Force loading the new state into the hardware */ -- cgit v1.2.3 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/common/driverfuncs.c | 2 -- src/mesa/drivers/dri/mach64/mach64_state.c | 2 -- src/mesa/drivers/dri/mga/mgastate.c | 3 -- src/mesa/drivers/dri/nouveau/nouveau_state.c | 7 ----- src/mesa/drivers/dri/r128/r128_state.c | 2 -- src/mesa/drivers/dri/r200/r200_state.c | 2 -- src/mesa/drivers/dri/radeon/radeon_state.c | 2 -- .../windows/gldirect/mesasw/gld_wgl_mesasw.c | 16 ---------- src/mesa/drivers/x11/xm_dd.c | 34 ---------------------- src/mesa/main/blend.c | 3 -- src/mesa/main/dd.h | 4 --- 11 files changed, 77 deletions(-) (limited to 'src/mesa/drivers/dri/mach64') diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 87163e6505..ebfaa2f07b 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -142,7 +142,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->BlendFuncSeparate = NULL; driver->ClearColor = NULL; driver->ClearDepth = NULL; - driver->ClearIndex = NULL; driver->ClearStencil = NULL; driver->ClipPlane = NULL; driver->ColorMask = NULL; @@ -157,7 +156,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->Enable = NULL; driver->Fogfv = NULL; driver->Hint = NULL; - driver->IndexMask = NULL; driver->Lightfv = NULL; driver->LightModelfv = NULL; driver->LineStipple = NULL; diff --git a/src/mesa/drivers/dri/mach64/mach64_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c index b9093b5a13..69a5aea02c 100644 --- a/src/mesa/drivers/dri/mach64/mach64_state.c +++ b/src/mesa/drivers/dri/mach64/mach64_state.c @@ -1156,12 +1156,10 @@ void mach64DDInitStateFuncs( GLcontext *ctx ) { ctx->Driver.UpdateState = mach64DDInvalidateState; - ctx->Driver.ClearIndex = NULL; ctx->Driver.ClearColor = mach64DDClearColor; ctx->Driver.DrawBuffer = mach64DDDrawBuffer; ctx->Driver.ReadBuffer = mach64DDReadBuffer; - ctx->Driver.IndexMask = NULL; ctx->Driver.ColorMask = mach64DDColorMask; ctx->Driver.AlphaFunc = mach64DDAlphaFunc; ctx->Driver.BlendEquationSeparate = mach64DDBlendEquationSeparate; diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c index 0253044761..745d5e9852 100644 --- a/src/mesa/drivers/dri/mga/mgastate.c +++ b/src/mesa/drivers/dri/mga/mgastate.c @@ -1193,8 +1193,5 @@ void mgaDDInitStateFuncs( GLcontext *ctx ) ctx->Driver.Viewport = mgaViewport; ctx->Driver.RenderMode = mgaRenderMode; - ctx->Driver.ClearIndex = 0; - ctx->Driver.IndexMask = 0; - TNL_CONTEXT(ctx)->Driver.RunPipeline = mgaRunPipeline; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 5d593ed4dd..e1871db0eb 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -242,12 +242,6 @@ nouveau_fog(GLcontext *ctx, GLenum pname, const GLfloat *params) context_dirty(ctx, FOG); } -static void -nouveau_index_mask(GLcontext *ctx, GLuint mask) -{ - context_dirty(ctx, INDEX_MASK); -} - static void nouveau_light(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params) { @@ -504,7 +498,6 @@ nouveau_state_init(GLcontext *ctx) ctx->Driver.DrawBuffers = nouveau_draw_buffers; ctx->Driver.Enable = nouveau_enable; ctx->Driver.Fogfv = nouveau_fog; - ctx->Driver.IndexMask = nouveau_index_mask; ctx->Driver.Lightfv = nouveau_light; ctx->Driver.LightModelfv = nouveau_light_model; ctx->Driver.LineStipple = nouveau_line_stipple; diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c index 42f6dd7388..4d773feaaa 100644 --- a/src/mesa/drivers/dri/r128/r128_state.c +++ b/src/mesa/drivers/dri/r128/r128_state.c @@ -1407,13 +1407,11 @@ void r128DDInitStateFuncs( GLcontext *ctx ) { ctx->Driver.UpdateState = r128DDInvalidateState; - ctx->Driver.ClearIndex = NULL; ctx->Driver.ClearColor = r128DDClearColor; ctx->Driver.ClearStencil = r128DDClearStencil; ctx->Driver.DrawBuffer = r128DDDrawBuffer; ctx->Driver.ReadBuffer = r128DDReadBuffer; - ctx->Driver.IndexMask = NULL; ctx->Driver.ColorMask = r128DDColorMask; ctx->Driver.AlphaFunc = r128DDAlphaFunc; ctx->Driver.BlendEquationSeparate = r128DDBlendEquationSeparate; diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index b9ec6f428f..050e5aa877 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -2501,7 +2501,6 @@ void r200InitStateFuncs( struct dd_function_table *functions ) functions->BlendFuncSeparate = r200BlendFuncSeparate; functions->ClearColor = r200ClearColor; functions->ClearDepth = r200ClearDepth; - functions->ClearIndex = NULL; functions->ClearStencil = r200ClearStencil; functions->ClipPlane = r200ClipPlane; functions->ColorMask = r200ColorMask; @@ -2513,7 +2512,6 @@ void r200InitStateFuncs( struct dd_function_table *functions ) functions->Fogfv = r200Fogfv; functions->FrontFace = r200FrontFace; functions->Hint = NULL; - functions->IndexMask = NULL; functions->LightModelfv = r200LightModelfv; functions->Lightfv = r200Lightfv; functions->LineStipple = r200LineStipple; diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 7db745a180..0ce97e8697 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -2254,7 +2254,6 @@ void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2 ) ctx->Driver.BlendFuncSeparate = radeonBlendFuncSeparate; ctx->Driver.ClearColor = radeonClearColor; ctx->Driver.ClearDepth = radeonClearDepth; - ctx->Driver.ClearIndex = NULL; ctx->Driver.ClearStencil = radeonClearStencil; ctx->Driver.ClipPlane = radeonClipPlane; ctx->Driver.ColorMask = radeonColorMask; @@ -2266,7 +2265,6 @@ void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2 ) ctx->Driver.Fogfv = radeonFogfv; ctx->Driver.FrontFace = radeonFrontFace; ctx->Driver.Hint = NULL; - ctx->Driver.IndexMask = NULL; ctx->Driver.LightModelfv = radeonLightModelfv; ctx->Driver.Lightfv = radeonLightfv; ctx->Driver.LineStipple = radeonLineStipple; diff --git a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c index 7ac425a109..f927abfa11 100644 --- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c +++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c @@ -629,21 +629,6 @@ static void flush(GLcontext* ctx) } -//--------------------------------------------------------------------------- - - -/* - * Set the color index used to clear the color buffer. - */ -static void clear_index(GLcontext* ctx, GLuint index) -{ - GLD_context *gldCtx = GLD_GET_CONTEXT(ctx); - WMesaContext *Current = GLD_GET_WMESA_DRIVER(gldCtx); - Current->clearpixel = index; -} - - - //--------------------------------------------------------------------------- /* @@ -1367,7 +1352,6 @@ static void wmesa_update_state_first_time( ctx->Driver.Clear = clear; ctx->Driver.Flush = flush; - ctx->Driver.ClearIndex = clear_index; ctx->Driver.ClearColor = clear_color; ctx->Driver.Enable = enable; 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; diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index de60031cc8..d022770f24 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -456,9 +456,6 @@ _mesa_IndexMask( GLuint mask ) FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.IndexMask = mask; - - if (ctx->Driver.IndexMask) - ctx->Driver.IndexMask( ctx, mask ); } #endif diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 079e44bb95..84b83fe273 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -620,8 +620,6 @@ struct dd_function_table { void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); /** Specify the clear value for the depth buffer */ void (*ClearDepth)(GLcontext *ctx, GLclampd d); - /** Specify the clear value for the color index buffers */ - void (*ClearIndex)(GLcontext *ctx, GLuint index); /** Specify the clear value for the stencil buffer */ void (*ClearStencil)(GLcontext *ctx, GLint s); /** Specify a plane against which all geometry is clipped */ @@ -653,8 +651,6 @@ struct dd_function_table { void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); /** Specify implementation-specific hints */ void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); - /** Control the writing of individual bits in the color index buffers */ - void (*IndexMask)(GLcontext *ctx, GLuint mask); /** Set light source parameters. * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already * been transformed to eye-space. -- cgit v1.2.3 From 0384214923216b4bb7340070d08fcda2cbb79a93 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 26 Feb 2010 17:58:53 -0800 Subject: Remove stray defines of HAVE_RGBA Now that color-index support is removed from t_dd_tritmp.h and t_dd_unfilled.h, drivers no longer need define HAVE_RGBA. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i810/i810tris.c | 1 - src/mesa/drivers/dri/i915/intel_tris.c | 1 - src/mesa/drivers/dri/mach64/mach64_tris.c | 1 - src/mesa/drivers/dri/mga/mgatris.c | 1 - src/mesa/drivers/dri/r128/r128_tris.c | 1 - src/mesa/drivers/dri/r200/r200_swtcl.c | 1 - src/mesa/drivers/dri/r300/r300_swtcl.c | 1 - src/mesa/drivers/dri/radeon/radeon_swtcl.c | 1 - src/mesa/drivers/dri/savage/savagetris.c | 1 - src/mesa/drivers/dri/sis/sis_tris.c | 1 - src/mesa/drivers/dri/tdfx/tdfx_tris.c | 1 - src/mesa/drivers/dri/unichrome/via_tris.c | 1 - 12 files changed, 12 deletions(-) (limited to 'src/mesa/drivers/dri/mach64') diff --git a/src/mesa/drivers/dri/i810/i810tris.c b/src/mesa/drivers/dri/i810/i810tris.c index 213ba541ce..1492f711c9 100644 --- a/src/mesa/drivers/dri/i810/i810tris.c +++ b/src/mesa/drivers/dri/i810/i810tris.c @@ -218,7 +218,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index e63cd97db6..fb191fe346 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -603,7 +603,6 @@ static struct #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/mach64/mach64_tris.c b/src/mesa/drivers/dri/mach64/mach64_tris.c index c2a0adfef0..a81d21afff 100644 --- a/src/mesa/drivers/dri/mach64/mach64_tris.c +++ b/src/mesa/drivers/dri/mach64/mach64_tris.c @@ -1248,7 +1248,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c index 4c58c3bdb0..07cf682f6e 100644 --- a/src/mesa/drivers/dri/mga/mgatris.c +++ b/src/mesa/drivers/dri/mga/mgatris.c @@ -347,7 +347,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_BACK_COLORS 0 #define HAVE_SPEC 1 #define HAVE_HW_FLATSHADE 0 diff --git a/src/mesa/drivers/dri/r128/r128_tris.c b/src/mesa/drivers/dri/r128/r128_tris.c index 86d4717b05..9ea2a9d162 100644 --- a/src/mesa/drivers/dri/r128/r128_tris.c +++ b/src/mesa/drivers/dri/r128/r128_tris.c @@ -158,7 +158,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c index e220e40b01..262fe3cdde 100644 --- a/src/mesa/drivers/dri/r200/r200_swtcl.c +++ b/src/mesa/drivers/dri/r200/r200_swtcl.c @@ -420,7 +420,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c index 93983cee20..4dcc7cb022 100644 --- a/src/mesa/drivers/dri/r300/r300_swtcl.c +++ b/src/mesa/drivers/dri/r300/r300_swtcl.c @@ -364,7 +364,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c index 5a71b510fa..f2fcb46688 100644 --- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c +++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c @@ -524,7 +524,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c index a177a7d2b6..0050485e31 100644 --- a/src/mesa/drivers/dri/savage/savagetris.c +++ b/src/mesa/drivers/dri/savage/savagetris.c @@ -387,7 +387,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c index e7471f9789..d109a8c41e 100644 --- a/src/mesa/drivers/dri/sis/sis_tris.c +++ b/src/mesa/drivers/dri/sis/sis_tris.c @@ -375,7 +375,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tris.c b/src/mesa/drivers/dri/tdfx/tdfx_tris.c index 8824988895..d65833c20b 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_tris.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_tris.c @@ -320,7 +320,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 0 #define HAVE_HW_FLATSHADE 0 #define HAVE_BACK_COLORS 0 diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c index 01359d51ea..be3c9a770f 100644 --- a/src/mesa/drivers/dri/unichrome/via_tris.c +++ b/src/mesa/drivers/dri/unichrome/via_tris.c @@ -257,7 +257,6 @@ static struct { #define DO_POINTS 1 #define DO_FULL_QUAD 1 -#define HAVE_RGBA 1 #define HAVE_SPEC 1 #define HAVE_BACK_COLORS 0 #define HAVE_HW_FLATSHADE 1 -- cgit v1.2.3 From 8953bfce0eb7e56f13d4527ef86cdf4cf2db037f Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Sat, 6 Mar 2010 06:33:20 +0200 Subject: dri: drop MINIGLX_SOURCES --- src/mesa/drivers/dri/i810/Makefile | 3 --- src/mesa/drivers/dri/i915/Makefile | 2 -- src/mesa/drivers/dri/i965/Makefile | 1 - src/mesa/drivers/dri/mach64/Makefile | 3 --- src/mesa/drivers/dri/mga/Makefile | 2 -- src/mesa/drivers/dri/nouveau/Makefile | 2 -- src/mesa/drivers/dri/r128/Makefile | 2 -- src/mesa/drivers/dri/r200/Makefile | 2 -- src/mesa/drivers/dri/r300/Makefile | 2 -- src/mesa/drivers/dri/r600/Makefile | 2 -- src/mesa/drivers/dri/radeon/Makefile | 2 -- src/mesa/drivers/dri/savage/Makefile | 3 --- src/mesa/drivers/dri/sis/Makefile | 4 ---- src/mesa/drivers/dri/tdfx/Makefile | 3 --- src/mesa/drivers/dri/unichrome/Makefile | 2 -- 15 files changed, 35 deletions(-) (limited to 'src/mesa/drivers/dri/mach64') diff --git a/src/mesa/drivers/dri/i810/Makefile b/src/mesa/drivers/dri/i810/Makefile index 3874faee51..54a837d5ea 100644 --- a/src/mesa/drivers/dri/i810/Makefile +++ b/src/mesa/drivers/dri/i810/Makefile @@ -5,9 +5,6 @@ include $(TOP)/configs/current LIBNAME = i810_dri.so -# Not yet -# MINIGLX_SOURCES = server/i810_dri.c - DRIVER_SOURCES = \ i810context.c \ i810ioctl.c \ diff --git a/src/mesa/drivers/dri/i915/Makefile b/src/mesa/drivers/dri/i915/Makefile index dc15ae425c..5b49d0c77c 100644 --- a/src/mesa/drivers/dri/i915/Makefile +++ b/src/mesa/drivers/dri/i915/Makefile @@ -4,8 +4,6 @@ include $(TOP)/configs/current LIBNAME = i915_dri.so -MINIGLX_SOURCES = server/intel_dri.c - DRIVER_SOURCES = \ i830_context.c \ i830_state.c \ diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index f98a1a27db..a242580273 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -99,7 +99,6 @@ DRIVER_SOURCES = \ C_SOURCES = \ $(COMMON_SOURCES) \ - $(MINIGLX_SOURCES) \ $(DRIVER_SOURCES) ASM_SOURCES = diff --git a/src/mesa/drivers/dri/mach64/Makefile b/src/mesa/drivers/dri/mach64/Makefile index a8f463e9fd..c20fdece29 100644 --- a/src/mesa/drivers/dri/mach64/Makefile +++ b/src/mesa/drivers/dri/mach64/Makefile @@ -5,9 +5,6 @@ include $(TOP)/configs/current LIBNAME = mach64_dri.so -# Not yet -# MINIGLX_SOURCES = server/mach64_dri.c - DRIVER_SOURCES = \ mach64_context.c \ mach64_ioctl.c \ diff --git a/src/mesa/drivers/dri/mga/Makefile b/src/mesa/drivers/dri/mga/Makefile index 0cc329fb22..92533bccc2 100644 --- a/src/mesa/drivers/dri/mga/Makefile +++ b/src/mesa/drivers/dri/mga/Makefile @@ -5,8 +5,6 @@ include $(TOP)/configs/current LIBNAME = mga_dri.so -MINIGLX_SOURCES = server/mga_dri.c - DRIVER_SOURCES = \ mgadd.c \ mgaioctl.c \ diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile index 49e8933561..7be19b26fd 100644 --- a/src/mesa/drivers/dri/nouveau/Makefile +++ b/src/mesa/drivers/dri/nouveau/Makefile @@ -8,8 +8,6 @@ DRI_LIB_DEPS += $(shell pkg-config libdrm_nouveau --libs) LIBNAME = nouveau_vieux_dri.so -MINIGLX_SOURCES = - DRIVER_SOURCES = \ nouveau_screen.c \ nouveau_context.c \ diff --git a/src/mesa/drivers/dri/r128/Makefile b/src/mesa/drivers/dri/r128/Makefile index 52c5a38a70..8144c9b43f 100644 --- a/src/mesa/drivers/dri/r128/Makefile +++ b/src/mesa/drivers/dri/r128/Makefile @@ -5,8 +5,6 @@ include $(TOP)/configs/current LIBNAME = r128_dri.so -MINIGLX_SOURCES = server/r128_dri.c - DRIVER_SOURCES = \ r128_context.c \ r128_lock.c \ diff --git a/src/mesa/drivers/dri/r200/Makefile b/src/mesa/drivers/dri/r200/Makefile index 14eb96c1ba..2e86e8b941 100644 --- a/src/mesa/drivers/dri/r200/Makefile +++ b/src/mesa/drivers/dri/r200/Makefile @@ -7,8 +7,6 @@ CFLAGS += $(RADEON_CFLAGS) LIBNAME = r200_dri.so -MINIGLX_SOURCES = server/radeon_dri.c - ifeq ($(RADEON_LDFLAGS),) CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c endif diff --git a/src/mesa/drivers/dri/r300/Makefile b/src/mesa/drivers/dri/r300/Makefile index 04459c2ddf..08934fc996 100644 --- a/src/mesa/drivers/dri/r300/Makefile +++ b/src/mesa/drivers/dri/r300/Makefile @@ -7,8 +7,6 @@ CFLAGS += $(RADEON_CFLAGS) LIBNAME = r300_dri.so -MINIGLX_SOURCES = server/radeon_dri.c - ifeq ($(RADEON_LDFLAGS),) CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c endif diff --git a/src/mesa/drivers/dri/r600/Makefile b/src/mesa/drivers/dri/r600/Makefile index 5d50941539..2478b12658 100644 --- a/src/mesa/drivers/dri/r600/Makefile +++ b/src/mesa/drivers/dri/r600/Makefile @@ -7,8 +7,6 @@ CFLAGS += $(RADEON_CFLAGS) LIBNAME = r600_dri.so -MINIGLX_SOURCES = server/radeon_dri.c - ifeq ($(RADEON_LDFLAGS),) CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c endif diff --git a/src/mesa/drivers/dri/radeon/Makefile b/src/mesa/drivers/dri/radeon/Makefile index a54ea16ec6..fc6d1c8e89 100644 --- a/src/mesa/drivers/dri/radeon/Makefile +++ b/src/mesa/drivers/dri/radeon/Makefile @@ -8,8 +8,6 @@ CFLAGS += $(RADEON_CFLAGS) LIBNAME = radeon_dri.so -MINIGLX_SOURCES = server/radeon_dri.c - ifeq ($(RADEON_LDFLAGS),) CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c endif diff --git a/src/mesa/drivers/dri/savage/Makefile b/src/mesa/drivers/dri/savage/Makefile index 2e5c40802c..53511552c6 100644 --- a/src/mesa/drivers/dri/savage/Makefile +++ b/src/mesa/drivers/dri/savage/Makefile @@ -5,9 +5,6 @@ include $(TOP)/configs/current LIBNAME = savage_dri.so -# Doesn't exist yet. -#MINIGLX_SOURCES = server/savage_dri.c - DRIVER_SOURCES = \ savage_xmesa.c \ savagedd.c \ diff --git a/src/mesa/drivers/dri/sis/Makefile b/src/mesa/drivers/dri/sis/Makefile index ad009fc239..6b4f938bab 100644 --- a/src/mesa/drivers/dri/sis/Makefile +++ b/src/mesa/drivers/dri/sis/Makefile @@ -5,10 +5,6 @@ include $(TOP)/configs/current LIBNAME = sis_dri.so - -# Not yet -# MINIGLX_SOURCES = server/sis_dri.c - DRIVER_SOURCES = \ sis6326_state.c \ sis6326_clear.c \ diff --git a/src/mesa/drivers/dri/tdfx/Makefile b/src/mesa/drivers/dri/tdfx/Makefile index b9f25db4fe..96bd8f8202 100644 --- a/src/mesa/drivers/dri/tdfx/Makefile +++ b/src/mesa/drivers/dri/tdfx/Makefile @@ -5,9 +5,6 @@ include $(TOP)/configs/current LIBNAME = tdfx_dri.so -# not yet -# MINIGLX_SOURCES = server/tdfx_dri.c - DRIVER_SOURCES = \ tdfx_context.c \ tdfx_dd.c \ diff --git a/src/mesa/drivers/dri/unichrome/Makefile b/src/mesa/drivers/dri/unichrome/Makefile index 344d34fce3..14cf9f3038 100644 --- a/src/mesa/drivers/dri/unichrome/Makefile +++ b/src/mesa/drivers/dri/unichrome/Makefile @@ -5,8 +5,6 @@ include $(TOP)/configs/current LIBNAME = unichrome_dri.so -MINIGLX_SOURCES = server/via_dri.c - DRIVER_SOURCES = \ via_context.c \ via_fb.c \ -- cgit v1.2.3 From 631a1a9ac8b97dec172205e13e33ef51f28bb1c0 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Sun, 14 Mar 2010 11:36:47 +0200 Subject: dri/common: mv __driUtilMessage to utils.c allows to link with xmlconfig without dri_util, and has nothing drm-specific. --- src/mesa/drivers/dri/common/dri_util.c | 22 ---------------------- src/mesa/drivers/dri/common/dri_util.h | 4 ---- src/mesa/drivers/dri/common/utils.c | 28 ++++++++++++++++++++++++---- src/mesa/drivers/dri/common/utils.h | 3 +++ src/mesa/drivers/dri/common/xmlconfig.c | 2 +- src/mesa/drivers/dri/mach64/mach64_context.c | 1 + 6 files changed, 29 insertions(+), 31 deletions(-) (limited to 'src/mesa/drivers/dri/mach64') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 75c98825b7..badbb5ff82 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -47,28 +47,6 @@ const __DRIextension driReadDrawableExtension = { __DRI_READ_DRAWABLE, __DRI_READ_DRAWABLE_VERSION }; -/** - * Print message to \c stderr if the \c LIBGL_DEBUG environment variable - * is set. - * - * Is called from the drivers. - * - * \param f \c printf like format string. - */ -void -__driUtilMessage(const char *f, ...) -{ - va_list args; - - if (getenv("LIBGL_DEBUG")) { - fprintf(stderr, "libGL: "); - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); - fprintf(stderr, "\n"); - } -} - GLint driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 ) { diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 99c0f1e442..f63583cebc 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -551,10 +551,6 @@ struct __DRIscreenRec { drmLock *lock; }; -extern void -__driUtilMessage(const char *f, ...); - - extern void __driUtilUpdateDrawableInfo(__DRIdrawable *pdp); diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index b85b364c57..0dd879abc9 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -37,6 +37,29 @@ #include "utils.h" +/** + * Print message to \c stderr if the \c LIBGL_DEBUG environment variable + * is set. + * + * Is called from the drivers. + * + * \param f \c printf like format string. + */ +void +__driUtilMessage(const char *f, ...) +{ + va_list args; + + if (getenv("LIBGL_DEBUG")) { + fprintf(stderr, "libGL: "); + va_start(args, f); + vfprintf(stderr, f, args); + va_end(args); + fprintf(stderr, "\n"); + } +} + + unsigned driParseDebugString( const char * debug, const struct dri_debug_control * control ) @@ -230,9 +253,6 @@ void driInitSingleExtension( GLcontext * ctx, /** * Utility function used by drivers to test the verions of other components. * - * If one of the version requirements is not met, a message is logged using - * \c __driUtilMessage. - * * \param driver_name Name of the driver. Used in error messages. * \param driActual Actual DRI version supplied __driCreateNewScreen. * \param driExpected Minimum DRI version required by the driver. @@ -244,7 +264,7 @@ void driInitSingleExtension( GLcontext * ctx, * \returns \c GL_TRUE if all version requirements are met. Otherwise, * \c GL_FALSE is returned. * - * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2, __driUtilMessage + * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2 * * \todo * Now that the old \c driCheckDriDdxDrmVersions function is gone, this diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h index 02ca3feb73..de6070c398 100644 --- a/src/mesa/drivers/dri/common/utils.h +++ b/src/mesa/drivers/dri/common/utils.h @@ -69,6 +69,9 @@ struct __DRIutilversionRec2 { int patch; /**< Patch-level. */ }; +extern void +__driUtilMessage(const char *f, ...); + extern unsigned driParseDebugString( const char * debug, const struct dri_debug_control * control ); diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c index 477259ea7e..de4500a39b 100644 --- a/src/mesa/drivers/dri/common/xmlconfig.c +++ b/src/mesa/drivers/dri/common/xmlconfig.c @@ -36,7 +36,7 @@ #include #include #include "main/imports.h" -#include "dri_util.h" +#include "utils.h" #include "xmlconfig.h" #undef GET_PROGRAM_NAME diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c index 77e7e53ce0..73b1e08d4b 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.c +++ b/src/mesa/drivers/dri/mach64/mach64_context.c @@ -31,6 +31,7 @@ #include "main/glheader.h" #include "main/context.h" +#include "main/extensions.h" #include "main/simple_list.h" #include "main/imports.h" -- cgit v1.2.3