aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/configure.ac109
-rw-r--r--mesalib/docs/index.html6
-rw-r--r--mesalib/docs/install.html15
-rw-r--r--mesalib/docs/relnotes.html1
-rw-r--r--mesalib/docs/relnotes/10.1.4.html100
-rw-r--r--mesalib/include/EGL/eglext.h1
-rw-r--r--mesalib/include/EGL/eglextchromium.h60
-rw-r--r--mesalib/scons/llvm.py8
-rw-r--r--mesalib/src/gallium/Automake.inc8
-rw-r--r--mesalib/src/mapi/glapi/Makefile.am4
-rw-r--r--mesalib/src/mapi/glapi/Makefile.sources4
-rwxr-xr-xmesalib/src/mapi/glapi/gen/glX_proto_send.py3
-rwxr-xr-xmesalib/src/mapi/glapi/gen/gl_gentable.py2
-rw-r--r--mesalib/src/mesa/Makefile.am2
-rw-r--r--mesalib/src/mesa/SConscript1
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c106
-rw-r--r--mesalib/src/mesa/drivers/common/meta.h10
-rw-r--r--mesalib/src/mesa/drivers/common/meta_blit.c52
-rw-r--r--mesalib/src/mesa/drivers/dri/Makefile.am2
-rw-r--r--mesalib/src/mesa/main/compiler.h6
-rw-r--r--mesalib/src/mesa/main/cpuinfo.c2
-rw-r--r--mesalib/src/mesa/main/cpuinfo.h2
-rw-r--r--mesalib/src/mesa/main/fbobject.c6
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_array.c6
-rw-r--r--mesalib/src/mesa/x86/common_x86.c25
-rw-r--r--mesalib/src/mesa/x86/common_x86_features.h4
26 files changed, 429 insertions, 116 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 4e4d76155..7397341b2 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -316,6 +316,22 @@ if test "x$enable_debug" = xyes; then
fi
dnl
+dnl Check if linker supports -Bsymbolic
+dnl
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
+AC_MSG_CHECKING([if ld supports -Bsymbolic])
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([int main() { return 0;}])],
+ [AC_MSG_RESULT([yes])
+ BSYMBOLIC="-Wl,-Bsymbolic";],
+ [AC_MSG_RESULT([no])
+ BSYMBOLIC="";])
+LDFLAGS=$save_LDFLAGS
+
+AC_SUBST([BSYMBOLIC])
+
+dnl
dnl Check if linker supports garbage collection
dnl
save_LDFLAGS=$LDFLAGS
@@ -336,7 +352,7 @@ dnl OpenBSD does not have DT_NEEDED entries for libc by design
dnl so when these flags are passed to ld via libtool the checks will fail
dnl
case "$host_os" in
-openbsd*)
+openbsd* | darwin* )
LD_NO_UNDEFINED="" ;;
*)
LD_NO_UNDEFINED="-Wl,--no-undefined" ;;
@@ -345,6 +361,28 @@ esac
AC_SUBST([LD_NO_UNDEFINED])
dnl
+dnl Check if linker supports version scripts
+dnl
+AC_MSG_CHECKING([if the linker supports version-scripts])
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+cat > conftest.map <<EOF
+VERSION_1 {
+ global:
+ main;
+
+ local:
+ *;
+};
+EOF
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([int main() { return 0;}])],
+ [have_ld_version_script=yes;AC_MSG_RESULT(yes)],
+ [have_ld_version_script=no; AC_MSG_RESULT(no)])
+LDFLAGS=$save_LDFLAGS
+AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+
+dnl
dnl compatibility symlinks
dnl
case "$host_os" in
@@ -748,8 +786,22 @@ fi
AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \
"x$enable_dri" = xyes)
-AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes)
-AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes)
+
+# Select which platform-dependent DRI code gets built
+case "$host_os" in
+darwin*)
+ dri_platform='apple' ;;
+gnu*|mingw*|cygwin*)
+ dri_platform='none' ;;
+*)
+ dri_platform='drm' ;;
+esac
+
+AM_CONDITIONAL(HAVE_DRICOMMON, test "x$enable_dri" = xyes )
+AM_CONDITIONAL(HAVE_DRISW, test "x$enable_dri" = xyes )
+AM_CONDITIONAL(HAVE_DRI2, test "x$enable_dri" = xyes && test "x$dri_platform" = xdrm )
+AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes && test "x$dri_platform" = xdrm )
+AM_CONDITIONAL(HAVE_APPLEDRI, test "x$enable_dri" = xyes && test "x$dri_platform" = xapple )
AC_ARG_ENABLE([shared-glapi],
[AS_HELP_STRING([--enable-shared-glapi],
@@ -874,23 +926,34 @@ xyesyes)
xyesno)
# DRI-based GLX
PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
- if test x"$driglx_direct" = xyes; then
- if test "x$have_libdrm" != xyes; then
- AC_MSG_ERROR([Direct rendering requires libdrm >= $LIBDRM_REQUIRED])
- fi
- PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
- GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED"
- if test x"$enable_dri3" = xyes; then
- PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED])
- PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED])
- fi
- fi
# find the DRI deps for libGL
- dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= $XCBGLX_REQUIRED xcb-dri2 >= $XCBDRI2_REQUIRED"
+ dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= $XCBGLX_REQUIRED"
+
+ if test x"$driglx_direct" = xyes; then
+ if test x"$dri_platform" = xdrm ; then
+ if test "x$have_libdrm" != xyes; then
+ AC_MSG_ERROR([Direct rendering requires libdrm >= $LIBDRM_REQUIRED])
+ fi
+
+ PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
+ GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED"
+ if test x"$enable_dri3" = xyes; then
+ PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED])
+ PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED])
+ fi
- if test x"$enable_dri3" = xyes; then
- dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED"
+ if test x"$enable_dri" = xyes; then
+ dri_modules="$dri_modules xcb-dri2 >= $XCBDRI2_REQUIRED"
+ fi
+
+ if test x"$enable_dri3" = xyes; then
+ dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED"
+ fi
+ fi
+ if test x"$dri_platform" = xapple ; then
+ DEFINES="$DEFINES -DGLX_USE_APPLEGL"
+ fi
fi
# add xf86vidmode if available
@@ -1043,6 +1106,12 @@ if test "x$enable_dri" = xyes; then
with_dri_drivers="swrast"
fi
;;
+ darwin*)
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DGLX_ALIAS_UNSUPPORTED"
+ if test "x$with_dri_drivers" = "xyes"; then
+ with_dri_drivers="swrast"
+ fi
+ ;;
esac
# default drivers
@@ -1591,7 +1660,8 @@ strip_unwanted_llvm_flags() {
-e 's/-fno-exceptions\>//g' \
-e 's/-fomit-frame-pointer\>//g' \
-e 's/-fvisibility-inlines-hidden\>//g' \
- -e 's/-fPIC\>//g'
+ -e 's/-fPIC\>//g' \
+ -e 's/-fstack-protector-strong\>//g'
}
@@ -2169,6 +2239,7 @@ AC_CONFIG_FILES([Makefile
src/gbm/main/gbm.pc
src/glsl/Makefile
src/glx/Makefile
+ src/glx/apple/Makefile
src/glx/tests/Makefile
src/gtest/Makefile
src/loader/Makefile
@@ -2238,7 +2309,9 @@ xnono)
;;
esac
+echo ""
if test "x$enable_dri" != xno; then
+ echo " DRI platform: $dri_platform"
if test -z "$DRI_DIRS"; then
echo " DRI drivers: no"
else
diff --git a/mesalib/docs/index.html b/mesalib/docs/index.html
index 0c22e8502..28a70467d 100644
--- a/mesalib/docs/index.html
+++ b/mesalib/docs/index.html
@@ -16,6 +16,12 @@
<h1>News</h1>
+<h2>May 20, 2014</h2>
+<p>
+<a href="relnotes/10.1.4.html">Mesa 10.1.4</a> is released.
+This is a bug-fix release.
+</p>
+
<h2>May 9, 2014</h2>
<p>
<a href="relnotes/10.1.3.html">Mesa 10.1.3</a> is released.
diff --git a/mesalib/docs/install.html b/mesalib/docs/install.html
index 5061eded0..f12425fcb 100644
--- a/mesalib/docs/install.html
+++ b/mesalib/docs/install.html
@@ -34,16 +34,25 @@
<h2>1.1 General</h2>
<ul>
+<li><a href="http://www.python.org/">Python</a> - Python is required.
+Version 2.6.4 or later should work.
+</li>
+<br>
+<li><a href="http://www.scons.org/">SCons</a> is required for building on
+Windows and optional for Linux (it's an alternative to autoconf/automake.)
+</li>
+<br>
<li>lex / yacc - for building the GLSL compiler.
+<br>
+<br>
On Linux systems, flex and bison are used.
Versions 2.5.35 and 2.4.1, respectively, (or later) should work.
<br>
<br>
On Windows with MinGW, install flex and bison with:
<pre>mingw-get install msys-flex msys-bison</pre>
-</li>
-<li>python - Python is needed for building the Gallium components.
-Version 2.6.4 or later should work.
+For MSVC on Windows, you can find flex/bison programs on the
+<a href="ftp://ftp.freedesktop.org/pub/mesa/windows-utils/">Mesa ftp site</a>.
</li>
</ul>
diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html
index db38fdfa4..7437e9b5b 100644
--- a/mesalib/docs/relnotes.html
+++ b/mesalib/docs/relnotes.html
@@ -21,6 +21,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<ul>
+<li><a href="relnotes/10.1.4.html">10.1.4 release notes</a>
<li><a href="relnotes/10.1.3.html">10.1.3 release notes</a>
<li><a href="relnotes/10.1.2.html">10.1.2 release notes</a>
<li><a href="relnotes/10.1.1.html">10.1.1 release notes</a>
diff --git a/mesalib/docs/relnotes/10.1.4.html b/mesalib/docs/relnotes/10.1.4.html
new file mode 100644
index 000000000..60392aef4
--- /dev/null
+++ b/mesalib/docs/relnotes/10.1.4.html
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>Mesa Release Notes</title>
+ <link rel="stylesheet" type="text/css" href="../mesa.css">
+</head>
+<body>
+
+<div class="header">
+ <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="../contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 10.1.4 Release Notes / (May 20, 2014)</h1>
+
+<p>
+Mesa 10.1.4 is a bug fix release which fixes bugs found since the 10.1.3 release.
+</p>
+
+<p>
+Mesa 10.1.4 implements the OpenGL 3.3 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 3.3. OpenGL
+3.3 is <strong>only</strong> available if requested at context creation
+because compatibility contexts are not supported.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+e934365d77f384bfaec844999440bef8 MesaLib-10.1.4.tar.gz
+6fddee101f49b7409cd29994c34ddee7 MesaLib-10.1.4.tar.bz2
+ba5f48e7d5e373922c804c2651fec6c1 MesaLib-10.1.4.zip
+</pre>
+
+
+<h2>New features</h2>
+<p>None</p>
+
+<h2>Bug fixes</h2>
+
+<p>This list is likely incomplete.</p>
+
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78225">Bug 78225</a> - Compile error due to undefined reference to `gbm_dri_backend', fix attached</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78537">Bug 78537</a> - no anisotropic filtering in a native Half-Life 2</li>
+
+</ul>
+
+<h2>Changes</h2>
+
+<p>Brian Paul (1):</p>
+<ul>
+ <li>mesa: fix double-freeing of dispatch tables inside glBegin/End.</li>
+</ul>
+
+<p>Carl Worth (3):</p>
+<ul>
+ <li>docs: Add MD5 sums for 10.1.3</li>
+ <li>cherry-ignore: Roland and Michel agreed to drop these patches.</li>
+ <li>VERSION: Update to 10.1.4</li>
+</ul>
+
+<p>Emil Velikov (1):</p>
+<ul>
+ <li>configure: error out if building GBM without dri</li>
+</ul>
+
+<p>Eric Anholt (1):</p>
+<ul>
+ <li>i965/vs: Use samplers for UBOs in the VS like we do for non-UBO pulls.</li>
+</ul>
+
+<p>Ilia Mirkin (3):</p>
+<ul>
+ <li>nv50/ir: make sure to reverse cond codes on all the OP_SET variants</li>
+ <li>nv50: fix setting of texture ms info to be per-stage</li>
+ <li>nv50/ir: fix integer mul lowering for u32 x u32 -&gt; high u32</li>
+</ul>
+
+<p>Michel Dänzer (1):</p>
+<ul>
+ <li>radeonsi: Fix anisotropic filtering state setup</li>
+</ul>
+
+<p>Tom Stellard (2):</p>
+<ul>
+ <li>configure.ac: Add LLVM_VERSION_PATCH to DEFINES</li>
+ <li>radeonsi: Enable geometry shaders with LLVM 3.4.1</li>
+</ul>
+
+</div>
+</body>
+</html>
diff --git a/mesalib/include/EGL/eglext.h b/mesalib/include/EGL/eglext.h
index 243da4a0a..88b39dbc4 100644
--- a/mesalib/include/EGL/eglext.h
+++ b/mesalib/include/EGL/eglext.h
@@ -646,6 +646,7 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
#endif /* EGL_NV_system_time */
#include <EGL/eglmesaext.h>
+#include <EGL/eglextchromium.h>
#ifdef __cplusplus
}
diff --git a/mesalib/include/EGL/eglextchromium.h b/mesalib/include/EGL/eglextchromium.h
new file mode 100644
index 000000000..0cc097658
--- /dev/null
+++ b/mesalib/include/EGL/eglextchromium.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file contains Chromium-specific EGL extensions declarations.
+
+#ifndef GPU_EGL_EGLEXTCHROMIUM_H_
+#define GPU_EGL_EGLEXTCHROMIUM_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <EGL/eglplatform.h>
+
+/* EGLSyncControlCHROMIUM requires 64-bit uint support */
+#if KHRONOS_SUPPORT_INT64
+#ifndef EGL_CHROMIUM_sync_control
+#define EGL_CHROMIUM_sync_control 1
+typedef khronos_uint64_t EGLuint64CHROMIUM;
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(
+ EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust,
+ EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCVALUESCHROMIUMPROC)
+ (EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust,
+ EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc);
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // GPU_EGL_EGLEXTCHROMIUM_H_
diff --git a/mesalib/scons/llvm.py b/mesalib/scons/llvm.py
index cdfbe4370..288a0806f 100644
--- a/mesalib/scons/llvm.py
+++ b/mesalib/scons/llvm.py
@@ -104,7 +104,7 @@ def generate(env):
'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG',
'LLVMAsmPrinter', 'LLVMMCParser', 'LLVMX86AsmPrinter',
- 'LLVMX86Utils', 'LLVMX86Info', 'LLVMJIT',
+ 'LLVMX86Utils', 'LLVMX86Info', 'LLVMMCJIT', 'LLVMJIT',
'LLVMExecutionEngine', 'LLVMCodeGen', 'LLVMScalarOpts',
'LLVMInstCombine', 'LLVMTransformUtils', 'LLVMipa',
'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
@@ -116,7 +116,7 @@ def generate(env):
'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG',
'LLVMAsmPrinter', 'LLVMMCParser', 'LLVMX86AsmPrinter',
- 'LLVMX86Utils', 'LLVMX86Info', 'LLVMJIT',
+ 'LLVMX86Utils', 'LLVMX86Info', 'LLVMMCJIT', 'LLVMJIT',
'LLVMExecutionEngine', 'LLVMCodeGen', 'LLVMScalarOpts',
'LLVMInstCombine', 'LLVMTransformUtils', 'LLVMipa',
'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
@@ -165,9 +165,7 @@ def generate(env):
if '-fno-rtti' in cxxflags:
env.Append(CXXFLAGS = ['-fno-rtti'])
- components = ['engine', 'bitwriter', 'x86asmprinter']
-
- components.append('mcjit')
+ components = ['engine', 'mcjit', 'bitwriter', 'x86asmprinter']
env.ParseConfig('llvm-config --libs ' + ' '.join(components))
env.ParseConfig('llvm-config --ldflags')
diff --git a/mesalib/src/gallium/Automake.inc b/mesalib/src/gallium/Automake.inc
index 4519c161c..70921ecd8 100644
--- a/mesalib/src/gallium/Automake.inc
+++ b/mesalib/src/gallium/Automake.inc
@@ -56,7 +56,9 @@ GALLIUM_DRI_LINKER_FLAGS = \
-shrext .so \
-module \
-avoid-version \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym \
+endif
$(GC_SECTIONS)
GALLIUM_VDPAU_LINKER_FLAGS = \
@@ -64,7 +66,9 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
-module \
-no-undefined \
-version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym \
+endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
@@ -73,7 +77,9 @@ GALLIUM_XVMC_LINKER_FLAGS = \
-module \
-no-undefined \
-version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym \
+endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
@@ -82,7 +88,9 @@ GALLIUM_OMX_LINKER_FLAGS = \
-module \
-no-undefined \
-avoid-version \
+if HAVE_LD_VERSION_SCRIPT
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym \
+endif
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
diff --git a/mesalib/src/mapi/glapi/Makefile.am b/mesalib/src/mapi/glapi/Makefile.am
index e425bacea..cadcd69d6 100644
--- a/mesalib/src/mapi/glapi/Makefile.am
+++ b/mesalib/src/mapi/glapi/Makefile.am
@@ -48,13 +48,13 @@ if HAVE_SHARED_GLAPI
AM_CPPFLAGS += \
-DMAPI_MODE_BRIDGE \
-DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
-glapi_GLAPI_sources =
+glapi_GLAPI_sources = $(GLAPI_UTIL_SOURCES)
glapi_ASM_sources =
glapi_MAPI_sources = $(MAPI_BRIDGE_FILES)
else
AM_CPPFLAGS += \
-DMAPI_MODE_UTIL
-glapi_GLAPI_sources = $(GLAPI_SOURCES)
+glapi_GLAPI_sources = $(GLAPI_SOURCES) $(GLAPI_UTIL_SOURCES)
glapi_ASM_sources = $(GLAPI_ASM_SOURCES)
glapi_MAPI_sources = $(MAPI_UTIL_FILES)
endif
diff --git a/mesalib/src/mapi/glapi/Makefile.sources b/mesalib/src/mapi/glapi/Makefile.sources
index 04fef6c9e..aae41a88d 100644
--- a/mesalib/src/mapi/glapi/Makefile.sources
+++ b/mesalib/src/mapi/glapi/Makefile.sources
@@ -1,9 +1,11 @@
# src/mapi/glapi/Makefile.sources
+GLAPI_UTIL_SOURCES = \
+ glapi_gentable.c
+
GLAPI_SOURCES = \
glapi_dispatch.c \
glapi_entrypoint.c \
- glapi_gentable.c \
glapi_getproc.c \
glapi_nop.c \
glapi.c \
diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_send.py b/mesalib/src/mapi/glapi/gen/glX_proto_send.py
index a98f63e99..1419a7cc1 100755
--- a/mesalib/src/mapi/glapi/gen/glX_proto_send.py
+++ b/mesalib/src/mapi/glapi/gen/glX_proto_send.py
@@ -947,6 +947,7 @@ class PrintGlxProtoInit_c(gl_XML.gl_print_base):
#include "glapi.h"
#include <assert.h>
+#ifndef GLX_USE_APPLEGL
/**
* No-op function used to initialize functions that have no GLX protocol
@@ -984,6 +985,8 @@ struct _glapi_table * __glXNewIndirectAPI( void )
print """
return (struct _glapi_table *) table;
}
+
+#endif
"""
return
diff --git a/mesalib/src/mapi/glapi/gen/gl_gentable.py b/mesalib/src/mapi/glapi/gen/gl_gentable.py
index 1c704452f..bbf985d77 100755
--- a/mesalib/src/mapi/glapi/gen/gl_gentable.py
+++ b/mesalib/src/mapi/glapi/gen/gl_gentable.py
@@ -113,7 +113,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) {
struct _glapi_table *
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
- struct _glapi_table *disp = calloc(_glapi_get_dispatch_table_size(), sizeof(void*));
+ struct _glapi_table *disp = calloc(1, _glapi_get_dispatch_table_size() * sizeof(_glapi_proc));
char symboln[512];
if(!disp)
diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am
index 0fdc8f315..88eeff9ee 100644
--- a/mesalib/src/mesa/Makefile.am
+++ b/mesalib/src/mesa/Makefile.am
@@ -25,7 +25,7 @@ if HAVE_X11_DRIVER
SUBDIRS += drivers/x11
endif
-if HAVE_DRI
+if HAVE_DRICOMMON
SUBDIRS += drivers/dri
endif
diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript
index cd959be65..f56578672 100644
--- a/mesalib/src/mesa/SConscript
+++ b/mesalib/src/mesa/SConscript
@@ -392,6 +392,7 @@ if (env['gcc'] or env['clang']) and \
'USE_X86_64_ASM',
])
mesa_sources += [
+ 'x86/common_x86.c',
'x86-64/x86-64.c',
'x86-64/xform4.S',
]
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 3ef3f7971..fec0d2be5 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -242,10 +242,25 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx,
GLenum target,
struct blit_shader_table *table)
{
- const char *vs_source;
- char *fs_source;
+ char *vs_source, *fs_source;
void *const mem_ctx = ralloc_context(NULL);
struct blit_shader *shader = choose_blit_shader(target, table);
+ const char *vs_input, *vs_output, *fs_input, *vs_preprocess, *fs_preprocess;
+
+ if (ctx->Const.GLSLVersion < 130) {
+ vs_preprocess = "";
+ vs_input = "attribute";
+ vs_output = "varying";
+ fs_preprocess = "#extension GL_EXT_texture_array : enable";
+ fs_input = "varying";
+ } else {
+ vs_preprocess = "#version 130";
+ vs_input = "in";
+ vs_output = "out";
+ fs_preprocess = "#version 130";
+ fs_input = "in";
+ shader->func = "texture";
+ }
assert(shader != NULL);
@@ -254,57 +269,30 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx,
return;
}
- if (ctx->Const.GLSLVersion < 130) {
- vs_source =
- "attribute vec2 position;\n"
- "attribute vec4 textureCoords;\n"
- "varying vec4 texCoords;\n"
- "void main()\n"
- "{\n"
- " texCoords = textureCoords;\n"
- " gl_Position = vec4(position, 0.0, 1.0);\n"
- "}\n";
-
- fs_source = ralloc_asprintf(mem_ctx,
- "#extension GL_EXT_texture_array : enable\n"
- "#extension GL_ARB_texture_cube_map_array: enable\n"
- "uniform %s texSampler;\n"
- "varying vec4 texCoords;\n"
- "void main()\n"
- "{\n"
- " gl_FragColor = %s(texSampler, %s);\n"
- " gl_FragDepth = gl_FragColor.x;\n"
- "}\n",
- shader->type,
- shader->func, shader->texcoords);
- }
- else {
- vs_source = ralloc_asprintf(mem_ctx,
- "#version 130\n"
- "in vec2 position;\n"
- "in vec4 textureCoords;\n"
- "out vec4 texCoords;\n"
- "void main()\n"
- "{\n"
- " texCoords = textureCoords;\n"
- " gl_Position = vec4(position, 0.0, 1.0);\n"
- "}\n");
- fs_source = ralloc_asprintf(mem_ctx,
- "#version 130\n"
- "#extension GL_ARB_texture_cube_map_array: enable\n"
- "uniform %s texSampler;\n"
- "in vec4 texCoords;\n"
- "out vec4 out_color;\n"
- "\n"
- "void main()\n"
- "{\n"
- " out_color = texture(texSampler, %s);\n"
- " gl_FragDepth = out_color.x;\n"
- "}\n",
- shader->type,
- shader->texcoords);
- }
-
+ vs_source = ralloc_asprintf(mem_ctx,
+ "%s\n"
+ "%s vec2 position;\n"
+ "%s vec4 textureCoords;\n"
+ "%s vec4 texCoords;\n"
+ "void main()\n"
+ "{\n"
+ " texCoords = textureCoords;\n"
+ " gl_Position = vec4(position, 0.0, 1.0);\n"
+ "}\n",
+ vs_preprocess, vs_input, vs_input, vs_output);
+
+ fs_source = ralloc_asprintf(mem_ctx,
+ "%s\n"
+ "#extension GL_ARB_texture_cube_map_array: enable\n"
+ "uniform %s texSampler;\n"
+ "%s vec4 texCoords;\n"
+ "void main()\n"
+ "{\n"
+ " gl_FragColor = %s(texSampler, %s);\n"
+ " gl_FragDepth = gl_FragColor.x;\n"
+ "}\n",
+ fs_preprocess, shader->type, fs_input,
+ shader->func, shader->texcoords);
_mesa_meta_compile_and_link_program(ctx, vs_source, fs_source,
ralloc_asprintf(mem_ctx, "%s blit",
@@ -2860,13 +2848,13 @@ copytexsubimage_using_blit_framebuffer(struct gl_context *ctx, GLuint dims,
* are too strict for CopyTexImage. We know meta will be fine with format
* changes.
*/
- _mesa_meta_BlitFramebuffer(ctx, x, y,
- x + width, y + height,
- xoffset, yoffset,
- xoffset + width, yoffset + height,
- mask, GL_NEAREST);
+ mask = _mesa_meta_BlitFramebuffer(ctx, x, y,
+ x + width, y + height,
+ xoffset, yoffset,
+ xoffset + width, yoffset + height,
+ mask, GL_NEAREST);
ctx->Meta->Blit.no_ctsi_fallback = false;
- success = true;
+ success = mask == 0x0;
out:
_mesa_lock_texture(ctx, texObj);
diff --git a/mesalib/src/mesa/drivers/common/meta.h b/mesalib/src/mesa/drivers/common/meta.h
index 2186a39f8..007f1040b 100644
--- a/mesalib/src/mesa/drivers/common/meta.h
+++ b/mesalib/src/mesa/drivers/common/meta.h
@@ -422,13 +422,21 @@ _mesa_meta_setup_sampler(struct gl_context *ctx,
const struct gl_texture_object *texObj,
GLenum target, GLenum filter, GLuint srcLevel);
-extern void
+extern GLbitfield
_mesa_meta_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
extern void
+_mesa_meta_and_swrast_BlitFramebuffer(struct gl_context *ctx,
+ GLint srcX0, GLint srcY0,
+ GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0,
+ GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter);
+
+extern void
_mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers);
extern void
diff --git a/mesalib/src/mesa/drivers/common/meta_blit.c b/mesalib/src/mesa/drivers/common/meta_blit.c
index e5a0a9ad0..707269dd6 100644
--- a/mesalib/src/mesa/drivers/common/meta_blit.c
+++ b/mesalib/src/mesa/drivers/common/meta_blit.c
@@ -325,10 +325,15 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx,
struct gl_renderbuffer *src_rb,
GLenum target)
{
+ unsigned texcoord_size;
+
/* target = GL_TEXTURE_RECTANGLE is not supported in GLES 3.0 */
assert(_mesa_is_desktop_gl(ctx) || target == GL_TEXTURE_2D);
- _mesa_meta_setup_vertex_objects(&blit->VAO, &blit->VBO, true, 2, 2, 0);
+ texcoord_size = 2 + (src_rb->Depth > 1 ? 1 : 0);
+
+ _mesa_meta_setup_vertex_objects(&blit->VAO, &blit->VBO, true,
+ 2, texcoord_size, 0);
if (target == GL_TEXTURE_2D_MULTISAMPLE ||
target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) {
@@ -533,12 +538,16 @@ blitframebuffer_texture(struct gl_context *ctx,
verts[0].tex[0] = s0;
verts[0].tex[1] = t0;
+ verts[0].tex[2] = readAtt->Zoffset;
verts[1].tex[0] = s1;
verts[1].tex[1] = t0;
+ verts[1].tex[2] = readAtt->Zoffset;
verts[2].tex[0] = s1;
verts[2].tex[1] = t1;
+ verts[2].tex[2] = readAtt->Zoffset;
verts[3].tex[0] = s0;
verts[3].tex[1] = t1;
+ verts[3].tex[2] = readAtt->Zoffset;
_mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
}
@@ -644,7 +653,7 @@ _mesa_meta_setup_sampler(struct gl_context *ctx,
* Meta implementation of ctx->Driver.BlitFramebuffer() in terms
* of texture mapping and polygon rendering.
*/
-void
+GLbitfield
_mesa_meta_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
@@ -669,7 +678,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
/* Multisample texture blit support requires texture multisample. */
if (ctx->ReadBuffer->Visual.samples > 0 &&
!ctx->Extensions.ARB_texture_multisample) {
- goto fallback;
+ return mask;
}
/* Clip a copy of the blit coordinates. If these differ from the input
@@ -678,7 +687,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
if (!_mesa_clip_blit(ctx, &clip.srcX0, &clip.srcY0, &clip.srcX1, &clip.srcY1,
&clip.dstX0, &clip.dstY0, &clip.dstX1, &clip.dstY1)) {
/* clipped/scissored everything away */
- return;
+ return 0;
}
/* Only scissor affects blit, but we're doing to set a custom scissor if
@@ -705,10 +714,6 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
filter, dstFlipX, dstFlipY,
use_glsl_version, false)) {
mask &= ~GL_COLOR_BUFFER_BIT;
- if (mask == 0x0) {
- _mesa_meta_end(ctx);
- return;
- }
}
}
@@ -718,10 +723,6 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
filter, dstFlipX, dstFlipY,
use_glsl_version, true)) {
mask &= ~GL_DEPTH_BUFFER_BIT;
- if (mask == 0x0) {
- _mesa_meta_end(ctx);
- return;
- }
}
}
@@ -731,11 +732,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
_mesa_meta_end(ctx);
-fallback:
- if (mask && !ctx->Meta->Blit.no_ctsi_fallback) {
- _swrast_BlitFramebuffer(ctx, srcX0, srcY0, srcX1, srcY1,
- dstX0, dstY0, dstX1, dstY1, mask, filter);
- }
+ return mask;
}
void
@@ -753,3 +750,24 @@ _mesa_meta_glsl_blit_cleanup(struct blit_state *blit)
_mesa_DeleteTextures(1, &blit->depthTex.TexObj);
blit->depthTex.TexObj = 0;
}
+
+void
+_mesa_meta_and_swrast_BlitFramebuffer(struct gl_context *ctx,
+ GLint srcX0, GLint srcY0,
+ GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0,
+ GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter)
+{
+ mask = _mesa_meta_BlitFramebuffer(ctx,
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+ if (mask == 0x0)
+ return;
+
+ _swrast_BlitFramebuffer(ctx,
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+}
diff --git a/mesalib/src/mesa/drivers/dri/Makefile.am b/mesalib/src/mesa/drivers/dri/Makefile.am
index e8076120d..70039f9ad 100644
--- a/mesalib/src/mesa/drivers/dri/Makefile.am
+++ b/mesalib/src/mesa/drivers/dri/Makefile.am
@@ -52,7 +52,7 @@ nodist_EXTRA_mesa_dri_drivers_la_SOURCES = dummy.cpp
mesa_dri_drivers_la_SOURCES =
mesa_dri_drivers_la_LDFLAGS = \
-module -avoid-version -shared -shrext .so \
- -Wl,-Bsymbolic \
+ $(BSYMBOLIC) \
$(GC_SECTIONS) \
$()
mesa_dri_drivers_la_LIBADD = \
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h
index 97075f58e..600691724 100644
--- a/mesalib/src/mesa/main/compiler.h
+++ b/mesalib/src/mesa/main/compiler.h
@@ -264,6 +264,12 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
#define unreachable()
#endif
+/*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+#define uninitialized_var(x) x = x
+
#if (__GNUC__ >= 3)
#define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
#else
diff --git a/mesalib/src/mesa/main/cpuinfo.c b/mesalib/src/mesa/main/cpuinfo.c
index 8d482a6ac..0755d6b21 100644
--- a/mesalib/src/mesa/main/cpuinfo.c
+++ b/mesalib/src/mesa/main/cpuinfo.c
@@ -34,7 +34,7 @@
void
_mesa_get_cpu_features(void)
{
-#ifdef USE_X86_ASM
+#if defined USE_X86_ASM || defined USE_X86_64_ASM
_mesa_get_x86_features();
#endif
}
diff --git a/mesalib/src/mesa/main/cpuinfo.h b/mesalib/src/mesa/main/cpuinfo.h
index 367888905..57925e82b 100644
--- a/mesalib/src/mesa/main/cpuinfo.h
+++ b/mesalib/src/mesa/main/cpuinfo.h
@@ -27,7 +27,7 @@
#define CPUINFO_H
-#if defined(USE_X86_ASM)
+#if defined USE_X86_ASM || defined USE_X86_64_ASM
#include "x86/common_x86_asm.h"
#endif
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 97538bc7b..ae3a418cd 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -500,6 +500,12 @@ _mesa_framebuffer_renderbuffer(struct gl_context *ctx,
}
else {
remove_attachment(ctx, att);
+ if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
+ /* detach stencil (depth was detached above) */
+ att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT);
+ assert(att);
+ remove_attachment(ctx, att);
+ }
}
invalidate_framebuffer(fb);
diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c
index 07ce08fef..9c161ccca 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_array.c
+++ b/mesalib/src/mesa/vbo/vbo_exec_array.c
@@ -581,9 +581,9 @@ vbo_handle_primitive_restart(struct gl_context *ctx,
{
struct vbo_context *vbo = vbo_context(ctx);
- if ((ib != NULL) &&
- ctx->Const.PrimitiveRestartInSoftware &&
- ctx->Array._PrimitiveRestart) {
+ if (ctx->Const.PrimitiveRestartInSoftware &&
+ ctx->Array._PrimitiveRestart &&
+ (ib != NULL)) {
/* Handle primitive restart in software */
vbo_sw_primitive_restart(ctx, prim, nr_prims, ib, NULL);
} else {
diff --git a/mesalib/src/mesa/x86/common_x86.c b/mesalib/src/mesa/x86/common_x86.c
index 3c1adc916..261f49170 100644
--- a/mesalib/src/mesa/x86/common_x86.c
+++ b/mesalib/src/mesa/x86/common_x86.c
@@ -47,6 +47,13 @@
#include <sys/sysctl.h>
#include <machine/cpu.h>
#endif
+#if defined(USE_X86_64_ASM)
+#include <cpuid.h>
+#if !defined(bit_SSE4_1) && defined(bit_SSE41)
+/* XXX: clang defines bit_SSE41 instead of bit_SSE4_1 */
+#define bit_SSE4_1 bit_SSE41
+#endif
+#endif
#include "main/imports.h"
#include "common_x86_asm.h"
@@ -223,7 +230,7 @@ _mesa_get_x86_features(void)
_mesa_debug(NULL, "CPUID not detected\n");
}
else {
- GLuint cpu_features;
+ GLuint cpu_features, cpu_features_ecx;
GLuint cpu_ext_features;
GLuint cpu_ext_info;
char cpu_vendor[13];
@@ -238,6 +245,7 @@ _mesa_get_x86_features(void)
/* get cpu features */
cpu_features = _mesa_x86_cpuid_edx(1);
+ cpu_features_ecx = _mesa_x86_cpuid_ecx(1);
if (cpu_features & X86_CPU_FPU)
_mesa_x86_cpu_features |= X86_FEATURE_FPU;
@@ -254,6 +262,8 @@ _mesa_get_x86_features(void)
_mesa_x86_cpu_features |= X86_FEATURE_XMM;
if (cpu_features & X86_CPU_XMM2)
_mesa_x86_cpu_features |= X86_FEATURE_XMM2;
+ if (cpu_features_ecx & X86_CPU_SSE4_1)
+ _mesa_x86_cpu_features |= X86_FEATURE_SSE4_1;
#endif
/* query extended cpu features */
@@ -330,7 +340,18 @@ _mesa_get_x86_features(void)
}
#endif
-#endif /* USE_X86_ASM */
+#elif defined(USE_X86_64_ASM)
+ unsigned int uninitialized_var(eax), uninitialized_var(ebx),
+ uninitialized_var(ecx), uninitialized_var(edx);
+
+ /* Always available on x86-64. */
+ _mesa_x86_cpu_features |= X86_FEATURE_XMM | X86_FEATURE_XMM2;
+
+ __get_cpuid(1, &eax, &ebx, &ecx, &edx);
+
+ if (ecx & bit_SSE4_1)
+ _mesa_x86_cpu_features |= X86_FEATURE_SSE4_1;
+#endif /* USE_X86_64_ASM */
(void) detection_debug;
}
diff --git a/mesalib/src/mesa/x86/common_x86_features.h b/mesalib/src/mesa/x86/common_x86_features.h
index 862548440..66f2cf651 100644
--- a/mesalib/src/mesa/x86/common_x86_features.h
+++ b/mesalib/src/mesa/x86/common_x86_features.h
@@ -43,6 +43,7 @@
#define X86_FEATURE_XMM2 (1<<6)
#define X86_FEATURE_3DNOWEXT (1<<7)
#define X86_FEATURE_3DNOW (1<<8)
+#define X86_FEATURE_SSE4_1 (1<<9)
/* standard X86 CPU features */
#define X86_CPU_FPU (1<<0)
@@ -50,6 +51,8 @@
#define X86_CPU_MMX (1<<23)
#define X86_CPU_XMM (1<<25)
#define X86_CPU_XMM2 (1<<26)
+/* ECX. */
+#define X86_CPU_SSE4_1 (1<<19)
/* extended X86 CPU features */
#define X86_CPUEXT_MMX_EXT (1<<22)
@@ -62,6 +65,7 @@
#define cpu_has_xmm2 (_mesa_x86_cpu_features & X86_FEATURE_XMM2)
#define cpu_has_3dnow (_mesa_x86_cpu_features & X86_FEATURE_3DNOW)
#define cpu_has_3dnowext (_mesa_x86_cpu_features & X86_FEATURE_3DNOWEXT)
+#define cpu_has_sse4_1 (_mesa_x86_cpu_features & X86_FEATURE_SSE4_1)
#endif