more clean-ups

This commit is contained in:
Brian Paul 2001-03-03 21:11:32 +00:00
parent d62269757b
commit 865322f931
8 changed files with 41 additions and 45 deletions

View file

@ -1,4 +1,4 @@
/* $Id: s_blend.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
/* $Id: s_blend.c,v 1.4 2001/03/03 21:11:33 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -573,7 +573,7 @@ void _swrast_choose_blend_func( GLcontext *ctx )
{
#if defined(USE_MMX_ASM)
if ( cpu_has_mmx ) {
SWRAST_CONTEXT(ctx)->BlendFunc = gl_mmx_blend_transparency;
SWRAST_CONTEXT(ctx)->BlendFunc = _mesa_mmx_blend_transparency;
}
else
#endif

View file

@ -1,4 +1,4 @@
/* $Id: common_x86.c,v 1.10 2001/03/03 20:33:30 brianp Exp $ */
/* $Id: common_x86.c,v 1.11 2001/03/03 21:11:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -44,11 +44,11 @@
#include "common_x86_asm.h"
int gl_x86_cpu_features = 0;
int _mesa_x86_cpu_features = 0;
/* No reason for this to be public.
*/
extern int gl_identify_x86_cpu_features( void );
extern int _mesa_identify_x86_cpu_features( void );
static void message( const char *msg )
@ -105,7 +105,7 @@ static void sigill_handler( int signal, struct sigcontext sc )
*/
sc.eip += 3;
gl_x86_cpu_features &= ~(X86_FEATURE_XMM);
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
}
static void sigfpe_handler( int signal, struct sigcontext sc )
@ -212,7 +212,7 @@ static void check_os_katmai_support( void )
* SSE, so we disable it by default.
*/
message( "Cannot test OS support for SSE, disabling to be safe.\n" );
gl_x86_cpu_features &= ~(X86_FEATURE_XMM);
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
#endif /* _POSIX_SOURCE */
#else
/* Do nothing on non-Linux platforms for now.
@ -227,13 +227,13 @@ static void check_os_katmai_support( void )
void _mesa_init_all_x86_transform_asm( void )
{
#ifdef USE_X86_ASM
gl_x86_cpu_features = gl_identify_x86_cpu_features();
_mesa_x86_cpu_features = _mesa_identify_x86_cpu_features();
if ( getenv( "MESA_NO_ASM" ) ) {
gl_x86_cpu_features = 0;
_mesa_x86_cpu_features = 0;
}
if ( gl_x86_cpu_features ) {
if ( _mesa_x86_cpu_features ) {
_mesa_init_x86_transform_asm();
}
@ -242,7 +242,7 @@ void _mesa_init_all_x86_transform_asm( void )
if ( getenv( "MESA_NO_MMX" ) == 0 ) {
message( "MMX cpu detected.\n" );
} else {
gl_x86_cpu_features &= ~(X86_FEATURE_MMX);
_mesa_x86_cpu_features &= ~(X86_FEATURE_MMX);
}
}
#endif
@ -253,7 +253,7 @@ void _mesa_init_all_x86_transform_asm( void )
message( "3DNow! cpu detected.\n" );
_mesa_init_3dnow_transform_asm();
} else {
gl_x86_cpu_features &= ~(X86_FEATURE_3DNOW);
_mesa_x86_cpu_features &= ~(X86_FEATURE_3DNOW);
}
}
#endif
@ -267,7 +267,7 @@ void _mesa_init_all_x86_transform_asm( void )
message( "Katmai cpu detected.\n" );
_mesa_init_katmai_transform_asm();
} else {
gl_x86_cpu_features &= ~(X86_FEATURE_XMM);
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
}
}
#endif
@ -275,12 +275,12 @@ void _mesa_init_all_x86_transform_asm( void )
}
/* Note: the above function must be called before this one, so that
* gl_x86_cpu_features gets correctly initialized.
* _mesa_x86_cpu_features gets correctly initialized.
*/
void _mesa_init_all_x86_vertex_asm( void )
{
#ifdef USE_X86_ASM
if ( gl_x86_cpu_features ) {
if ( _mesa_x86_cpu_features ) {
_mesa_init_x86_vertex_asm();
}

View file

@ -1,4 +1,4 @@
/* $Id: common_x86_asm.S,v 1.4 2001/02/09 23:23:43 brianp Exp $ */
/* $Id: common_x86_asm.S,v 1.5 2001/03/03 21:11:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -68,8 +68,8 @@ GLNAME( katmai_test_dummy ):
SEG_TEXT
ALIGNTEXT4
GLOBL GLNAME( gl_identify_x86_cpu_features )
GLNAME( gl_identify_x86_cpu_features ):
GLOBL GLNAME( _mesa_identify_x86_cpu_features )
GLNAME( _mesa_identify_x86_cpu_features ):
PUSH_L ( EBX )
@ -165,8 +165,8 @@ LLBL ( cpuid_done ):
* application.
*/
ALIGNTEXT4
GLOBL GLNAME( gl_test_os_katmai_support )
GLNAME( gl_test_os_katmai_support ):
GLOBL GLNAME( _mesa_test_os_katmai_support )
GLNAME( _mesa_test_os_katmai_support ):
XORPS ( XMM0, XMM0 )
@ -179,8 +179,8 @@ GLNAME( gl_test_os_katmai_support ):
* otherwise this could kill the client application.
*/
ALIGNTEXT4
GLOBL GLNAME( gl_test_os_katmai_exception_support )
GLNAME( gl_test_os_katmai_exception_support ):
GLOBL GLNAME( _mesa_test_os_katmai_exception_support )
GLNAME( _mesa_test_os_katmai_exception_support ):
PUSH_L ( EBP )
MOV_L ( ESP, EBP )

View file

@ -1,4 +1,4 @@
/* $Id: common_x86_asm.h,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
/* $Id: common_x86_asm.h,v 1.6 2001/03/03 21:11:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -57,7 +57,7 @@
#endif
#endif
extern int gl_x86_cpu_features;
extern int _mesa_x86_cpu_features;
extern void _mesa_init_all_x86_transform_asm( void );
extern void _mesa_init_all_x86_vertex_asm( void );

View file

@ -1,4 +1,4 @@
/* $Id: common_x86_features.h,v 1.2 2000/10/23 00:16:28 gareth Exp $ */
/* $Id: common_x86_features.h,v 1.3 2001/03/03 21:11:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -26,7 +26,7 @@
/*
* x86 CPUID feature information. The raw data is returned by
* gl_identify_x86_cpu_features() and interpreted with the cpu_has_*
* _mesa_identify_x86_cpu_features() and interpreted with the cpu_has_*
* helper macros.
*
* Gareth Hughes <gareth@valinux.com>
@ -70,8 +70,8 @@
#define X86_FEATURE_3DNOWEXT 0x40000000
#define X86_FEATURE_3DNOW 0x80000000
#define cpu_has_mmx (gl_x86_cpu_features & X86_FEATURE_MMX)
#define cpu_has_xmm (gl_x86_cpu_features & X86_FEATURE_XMM)
#define cpu_has_3dnow (gl_x86_cpu_features & X86_FEATURE_3DNOW)
#define cpu_has_mmx (_mesa_x86_cpu_features & X86_FEATURE_MMX)
#define cpu_has_xmm (_mesa_x86_cpu_features & X86_FEATURE_XMM)
#define cpu_has_3dnow (_mesa_x86_cpu_features & X86_FEATURE_3DNOW)
#endif

View file

@ -1,10 +1,10 @@
/* $Id: mmx.h,v 1.4 2000/11/05 18:41:00 keithw Exp $ */
/* $Id: mmx.h,v 1.5 2001/03/03 21:11:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2001 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"),
@ -25,17 +25,13 @@
*/
#ifndef ASM_MMX_H
#define ASM_MMX_H
extern void _ASMAPI
gl_mmx_blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
GLubyte rgba[][4], const GLubyte dest[][4] );
_mesa_mmx_blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
GLubyte rgba[][4], const GLubyte dest[][4] );
#endif

View file

@ -5,9 +5,9 @@ SEG_TEXT
ALIGNTEXT16
GLOBL GLNAME(gl_mmx_blend_transparency)
GLOBL GLNAME(_mesa_mmx_blend_transparency)
GLNAME( gl_mmx_blend_transparency ):
GLNAME( _mesa_mmx_blend_transparency ):
PUSH_L ( EBP )
MOV_L ( ESP, EBP )
SUB_L ( CONST(52), ESP )

View file

@ -1,4 +1,4 @@
/* $Id: x86_cliptest.S,v 1.4 2001/01/13 05:48:25 keithw Exp $ */
/* $Id: x86_cliptest.S,v 1.5 2001/03/03 21:11:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -71,7 +71,7 @@ clip_table:
SEG_TEXT
/*
* gl_x86_cliptest_points4
* _mesa_x86_cliptest_points4
*
* AL: ormask
* AH: andmask
@ -88,8 +88,8 @@ clip_table:
#endif
ALIGNTEXT16
GLOBL GLNAME( gl_x86_cliptest_points4 )
GLNAME( gl_x86_cliptest_points4 ):
GLOBL GLNAME( _mesa_x86_cliptest_points4 )
GLNAME( _mesa_x86_cliptest_points4 ):
#ifdef ELFPIC
#define FRAME_OFFSET 20
@ -254,8 +254,8 @@ LLBL( ctp4_finish ):
ALIGNTEXT16
GLOBL GLNAME( gl_x86_cliptest_points4_np )
GLNAME( gl_x86_cliptest_points4_np ):
GLOBL GLNAME( _mesa_x86_cliptest_points4_np )
GLNAME( _mesa_x86_cliptest_points4_np ):
#ifdef ELFPIC
#define FRAME_OFFSET 20