aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-23 08:33:10 +0100
committermarha <marha@users.sourceforge.net>2012-01-23 08:33:10 +0100
commit45e3694d529b052f4122262c9bdff5476219b2b4 (patch)
tree173df8f3cea2330e782626e382a90668950d3e6f /mesalib/src/mesa
parenta8ef69cc0c9e5281e6b745dd4a2be75f629eb8b8 (diff)
downloadvcxsrv-45e3694d529b052f4122262c9bdff5476219b2b4.tar.gz
vcxsrv-45e3694d529b052f4122262c9bdff5476219b2b4.tar.bz2
vcxsrv-45e3694d529b052f4122262c9bdff5476219b2b4.zip
git update libX11 mesa libxcb xkeyboard-config 23 jan 2012
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/SConscript8
-rw-r--r--mesalib/src/mesa/drivers/dri/Makefile55
-rw-r--r--mesalib/src/mesa/drivers/dri/Makefile.defines27
-rw-r--r--mesalib/src/mesa/drivers/dri/Makefile.targets78
-rw-r--r--mesalib/src/mesa/drivers/dri/dri.pc.in10
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/Makefile27
-rw-r--r--mesalib/src/mesa/main/cpuinfo.c200
-rw-r--r--mesalib/src/mesa/main/cpuinfo.h4
-rw-r--r--mesalib/src/mesa/main/fbobject.c13
-rw-r--r--mesalib/src/mesa/main/mtypes.h32
-rw-r--r--mesalib/src/mesa/main/state.c1
-rw-r--r--mesalib/src/mesa/math/m_xform.c6
-rw-r--r--mesalib/src/mesa/ppc/common_ppc.c91
-rw-r--r--mesalib/src/mesa/ppc/common_ppc_features.h54
-rw-r--r--mesalib/src/mesa/sources.mak2
15 files changed, 124 insertions, 484 deletions
diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript
index 4754fbfc8..e9b1f6aaf 100644
--- a/mesalib/src/mesa/SConscript
+++ b/mesalib/src/mesa/SConscript
@@ -423,14 +423,6 @@ if env['gcc'] and env['platform'] != 'windows':
'x86-64/x86-64.c',
'x86-64/xform4.S',
]
- elif env['machine'] == 'ppc':
- env.Append(CPPDEFINES = [
- 'USE_PPC_ASM',
- 'USE_VMX_ASM',
- ])
- mesa_sources += [
- 'ppc/common_ppc.c',
- ]
elif env['machine'] == 'sparc':
mesa_sources += [
'sparc/sparc.c',
diff --git a/mesalib/src/mesa/drivers/dri/Makefile b/mesalib/src/mesa/drivers/dri/Makefile
deleted file mode 100644
index 264648c3f..000000000
--- a/mesalib/src/mesa/drivers/dri/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# src/mesa/drivers/dri/Makefile
-
-TOP = ../../../..
-
-include $(TOP)/configs/current
-
-
-
-default: $(TOP)/$(LIB_DIR) subdirs dri.pc
-
-
-$(TOP)/$(LIB_DIR):
- -mkdir $(TOP)/$(LIB_DIR)
-
-
-subdirs:
- @for dir in $(DRI_DIRS) ; do \
- if [ -d $$dir ] ; then \
- (cd $$dir && $(MAKE)) || exit 1 ; \
- fi \
- done
-
-pcedit = sed \
- -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
- -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
- -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
- -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
- -e 's,@DRI_DRIVER_DIR@,$(DRI_DRIVER_INSTALL_DIR),' \
- -e 's,@DRI_PC_REQ_PRIV@,$(DRI_PC_REQ_PRIV),'
-
-dri.pc: dri.pc.in
- $(pcedit) $< > $@
-
-
-install: dri.pc
- @for dir in $(DRI_DIRS) ; do \
- if [ -d $$dir ] ; then \
- (cd $$dir && $(MAKE) install) || exit 1 ; \
- fi \
- done
- $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
- $(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
- $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(INSTALL) -m 0644 dri.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-
-
-clean:
- -@for dir in $(DRI_DIRS) ; do \
- if [ -d $$dir ] ; then \
- (cd $$dir && $(MAKE) clean) ; \
- fi \
- done
- -rm -f common/*.o
- -rm -f *.pc
diff --git a/mesalib/src/mesa/drivers/dri/Makefile.defines b/mesalib/src/mesa/drivers/dri/Makefile.defines
deleted file mode 100644
index 6ff8df5c0..000000000
--- a/mesalib/src/mesa/drivers/dri/Makefile.defines
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*-makefile-*-
-
-# Import mesa_dri_common_*
-include ../common/Makefile.sources
-
-COMMON_GALLIUM_SOURCES = \
- $(addprefix ../common/, $(mesa_dri_common_gallium_SOURCES))
-
-COMMON_SOURCES = \
- $(addprefix ../common/, $(mesa_dri_common_SOURCES))
-
-INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
-
-OBJECTS = $(C_SOURCES:.c=.o) \
- $(CXX_SOURCES:.cpp=.o) \
- $(ASM_SOURCES:.S=.o)
-
-
-### Include directories
-SHARED_INCLUDES = \
- -I. \
- -Iserver \
- $(addprefix -I$(TOP)/, $(mesa_dri_common_INCLUDES)) \
- $(LIBDRM_CFLAGS)
-
-INCLUDES += $(API_DEFINES)
-CXXFLAGS += $(API_DEFINES)
diff --git a/mesalib/src/mesa/drivers/dri/Makefile.targets b/mesalib/src/mesa/drivers/dri/Makefile.targets
deleted file mode 100644
index 436b2a3c4..000000000
--- a/mesalib/src/mesa/drivers/dri/Makefile.targets
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*-makefile-*-
-
-##### RULES #####
-
-.c.o:
- $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DRIVER_DEFINES) $< -o $@
-
-.cpp.o:
- $(CC) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DRIVER_DEFINES) $< -o $@
-
-
-#### TARGETS #####
-
-default: subdirs lib
-
-
-.PHONY: lib
-lib: symlinks subdirs depend
- @$(MAKE) $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
-
-$(LIBNAME): $(OBJECTS) $(EXTRA_MODULES) $(MESA_MODULES) Makefile \
- $(TOP)/src/mesa/drivers/dri/Makefile.targets $(TOP)/src/mesa/drivers/dri/common/dri_test.o
- $(MKLIB) -o $@.tmp -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
- $(OBJECTS) $(EXTRA_MODULES) $(DRI_LIB_DEPS)
- $(CXX) $(CFLAGS) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS)
- @rm -f $@.test
- mv -f $@.tmp $@
-
-
-$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
- $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)
-
-
-# If the Makefile defined SUBDIRS, run make in each
-.PHONY: subdirs
-subdirs:
- @if test -n "$(SUBDIRS)" ; then \
- for dir in $(SUBDIRS) ; do \
- if [ -d $$dir ] ; then \
- (cd $$dir && $(MAKE)) || exit 1; \
- fi \
- done \
- fi
-
-
-.PHONY: symlinks
-symlinks:
-
-
-depend: $(C_SOURCES) $(CXX_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
- @ echo "running $(MKDEP)"
- @ rm -f depend
- @ touch depend
- @ $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) \
- $(C_SOURCES) $(CXX_SOURCES) \
- $(ASM_SOURCES) > /dev/null 2>/dev/null
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
-
-
-# Remove .o and backup files
-clean:
- -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
- -rm -f depend depend.bak
-
-
-install: $(LIBNAME)
- $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
-
-
--include depend
diff --git a/mesalib/src/mesa/drivers/dri/dri.pc.in b/mesalib/src/mesa/drivers/dri/dri.pc.in
index 695aa6cfd..de6e08a4a 100644
--- a/mesalib/src/mesa/drivers/dri/dri.pc.in
+++ b/mesalib/src/mesa/drivers/dri/dri.pc.in
@@ -1,8 +1,8 @@
-prefix=@INSTALL_DIR@
-exec_prefix=${prefix}
-libdir=@INSTALL_LIB_DIR@
-includedir=@INSTALL_INC_DIR@
-dridriverdir=@DRI_DRIVER_DIR@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+dridriverdir=@DRI_DRIVER_INSTALL_DIR@
Name: dri
Description: Direct Rendering Infrastructure
diff --git a/mesalib/src/mesa/drivers/dri/swrast/Makefile b/mesalib/src/mesa/drivers/dri/swrast/Makefile
deleted file mode 100644
index 509fa28b6..000000000
--- a/mesalib/src/mesa/drivers/dri/swrast/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# src/mesa/drivers/dri/swrast/Makefile
-
-TOP = ../../../../..
-include $(TOP)/configs/current
-
-LIBNAME = swrast_dri.so
-
-include ../Makefile.defines
-
-DRIVER_DEFINES = -D__NOT_HAVE_DRM_H
-
-DRIVER_SOURCES = \
- swrast.c \
- swrast_span.c
-
-C_SOURCES = \
- $(SWRAST_COMMON_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
-SWRAST_COMMON_SOURCES = \
- ../common/utils.c \
- ../common/drisw_util.c
-
-include ../Makefile.targets
-
diff --git a/mesalib/src/mesa/main/cpuinfo.c b/mesalib/src/mesa/main/cpuinfo.c
index d19aef91b..0d7971bcc 100644
--- a/mesalib/src/mesa/main/cpuinfo.c
+++ b/mesalib/src/mesa/main/cpuinfo.c
@@ -1,109 +1,91 @@
-/*
- * Mesa 3-D graphics library
- * Version: 7.5
- *
- * Copyright (C) 2009 VMware, Inc. 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
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#include "main/compiler.h"
-#include "main/cpuinfo.h"
-
-
-/**
- * This function should be called before the various "cpu_has_foo" macros
- * are used.
- */
-void
-_mesa_get_cpu_features(void)
-{
-#ifdef USE_X86_ASM
- _mesa_get_x86_features();
-#endif
-}
-
-
-/**
- * Return a string describing the CPU architexture and extensions that
- * Mesa is using (such as SSE or Altivec).
- * \return information string, free it with free()
- */
-char *
-_mesa_get_cpu_string(void)
-{
-#define MAX_STRING 50
- char *buffer;
-
- buffer = (char *) malloc(MAX_STRING);
- if (!buffer)
- return NULL;
-
- buffer[0] = 0;
-
-#ifdef USE_X86_ASM
-
- if (_mesa_x86_cpu_features) {
- strcat(buffer, "x86");
- }
-
-# ifdef USE_MMX_ASM
- if (cpu_has_mmx) {
- strcat(buffer, (cpu_has_mmxext) ? "/MMX+" : "/MMX");
- }
-# endif
-# ifdef USE_3DNOW_ASM
- if (cpu_has_3dnow) {
- strcat(buffer, (cpu_has_3dnowext) ? "/3DNow!+" : "/3DNow!");
- }
-# endif
-# ifdef USE_SSE_ASM
- if (cpu_has_xmm) {
- strcat(buffer, (cpu_has_xmm2) ? "/SSE2" : "/SSE");
- }
-# endif
-
-#elif defined(USE_SPARC_ASM)
-
- strcat(buffer, "SPARC");
-
-#elif defined(USE_PPC_ASM)
-
- if (_mesa_ppc_cpu_features) {
- strcat(buffer, (cpu_has_64) ? "PowerPC 64" : "PowerPC");
- }
-
-# ifdef USE_VMX_ASM
-
- if (cpu_has_vmx) {
- strcat(buffer, "/Altivec");
- }
-
-# endif
-
- if (! cpu_has_fpu) {
- strcat(buffer, "/No FPU");
- }
-
-#endif
-
- assert(strlen(buffer) < MAX_STRING);
-
- return buffer;
-}
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.5
+ *
+ * Copyright (C) 2009 VMware, Inc. 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
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "main/compiler.h"
+#include "main/cpuinfo.h"
+
+
+/**
+ * This function should be called before the various "cpu_has_foo" macros
+ * are used.
+ */
+void
+_mesa_get_cpu_features(void)
+{
+#ifdef USE_X86_ASM
+ _mesa_get_x86_features();
+#endif
+}
+
+
+/**
+ * Return a string describing the CPU architexture and extensions that
+ * Mesa is using (such as SSE or Altivec).
+ * \return information string, free it with free()
+ */
+char *
+_mesa_get_cpu_string(void)
+{
+#define MAX_STRING 50
+ char *buffer;
+
+ buffer = (char *) malloc(MAX_STRING);
+ if (!buffer)
+ return NULL;
+
+ buffer[0] = 0;
+
+#ifdef USE_X86_ASM
+
+ if (_mesa_x86_cpu_features) {
+ strcat(buffer, "x86");
+ }
+
+# ifdef USE_MMX_ASM
+ if (cpu_has_mmx) {
+ strcat(buffer, (cpu_has_mmxext) ? "/MMX+" : "/MMX");
+ }
+# endif
+# ifdef USE_3DNOW_ASM
+ if (cpu_has_3dnow) {
+ strcat(buffer, (cpu_has_3dnowext) ? "/3DNow!+" : "/3DNow!");
+ }
+# endif
+# ifdef USE_SSE_ASM
+ if (cpu_has_xmm) {
+ strcat(buffer, (cpu_has_xmm2) ? "/SSE2" : "/SSE");
+ }
+# endif
+
+#elif defined(USE_SPARC_ASM)
+
+ strcat(buffer, "SPARC");
+
+#endif
+
+ assert(strlen(buffer) < MAX_STRING);
+
+ return buffer;
+}
diff --git a/mesalib/src/mesa/main/cpuinfo.h b/mesalib/src/mesa/main/cpuinfo.h
index c41a90b07..bf846ef40 100644
--- a/mesalib/src/mesa/main/cpuinfo.h
+++ b/mesalib/src/mesa/main/cpuinfo.h
@@ -31,10 +31,6 @@
#include "x86/common_x86_asm.h"
#endif
-#if defined(USE_PPC_ASM)
-#include "ppc/common_ppc_features.h"
-#endif
-
extern void
_mesa_get_cpu_features(void);
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 052495907..2b3ac2e25 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -2709,9 +2709,13 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
if ((readRb == NULL) || (drawRb == NULL)) {
mask &= ~GL_STENCIL_BUFFER_BIT;
}
- else if (readRb->Format != drawRb->Format) {
+ else if (_mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) {
+ /* There is no need to check the stencil datatype here, because
+ * there is only one: GL_UNSIGNED_INT.
+ */
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glBlitFramebufferEXT(stencil buffer format mismatch)");
+ "glBlitFramebufferEXT(stencil buffer size mismatch)");
return;
}
}
@@ -2731,7 +2735,10 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
if ((readRb == NULL) || (drawRb == NULL)) {
mask &= ~GL_DEPTH_BUFFER_BIT;
}
- else if (readRb->Format != drawRb->Format) {
+ else if ((_mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_DEPTH_BITS)) ||
+ (_mesa_get_format_datatype(readRb->Format) !=
+ _mesa_get_format_datatype(drawRb->Format))) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBlitFramebufferEXT(depth buffer format mismatch)");
return;
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index f8ef01d4e..2ff608596 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -1827,6 +1827,22 @@ struct gl_transform_feedback_varying_info {
GLint Size;
};
+struct gl_transform_feedback_output {
+ unsigned OutputRegister;
+ unsigned OutputBuffer;
+ unsigned NumComponents;
+
+ /** offset (in DWORDs) of this output within the interleaved structure */
+ unsigned DstOffset;
+
+ /**
+ * Offset into the output register of the data to output. For example,
+ * if NumComponents is 2 and ComponentOffset is 1, then the data to
+ * offset is in the y and z components of the output register.
+ */
+ unsigned ComponentOffset;
+};
+
/** Post-link transform feedback info. */
struct gl_transform_feedback_info {
unsigned NumOutputs;
@@ -1836,21 +1852,7 @@ struct gl_transform_feedback_info {
*/
unsigned NumBuffers;
- struct {
- unsigned OutputRegister;
- unsigned OutputBuffer;
- unsigned NumComponents;
-
- /** offset (in DWORDs) of this output within the interleaved structure */
- unsigned DstOffset;
-
- /**
- * Offset into the output register of the data to output. For example,
- * if NumComponents is 2 and ComponentOffset is 1, then the data to
- * offset is in the y and z components of the output register.
- */
- unsigned ComponentOffset;
- } Outputs[MAX_PROGRAM_OUTPUTS];
+ struct gl_transform_feedback_output *Outputs;
/** Transform feedback varyings used for the linking of this shader program.
*
diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c
index adbb0c32b..39d7294f7 100644
--- a/mesalib/src/mesa/main/state.c
+++ b/mesalib/src/mesa/main/state.c
@@ -33,6 +33,7 @@
#include "glheader.h"
#include "mtypes.h"
+#include "arrayobj.h"
#include "context.h"
#include "debug.h"
#include "macros.h"
diff --git a/mesalib/src/mesa/math/m_xform.c b/mesalib/src/mesa/math/m_xform.c
index 369f2c6e9..61ad3c753 100644
--- a/mesalib/src/mesa/math/m_xform.c
+++ b/mesalib/src/mesa/math/m_xform.c
@@ -58,10 +58,6 @@
#include "sparc/sparc.h"
#endif
-#ifdef USE_PPC_ASM
-#include "ppc/common_ppc_features.h"
-#endif
-
clip_func _mesa_clip_tab[5];
clip_func _mesa_clip_np_tab[5];
dotprod_func _mesa_dotprod_tab[5];
@@ -120,8 +116,6 @@ _math_init_transformation( void )
_mesa_init_all_x86_transform_asm();
#elif defined( USE_SPARC_ASM )
_mesa_init_all_sparc_transform_asm();
-#elif defined( USE_PPC_ASM )
- _mesa_init_all_ppc_transform_asm();
#elif defined( USE_X86_64_ASM )
_mesa_init_all_x86_64_transform_asm();
#endif
diff --git a/mesalib/src/mesa/ppc/common_ppc.c b/mesalib/src/mesa/ppc/common_ppc.c
deleted file mode 100644
index c7cec96e5..000000000
--- a/mesalib/src/mesa/ppc/common_ppc.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2004
- * 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
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, 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 (including the next
- * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file common_ppc.c
- * Check CPU capabilities & initialize optimized funtions for this particular
- * processor.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-#ifdef USE_PPC_ASM
-#include <elf.h>
-#endif
-
-#include "common_ppc_features.h"
-
-
-unsigned long _mesa_ppc_cpu_features = 0;
-
-/**
- * Detect CPU features and install optimized transform and lighting routines.
- * Currently, CPU features are only detected. The optimized routines have
- * yet to be written.
- *
- * \bug
- * This routine is highly specific to Linux kernel 2.6. I'm still waiting
- * to hear back from the glibc folk on how to do this "right".
- */
-
-void _mesa_init_all_ppc_transform_asm( void )
-{
-#ifdef USE_PPC_ASM
- const pid_t my_pid = getpid();
- char file_name[32];
- FILE * f;
-#ifdef __powerpc64__
- Elf64_auxv_t v;
-#else
- Elf32_auxv_t v;
-#endif
-
- sprintf( file_name, "/proc/%u/auxv", (unsigned) my_pid );
- f = fopen( file_name, "rb" );
- if ( f != NULL ) {
- while( 1 ) {
- ssize_t elem = fread( & v, sizeof( v ), 1, f );
-
- if ( elem < 1 ) {
- break;
- }
-
- if ( v.a_type == AT_HWCAP ) {
- _mesa_ppc_cpu_features = v.a_un.a_val;
- break;
- }
- }
-
- fclose( f );
- }
-
-# ifndef USE_VMX_ASM
- _mesa_ppc_cpu_features &= ~PPC_FEATURE_HAS_ALTIVEC;
-# endif
-#endif
-}
diff --git a/mesalib/src/mesa/ppc/common_ppc_features.h b/mesalib/src/mesa/ppc/common_ppc_features.h
deleted file mode 100644
index 9cde422d7..000000000
--- a/mesalib/src/mesa/ppc/common_ppc_features.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2004
- * 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
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, 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 (including the next
- * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file common_ppc_features.h
- * Interface for determining which CPU features were detected.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-#ifndef COMMON_PPC_FEATURES_H
-#define COMMON_PPC_FEATURES_H
-
-#ifdef USE_PPC_ASM
-#include <asm/cputable.h>
-
-extern unsigned long _mesa_ppc_cpu_features;
-
-
-/* The PPC_FEATURE_* values come from asm/cputable.h. Should we define
- * versions of them here if that file does not exist? This will only
- * matter once these code paths are supported on non-Linux platforms.
- */
-
-#define cpu_has_64 ((_mesa_ppc_cpu_features & PPC_FEATURE_64) != 0)
-#define cpu_has_vmx ((_mesa_ppc_cpu_features & PPC_FEATURE_HAS_ALTIVEC) != 0)
-#define cpu_has_fpu ((_mesa_ppc_cpu_features & PPC_FEATURE_HAS_FPU) != 0)
-
-#endif /* USE_PPC_ASM */
-
-extern void _mesa_init_all_ppc_transform_asm( void );
-
-#endif /* COMMON_PPC_FEATURES_H */
diff --git a/mesalib/src/mesa/sources.mak b/mesalib/src/mesa/sources.mak
index 165a6c85e..b57a10e4d 100644
--- a/mesalib/src/mesa/sources.mak
+++ b/mesalib/src/mesa/sources.mak
@@ -277,7 +277,6 @@ ASM_C_SOURCES = \
x86/sse.c \
x86/rtasm/x86sse.c \
sparc/sparc.c \
- ppc/common_ppc.c \
x86-64/x86-64.c
X86_SOURCES = \
@@ -336,7 +335,6 @@ MESA_GALLIUM_SOURCES = \
$(VBO_SOURCES) \
$(STATETRACKER_SOURCES) \
$(PROGRAM_SOURCES) \
- ppc/common_ppc.c \
x86/common_x86.c
MESA_GALLIUM_CXX_SOURCES = \