From: Andre Werthmann Date: Thu, 18 Nov 1999 09:20:50 +0000 (+0000) Subject: checked in the first new PIII vertex-transformation code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6630e2be01f41fb3b0fdf815e00a82d8e980f116;p=mesa.git checked in the first new PIII vertex-transformation code --- diff --git a/Make-config b/Make-config index ee9eada0db5..c982ddf6a25 100644 --- a/Make-config +++ b/Make-config @@ -1,4 +1,4 @@ -# $Id: Make-config,v 1.11 1999/11/11 01:28:16 brianp Exp $ +# $Id: Make-config,v 1.12 1999/11/18 09:20:50 wertmann Exp $ MESA_MAJOR=3 MESA_MINOR=3 @@ -590,6 +590,46 @@ linux-3dnow-glide: X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \ FX/X86/fx_3dnow_fastpath.S" +linux-katmai: + $(MAKE) $(MFLAGS) -f Makefile.X11 targets \ + "GL_LIB = libGL.so" \ + "GLU_LIB = libGLU.so" \ + "GLUT_LIB = libglut.so" \ + "GLW_LIB = libGLw.so" \ + "CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \ + "CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -I/usr/X11R6/include" \ + "MAKELIB = ../bin/mklib.linux" \ + "XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \ + "ASM_SOURCES = X86/x86a.S X86/common_x86asm.S \ + X86/mmx_blend.S \ + X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \ + X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \ + X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \ + X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \ + X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \ + X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \ + X86/vertex_katmai.S" + +linux-katmai-glide: + $(MAKE) $(MFLAGS) -f Makefile.X11 targets \ + "GL_LIB = libGL.so" \ + "GLU_LIB = libGLU.so" \ + "GLUT_LIB = libglut.so" \ + "GLW_LIB = libGLw.so" \ + "CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \ + "CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -DUSE_XSHM -DFX -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include -I/usr/src/mesa-glx/src/FX/X86" \ + "MAKELIB = ../bin/mklib.linux" \ + "XLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -L/usr/local/glide/lib -lglide2x -lm" \ + "ASM_SOURCES = X86/x86a.S X86/common_x86asm.S \ + X86/mmx_blend.S \ + X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \ + X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \ + X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \ + X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \ + X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \ + FX/X86/fx_3dnow_fastpath.S \ + X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \ + X86/vertex_katmai.S" # Contributed by C. Alex. North-Keys (erlkonig@talisman.org) linux-386-pthread-shared-glide: diff --git a/Makefile.X11 b/Makefile.X11 index 77a1c763e99..d2ec284ea68 100644 --- a/Makefile.X11 +++ b/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.12 1999/11/04 03:57:28 gareth Exp $ +# $Id: Makefile.X11,v 1.13 1999/11/18 09:20:51 wertmann Exp $ # Mesa 3-D graphics library # Version: 3.1 @@ -82,6 +82,8 @@ default: @echo " make linux-386-opt-V2-glide for Linux with 3Dfx Voodoo2 for GLQuake" @echo " make linux-3dnow for Linux on AMD w/ 3DNow!" @echo " make linux-3dnow-glide for Linux on AMD w/ 3DNow! for Glide" + @echo " make linux-katmai for Linux on PentiumIII w/ SSE" + @echo " make linux-katmai-glide for Linux on PentiumIII w/ SSE for Glide" @echo " make linux-386-pthread for Linux w/ Intel assembly and linuxthreads" @echo " make linux-386-pthread-shared for Linux w/ Intel assembly and linuxthreads" @echo " make linux-386-pthread-shared-glide for Linux w/ Intel assembly, linuxthreads, and 3Dfx Glide driver" @@ -145,6 +147,7 @@ linux-glide linux-386-glide linux-386-opt-glide \ linux-386-opt-V2-glide \ linux-386 linux-386-elf \ linux-3dnow linux-3dnow-glide \ +linux-katmai linux-katmai-glide \ linux-alpha linux-alpha-elf \ linux-ppc linux-ppc-so \ linux-386-pthread linux-386-pthread-shared linux-386-pthread-shared-glide \ diff --git a/src/mesa/Makefile.X11 b/src/mesa/Makefile.X11 index f5e73514d36..1541f722f54 100644 --- a/src/mesa/Makefile.X11 +++ b/src/mesa/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.8 1999/11/16 15:49:12 brianp Exp $ +# $Id: Makefile.X11,v 1.9 1999/11/18 09:20:51 wertmann Exp $ # Mesa 3-D graphics library # Version: 3.3 @@ -93,7 +93,8 @@ CORE_SOURCES = \ zoom.c \ X86/x86.c \ X86/common_x86.c \ - X86/3dnow.c + X86/3dnow.c \ + X86/katmai.c DRIVER_SOURCES = \ X/glxapi.c \ @@ -206,7 +207,8 @@ X86/common_x86.o: X86/common_x86.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ X86/3dnow.o: X86/3dnow.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ - +X86/katmai.o: X86/katmai.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ ##### TARGETS ##### diff --git a/src/mesa/main/Makefile.X11 b/src/mesa/main/Makefile.X11 index f5e73514d36..1541f722f54 100644 --- a/src/mesa/main/Makefile.X11 +++ b/src/mesa/main/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.8 1999/11/16 15:49:12 brianp Exp $ +# $Id: Makefile.X11,v 1.9 1999/11/18 09:20:51 wertmann Exp $ # Mesa 3-D graphics library # Version: 3.3 @@ -93,7 +93,8 @@ CORE_SOURCES = \ zoom.c \ X86/x86.c \ X86/common_x86.c \ - X86/3dnow.c + X86/3dnow.c \ + X86/katmai.c DRIVER_SOURCES = \ X/glxapi.c \ @@ -206,7 +207,8 @@ X86/common_x86.o: X86/common_x86.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ X86/3dnow.o: X86/3dnow.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ - +X86/katmai.o: X86/katmai.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ ##### TARGETS ##### diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index 94a9c1caf1d..5342d85854e 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -29,6 +29,8 @@ * processor. * * Written by Holger Waechtler + * Changed by Andre Werthmann for using the + * new Katmai functions */ #include @@ -40,6 +42,7 @@ int gl_x86_cpu_features = 0; void gl_init_all_x86_asm (void) { + #ifdef USE_X86_ASM gl_x86_cpu_features = gl_identify_x86_cpu_features (); gl_x86_cpu_features |= GL_CPU_AnyX86; @@ -52,7 +55,7 @@ void gl_init_all_x86_asm (void) } if (gl_x86_cpu_features) { - gl_init_x86_asm_transforms (); + gl_init_x86_asm_transforms (); } #ifdef USE_MMX_ASM @@ -66,7 +69,6 @@ void gl_init_all_x86_asm (void) } #endif - #ifdef USE_3DNOW_ASM if (gl_x86_cpu_features & GL_CPU_3Dnow) { char *s = getenv( "MESA_NO_3DNOW" ); @@ -79,6 +81,19 @@ void gl_init_all_x86_asm (void) } #endif + +#ifdef USE_KATMAI_ASM + if (gl_x86_cpu_features & GL_CPU_Katmai) { + char *s = getenv( "MESA_NO_KATMAI" ); + if (s == NULL) { + fprintf (stderr, "Katmai cpu detected.\n"); + gl_init_katmai_asm_transforms (); + } else { + gl_x86_cpu_features &= (~GL_CPU_Katmai); + } + } +#endif + #endif }