diff options
author | Brian Paul <[email protected]> | 2004-01-20 02:49:27 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-01-20 02:49:27 +0000 |
commit | d3fd7ba8af15bead2f770d68a893449adeb11397 (patch) | |
tree | 2c92f7cb35f2776d6c461378f93b556fc1ca080d /src/mesa/drivers/dri/tdfx/tdfx_state.c | |
parent | 988a8862c8379c0312d40353ee4b35537dff59a1 (diff) |
Before calling _mesa_create_context(), initialize a dd_function_table struct
by calling _mesa_init_driver_functions() and then plugging in the driver-
specific functions.
In particular, make sure ctx->Driver.NewTextureObject points to the
appropriate driver function so that _all_ texture objects are augmented
with the driver-specific data.
Put in a bunch of assertions in the texture-related driver functions that
texObj->DriverData is valid. Remove old dead code in near future.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx/tdfx_state.c')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_state.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c index 5372558cdf1..53e331f69b6 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_state.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c @@ -1388,12 +1388,10 @@ void tdfxDDInitStateFuncs( GLcontext *ctx ) /* State notification callbacks: */ - ctx->Driver.ClearIndex = NULL; ctx->Driver.ClearColor = tdfxDDClearColor; ctx->Driver.DrawBuffer = tdfxDDDrawBuffer; ctx->Driver.ReadBuffer = tdfxDDReadBuffer; - ctx->Driver.IndexMask = NULL; ctx->Driver.ColorMask = tdfxDDColorMask; ctx->Driver.AlphaFunc = tdfxDDAlphaFunc; @@ -1401,7 +1399,6 @@ void tdfxDDInitStateFuncs( GLcontext *ctx ) ctx->Driver.BlendFunc = tdfxDDBlendFunc; ctx->Driver.BlendFuncSeparate = tdfxDDBlendFuncSeparate; ctx->Driver.ClearDepth = tdfxDDClearDepth; - ctx->Driver.ClearStencil = NULL; ctx->Driver.CullFace = tdfxDDCullFace; ctx->Driver.FrontFace = tdfxDDFrontFace; ctx->Driver.DepthFunc = tdfxDDDepthFunc; @@ -1409,39 +1406,13 @@ void tdfxDDInitStateFuncs( GLcontext *ctx ) ctx->Driver.DepthRange = tdfxDDDepthRange; ctx->Driver.Enable = tdfxDDEnable; ctx->Driver.Fogfv = tdfxDDFogfv; - ctx->Driver.Hint = NULL; - ctx->Driver.Lightfv = NULL; ctx->Driver.LightModelfv = tdfxDDLightModelfv; - ctx->Driver.LineStipple = NULL; ctx->Driver.LineWidth = tdfxDDLineWidth; ctx->Driver.PolygonStipple = tdfxDDPolygonStipple; ctx->Driver.RenderMode = tdfxDDRenderMode; ctx->Driver.Scissor = tdfxDDScissor; ctx->Driver.ShadeModel = tdfxDDShadeModel; - ctx->Driver.BindTexture = tdfxDDBindTexture; - ctx->Driver.DeleteTexture = tdfxDDDeleteTexture; - ctx->Driver.TexEnv = tdfxDDTexEnv; - ctx->Driver.TexParameter = tdfxDDTexParameter; - ctx->Driver.ChooseTextureFormat = tdfxDDChooseTextureFormat; - ctx->Driver.TexImage2D = tdfxDDTexImage2D; - ctx->Driver.TexSubImage2D = tdfxDDTexSubImage2D; - /* - ctx->Driver.TexImage2D = _mesa_store_teximage2d; - ctx->Driver.TexSubImage2D = _mesa_store_texsubimage2d; - */ - - ctx->Driver.TexImage1D = _mesa_store_teximage1d; - ctx->Driver.TexImage3D = _mesa_store_teximage3d; - ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; - ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; - ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; - ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; - ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; - ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; - ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; - ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; - /* ctx->Driver.GetTexImage = tdfxDDGetTexImage; */ ctx->Driver.UpdateTexturePalette = tdfxDDTexturePalette; @@ -1449,15 +1420,10 @@ void tdfxDDInitStateFuncs( GLcontext *ctx ) ctx->Driver.StencilFunc = tdfxDDStencilFunc; ctx->Driver.StencilMask = tdfxDDStencilMask; ctx->Driver.StencilOp = tdfxDDStencilOp; - } else { - ctx->Driver.StencilFunc = NULL; - ctx->Driver.StencilMask = NULL; - ctx->Driver.StencilOp = NULL; } ctx->Driver.Viewport = tdfxDDViewport; - /* Swrast hooks for imaging extensions: */ ctx->Driver.CopyColorTable = _swrast_CopyColorTable; |