From 5df82c82bd53db90eb72c5aad4dd20cf6f1116b1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 22 Aug 2003 20:11:43 +0000 Subject: patch to import Jon Smirl's work from Bitkeeper --- src/mesa/drivers/dri/mga/mgapixel.c | 42 ++++--------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) (limited to 'src/mesa/drivers/dri/mga/mgapixel.c') diff --git a/src/mesa/drivers/dri/mga/mgapixel.c b/src/mesa/drivers/dri/mga/mgapixel.c index 0bc4b3fac5..07e0c3a756 100644 --- a/src/mesa/drivers/dri/mga/mgapixel.c +++ b/src/mesa/drivers/dri/mga/mgapixel.c @@ -35,12 +35,12 @@ #include "mgacontext.h" #include "mgaioctl.h" #include "mgapixel.h" -#include "mgabuffers.h" +#include "mgastate.h" -#include "xf86drm.h" #include "mga_common.h" #include "swrast/swrast.h" +#include "imports.h" #define IS_AGP_MEM( mmesa, p ) \ ((unsigned long)mmesa->mgaScreen->buffers.map <= ((unsigned long)p) && \ @@ -134,7 +134,7 @@ check_color_per_fragment_ops( const GLcontext *ctx ) !ctx->Color.ColorMask[2] || !ctx->Color.ColorMask[3] || ctx->Color.ColorLogicOpEnabled || - ctx->Texture.Unit[0]._ReallyEnabled || + ctx->Texture._EnabledUnits || ctx->Depth.OcclusionTest ) && ctx->Current.RasterPosValid && @@ -596,7 +596,7 @@ mgaTryDrawPixels( GLcontext *ctx, } } #else - memcpy( address, pixels, rows*bufferpitch ); + MEMCPY( address, pixels, rows*bufferpitch ); #endif do_draw_pix( ctx, x, y, width, rows, @@ -639,42 +639,8 @@ mgaDDDrawPixels( GLcontext *ctx, * the same block of agp space which isn't used for anything else at * present. */ -#if defined(MESA_hacked_agp_allocator) -static void mgaDDFreeAgpMemory( GLcontext *ctx, void *ptr ) -{ - (void) ptr; -} - -static void *mgaDDAllocateAgpMemory( GLcontext *ctx, GLsizei size ) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - - if (size < mmesa->mgaScreen->textureSize[MGA_AGP_HEAP]) - return mmesa->mgaScreen->texVirtual[MGA_AGP_HEAP]; - else - return 0; -} - -static GLint mgaDDGetAgpOffset( GLcontext *ctx, const void *ptr ) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - - if (!IS_AGP_MEM(mmesa, ptr)) - return -1; - - return AGP_OFFSET(mmesa, ptr); -} -#endif - - void mgaDDInitPixelFuncs( GLcontext *ctx ) { -#if defined (MESA_experimetal_agp_allocator) - ctx->Driver.AllocateAgpMemory = mgaDDAllocateAgpMemory; - ctx->Driver.GetAgpOffset = mgaDDGetAgpOffset; - ctx->Driver.FreeAgpMemory = mgaDDFreeAgpMemory; -#endif - /* Pixel path fallbacks. */ ctx->Driver.Accum = _swrast_Accum; -- cgit v1.2.3