From e312cf26ea1ae0445926df20c43e80363d453cb5 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Fri, 12 Nov 1999 04:56:54 +0000 Subject: [PATCH] . Updates to get X86, MXX and 3DNow assembler code working with Watcom C++ and NASM. This includes lots of _ASMAPI macros to ensure that assembler functions are prototyped as __cdecl, as Watcom C++ uses register calling conventions by default. . Misc fixes to files to remove warnings generated by Watcom C++. --- src/mesa/drivers/d3d/D3DCAPS.CPP | 1 - src/mesa/drivers/d3d/D3DHAL.H | 1 - src/mesa/drivers/d3d/D3DMESA.H | 1 - src/mesa/drivers/d3d/D3DRaster.cpp | 1 - src/mesa/drivers/d3d/D3DTEXT.CPP | 1 - src/mesa/drivers/d3d/D3DTextureMgr.cpp | 1 - src/mesa/drivers/d3d/D3DTextureMgr.h | 1 - src/mesa/drivers/d3d/D3DUTILS.CPP | 1 - src/mesa/drivers/d3d/D3Dvbrender.c | 1 - src/mesa/drivers/d3d/DDrawPROCS.c | 1 - src/mesa/drivers/d3d/DEBUG.C | 1 - src/mesa/drivers/d3d/DEBUG.H | 1 - src/mesa/drivers/d3d/MAKEFILE | 1 - src/mesa/drivers/d3d/NullProcs.c | 1 - src/mesa/drivers/d3d/OPENGL32.DEF | 1 - src/mesa/main/Imakefile | 1 - src/mesa/main/blend.c | 48 ++++++----- src/mesa/main/texobj.c | 4 +- src/mesa/main/varray.c | 4 +- src/mesa/x86/3dnow.c | 115 ++++++++++++------------- src/mesa/x86/assyntax.h | 8 ++ src/mesa/x86/mmx.h | 4 +- src/mesa/x86/x86.c | 22 ++--- 23 files changed, 108 insertions(+), 113 deletions(-) diff --git a/src/mesa/drivers/d3d/D3DCAPS.CPP b/src/mesa/drivers/d3d/D3DCAPS.CPP index 53595f0c34e..cd95ef0f1ee 100644 --- a/src/mesa/drivers/d3d/D3DCAPS.CPP +++ b/src/mesa/drivers/d3d/D3DCAPS.CPP @@ -248,4 +248,3 @@ void AlphaBlendTableHAL( PMESAD3DHAL pHAL ) } } - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3DHAL.H b/src/mesa/drivers/d3d/D3DHAL.H index 12f4b4e728e..5295520d7be 100644 --- a/src/mesa/drivers/d3d/D3DHAL.H +++ b/src/mesa/drivers/d3d/D3DHAL.H @@ -66,4 +66,3 @@ extern char *errorMsg; #endif - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3DMESA.H b/src/mesa/drivers/d3d/D3DMESA.H index 907f69ffb17..792f34d1f17 100644 --- a/src/mesa/drivers/d3d/D3DMESA.H +++ b/src/mesa/drivers/d3d/D3DMESA.H @@ -82,4 +82,3 @@ extern D3DTLVERTEX D3DTLVertices[(VB_MAX*6)]; #endif - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3DRaster.cpp b/src/mesa/drivers/d3d/D3DRaster.cpp index b87b3abd6d3..004bb773603 100644 --- a/src/mesa/drivers/d3d/D3DRaster.cpp +++ b/src/mesa/drivers/d3d/D3DRaster.cpp @@ -211,4 +211,3 @@ extern "C" void SetStateHAL( PMESAD3DSHARED pShared, DWORD dwType, DWORD dwState - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3DTEXT.CPP b/src/mesa/drivers/d3d/D3DTEXT.CPP index 7321eeb7c44..e6ff8645611 100644 --- a/src/mesa/drivers/d3d/D3DTEXT.CPP +++ b/src/mesa/drivers/d3d/D3DTEXT.CPP @@ -574,4 +574,3 @@ static int ConvertCharacter( char *c, int cIndex, PD3DFONTMETRICS pfntMetrics ) #undef BRIGHT #undef RIGHT #undef ALL - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3DTextureMgr.cpp b/src/mesa/drivers/d3d/D3DTextureMgr.cpp index 9375e51e32e..ac9d2621fcc 100644 --- a/src/mesa/drivers/d3d/D3DTextureMgr.cpp +++ b/src/mesa/drivers/d3d/D3DTextureMgr.cpp @@ -945,4 +945,3 @@ HRESULT CALLBACK EnumPFHook( LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext ) } - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3DTextureMgr.h b/src/mesa/drivers/d3d/D3DTextureMgr.h index 6b3ac785607..f4a4154917a 100644 --- a/src/mesa/drivers/d3d/D3DTextureMgr.h +++ b/src/mesa/drivers/d3d/D3DTextureMgr.h @@ -60,4 +60,3 @@ void APIENTRY TermTMD3D( void *pVoid ); /*========================================================================*/ #endif - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3DUTILS.CPP b/src/mesa/drivers/d3d/D3DUTILS.CPP index 381e09f2a13..c13d89cd711 100644 --- a/src/mesa/drivers/d3d/D3DUTILS.CPP +++ b/src/mesa/drivers/d3d/D3DUTILS.CPP @@ -636,4 +636,3 @@ char *ErrorStringD3D( HRESULT hr ) return &errorString[0]; } - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/D3Dvbrender.c b/src/mesa/drivers/d3d/D3Dvbrender.c index 57c1306d605..6ed8037902b 100644 --- a/src/mesa/drivers/d3d/D3Dvbrender.c +++ b/src/mesa/drivers/d3d/D3Dvbrender.c @@ -2147,4 +2147,3 @@ static void DebugRenderStates( GLcontext *ctx, BOOL bForce ) } } } - diff --git a/src/mesa/drivers/d3d/DDrawPROCS.c b/src/mesa/drivers/d3d/DDrawPROCS.c index 33a1e47bba3..a02a89debbb 100644 --- a/src/mesa/drivers/d3d/DDrawPROCS.c +++ b/src/mesa/drivers/d3d/DDrawPROCS.c @@ -397,4 +397,3 @@ void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y /* Giver back. */ UnlockHAL( pContext->pShared, TRUE ); } - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/DEBUG.C b/src/mesa/drivers/d3d/DEBUG.C index 26c2c25be75..dfa524bf314 100644 --- a/src/mesa/drivers/d3d/DEBUG.C +++ b/src/mesa/drivers/d3d/DEBUG.C @@ -141,4 +141,3 @@ void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf ) - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/DEBUG.H b/src/mesa/drivers/d3d/DEBUG.H index e63d6c500c5..76122b91210 100644 --- a/src/mesa/drivers/d3d/DEBUG.H +++ b/src/mesa/drivers/d3d/DEBUG.H @@ -88,4 +88,3 @@ extern DWORD g_DBGMask; - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/MAKEFILE b/src/mesa/drivers/d3d/MAKEFILE index 59734cfd32a..ad1d40dc27b 100644 --- a/src/mesa/drivers/d3d/MAKEFILE +++ b/src/mesa/drivers/d3d/MAKEFILE @@ -99,4 +99,3 @@ forceit: - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/NullProcs.c b/src/mesa/drivers/d3d/NullProcs.c index e8f18545d11..60e4010f913 100644 --- a/src/mesa/drivers/d3d/NullProcs.c +++ b/src/mesa/drivers/d3d/NullProcs.c @@ -127,4 +127,3 @@ void NULLRePiRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint - \ No newline at end of file diff --git a/src/mesa/drivers/d3d/OPENGL32.DEF b/src/mesa/drivers/d3d/OPENGL32.DEF index 19762bbebe4..b32bd1fef81 100644 --- a/src/mesa/drivers/d3d/OPENGL32.DEF +++ b/src/mesa/drivers/d3d/OPENGL32.DEF @@ -440,4 +440,3 @@ EXPORTS - \ No newline at end of file diff --git a/src/mesa/main/Imakefile b/src/mesa/main/Imakefile index 115f16c8c35..443e83c8f30 100644 --- a/src/mesa/main/Imakefile +++ b/src/mesa/main/Imakefile @@ -124,4 +124,3 @@ LINTLIBS = DependTarget() - \ No newline at end of file diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 4dac9a4f6a7..0790d65256c 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -1,4 +1,4 @@ -/* $Id: blend.c,v 1.8 1999/11/11 01:22:25 brianp Exp $ */ +/* $Id: blend.c,v 1.9 1999/11/12 04:56:55 kendallb Exp $ */ /* * Mesa 3-D graphics library @@ -264,12 +264,16 @@ _mesa_BlendColorEXT( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ctx->Color.BlendColor[3] = CLAMP( alpha, 0.0F, 1.0F ); } - +#ifdef USE_MMX_ASM +#define _BLENDAPI _ASMAPI +#else +#define _BLENDAPI +#endif /* * Common transparency blending mode. */ -static void blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[], +static void _BLENDAPI blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[], GLubyte rgba[][4], CONST GLubyte dest[][4] ) { GLuint i; @@ -314,7 +318,7 @@ static void blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[], /* * Add src and dest. */ -static void blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[], +static void _BLENDAPI blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[], GLubyte rgba[][4], CONST GLubyte dest[][4] ) { GLuint i; @@ -333,7 +337,7 @@ static void blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[], rgba[i][GCOMP] = (GLubyte) MIN2( g, 255 ); rgba[i][BCOMP] = (GLubyte) MIN2( b, 255 ); rgba[i][ACOMP] = (GLubyte) MIN2( a, 255 ); - } + } } } @@ -342,20 +346,20 @@ static void blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[], /* * Blend min function (for GL_EXT_blend_minmax) */ -static void blend_min( GLcontext *ctx, GLuint n, const GLubyte mask[], - GLubyte rgba[][4], CONST GLubyte dest[][4] ) +static void _BLENDAPI blend_min( GLcontext *ctx, GLuint n, const GLubyte mask[], + GLubyte rgba[][4], CONST GLubyte dest[][4] ) { GLuint i; ASSERT(ctx->Color.BlendEquation==GL_MIN_EXT); (void) ctx; for (i=0;i 2) { + if (dim > 2) { gl_error( ctx, GL_INVALID_ENUM, "glBindTexture" ); return; } diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 8fcc63b9e72..c22be597594 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1,4 +1,4 @@ -/* $Id: varray.c,v 1.14 1999/11/11 01:22:28 brianp Exp $ */ +/* $Id: varray.c,v 1.15 1999/11/12 04:57:05 kendallb Exp $ */ /* * Mesa 3-D graphics library @@ -799,7 +799,7 @@ _mesa_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indice return; } - if (mode < 0 || mode > GL_POLYGON) { + if (mode > GL_POLYGON) { gl_error( ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); return; } diff --git a/src/mesa/x86/3dnow.c b/src/mesa/x86/3dnow.c index 212b6bffa5b..a32815bf625 100644 --- a/src/mesa/x86/3dnow.c +++ b/src/mesa/x86/3dnow.c @@ -1,4 +1,4 @@ -/* $Id: 3dnow.c,v 1.2 1999/10/19 18:37:06 keithw Exp $ */ +/* $Id: 3dnow.c,v 1.3 1999/11/12 04:57:22 kendallb Exp $ */ /* * Mesa 3-D graphics library @@ -29,7 +29,7 @@ * 3DNow! optimizations contributed by * Holger Waechtler */ -#if defined(USE_3DNOW_ASM) +#if defined(USE_3DNOW_ASM) && defined(USE_X86_ASM) #include "3dnow.h" #include @@ -58,31 +58,31 @@ #define DECLARE_XFORM_GROUP(pfx, v, masked) \ - extern void gl_##pfx##_transform_points##v##_general_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##v##_identity_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##v##_3d_no_rot_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##v##_perspective_##masked(XFORM_ARGS);\ - extern void gl_##pfx##_transform_points##v##_2d_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##v##_2d_no_rot_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##v##_3d_##masked(XFORM_ARGS); + extern void _ASMAPI gl##pfx##_transform_points##v##_general_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_points##v##_identity_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_points##v##_3d_no_rot_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_points##v##_perspective_##masked(XFORM_ARGS);\ + extern void _ASMAPI gl##pfx##_transform_points##v##_2d_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_points##v##_2d_no_rot_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_points##v##_3d_##masked(XFORM_ARGS); #define ASSIGN_XFORM_GROUP( pfx, cma, vsize, masked ) \ gl_transform_tab[cma][vsize][MATRIX_GENERAL] \ - = gl_##pfx##_transform_points##vsize##_general_##masked; \ + = gl##pfx##_transform_points##vsize##_general_##masked; \ gl_transform_tab[cma][vsize][MATRIX_IDENTITY] \ - = gl_##pfx##_transform_points##vsize##_identity_##masked; \ + = gl##pfx##_transform_points##vsize##_identity_##masked; \ gl_transform_tab[cma][vsize][MATRIX_3D_NO_ROT] \ - = gl_##pfx##_transform_points##vsize##_3d_no_rot_##masked; \ + = gl##pfx##_transform_points##vsize##_3d_no_rot_##masked; \ gl_transform_tab[cma][vsize][MATRIX_PERSPECTIVE] \ - = gl_##pfx##_transform_points##vsize##_perspective_##masked; \ + = gl##pfx##_transform_points##vsize##_perspective_##masked; \ gl_transform_tab[cma][vsize][MATRIX_2D] \ - = gl_##pfx##_transform_points##vsize##_2d_##masked; \ + = gl##pfx##_transform_points##vsize##_2d_##masked; \ gl_transform_tab[cma][vsize][MATRIX_2D_NO_ROT] \ - = gl_##pfx##_transform_points##vsize##_2d_no_rot_##masked; \ + = gl##pfx##_transform_points##vsize##_2d_no_rot_##masked; \ gl_transform_tab[cma][vsize][MATRIX_3D] \ - = gl_##pfx##_transform_points##vsize##_3d_##masked; + = gl##pfx##_transform_points##vsize##_3d_##masked; @@ -97,48 +97,48 @@ #define DECLARE_NORM_GROUP(pfx, masked) \ - extern void gl_##pfx##_rescale_normals_##masked## (NORM_ARGS); \ - extern void gl_##pfx##_normalize_normals_##masked## (NORM_ARGS); \ - extern void gl_##pfx##_transform_normals_##masked## (NORM_ARGS); \ - extern void gl_##pfx##_transform_normals_no_rot_##masked## (NORM_ARGS); \ - extern void gl_##pfx##_transform_rescale_normals_##masked## (NORM_ARGS); \ - extern void gl_##pfx##_transform_rescale_normals_no_rot_##masked## (NORM_ARGS); \ - extern void gl_##pfx##_transform_normalize_normals_##masked## (NORM_ARGS); \ - extern void gl_##pfx##_transform_normalize_normals_no_rot_##masked## (NORM_ARGS); + extern void _ASMAPI gl##pfx##_rescale_normals_##masked## (NORM_ARGS); \ + extern void _ASMAPI gl##pfx##_normalize_normals_##masked## (NORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_normals_##masked## (NORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_normals_no_rot_##masked## (NORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_rescale_normals_##masked## (NORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_rescale_normals_no_rot_##masked## (NORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_normalize_normals_##masked## (NORM_ARGS); \ + extern void _ASMAPI gl##pfx##_transform_normalize_normals_no_rot_##masked## (NORM_ARGS); #define ASSIGN_NORM_GROUP( pfx, cma, masked ) \ gl_normal_tab[NORM_RESCALE][cma] = \ - gl_##pfx##_rescale_normals_##masked##; \ + gl##pfx##_rescale_normals_##masked##; \ gl_normal_tab[NORM_NORMALIZE][cma] = \ - gl_##pfx##_normalize_normals_##masked##; \ + gl##pfx##_normalize_normals_##masked##; \ gl_normal_tab[NORM_TRANSFORM][cma] = \ - gl_##pfx##_transform_normals_##masked##; \ + gl##pfx##_transform_normals_##masked##; \ gl_normal_tab[NORM_TRANSFORM_NO_ROT][cma] = \ - gl_##pfx##_transform_normals_no_rot_##masked##; \ + gl##pfx##_transform_normals_no_rot_##masked##; \ gl_normal_tab[NORM_TRANSFORM | NORM_RESCALE][cma] = \ - gl_##pfx##_transform_rescale_normals_##masked##; \ + gl##pfx##_transform_rescale_normals_##masked##; \ gl_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE][cma] = \ - gl_##pfx##_transform_rescale_normals_no_rot_##masked##; \ + gl##pfx##_transform_rescale_normals_no_rot_##masked##; \ gl_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE][cma] = \ - gl_##pfx##_transform_normalize_normals_##masked##; \ + gl##pfx##_transform_normalize_normals_##masked##; \ gl_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE][cma] = \ - gl_##pfx##_transform_normalize_normals_no_rot_##masked##; + gl##pfx##_transform_normalize_normals_no_rot_##masked##; -extern void gl_3dnow_project_vertices( GLfloat *first, +extern void _ASMAPI gl_3dnow_project_vertices( GLfloat *first, GLfloat *last, const GLfloat *m, GLuint stride ); -extern void gl_3dnow_project_clipped_vertices( GLfloat *first, +extern void _ASMAPI gl_3dnow_project_clipped_vertices( GLfloat *first, GLfloat *last, const GLfloat *m, GLuint stride, const GLubyte *clipmask ); -extern void gl_v16_3dnow_general_xform( GLfloat *first_vert, +extern void _ASMAPI gl_v16_3dnow_general_xform( GLfloat *first_vert, const GLfloat *m, const GLfloat *src, GLuint src_stride, @@ -146,32 +146,32 @@ extern void gl_v16_3dnow_general_xform( GLfloat *first_vert, void gl_init_3dnow_asm_transforms (void) { - DECLARE_XFORM_GROUP( 3dnow, 1, raw ) - DECLARE_XFORM_GROUP( 3dnow, 2, raw ) - DECLARE_XFORM_GROUP( 3dnow, 3, raw ) - DECLARE_XFORM_GROUP( 3dnow, 4, raw ) - - DECLARE_XFORM_GROUP( 3dnow, 1, masked ) - DECLARE_XFORM_GROUP( 3dnow, 2, masked ) - DECLARE_XFORM_GROUP( 3dnow, 3, masked ) - DECLARE_XFORM_GROUP( 3dnow, 4, masked ) - - DECLARE_NORM_GROUP( 3dnow, raw ) -/* DECLARE_NORM_GROUP( 3dnow, masked ) + DECLARE_XFORM_GROUP( _3dnow, 1, raw ) + DECLARE_XFORM_GROUP( _3dnow, 2, raw ) + DECLARE_XFORM_GROUP( _3dnow, 3, raw ) + DECLARE_XFORM_GROUP( _3dnow, 4, raw ) + + DECLARE_XFORM_GROUP( _3dnow, 1, masked ) + DECLARE_XFORM_GROUP( _3dnow, 2, masked ) + DECLARE_XFORM_GROUP( _3dnow, 3, masked ) + DECLARE_XFORM_GROUP( _3dnow, 4, masked ) + + DECLARE_NORM_GROUP( _3dnow, raw ) +/* DECLARE_NORM_GROUP( _3dnow, masked ) */ - ASSIGN_XFORM_GROUP( 3dnow, 0, 1, raw ) - ASSIGN_XFORM_GROUP( 3dnow, 0, 2, raw ) - ASSIGN_XFORM_GROUP( 3dnow, 0, 3, raw ) - ASSIGN_XFORM_GROUP( 3dnow, 0, 4, raw ) + ASSIGN_XFORM_GROUP( _3dnow, 0, 1, raw ) + ASSIGN_XFORM_GROUP( _3dnow, 0, 2, raw ) + ASSIGN_XFORM_GROUP( _3dnow, 0, 3, raw ) + ASSIGN_XFORM_GROUP( _3dnow, 0, 4, raw ) - ASSIGN_XFORM_GROUP( 3dnow, CULL_MASK_ACTIVE, 1, masked ) - ASSIGN_XFORM_GROUP( 3dnow, CULL_MASK_ACTIVE, 2, masked ) - ASSIGN_XFORM_GROUP( 3dnow, CULL_MASK_ACTIVE, 3, masked ) - ASSIGN_XFORM_GROUP( 3dnow, CULL_MASK_ACTIVE, 4, masked ) + ASSIGN_XFORM_GROUP( _3dnow, CULL_MASK_ACTIVE, 1, masked ) + ASSIGN_XFORM_GROUP( _3dnow, CULL_MASK_ACTIVE, 2, masked ) + ASSIGN_XFORM_GROUP( _3dnow, CULL_MASK_ACTIVE, 3, masked ) + ASSIGN_XFORM_GROUP( _3dnow, CULL_MASK_ACTIVE, 4, masked ) - ASSIGN_NORM_GROUP( 3dnow, 0, raw ) -/* ASSIGN_NORM_GROUP( 3dnow, CULL_MASK_ACTIVE, masked ) + ASSIGN_NORM_GROUP( _3dnow, 0, raw ) +/* ASSIGN_NORM_GROUP( _3dnow, CULL_MASK_ACTIVE, masked ) */ #ifdef DEBUG @@ -187,4 +187,3 @@ void gl_init_3dnow_asm_transforms (void) } #endif - diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h index 1d476ce49b0..30105073b1d 100644 --- a/src/mesa/x86/assyntax.h +++ b/src/mesa/x86/assyntax.h @@ -876,9 +876,17 @@ #define D_BYTE db /* #define SPACE */ /* #define COMM */ +#if defined(__WATCOMC__) +SECTION _TEXT public align=16 class=CODE use32 flat +SECTION _DATA public align=16 class=DATA use32 flat +#define SEG_TEXT SECTION _TEXT +#define SEG_DATA SECTION _DATA +#define SEG_BSS SECTION .bss +#else #define SEG_DATA SECTION .data #define SEG_TEXT SECTION .text #define SEG_BSS SECTION .bss +#endif #define D_SPACE(n) db n REP 0 diff --git a/src/mesa/x86/mmx.h b/src/mesa/x86/mmx.h index c8c5eff3023..f0e05cf06d2 100644 --- a/src/mesa/x86/mmx.h +++ b/src/mesa/x86/mmx.h @@ -31,9 +31,9 @@ #define ASM_MMX_H -extern void +extern void _ASMAPI gl_mmx_blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[], - GLubyte rgba[][4], const GLubyte dest[][4] ); + GLubyte rgba[][4], const GLubyte dest[][4] ); void gl_mmx_set_blend_function( GLcontext *ctx ) diff --git a/src/mesa/x86/x86.c b/src/mesa/x86/x86.c index 610ec15ea64..02465fa14df 100644 --- a/src/mesa/x86/x86.c +++ b/src/mesa/x86/x86.c @@ -1,4 +1,4 @@ -/* $Id: x86.c,v 1.2 1999/10/19 18:37:07 keithw Exp $ */ +/* $Id: x86.c,v 1.3 1999/11/12 04:57:23 kendallb Exp $ */ /* * Mesa 3-D graphics library @@ -40,14 +40,14 @@ #include "xform.h" #include "x86.h" -extern void gl_v16_x86_cliptest_points4(GLfloat *first_vert, +extern void _ASMAPI gl_v16_x86_cliptest_points4(GLfloat *first_vert, GLfloat *last_vert, GLubyte *or_mask, GLubyte *and_mask, GLubyte *clip_mask ); -extern void gl_v16_x86_general_xform(GLfloat *dest, +extern void _ASMAPI gl_v16_x86_general_xform(GLfloat *dest, const GLfloat *m, const GLfloat *src, GLuint src_stride, @@ -62,13 +62,13 @@ extern void gl_v16_x86_general_xform(GLfloat *dest, const GLubyte flag #define DECLARE_XFORM_GROUP(pfx, vsize, masked) \ - extern void gl_##pfx##_transform_points##vsize##_general_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##vsize##_identity_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##vsize##_3d_no_rot_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##vsize##_perspective_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##vsize##_2d_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##vsize##_2d_no_rot_##masked(XFORM_ARGS); \ - extern void gl_##pfx##_transform_points##vsize##_3d_##masked(XFORM_ARGS); + extern void _ASMAPI gl_##pfx##_transform_points##vsize##_general_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl_##pfx##_transform_points##vsize##_identity_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl_##pfx##_transform_points##vsize##_3d_no_rot_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl_##pfx##_transform_points##vsize##_perspective_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl_##pfx##_transform_points##vsize##_2d_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl_##pfx##_transform_points##vsize##_2d_no_rot_##masked(XFORM_ARGS); \ + extern void _ASMAPI gl_##pfx##_transform_points##vsize##_3d_##masked(XFORM_ARGS); #define ASSIGN_XFORM_GROUP( pfx, cma, vsize, masked ) \ gl_transform_tab[cma][vsize][MATRIX_GENERAL] \ @@ -96,7 +96,7 @@ void gl_init_x86_asm_transforms( void ) DECLARE_XFORM_GROUP( x86, 3, masked ) DECLARE_XFORM_GROUP( x86, 4, masked ) - extern GLvector4f *gl_x86_cliptest_points4( GLvector4f *clip_vec, + extern GLvector4f * _ASMAPI gl_x86_cliptest_points4( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, -- 2.30.2