aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-23 08:37:42 +0100
committermarha <marha@users.sourceforge.net>2012-01-23 08:37:42 +0100
commit6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7 (patch)
treee151dcf34c7fa60fcf9bde9963638f3c20a567f6 /mesalib/src
parentdc56d736fcd8ee767f76674981abbb506a1d69d5 (diff)
parent45e3694d529b052f4122262c9bdff5476219b2b4 (diff)
downloadvcxsrv-6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7.tar.gz
vcxsrv-6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7.tar.bz2
vcxsrv-6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src')
-rw-r--r--mesalib/src/glsl/glsl_types.cpp4
-rw-r--r--mesalib/src/glsl/linker.cpp64
-rw-r--r--mesalib/src/mapi/glapi/Makefile141
-rw-r--r--mesalib/src/mapi/glapi/gen/glX_proto_send.py6
-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
19 files changed, 230 insertions, 593 deletions
diff --git a/mesalib/src/glsl/glsl_types.cpp b/mesalib/src/glsl/glsl_types.cpp
index d4385a644..1489aae6d 100644
--- a/mesalib/src/glsl/glsl_types.cpp
+++ b/mesalib/src/glsl/glsl_types.cpp
@@ -147,12 +147,12 @@ glsl_type::sampler_index() const
return TEXTURE_RECT_INDEX;
case GLSL_SAMPLER_DIM_BUF:
assert(!"FINISHME: Implement ARB_texture_buffer_object");
- break;
+ return TEXTURE_BUFFER_INDEX;
case GLSL_SAMPLER_DIM_EXTERNAL:
return TEXTURE_EXTERNAL_INDEX;
default:
assert(!"Should not get here.");
- break;
+ return TEXTURE_BUFFER_INDEX;
}
}
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp
index adedfe6f3..509575192 100644
--- a/mesalib/src/glsl/linker.cpp
+++ b/mesalib/src/glsl/linker.cpp
@@ -1388,9 +1388,10 @@ public:
static bool is_same(const tfeedback_decl &x, const tfeedback_decl &y);
bool assign_location(struct gl_context *ctx, struct gl_shader_program *prog,
ir_variable *output_var);
+ bool accumulate_num_outputs(struct gl_shader_program *prog, unsigned *count);
bool store(struct gl_context *ctx, struct gl_shader_program *prog,
struct gl_transform_feedback_info *info, unsigned buffer,
- unsigned varying) const;
+ unsigned varying, const unsigned max_outputs) const;
/**
@@ -1624,16 +1625,9 @@ tfeedback_decl::assign_location(struct gl_context *ctx,
}
-/**
- * Update gl_transform_feedback_info to reflect this tfeedback_decl.
- *
- * If an error occurs, the error is reported through linker_error() and false
- * is returned.
- */
bool
-tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
- struct gl_transform_feedback_info *info,
- unsigned buffer, unsigned varying) const
+tfeedback_decl::accumulate_num_outputs(struct gl_shader_program *prog,
+ unsigned *count)
{
if (!this->is_assigned()) {
/* From GL_EXT_transform_feedback:
@@ -1648,6 +1642,28 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
return false;
}
+ unsigned translated_size = this->size;
+ if (this->is_clip_distance_mesa)
+ translated_size = (translated_size + 3) / 4;
+
+ *count += translated_size * this->matrix_columns;
+
+ return true;
+}
+
+
+/**
+ * Update gl_transform_feedback_info to reflect this tfeedback_decl.
+ *
+ * If an error occurs, the error is reported through linker_error() and false
+ * is returned.
+ */
+bool
+tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
+ struct gl_transform_feedback_info *info,
+ unsigned buffer,
+ unsigned varying, const unsigned max_outputs) const
+{
/* From GL_EXT_transform_feedback:
* A program will fail to link if:
*
@@ -1663,19 +1679,6 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
return false;
}
- /* Verify that the checks on MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS
- * and MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS are sufficient to prevent
- * overflow of info->Outputs[]. In worst case we generate one entry in
- * Outputs[] per component so a conservative check is to verify that the
- * size of the array is greater than or equal to both
- * MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS and
- * MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS.
- */
- assert(Elements(info->Outputs) >=
- ctx->Const.MaxTransformFeedbackInterleavedComponents);
- assert(Elements(info->Outputs) >=
- ctx->Const.MaxTransformFeedbackSeparateComponents);
-
unsigned translated_size = this->size;
if (this->is_clip_distance_mesa)
translated_size = (translated_size + 3) / 4;
@@ -1683,6 +1686,7 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
for (unsigned index = 0; index < translated_size; ++index) {
for (unsigned v = 0; v < this->matrix_columns; ++v) {
unsigned num_components = this->vector_elements;
+ assert(info->NumOutputs < max_outputs);
info->Outputs[info->NumOutputs].ComponentOffset = 0;
if (this->is_clip_distance_mesa) {
if (this->is_subscripted) {
@@ -1976,6 +1980,7 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS;
ralloc_free(prog->LinkedTransformFeedback.Varyings);
+ ralloc_free(prog->LinkedTransformFeedback.Outputs);
memset(&prog->LinkedTransformFeedback, 0,
sizeof(prog->LinkedTransformFeedback));
@@ -1988,12 +1993,23 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
struct gl_transform_feedback_varying_info,
num_tfeedback_decls);
+ unsigned num_outputs = 0;
+ for (unsigned i = 0; i < num_tfeedback_decls; ++i)
+ if (!tfeedback_decls[i].accumulate_num_outputs(prog, &num_outputs))
+ return false;
+
+ prog->LinkedTransformFeedback.Outputs =
+ rzalloc_array(prog,
+ struct gl_transform_feedback_output,
+ num_outputs);
+
for (unsigned i = 0; i < num_tfeedback_decls; ++i) {
unsigned buffer = separate_attribs_mode ? i : 0;
if (!tfeedback_decls[i].store(ctx, prog, &prog->LinkedTransformFeedback,
- buffer, i))
+ buffer, i, num_outputs))
return false;
}
+ assert(prog->LinkedTransformFeedback.NumOutputs == num_outputs);
return true;
}
diff --git a/mesalib/src/mapi/glapi/Makefile b/mesalib/src/mapi/glapi/Makefile
index 9f1d42f88..37b178eee 100644
--- a/mesalib/src/mapi/glapi/Makefile
+++ b/mesalib/src/mapi/glapi/Makefile
@@ -1,77 +1,64 @@
-# src/mapi/glapi/Makefile
-
-TOP = ../../..
-include $(TOP)/configs/current
-
-TARGET = glapi
-
-MAPI = $(TOP)/src/mapi/mapi
-
-include sources.mak
-include $(MAPI)/sources.mak
-
-glapi_CPPFLAGS := \
- -I$(TOP)/include \
- -I$(TOP)/src/mapi \
- -I$(TOP)/src/mesa
-
-ifeq ($(SHARED_GLAPI),1)
-glapi_CPPFLAGS += \
- -DMAPI_MODE_BRIDGE \
- -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
-glapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_BRIDGE_SOURCES))
-
-glapi_GLAPI_OBJECTS :=
-glapi_ASM_OBJECTS :=
-glapi_MAPI_OBJECTS := $(MAPI_BRIDGE_SOURCES:.c=.o)
-else
-glapi_CPPFLAGS += -DMAPI_MODE_UTIL
-glapi_SOURCES := $(GLAPI_SOURCES) $(addprefix $(MAPI)/, $(MAPI_UTIL_SOURCES))
-
-glapi_GLAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o)
-glapi_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o)
-glapi_MAPI_OBJECTS := $(MAPI_UTIL_SOURCES:.c=.o)
-endif # SHARED_GLAPI
-
-glapi_OBJECTS := \
- $(glapi_GLAPI_OBJECTS) \
- $(glapi_ASM_OBJECTS) \
- $(glapi_MAPI_OBJECTS)
-
-default: depend lib$(TARGET).a
-
-lib$(TARGET).a: $(glapi_OBJECTS)
- @$(MKLIB) -o $(TARGET) -static $(glapi_OBJECTS)
-
-$(glapi_GLAPI_OBJECTS): %.o: %.c
- $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
-
-$(glapi_ASM_OBJECTS): %.o: %.S
- $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
-
-$(glapi_MAPI_OBJECTS): %.o: $(MAPI)/%.c
- $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
-
-install:
-
-clean:
- -rm -f $(glapi_OBJECTS)
- -rm -f lib$(TARGET).a
- -rm -f depend depend.bak
-
-ifeq ($(SHARED_GLAPI),1)
-# workaround a bug in makedepend
-makedepend_CPPFLAGS := \
- $(filter-out -DMAPI_ABI_HEADER=%, $(glapi_CPPFLAGS))
-$(glapi_OBJECTS): glapi_mapi_tmp.h
-else
-makedepend_CPPFLAGS := $(glapi_CPPFLAGS)
-endif
-
-depend: $(glapi_SOURCES)
- @ echo "running $(MKDEP)"
- @ touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
- $(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend
-
--include depend
+# src/mapi/glapi/Makefile
+
+TOP = ../../..
+include $(TOP)/configs/current
+
+TARGET = glapi
+
+MAPI = $(TOP)/src/mapi/mapi
+
+include sources.mak
+include $(MAPI)/sources.mak
+
+glapi_CPPFLAGS := \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mapi \
+ -I$(TOP)/src/mesa
+
+glapi_CPPFLAGS += \
+ -DMAPI_MODE_BRIDGE \
+ -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
+glapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_BRIDGE_SOURCES))
+
+glapi_GLAPI_OBJECTS :=
+glapi_ASM_OBJECTS :=
+glapi_MAPI_OBJECTS := $(MAPI_BRIDGE_SOURCES:.c=.o)
+
+glapi_OBJECTS := \
+ $(glapi_GLAPI_OBJECTS) \
+ $(glapi_ASM_OBJECTS) \
+ $(glapi_MAPI_OBJECTS)
+
+default: depend lib$(TARGET).a
+
+lib$(TARGET).a: $(glapi_OBJECTS)
+ @$(MKLIB) -o $(TARGET) -static $(glapi_OBJECTS)
+
+$(glapi_GLAPI_OBJECTS): %.o: %.c
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
+
+$(glapi_ASM_OBJECTS): %.o: %.S
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
+
+$(glapi_MAPI_OBJECTS): %.o: $(MAPI)/%.c
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
+
+install:
+
+clean:
+ -rm -f $(glapi_OBJECTS)
+ -rm -f lib$(TARGET).a
+ -rm -f depend depend.bak
+
+# workaround a bug in makedepend
+makedepend_CPPFLAGS := \
+ $(filter-out -DMAPI_ABI_HEADER=%, $(glapi_CPPFLAGS))
+$(glapi_OBJECTS): glapi_mapi_tmp.h
+
+depend: $(glapi_SOURCES)
+ @ echo "running $(MKDEP)"
+ @ touch depend
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
+ $(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend
+
+-include depend
diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_send.py b/mesalib/src/mapi/glapi/gen/glX_proto_send.py
index bec022218..29bf0808b 100644
--- a/mesalib/src/mapi/glapi/gen/glX_proto_send.py
+++ b/mesalib/src/mapi/glapi/gen/glX_proto_send.py
@@ -361,8 +361,6 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
procs[n] = func.static_glx_name(n)
print """
-#ifdef GLX_SHARED_GLAPI
-
static const struct proc_pair
{
const char *name;
@@ -396,8 +394,6 @@ __indirect_get_proc_address(const char *name)
return (pair) ? pair->proc : NULL;
}
-
-#endif /* GLX_SHARED_GLAPI */
"""
return
@@ -1051,9 +1047,7 @@ extern _X_HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
break
print ''
- print '#ifdef GLX_SHARED_GLAPI'
print 'extern _X_HIDDEN void (*__indirect_get_proc_address(const char *name))(void);'
- print '#endif'
def show_usage():
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 = \