aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/ffb
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-01-20 15:24:50 +0000
committerBrian Paul <[email protected]>2004-01-20 15:24:50 +0000
commit4e713913fb88bc221eea1a18822cc782ca39af4d (patch)
tree71607e8e178163d5e8b79df15582cce89c6728cd /src/mesa/drivers/dri/ffb
parentd4636e74c86fad221c57a3a1704106e2367fc230 (diff)
Undo some bits from last check-in related to the ctx->Driver.NewTextureObject
functions. Don't allocate the driver-specific data during texture object creation but do it later as needed (as code originally was).
Diffstat (limited to 'src/mesa/drivers/dri/ffb')
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_state.c26
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_tex.c14
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_xmesa.c12
3 files changed, 19 insertions, 33 deletions
diff --git a/src/mesa/drivers/dri/ffb/ffb_state.c b/src/mesa/drivers/dri/ffb/ffb_state.c
index 5a56c945ca1..ac753b922a1 100644
--- a/src/mesa/drivers/dri/ffb/ffb_state.c
+++ b/src/mesa/drivers/dri/ffb/ffb_state.c
@@ -1061,7 +1061,6 @@ void ffbDDInitStateFuncs(GLcontext *ctx)
ctx->Driver.UpdateState = ffbDDUpdateState;
ctx->Driver.Enable = ffbDDEnable;
- ctx->Driver.LightModelfv = NULL;
ctx->Driver.AlphaFunc = ffbDDAlphaFunc;
ctx->Driver.BlendEquation = ffbDDBlendEquation;
ctx->Driver.BlendFunc = ffbDDBlendFunc;
@@ -1072,8 +1071,6 @@ void ffbDDInitStateFuncs(GLcontext *ctx)
ctx->Driver.LineStipple = ffbDDLineStipple;
ctx->Driver.PolygonStipple = ffbDDPolygonStipple;
ctx->Driver.Scissor = ffbDDScissor;
- ctx->Driver.CullFace = NULL;
- ctx->Driver.FrontFace = NULL;
ctx->Driver.ColorMask = ffbDDColorMask;
ctx->Driver.LogicOpcode = ffbDDLogicOp;
ctx->Driver.Viewport = ffbDDViewport;
@@ -1083,10 +1080,6 @@ void ffbDDInitStateFuncs(GLcontext *ctx)
ctx->Driver.StencilFunc = ffbDDStencilFunc;
ctx->Driver.StencilMask = ffbDDStencilMask;
ctx->Driver.StencilOp = ffbDDStencilOp;
- } else {
- ctx->Driver.StencilFunc = NULL;
- ctx->Driver.StencilMask = NULL;
- ctx->Driver.StencilOp = NULL;
}
ctx->Driver.DrawBuffer = ffbDDDrawBuffer;
@@ -1096,25 +1089,10 @@ void ffbDDInitStateFuncs(GLcontext *ctx)
ctx->Driver.ClearStencil = ffbDDClearStencil;
/* We will support color index modes later... -DaveM */
+ /*
ctx->Driver.ClearIndex = 0;
ctx->Driver.IndexMask = 0;
-
-
-
- /* Pixel path fallbacks.
- */
- ctx->Driver.Accum = _swrast_Accum;
- ctx->Driver.CopyPixels = _swrast_CopyPixels;
- ctx->Driver.DrawPixels = _swrast_DrawPixels;
- ctx->Driver.ReadPixels = _swrast_ReadPixels;
- ctx->Driver.ResizeBuffers = _swrast_alloc_buffers;
-
- /* Swrast hooks for imaging extensions:
- */
- ctx->Driver.CopyColorTable = _swrast_CopyColorTable;
- ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable;
- ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D;
- ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
+ */
{
struct swrast_device_driver *swdd =
diff --git a/src/mesa/drivers/dri/ffb/ffb_tex.c b/src/mesa/drivers/dri/ffb/ffb_tex.c
index 4fe5dea96ab..24d7fe3cd2c 100644
--- a/src/mesa/drivers/dri/ffb/ffb_tex.c
+++ b/src/mesa/drivers/dri/ffb/ffb_tex.c
@@ -25,17 +25,16 @@
* David S. Miller <[email protected]>
*/
-#include <GL/gl.h>
-#include "texformat.h"
-#include "texstore.h"
-#include "teximage.h"
-#include "swrast/swrast.h"
-
-#include "ffb_tex.h"
+#include "glheader.h"
+#include "mtypes.h"
/* No texture unit, all software. */
+/* XXX this function isn't needed since _mesa_init_driver_functions()
+ * will make all these assignments.
+ */
void ffbDDInitTexFuncs(GLcontext *ctx)
{
+ /*
ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format;
ctx->Driver.TexImage1D = _mesa_store_teximage1d;
ctx->Driver.TexImage2D = _mesa_store_teximage2d;
@@ -49,4 +48,5 @@ void ffbDDInitTexFuncs(GLcontext *ctx)
ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d;
ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d;
ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage;
+ */
}
diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
index caca9d4384a..0d7a2fda205 100644
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
@@ -38,6 +38,7 @@
#include "tnl/tnl.h"
#include "tnl/t_pipeline.h"
#include "array_cache/acache.h"
+#include "drivers/common/driverfuncs.h"
#include "ffb_context.h"
#include "ffb_dd.h"
@@ -178,18 +179,22 @@ ffbCreateContext(const __GLcontextModes *mesaVis,
__DRIscreenPrivate *sPriv;
ffbScreenPrivate *ffbScreen;
char *debug;
+ struct dd_function_table functions;
/* Allocate ffb context */
fmesa = (ffbContextPtr) CALLOC(sizeof(ffbContextRec));
if (!fmesa)
return GL_FALSE;
+ _mesa_init_driver_functions(&functions);
+
/* Allocate Mesa context */
if (sharedContextPrivate)
shareCtx = ((ffbContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- fmesa->glCtx = _mesa_create_context(mesaVis, shareCtx, fmesa, GL_TRUE);
+ fmesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
+ &functions, fmesa);
if (!fmesa->glCtx) {
FREE(fmesa);
return GL_FALSE;
@@ -265,6 +270,9 @@ ffbCreateContext(const __GLcontextModes *mesaVis,
_swsetup_CreateContext( ctx );
/* All of this need only be done once for a new context. */
+ /* XXX these should be moved right after the
+ * _mesa_init_driver_functions() call above.
+ */
ffbDDExtensionsInit(ctx);
ffbDDInitDriverFuncs(ctx);
ffbDDInitStateFuncs(ctx);
@@ -272,7 +280,7 @@ ffbCreateContext(const __GLcontextModes *mesaVis,
ffbDDInitDepthFuncs(ctx);
ffbDDInitStencilFuncs(ctx);
ffbDDInitRenderFuncs(ctx);
- ffbDDInitTexFuncs(ctx);
+ /*ffbDDInitTexFuncs(ctx); not needed */
ffbDDInitBitmapFuncs(ctx);
ffbInitVB(ctx);