X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Ftdfx%2Ftdfx_dd.c;h=34e4babcf5e16d72c17dbf8c0fbdad3d22114c4e;hb=994d5cc5f48cc2f08c59ccd6de31b7fb05f8349e;hp=31604e3e1567c1c1c5dafe0e8dbe46d0a840677a;hpb=e05ab2795b7463a053562b233d75e62f4138e0d3;p=mesa.git diff --git a/src/mesa/drivers/dri/tdfx/tdfx_dd.c b/src/mesa/drivers/dri/tdfx/tdfx_dd.c index 31604e3e156..34e4babcf5e 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_dd.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_dd.c @@ -45,11 +45,11 @@ #include "enums.h" #include "swrast/swrast.h" #if defined(USE_X86_ASM) -#include "X86/common_x86_asm.h" +#include "x86/common_x86_asm.h" #endif -#define TDFX_DATE "20021125" +#define TDFX_DATE "20040719" /* These are used in calls to FX_grColorMaskv() */ @@ -243,47 +243,38 @@ static GLboolean tdfxDDGetIntegerv( GLcontext *ctx, GLenum pname, #define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ - ((vis.redBits == r) && \ - (vis.greenBits == g) && \ - (vis.blueBits == b) && \ - (vis.alphaBits == a)) + ((vis->redBits == r) && \ + (vis->greenBits == g) && \ + (vis->blueBits == b) && \ + (vis->alphaBits == a)) -void tdfxDDInitDriverFuncs( GLcontext *ctx ) +void tdfxDDInitDriverFuncs( const __GLcontextModes *visual, + struct dd_function_table *functions ) { if ( MESA_VERBOSE & VERBOSE_DRIVER ) { fprintf( stderr, "tdfx: %s()\n", __FUNCTION__ ); } - ctx->Driver.GetString = tdfxDDGetString; - ctx->Driver.GetBufferSize = tdfxDDGetBufferSize; - ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; - ctx->Driver.Error = NULL; - - /* Pixel path fallbacks. - */ - ctx->Driver.Accum = _swrast_Accum; - ctx->Driver.Bitmap = _swrast_Bitmap; - ctx->Driver.CopyPixels = _swrast_CopyPixels; - ctx->Driver.DrawPixels = _swrast_DrawPixels; - ctx->Driver.ReadPixels = _swrast_ReadPixels; + functions->GetString = tdfxDDGetString; + functions->GetBufferSize = tdfxDDGetBufferSize; + functions->ResizeBuffers = _swrast_alloc_buffers; /* Accelerated paths */ - if ( VISUAL_EQUALS_RGBA(ctx->Visual, 8, 8, 8, 8) ) + if ( VISUAL_EQUALS_RGBA(visual, 8, 8, 8, 8) ) { - ctx->Driver.DrawPixels = tdfx_drawpixels_R8G8B8A8; - ctx->Driver.ReadPixels = tdfx_readpixels_R8G8B8A8; + functions->DrawPixels = tdfx_drawpixels_R8G8B8A8; + functions->ReadPixels = tdfx_readpixels_R8G8B8A8; } - else if ( VISUAL_EQUALS_RGBA(ctx->Visual, 5, 6, 5, 0) ) + else if ( VISUAL_EQUALS_RGBA(visual, 5, 6, 5, 0) ) { - ctx->Driver.ReadPixels = tdfx_readpixels_R5G6B5; + functions->ReadPixels = tdfx_readpixels_R5G6B5; } - ctx->Driver.GetBooleanv = tdfxDDGetBooleanv; - ctx->Driver.GetDoublev = tdfxDDGetDoublev; - ctx->Driver.GetFloatv = tdfxDDGetFloatv; - ctx->Driver.GetIntegerv = tdfxDDGetIntegerv; - ctx->Driver.GetPointerv = NULL; + functions->GetBooleanv = tdfxDDGetBooleanv; + functions->GetDoublev = tdfxDDGetDoublev; + functions->GetFloatv = tdfxDDGetFloatv; + functions->GetIntegerv = tdfxDDGetIntegerv; }