From dbd1e2b5990a3689bf718296c57c14fc3ba38db5 Mon Sep 17 00:00:00 2001 From: Jouk Jansen Date: Wed, 22 Nov 2000 08:55:51 +0000 Subject: Modified Files: Mesa/src/Allegro/amesa.c Mesa/src/DOS/dosmesa.c Mesa/src/FX/fxdd.c Mesa/src/FX/fxdrv.h Mesa/src/FX/fxfastpath.c Mesa/src/GGI/include/ggi/mesa/ggimesa.h Mesa/src/OSmesa/osmesa.c Mesa/src/SVGA/svgamesa.c Mesa/src/Trace/tr_control.c Mesa/src/Windows/wgl.c Mesa/src/X/xmesaP.h Mesa/src/X86/3dnow.c Mesa/src/X86/katmai.c Mesa/src/X86/x86.c Removed Files: Mesa/src/mms_depend Oops,... all files containing Caps in directory name or file name were missing in my types->mtypes commit. ---------------------------------------------------------------------- --- src/mesa/drivers/allegro/amesa.c | 2 +- src/mesa/drivers/dos/dosmesa.c | 24 ++++++++- src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h | 10 ++-- src/mesa/drivers/glide/fxdd.c | 72 ++++++++++++------------- src/mesa/drivers/glide/fxdrv.h | 26 ++++----- src/mesa/drivers/osmesa/osmesa.c | 38 ++++++------- src/mesa/drivers/svga/svgamesa.c | 60 ++++++++++----------- src/mesa/drivers/windows/wgl.c | 4 +- src/mesa/drivers/x11/xmesaP.h | 18 +++---- src/mesa/x86/3dnow.c | 4 +- src/mesa/x86/x86.c | 4 +- 11 files changed, 141 insertions(+), 121 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c index 1645c5d11c..23ce888509 100644 --- a/src/mesa/drivers/allegro/amesa.c +++ b/src/mesa/drivers/allegro/amesa.c @@ -23,7 +23,7 @@ #include #include "context.h" #include "matrix.h" -#include "types.h" +#include "mtypes.h" #include "GL/amesa.h" diff --git a/src/mesa/drivers/dos/dosmesa.c b/src/mesa/drivers/dos/dosmesa.c index 6221268b52..89a8c2d616 100644 --- a/src/mesa/drivers/dos/dosmesa.c +++ b/src/mesa/drivers/dos/dosmesa.c @@ -1,4 +1,4 @@ -/* $Id: dosmesa.c,v 1.2 2000/09/26 20:54:10 brianp Exp $ */ +/* $Id: dosmesa.c,v 1.3 2000/11/22 08:55:52 joukj Exp $ */ /* * Mesa 3-D graphics library @@ -23,6 +23,26 @@ /* * $Log: dosmesa.c,v $ + * Revision 1.3 2000/11/22 08:55:52 joukj + * + * + * Modified Files: + * Mesa/src/Allegro/amesa.c Mesa/src/DOS/dosmesa.c + * Mesa/src/FX/fxdd.c Mesa/src/FX/fxdrv.h + * Mesa/src/FX/fxfastpath.c + * Mesa/src/GGI/include/ggi/mesa/ggimesa.h + * Mesa/src/OSmesa/osmesa.c Mesa/src/SVGA/svgamesa.c + * Mesa/src/Trace/tr_control.c Mesa/src/Windows/wgl.c + * Mesa/src/X/xmesaP.h Mesa/src/X86/3dnow.c Mesa/src/X86/katmai.c + * Mesa/src/X86/x86.c + * Removed Files: + * Mesa/src/mms_depend + * + * Oops,... all files containing Caps in directory name or file name were + * missing in my types->mtypes commit. + * + * ---------------------------------------------------------------------- + * * Revision 1.2 2000/09/26 20:54:10 brianp * First batch of OpenGL SI related changes: * Renamed struct gl_context to struct __GLcontextRec. @@ -104,7 +124,7 @@ #include "GL/DOSmesa.h" #include "context.h" #include "matrix.h" -#include "types.h" +#include "mtypes.h" #ifdef GLIDE diff --git a/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h b/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h index 94fe730ce9..a1e67fcbbf 100644 --- a/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h +++ b/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h @@ -1,5 +1,5 @@ /* GGI-Driver for MESA - * + * * Copyright (C) 1997 Uwe Maurer * * This library is free software; you can redistribute it and/or @@ -19,7 +19,7 @@ * This code was derived from the following source of information: * * svgamesa.c and ddsample.c by Brian Paul - * + * */ #ifndef _GGIMESA_H @@ -34,7 +34,7 @@ #include "mem.h" #include "matrix.h" #include "state.h" -#include "types.h" +#include "mtypes.h" #include "macros.h" #include "depth.h" @@ -47,13 +47,13 @@ struct ggi_mesa_info; -struct ggi_mesa_context +struct ggi_mesa_context { GLcontext *gl_ctx; GLvisual *gl_vis; GLframebuffer *gl_buffer; - ggi_visual_t ggi_vis; + ggi_visual_t ggi_vis; ggi_coord origin; int flip_y; int width, height, stride; /* Stride is in pixels */ diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 6dbbec4d59..fc375f054f 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -52,7 +52,7 @@ #if defined(FX) #include "image.h" -#include "types.h" +#include "mtypes.h" #include "fxdrv.h" #include "enums.h" #include "extensions.h" @@ -135,7 +135,7 @@ static void fxDDClearColor(GLcontext *ctx, GLubyte red, GLubyte green, if (MESA_VERBOSE&VERBOSE_DRIVER) { fprintf(stderr,"fxmesa: fxDDClearColor(%d,%d,%d,%d)\n",red,green,blue,alpha); } - + fxMesa->clearC=FXCOLOR4( col ); fxMesa->clearA=alpha; } @@ -329,7 +329,7 @@ static GLboolean fxDDDrawBitmap(GLcontext *ctx, GLint px, GLint py, ctx->Color.ColorLogicOpEnabled || ctx->Stencil.Enabled || ctx->Scissor.Enabled || - ( ctx->DrawBuffer->UseSoftwareAlphaBuffers && + ( ctx->DrawBuffer->UseSoftwareAlphaBuffers && ctx->Color.ColorMask[ACOMP]) || ctx->Color.MultiDrawBuffer) return GL_FALSE; @@ -372,7 +372,7 @@ static GLboolean fxDDDrawBitmap(GLcontext *ctx, GLint px, GLint py, if (width <= 0 || height <= 0) return GL_TRUE; /* totally scissored away */ - } + } else { finalUnpack = unpack; } @@ -609,7 +609,7 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name) static char buf[80]; if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_VOODOO) { - GrVoodooConfig_t *vc = + GrVoodooConfig_t *vc = &glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig; sprintf(buf, @@ -623,7 +623,7 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name) (vc->sliDetect ? "SLI" : "NOSLI")); } else if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96) { - GrSst96Config_t *sc = + GrSst96Config_t *sc = &glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config; sprintf(buf, @@ -647,17 +647,17 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name) int fxDDInitFxMesaContext( fxMesaContext fxMesa ) { - + FX_setupGrVertexLayout(); - - if (getenv("FX_EMULATE_SINGLE_TMU")) + + if (getenv("FX_EMULATE_SINGLE_TMU")) fxMesa->haveTwoTMUs = GL_FALSE; - + fxMesa->emulateTwoTMUs = fxMesa->haveTwoTMUs; - - if (!getenv("FX_DONT_FAKE_MULTITEX")) + + if (!getenv("FX_DONT_FAKE_MULTITEX")) fxMesa->emulateTwoTMUs = GL_TRUE; - + if(getenv("FX_GLIDE_SWAPINTERVAL")) fxMesa->swapInterval=atoi(getenv("FX_GLIDE_SWAPINTERVAL")); else @@ -667,7 +667,7 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa ) fxMesa->maxPendingSwapBuffers=atoi(getenv("MESA_FX_SWAP_PENDING")); else fxMesa->maxPendingSwapBuffers=2; - + if(getenv("MESA_FX_INFO")) fxMesa->verbose=GL_TRUE; else @@ -710,13 +710,13 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa ) fxMesa->currentFB=GR_BUFFER_FRONTBUFFER; FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER); } - + fxMesa->state = NULL; fxMesa->fogTable = NULL; - + fxMesa->state = malloc(FX_grGetInteger(FX_GLIDE_STATE_SIZE)); fxMesa->fogTable = malloc(FX_grGetInteger(FX_FOG_TABLE_ENTRIES)*sizeof(GrFog_t)); - + if (!fxMesa->state || !fxMesa->fogTable) { if (fxMesa->state) free(fxMesa->state); if (fxMesa->fogTable) free(fxMesa->fogTable); @@ -725,7 +725,7 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa ) if(fxMesa->haveZBuffer) FX_grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); - + #if (!FXMESA_USE_ARGB) FX_grLfbWriteColorFormat(GR_COLORFORMAT_ABGR); /* Not every Glide has this */ #endif @@ -735,7 +735,7 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa ) fxMesa->glCtx->Const.MaxTextureSize=256; fxMesa->glCtx->Const.MaxTextureUnits=fxMesa->emulateTwoTMUs ? 2 : 1; fxMesa->new_state = _NEW_ALL; - + fxDDSetupInit(); fxDDTrifuncInit(); fxDDFastPathInit(); @@ -756,13 +756,13 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa ) _swrast_allow_vertex_fog( fxMesa->glCtx, GL_FALSE ); _swrast_allow_pixel_fog( fxMesa->glCtx, GL_TRUE ); - fxDDInitExtensions(fxMesa->glCtx); + fxDDInitExtensions(fxMesa->glCtx); FX_grGlideGetState((GrState*)fxMesa->state); /* XXX Fix me too: need to have the 'struct dd' prepared prior to * creating the context... The below is broken if you try to insert - * new stages. + * new stages. */ fxDDRegisterPipelineStages( fxMesa->glCtx ); @@ -786,11 +786,11 @@ void fxDDInitExtensions( GLcontext *ctx ) gl_extensions_disable(ctx, "GL_EXT_fog_coord"); gl_extensions_add(ctx, GL_TRUE, "3DFX_set_global_palette", 0); - + if (!fxMesa->haveTwoTMUs) gl_extensions_disable(ctx, "GL_EXT_texture_env_add"); - - if (!fxMesa->emulateTwoTMUs) + + if (!fxMesa->emulateTwoTMUs) gl_extensions_disable(ctx, "GL_ARB_multitexture"); } @@ -799,7 +799,7 @@ void fxDDInitExtensions( GLcontext *ctx ) /************************************************************************/ /************************************************************************/ -/* Check if the hardware supports the current context +/* Check if the hardware supports the current context * * Performs similar work to fxDDChooseRenderState() - should be merged. */ @@ -830,7 +830,7 @@ static GLboolean fxIsInHardware(GLcontext *ctx) if(fxMesa->emulateTwoTMUs) { if((ctx->_Enabled & (TEXTURE0_3D | TEXTURE1_3D)) || /* Not very well written ... */ - ((ctx->_Enabled & (TEXTURE0_1D | TEXTURE1_1D)) && + ((ctx->_Enabled & (TEXTURE0_1D | TEXTURE1_1D)) && ((ctx->_Enabled & (TEXTURE0_2D | TEXTURE1_2D))!=(TEXTURE0_2D | TEXTURE1_2D))) ) { return GL_FALSE; @@ -873,7 +873,7 @@ static GLboolean fxIsInHardware(GLcontext *ctx) if (!fxMesa->haveTwoTMUs && ctx->Color.BlendEnabled) { return GL_FALSE; } - + if ((ctx->Texture.Unit[0].EnvMode!=ctx->Texture.Unit[1].EnvMode) && (ctx->Texture.Unit[0].EnvMode!=GL_MODULATE) && (ctx->Texture.Unit[0].EnvMode!=GL_REPLACE)) /* q2, seems ok... */ @@ -886,13 +886,13 @@ static GLboolean fxIsInHardware(GLcontext *ctx) } else { if((ctx->_Enabled & (TEXTURE1_1D | TEXTURE1_2D | TEXTURE1_3D)) || /* Not very well written ... */ - ((ctx->_Enabled & TEXTURE0_1D) && + ((ctx->_Enabled & TEXTURE0_1D) && (!(ctx->_Enabled & TEXTURE0_2D))) ) { return GL_FALSE; } - + if((ctx->Texture._ReallyEnabled & TEXTURE0_2D) && (ctx->Texture.Unit[0].EnvMode==GL_BLEND)) { return GL_FALSE; @@ -927,15 +927,15 @@ static void fxDDUpdateDDPointers(GLcontext *ctx) if (new_state & _FX_NEW_IS_IN_HARDWARE) fxMesa->is_in_hardware = fxIsInHardware(ctx); - + if (fxMesa->new_state) fxSetupFXUnits(ctx); - if (new_state & _FX_NEW_RENDERSTATE) + if (new_state & _FX_NEW_RENDERSTATE) fxDDChooseRenderState( ctx ); - + if (new_state & _FX_NEW_SETUP_FUNCTION) - ctx->Driver.RasterSetup = fxDDChooseSetupFunction(ctx); + ctx->Driver.RasterSetup = fxDDChooseSetupFunction(ctx); } } @@ -953,7 +953,7 @@ void fxSetupDDPointers(GLcontext *ctx) ctx->Driver.WriteDepthPixels=fxDDWriteDepthPixels; ctx->Driver.ReadDepthSpan=fxDDReadDepthSpan; ctx->Driver.ReadDepthPixels=fxDDReadDepthPixels; - + ctx->Driver.GetString=fxDDGetString; ctx->Driver.ClearIndex=NULL; @@ -998,8 +998,8 @@ void fxSetupDDPointers(GLcontext *ctx) ctx->Driver.RegisterVB=fxDDRegisterVB; ctx->Driver.UnregisterVB=fxDDUnregisterVB; - if (!getenv("FX_NO_FAST")) - ctx->Driver.BuildPrecalcPipeline = fxDDBuildPrecalcPipeline; + if (!getenv("FX_NO_FAST")) + ctx->Driver.BuildPrecalcPipeline = fxDDBuildPrecalcPipeline; fxSetupDDSpanPointers(ctx); fxDDUpdateDDPointers(ctx); diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h index 04049f091f..f708a279b9 100644 --- a/src/mesa/drivers/glide/fxdrv.h +++ b/src/mesa/drivers/glide/fxdrv.h @@ -61,7 +61,7 @@ #include "matrix.h" #include "mem.h" #include "texture.h" -#include "types.h" +#include "mtypes.h" #include "GL/fxmesa.h" #include "fxglidew.h" @@ -70,7 +70,7 @@ /* use gl/gl.h GLAPI/GLAPIENTRY/GLCALLBACK in place of * WINGDIAPI/APIENTRY/CALLBACK, these are defined in mesa gl/gl.h - - * tjump@spgs.com + * tjump@spgs.com */ @@ -126,7 +126,7 @@ typedef union { ( ((unsigned int)(c[0]))<<16 ) | \ ( ((unsigned int)(c[1]))<<8 ) | \ ( (unsigned int)(c[2])) ) - + #else #ifdef __i386__ #define FXCOLOR4( c ) (* (int *)c) @@ -243,7 +243,7 @@ typedef struct tfxTexInfo_t { GLfloat sScale, tScale; GLint int_sScale, int_tScale; /* x86 floating point trick for - * multiplication by powers of 2. + * multiplication by powers of 2. * Used in fxfasttmp.h */ @@ -329,9 +329,9 @@ struct tfxMesaVertexBuffer { _NEW_STENCIL| \ _NEW_BUFFERS| \ _NEW_COLOR| \ - _NEW_LIGHT) + _NEW_LIGHT) -/* Covers the state referenced by fxDDChooseRenderState +/* Covers the state referenced by fxDDChooseRenderState */ #define _FX_NEW_RENDERSTATE (_FX_NEW_IS_IN_HARDWARE | \ _DD_NEW_FLATSHADE | \ @@ -397,7 +397,7 @@ struct tfxMesaContext { GLuint setupdone; GLuint stw_hint_state; /* for grHints */ GLuint is_in_hardware; - GLuint new_state; + GLuint new_state; GLuint using_fast_path, passes, multipass; /* Texture Memory Manager Data */ @@ -432,7 +432,7 @@ struct tfxMesaContext { fx_point_func subsequent_point; fx_line_func subsequent_line; fx_tri_func subsequent_tri; - + GLfloat inv_s0scale; GLfloat inv_s1scale; @@ -454,7 +454,7 @@ struct tfxMesaContext { GLboolean haveGlobalPaletteTexture; GLint swapInterval; GLint maxPendingSwapBuffers; - + FX_GrContext_t glideContext; int screen_width; @@ -555,8 +555,8 @@ extern int fxTexGetInfo(int, int, GrLOD_t *, GrAspectRatio_t *, extern void fxDDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h ); extern void fxDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *params ); -extern void fxDDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, +extern void fxDDColorMask(GLcontext *ctx, + GLboolean r, GLboolean g, GLboolean b, GLboolean a ); extern void fxDDWriteDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y, @@ -589,8 +589,8 @@ extern int fxDDInitFxMesaContext( fxMesaContext fxMesa ); extern void fxSetScissorValues(GLcontext *ctx); -extern void fxTMMoveInTM_NoLock(fxMesaContext fxMesa, - struct gl_texture_object *tObj, +extern void fxTMMoveInTM_NoLock(fxMesaContext fxMesa, + struct gl_texture_object *tObj, GLint where); extern void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder); diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 3f9a3626b1..bc45f3ee44 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,21 +1,21 @@ -/* $Id: osmesa.c,v 1.33 2000/11/19 23:10:26 brianp Exp $ */ +/* $Id: osmesa.c,v 1.34 2000/11/22 08:55:52 joukj Exp $ */ /* * Mesa 3-D graphics library * Version: 3.3 - * + * * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -45,7 +45,7 @@ #include "macros.h" #include "mem.h" #include "matrix.h" -#include "types.h" +#include "mtypes.h" #include "extensions.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" @@ -316,7 +316,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, _swrast_CreateContext( ctx ); _swsetup_CreateContext( ctx ); _tnl_CreateContext( ctx ); - + osmesa_register_swrast_functions( ctx ); } } @@ -1242,7 +1242,7 @@ static void flat_rgba_line( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) { OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLubyte *color = vert0->color; + GLubyte *color = (GLubyte*) vert0->color; unsigned long pixel = PACK_RGBA( color[0], color[1], color[2], color[3] ); #define INTERP_XY 1 @@ -1264,7 +1264,7 @@ static void flat_rgba_z_line( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) { OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLubyte *color = vert0->color; + GLubyte *color = (GLubyte*) vert0->color; unsigned long pixel = PACK_RGBA( color[0], color[1], color[2], color[3] ); #define INTERP_XY 1 @@ -1402,7 +1402,7 @@ static void flat_blend_rgba_z_line_write( GLcontext *ctx, * Analyze context state to see if we can provide a fast line drawing * function, like those in lines.c. Otherwise, return NULL. */ -static swrast_line_func +static swrast_line_func osmesa_choose_line_function( GLcontext *ctx ) { OSMesaContext osmesa = OSMESA_CONTEXT(ctx); @@ -1508,7 +1508,7 @@ osmesa_choose_line_function( GLcontext *ctx ) /* * Smooth-shaded, z-less triangle, RGBA color. */ -static void smooth_rgba_z_triangle( GLcontext *ctx, +static void smooth_rgba_z_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ) @@ -1552,7 +1552,7 @@ static void smooth_rgba_z_triangle( GLcontext *ctx, /* * Flat-shaded, z-less triangle, RGBA color. */ -static void flat_rgba_z_triangle( GLcontext *ctx, +static void flat_rgba_z_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ) @@ -1593,13 +1593,13 @@ static void flat_rgba_z_triangle( GLcontext *ctx, /* * Return pointer to an accelerated triangle function if possible. */ -static swrast_tri_func +static swrast_tri_func osmesa_choose_triangle_function( GLcontext *ctx ) { OSMesaContext osmesa = OSMESA_CONTEXT(ctx); SWcontext *swrast = SWRAST_CONTEXT(ctx); - if ((osmesa->format==OSMESA_RGB)||(osmesa->format==OSMESA_BGR)) + if ((osmesa->format==OSMESA_RGB)||(osmesa->format==OSMESA_BGR)) return (swrast_tri_func)NULL; if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL; @@ -1624,7 +1624,7 @@ osmesa_choose_triangle_function( GLcontext *ctx ) /* Override for the swrast triangle-selection function. Try to use one * of our internal triangle functions, otherwise fall back to the - * standard swrast functions. + * standard swrast functions. */ static void osmesa_choose_triangle( GLcontext *ctx ) { @@ -1650,7 +1650,7 @@ static void osmesa_choose_line( GLcontext *ctx ) _NEW_LIGHT | \ _NEW_DEPTH | \ _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) + _SWRAST_NEW_RASTERMASK) #define OSMESA_NEW_TRIANGLE (_NEW_POLYGON | \ _NEW_TEXTURE | \ @@ -1660,16 +1660,16 @@ static void osmesa_choose_line( GLcontext *ctx ) _SWRAST_NEW_RASTERMASK) -/* Extend the software rasterizer with our line and triangle +/* Extend the software rasterizer with our line and triangle * functions. */ static void osmesa_register_swrast_functions( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT( ctx ); - + swrast->choose_line = osmesa_choose_line; swrast->choose_triangle = osmesa_choose_triangle; - + swrast->invalidate_line |= OSMESA_NEW_LINE; swrast->invalidate_triangle |= OSMESA_NEW_TRIANGLE; } diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c index 4a6c34b4f0..23166f9819 100644 --- a/src/mesa/drivers/svga/svgamesa.c +++ b/src/mesa/drivers/svga/svgamesa.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa.c,v 1.9 2000/11/17 21:01:44 brianp Exp $ */ +/* $Id: svgamesa.c,v 1.10 2000/11/22 08:55:53 joukj Exp $ */ /* * Mesa 3-D graphics library @@ -45,7 +45,7 @@ #include "context.h" #include "extensions.h" #include "matrix.h" -#include "types.h" +#include "mtypes.h" #endif #include "svgapix.h" @@ -73,7 +73,7 @@ void SVGAlog(char * what) if (!logfile) return; fprintf(logfile,"%s\n",what); fclose(logfile); -} +} #endif /**********************************************************************/ @@ -81,23 +81,23 @@ void SVGAlog(char * what) /**********************************************************************/ int SVGAMesaInit( int GraphMode ) -{ +{ vga_init(); if (!vga_hasmode(GraphMode)) { fprintf(stderr,"GraphMode %d unavailable...",GraphMode); #ifdef SVGA_DEBUG SVGAlog("SVGAMesaInit: invalid GraphMode (doesn't exist)"); -#endif +#endif return(1); } - SVGAInfo=vga_getmodeinfo(GraphMode); + SVGAInfo=vga_getmodeinfo(GraphMode); if (SVGAInfo->flags & IS_MODEX) { fprintf(stderr,"ModeX not implemented..."); #ifdef SVGA_DEBUG SVGAlog("SVGAMesaInit: invalid GraphMode (ModeX)"); -#endif +#endif return(2); } if (!SVGAInfo->bytesperpixel) @@ -105,7 +105,7 @@ int SVGAMesaInit( int GraphMode ) fprintf(stderr,"1 / 4 bit color not implemented..."); #ifdef SVGA_DEBUG SVGAlog("SVGAMesaInit: invalid GraphMode (1 or 4 bit)"); -#endif +#endif return(3); } switch (SVGAInfo->colors) { @@ -125,21 +125,21 @@ int SVGAMesaInit( int GraphMode ) SVGABuffer.Depth,GraphMode,SVGAInfo->linewidth, \ SVGAInfo->height,SVGABuffer.BufferSize); SVGAlog(cbuf); -#endif +#endif SVGABuffer.FrontBuffer=(void*)malloc(SVGABuffer.BufferSize + 4); if (!SVGABuffer.FrontBuffer) { { fprintf(stderr,"Not enough RAM for FRONT_LEFT_BUFFER..."); #ifdef SVGA_DEBUG SVGAlog("SVGAMesaInit: Not enough RAM (front buffer)"); -#endif +#endif return(4); } - } + } #ifdef SVGA_DEBUG sprintf(cbuf,"SVGAMesaInit: FrontBuffer - %p",SVGABuffer.FrontBuffer); SVGAlog(cbuf); -#endif +#endif SVGABuffer.BackBuffer=(void*)malloc(SVGABuffer.BufferSize + 4); if (!SVGABuffer.BackBuffer) { { @@ -147,14 +147,14 @@ int SVGAMesaInit( int GraphMode ) fprintf(stderr,"Not enough RAM for BACK_LEFT_BUFFER..."); #ifdef SVGA_DEBUG SVGAlog("SVGAMesaInit: Not enough RAM (back buffer)"); -#endif +#endif return(5); } - } + } #ifdef SVGA_DEBUG sprintf(cbuf,"SVGAMesaInit: BackBuffer - %p",SVGABuffer.BackBuffer); SVGAlog(cbuf); -#endif +#endif vga_setmode(GraphMode); SVGABuffer.VideoRam=vga_getgraphmem(); @@ -169,11 +169,11 @@ int SVGAMesaInit( int GraphMode ) SVGABuffer.ReadBuffer = SVGABuffer.BackBuffer; return 0; -} +} int SVGAMesaClose( void ) -{ - vga_setmode(TEXT); +{ + vga_setmode(TEXT); free(SVGABuffer.FrontBuffer); free(SVGABuffer.BackBuffer); return 0; @@ -195,17 +195,17 @@ static void copy_buffer( const GLubyte * buffer) { #ifdef SVGA_DEBUG sprintf(cbuf,"copy_buffer: copy %p to %p",buffer,SVGABuffer.VideoRam); SVGAlog(cbuf); -#endif +#endif while(size>0) { vga_setpage(page++); - if (size>>16) { + if (size>>16) { memcpy(SVGABuffer.VideoRam,buffer,0x10000); buffer+=0x10000; - }else{ + }else{ memcpy(SVGABuffer.VideoRam,buffer,size & 0xffff); } - size-=0xffff; + size-=0xffff; } } @@ -228,7 +228,7 @@ static GLboolean set_draw_buffer( GLcontext *ctx, GLenum buffer ) SVGABuffer.FrontBuffer=tmpptr; #endif return GL_TRUE; - } + } else if (buffer == GL_BACK_LEFT) { SVGABuffer.DrawBuffer = SVGABuffer.BackBuffer; #if 0 @@ -302,7 +302,7 @@ static void svgamesa_update_state( GLcontext *ctx ) ctx->Driver.WriteMonoCIPixels = __write_mono_ci_pixels8; #ifdef SVGA_DEBUG SVGAlog("SVGAUpdateState: 8 bit mode."); -#endif +#endif break; case 15: ctx->Driver.ClearColor = __clear_color15; @@ -316,7 +316,7 @@ static void svgamesa_update_state( GLcontext *ctx ) ctx->Driver.WriteMonoRGBAPixels = __write_mono_rgba_pixels15; #ifdef SVGA_DEBUG SVGAlog("SVGAUpdateState: 15 bit mode."); -#endif +#endif break; case 16: ctx->Driver.ClearColor = __clear_color16; ctx->Driver.Clear = __clear16; @@ -330,7 +330,7 @@ static void svgamesa_update_state( GLcontext *ctx ) break; #ifdef SVGA_DEBUG SVGAlog("SVGAUpdateState: 16 bit mode."); -#endif +#endif case 24: ctx->Driver.ClearColor = __clear_color24; ctx->Driver.Clear = __clear24; @@ -343,7 +343,7 @@ static void svgamesa_update_state( GLcontext *ctx ) break; #ifdef SVGA_DEBUG SVGAlog("SVGAUpdateState: 32 bit mode."); -#endif +#endif case 32: ctx->Driver.ClearColor = __clear_color32; ctx->Driver.Clear = __clear32; @@ -353,7 +353,7 @@ static void svgamesa_update_state( GLcontext *ctx ) ctx->Driver.WriteRGBAPixels = __write_rgba_pixels32; ctx->Driver.WriteMonoRGBASpan = __write_mono_rgba_span32; ctx->Driver.WriteMonoRGBAPixels = __write_mono_rgba_pixels32; - } + } } /* @@ -491,8 +491,8 @@ void SVGAMesaSwapBuffers( void ) #ifndef DEV _mesa_swapbuffers( SVGAMesa->gl_ctx ); - if (SVGAMesa->gl_vis->DBflag) -#endif /* DEV */ + if (SVGAMesa->gl_vis->DBflag) +#endif /* DEV */ { #ifdef SVGA_DEBUG sprintf(cbuf,"SVGAMesaSwapBuffers : Swapping..."); diff --git a/src/mesa/drivers/windows/wgl.c b/src/mesa/drivers/windows/wgl.c index 93a64983ab..6b7635d560 100644 --- a/src/mesa/drivers/windows/wgl.c +++ b/src/mesa/drivers/windows/wgl.c @@ -1,4 +1,4 @@ -/* $Id: wgl.c,v 1.3 2000/08/02 20:29:03 brianp Exp $ */ +/* $Id: wgl.c,v 1.4 2000/11/22 08:55:53 joukj Exp $ */ /* * This library is free software; you can redistribute it and/or @@ -43,7 +43,7 @@ extern "C" { #include #include "wmesadef.h" #include "GL/wmesa.h" -#include "types.h" +#include "mtypes.h" #define MAX_MESA_ATTRS 20 diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index c88e1f7eb6..401fc7dda1 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -1,21 +1,21 @@ -/* $Id: xmesaP.h,v 1.16 2000/11/19 23:42:33 jtaylor Exp $ */ +/* $Id: xmesaP.h,v 1.17 2000/11/22 08:55:53 joukj Exp $ */ /* * Mesa 3-D graphics library * Version: 3.3 - * + * * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -41,7 +41,7 @@ # endif #endif #include "GL/xmesa.h" -#include "types.h" +#include "mtypes.h" #if defined(FX) && !defined(GLX_DIRECT_RENDERING) #include "GL/fxmesa.h" #include "FX/fxdrv.h" @@ -438,15 +438,15 @@ static GLushort DitherValues[16]; /* array of (up to) 16-bit pixel values */ static const short HPCR_DRGB[3][2][16] = { { { 16, -4, 1,-11, 14, -6, 3, -9, 15, -5, 2,-10, 13, -7, 4, -8}, - {-15, 5, 0, 12,-13, 7, -2, 10,-14, 6, -1, 11,-12, 8, -3, 9} + {-15, 5, 0, 12,-13, 7, -2, 10,-14, 6, -1, 11,-12, 8, -3, 9} }, { {-11, 15, -7, 3, -8, 14, -4, 2,-10, 16, -6, 4, -9, 13, -5, 1}, - { 12,-14, 8, -2, 9,-13, 5, -1, 11,-15, 7, -3, 10,-12, 6, 0} + { 12,-14, 8, -2, 9,-13, 5, -1, 11,-15, 7, -3, 10,-12, 6, 0} }, { { 6,-18, 26,-14, 2,-22, 30,-10, 8,-16, 28,-12, 4,-20, 32, -8}, - { -4, 20,-24, 16, 0, 24,-28, 12, -6, 18,-26, 14, -2, 22,-30, 10} + { -4, 20,-24, 16, 0, 24,-28, 12, -6, 18,-26, 14, -2, 22,-30, 10} } }; diff --git a/src/mesa/x86/3dnow.c b/src/mesa/x86/3dnow.c index 35c3437240..32d5324b8d 100644 --- a/src/mesa/x86/3dnow.c +++ b/src/mesa/x86/3dnow.c @@ -1,4 +1,4 @@ -/* $Id: 3dnow.c,v 1.11 2000/11/19 02:18:33 gareth Exp $ */ +/* $Id: 3dnow.c,v 1.12 2000/11/22 08:55:53 joukj Exp $ */ /* * Mesa 3-D graphics library @@ -31,7 +31,7 @@ #include "glheader.h" #include "context.h" -#include "types.h" +#include "mtypes.h" #include "3dnow.h" #include "math/m_vertices.h" diff --git a/src/mesa/x86/x86.c b/src/mesa/x86/x86.c index cdde1c018c..3f9d10201b 100644 --- a/src/mesa/x86/x86.c +++ b/src/mesa/x86/x86.c @@ -1,4 +1,4 @@ -/* $Id: x86.c,v 1.12 2000/11/19 02:18:33 gareth Exp $ */ +/* $Id: x86.c,v 1.13 2000/11/22 08:55:53 joukj Exp $ */ /* * Mesa 3-D graphics library @@ -30,7 +30,7 @@ #include "glheader.h" #include "context.h" -#include "types.h" +#include "mtypes.h" #include "x86.h" #include "math/m_vertices.h" -- cgit v1.2.3