aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-04 10:58:53 +0200
committermarha <marha@users.sourceforge.net>2012-10-04 10:58:53 +0200
commitbd13c464f728719fceb8a4918b52727ec125ea6e (patch)
tree05a48375076036097a9e28356738c05a16cc5ed0
parentbab6395ded69210cbc550c0fb3765160e4405283 (diff)
parent0130346adbce7e6b2422429887fc46c76806d845 (diff)
downloadvcxsrv-bd13c464f728719fceb8a4918b52727ec125ea6e.tar.gz
vcxsrv-bd13c464f728719fceb8a4918b52727ec125ea6e.tar.bz2
vcxsrv-bd13c464f728719fceb8a4918b52727ec125ea6e.zip
Merge remote-tracking branch 'origin/released'
* origin/released: randrproto mesa pixman git update 4 oct 2012
-rw-r--r--X11/extensions/randrproto.txt111
-rw-r--r--mesalib/Android.common.mk2
-rw-r--r--mesalib/configure.ac82
-rw-r--r--mesalib/docs/contents.html1
-rw-r--r--mesalib/docs/devinfo.html24
-rw-r--r--mesalib/docs/dispatch.html2
-rw-r--r--mesalib/docs/helpwanted.html38
-rw-r--r--mesalib/docs/shading.html13
-rw-r--r--mesalib/scons/gallium.py2
-rw-r--r--mesalib/src/glsl/Android.gen.mk6
-rw-r--r--mesalib/src/glsl/Makefile.am6
-rw-r--r--mesalib/src/mapi/glapi/gen/es_EXT.xml6
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py2
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py6
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_x86_asm.py6
-rw-r--r--mesalib/src/mapi/glapi/glapi_entrypoint.c6
-rw-r--r--mesalib/src/mapi/mapi/stub.c2
-rw-r--r--mesalib/src/mapi/mapi/u_thread.h8
-rw-r--r--mesalib/src/mesa/Android.gen.mk6
-rw-r--r--mesalib/src/mesa/Makefile.am10
-rw-r--r--mesalib/src/mesa/drivers/dri/common/Makefile.am3
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/Makefile.am3
-rw-r--r--mesalib/src/mesa/main/APIspec.xml3
-rw-r--r--mesalib/src/mesa/main/extensions.c3
-rw-r--r--mesalib/src/mesa/main/glformats.c6
-rw-r--r--mesalib/src/mesa/main/mtypes.h1
-rw-r--r--mesalib/src/mesa/main/texformat.c12
-rw-r--r--mesalib/src/mesa/main/teximage.c34
-rw-r--r--mesalib/src/mesa/main/texstore.c6
-rw-r--r--mesalib/src/mesa/program/register_allocate.c7
-rw-r--r--pixman/pixman/pixman-conical-gradient.c2
-rw-r--r--pixman/pixman/pixman-glyph.c10
-rw-r--r--pixman/pixman/pixman-linear-gradient.c4
-rw-r--r--pixman/pixman/pixman-radial-gradient.c4
-rw-r--r--pixman/pixman/pixman-solid-fill.c2
-rw-r--r--pixman/pixman/pixman-trap.c10
-rw-r--r--pixman/pixman/pixman.c10
-rw-r--r--pixman/pixman/pixman.h24
38 files changed, 282 insertions, 201 deletions
diff --git a/X11/extensions/randrproto.txt b/X11/extensions/randrproto.txt
index 7ff573b28..2bf065f6d 100644
--- a/X11/extensions/randrproto.txt
+++ b/X11/extensions/randrproto.txt
@@ -212,9 +212,12 @@ are visible on the reconfigured screen).
3. Data Types
-The subpixel order is shared with the Render extension, and is documented
-there. The only datatype defined is the screen size, defined in the normal
-(0 degree) orientation.
+The subpixel order and transform data types are shared with the Render
+extension, and are documented there.
+
+The only datatype defined in the original extension is the screen size,
+defined in the normal (0 degree) orientation. Several more are added
+in later revisions.
❧❧❧❧❧❧❧❧❧❧❧
@@ -259,7 +262,7 @@ RRCONFIGSTATUS { Success
configuration is unsupported by the hardware. The goal is to make
these limitations expressed by the protocol, but when that isn't
possible it is correct to return this error value. If, as a
- implentor, you find this error code required, please submit the
+ implementor, you find this error code required, please submit the
hardware constraints that exist so that a future version of the
extension can correctly capture the configuration constraints in
your system.
@@ -296,15 +299,9 @@ CONNECTION { Connected, Disconnected, UnknownConnection }
This value provides an indication of whether an output is actually
connected to a monitor or other presentation device.
-SUBPIXELORDER { SubPixelUnknown The subpixel order uses the Render
- SubPixelHorizontalRGB extensions definitions; they are here
- SubPixelHorizontalBGR only for convenience.
- SubPixelVerticalRGB
- SubPixelVerticalBGR
- SubPixelNone }
-SCREENSIZE { widthInPixels, heightInPixels: CARD16
- widthInMillimeters, heightInMillimeters: CARD16 }
+SCREENSIZE [ widthInPixels, heightInPixels: CARD16
+ widthInMillimeters, heightInMillimeters: CARD16 ]
MODEFLAG { HSyncPositive
HSyncNegative
@@ -321,15 +318,37 @@ MODEFLAG { HSyncPositive
DoubleClock
ClockDivideBy2 }
-MODEINFO { id: MODE
+MODEINFO [ id: MODE
name: STRING
width, height: CARD16
dotClock: CARD32
hSyncStart, hSyncEnd, hTotal, hSkew: CARD16
vSyncStart, vSyncEnd, vTotal: CARD16
- modeFlags: SETofMODEFLAG }
+ modeFlags: SETofMODEFLAG ]
+
+REFRESH [ rates: LISTofCARD16 ]
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+5.1 Data Types defined by the Render extension
+
+These data types use the Render extension definitions; they are shown here
+only for convenience:
-REFRESH { rates: LISTofCARD16 }
+SUBPIXELORDER { SubPixelUnknown
+ SubPixelHorizontalRGB
+ SubPixelHorizontalBGR
+ SubPixelVerticalRGB
+ SubPixelVerticalBGR
+ SubPixelNone }
+
+FIXED 32-bit value (top 16 are integer portion, bottom 16 are fraction)
+
+TRANSFORM [
+ p11, p12, p13: FIXED
+ p21, p22, p23: FIXED
+ p31, p32, p33: FIXED
+ ]
❧❧❧❧❧❧❧❧❧❧❧
@@ -338,7 +357,7 @@ REFRESH { rates: LISTofCARD16 }
PROVIDER { XID }
PROVIDER_CAPS { SourceOutput, SinkOutput, SourceOffload, SinkOffload }
- Capabilties for this provider:
+ Capabilities for this provider:
SourceOutput: This device can source output buffers.
SinkOutput: This device can sink output buffers.
SourceOffload: This device can source offload buffers.
@@ -1307,7 +1326,7 @@ dynamic changes in the display environment.
└───
Errors: Window
- RRGetPRoviders returns the list of providers connected to the screen
+ RRGetProviders returns the list of providers connected to the screen
associated with 'window'.
'timestamp' indicates when the configuration was last set.
@@ -1329,7 +1348,7 @@ dynamic changes in the display environment.
Errors: Provider
RRGetProviderInfo return information about the specified provider.
- The capabilites of the current provider are returned, along with
+ The capabilities of the current provider are returned, along with
the list of providers currently associated with this provider and
the capability they are associated with. It also provides the list
of crtcs and outputs that this provider is responsible for.
@@ -1341,7 +1360,7 @@ dynamic changes in the display environment.
RRSetProviderOffloadSink
provider: PROVIDER
sink_provider: PROVIDER
- ▶
+ config-timestamp: TIMESTAMP
└───
Errors: Provider
@@ -1352,7 +1371,7 @@ dynamic changes in the display environment.
RRSetProviderOutputSource
provider: PROVIDER
source_provider: PROVIDER
- ▶
+ config-timestamp: TIMESTAMP
└───
Errors: Provider
@@ -1661,25 +1680,20 @@ factors, such as re-cabling a monitor, etc.
┌───
RRProviderChangeNotify:
timestamp: TIMESTAMP time screen was reconfigured
- config-timestamp: TIMESTAMP time available config data was changed
window: WINDOW window requesting notification
provider: PROVIDER provider affected by change
- role: CRTC new role for provider
└───
This event is generated whenever the role for a provider has changed
and is sent to requesting clients. 'timestamp' indicates when the
- provider configuration was changed by a client.
- 'config-timestamp' says when the last time the available
- configurations changed. 'root' is the root of the screen the change
- occurred on, 'window' is window selecting for this event. The
- precise change can be detected by examining the new state of the
- system.
+ provider configuration was changed by a client. 'window' is the
+ window selecting for this event. The precise change can be detected
+ by examining the new state of the system.
┌───
RRProviderPropertyNotify:
window: WINDOW window requesting notification
- provider: PROVIDER providre affected by change
+ provider: PROVIDER provider affected by change
atom: ATOM affected property
time: TIMESTAMP time property was changed
state: { NewValue, Deleted } new property state
@@ -2155,6 +2169,13 @@ A.1 Common Types
2 UnknownConnection
└───
+┌───
+ PROVIDER_CAPS Added in version 1.4
+ 0x00000001 SourceOutput
+ 0x00000002 SinkOutput
+ 0x00000004 SourceOffload
+ 0x00000008 SinkOffload
+└───
A.2 Protocol Requests
@@ -2443,7 +2464,7 @@ A.2.1 Protocol Requests added with version 1.2
RRCreateMode
1 CARD8 major opcode
1 16 RandR opcode
- 2 12+(n+p)/4 length
+ 2 10+(n+p)/4 length
4 WINDOW window
32 MODEINFO mode
n STRING8 mode name
@@ -2491,7 +2512,7 @@ A.2.1 Protocol Requests added with version 1.2
1 RRCONFIGSTATUS status
2 CARD16 sequence number
4 o+p reply length
- 4 TIMESTATMP timestamp
+ 4 TIMESTAMP timestamp
2 INT16 x
2 INT16 y
2 CARD16 width
@@ -2508,7 +2529,7 @@ A.2.1 Protocol Requests added with version 1.2
RRSetCrtcConfig
1 CARD8 major opcode
1 21 RandR opcode
- 2 7+2n length
+ 2 7+n length
4 CRTC crtc
4 TIMESTAMP timestamp
4 TIMESTAMP config timestamp
@@ -2517,7 +2538,7 @@ A.2.1 Protocol Requests added with version 1.2
4 MODE mode
2 ROTATION rotation/reflection
2 unused
- 8n LISTofOUTPUT outputs
+ 4n LISTofOUTPUT outputs
1 1 Reply
1 RRCONFIGSTATUS status
@@ -2550,7 +2571,7 @@ A.2.1 Protocol Requests added with version 1.2
1 1 Reply
1 unused
2 CARD16 sequence number
- 4 (6n+2)/4 reply length
+ 4 (6n+p)/4 reply length
2 n size
20 unused
2n LISTofCARD16 red
@@ -2562,7 +2583,7 @@ A.2.1 Protocol Requests added with version 1.2
RRSetCrtcGamma
1 CARD8 major opcode
1 24 RandR opcode
- 2 3+(6n+2)/4 length
+ 2 3+(6n+p)/4 length
4 CRTC crtc
2 n size
2 unused
@@ -2733,11 +2754,10 @@ A.2.3 Protocol Requests added with version 1.4
1 1 Reply
1 unused
2 CARD16 sequence number
- 4 CARD32 length
+ 4 p length
4 TIMESTAMP timestamp
2 p number of Providers
- 2 CARD16 maximum masters
- 4 CARD32 flags
+ 18 unused
4p LISTofPROVIDERS providers
└───
┌───
@@ -2752,12 +2772,13 @@ A.2.3 Protocol Requests added with version 1.4
1 RRCONFIGSTATUS status
2 CARD16 sequence number
4 1+c+o+(a*2)+(n+p)/4 reply length
- 4 TIMESTATMP timestamp
- 4 CARD32 capabilites
+ 4 TIMESTAMP timestamp
+ 4 CARD32 capabilities
2 c number of crtcs
2 o number of outputs
2 a number of associated providers
2 n length of name
+ 8 unused
4c LISTofCRTC crtcs
4o LISTofOUTPUT outputs
4a LISTofPROVIDER associated providers
@@ -2769,7 +2790,7 @@ A.2.3 Protocol Requests added with version 1.4
RRSetProviderOffloadSink
1 CARD8 major opcode
1 34 RandR opcode
- 2 2 length
+ 2 4 length
4 PROVIDER provider
4 PROVIDER offload sink provider
4 TIMESTAMP timestamp
@@ -2778,7 +2799,7 @@ A.2.3 Protocol Requests added with version 1.4
RRSetProviderOutputSource
1 CARD8 major opcode
1 35 RandR opcode
- 2 2 length
+ 2 4 length
4 PROVIDER provider
4 PROVIDER output source provider
4 TIMESTAMP timestamp
@@ -2965,7 +2986,7 @@ A.3.2 Protocol Events added with version 1.4
┌───
RRProviderChangeNotify
1 Base + 1 code
- 1 1 sub-code
+ 1 3 sub-code
2 CARD16 sequence number
4 TIMESTAMP timestamp
4 WINDOW request window
@@ -2975,7 +2996,7 @@ A.3.2 Protocol Events added with version 1.4
┌───
RRProviderPropertyNotify
1 Base + 1 code
- 1 2 sub-code
+ 1 4 sub-code
2 CARD16 sequence number
4 WINDOW window
4 PROVIDER provider
@@ -2989,7 +3010,7 @@ A.3.2 Protocol Events added with version 1.4
┌───
RRResourceChangeNotify
1 Base + 1 code
- 1 2 sub-code
+ 1 5 sub-code
2 CARD16 sequence number
4 TIMESTAMP time
4 WINDOW window
diff --git a/mesalib/Android.common.mk b/mesalib/Android.common.mk
index 1e9f040ac..18e5726fa 100644
--- a/mesalib/Android.common.mk
+++ b/mesalib/Android.common.mk
@@ -40,7 +40,7 @@ LOCAL_CFLAGS += \
-DANDROID_VERSION=0x0$(major)0$(minor)
LOCAL_CFLAGS += \
- -DPTHREADS \
+ -DHAVE_PTHREAD=1 \
-fvisibility=hidden \
-Wno-sign-compare
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 896f98a53..72c2b8c58 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -160,13 +160,13 @@ DEFINES=""
AC_SUBST([DEFINES])
case "$host_os" in
linux*|*-gnu*|gnu*)
- DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
+ DEFINES="$DEFINES -D_GNU_SOURCE"
;;
solaris*)
- DEFINES="$DEFINES -DPTHREADS -DSVR4"
+ DEFINES="$DEFINES -DSVR4"
;;
cygwin*)
- DEFINES="$DEFINES -DPTHREADS"
+ DEFINES="$DEFINES"
;;
esac
@@ -500,15 +500,12 @@ AC_SUBST([DLOPEN_LIBS])
dnl See if posix_memalign is available
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
-dnl signbit() is a macro in glibc's math.h, so AC_CHECK_FUNC fails. To handle
-dnl this, use AC_CHECK_DECLS and fallback to AC_CHECK_FUNC in case it fails.
-AC_CHECK_DECLS([signbit],[],
- AC_CHECK_FUNC([signbit],[],
- AC_MSG_ERROR([could not find signbit()])),
- [#include <math.h>])
-
dnl Check for pthreads
AX_PTHREAD
+dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS
+dnl to -pthread, which causes problems if we need -lpthread to appear in
+dnl pkgconfig files.
+test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
dnl SELinux awareness.
AC_ARG_ENABLE([selinux],
@@ -867,8 +864,8 @@ xyesyes)
GL_PC_REQ_PRIV="x11 xext"
X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
GL_LIB_DEPS="$XLIBGL_LIBS"
- GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $DLOPEN_LIBS"
- GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
+ GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm $PTHREAD_LIBS"
;;
xyesno)
# DRI-based GLX
@@ -895,9 +892,9 @@ xyesno)
X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
GL_LIB_DEPS="$DRIGL_LIBS"
- # need DRM libs, -lpthread, etc.
- GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
- GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
+ # need DRM libs, $PTHREAD_LIBS, etc.
+ GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ GL_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
;;
esac
@@ -905,10 +902,10 @@ esac
# builds.
AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes)
-GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
-GLESv1_CM_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
-GLESv2_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
-GLESv2_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
+GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+GLESv1_CM_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
+GLESv2_LIB_DEPS="$LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+GLESv2_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
AC_SUBST([X11_INCLUDES])
AC_SUBST([GL_LIB_DEPS])
@@ -951,8 +948,8 @@ AC_ARG_ENABLE([glx-tls],
[GLX_USE_TLS=no])
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
-AS_IF([test "x$GLX_USE_TLS" = xyes],
- [DEFINES="${DEFINES} -DGLX_USE_TLS -DPTHREADS"])
+AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
+ [DEFINES="${DEFINES} -DGLX_USE_TLS"])
dnl
dnl More DRI setup
@@ -1036,7 +1033,7 @@ if test "x$enable_dri" = xyes; then
esac
;;
freebsd* | dragonfly* | *netbsd*)
- DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
if test "x$DRI_DIRS" = "xyes"; then
@@ -1095,9 +1092,10 @@ if test "x$enable_dri" = xyes; then
fi
# put all the necessary libs together
- DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
- GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
+ DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
fi
+AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
AC_SUBST([DRI_DIRS])
AC_SUBST([EXPAT_INCLUDES])
AC_SUBST([DRI_LIB_DEPS])
@@ -1192,12 +1190,12 @@ esac
if test "x$enable_osmesa" = xyes; then
# only link libraries with osmesa if shared
if test "$enable_static" = no; then
- OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
+ OSMESA_LIB_DEPS="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS"
else
OSMESA_LIB_DEPS=""
fi
OSMESA_MESA_DEPS=""
- OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
+ OSMESA_PC_LIB_PRIV="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS"
fi
AC_SUBST([OSMESA_LIB_DEPS])
@@ -1243,7 +1241,7 @@ EGL_CLIENT_APIS=""
if test "x$enable_egl" = xyes; then
SRC_DIRS="$SRC_DIRS egl"
- EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
+ EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS $PTHREAD_LIBS"
AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"])
@@ -1366,11 +1364,11 @@ if test "x$enable_openvg" = xyes; then
fi
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
- VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS -lpthread"
+ VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
CORE_DIRS="$CORE_DIRS mapi/vgapi"
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
HAVE_ST_VEGA=yes
- VG_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
+ VG_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
AC_SUBST([VG_PC_LIB_PRIV])
fi
@@ -1661,6 +1659,7 @@ if test "x$enable_gallium_llvm" = xyes; then
if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
fi
+
if test "x$enable_opencl" = xyes; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
fi
@@ -1782,6 +1781,21 @@ gallium_require_drm_loader() {
fi
}
+radeon_llvm_check() {
+ LLVM_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
+ if test "$LLVM_VERSION_MAJOR" -lt "3" -o "x$LLVM_VERSION" = "x3.0"; then
+ AC_MSG_ERROR([LLVM 3.1 or newer is required for the r600/radeonsi llvm compiler.])
+ fi
+ if test "$LLVM_VERSION_MAJOR" -ge "3" -a "x$LLVM_VERSION" != "x3.1" && $LLVM_CONFIG --targets-built | grep -qv '\<AMDGPU\>' ; then
+ AC_MSG_ERROR([To use the r600/radeonsi LLVM backend with LLVM 3.2 and newer, you need to fetch the LLVM source from:
+ git://people.freedesktop.org/~tstellar/llvm master
+ and build with --enable-experimental-targets==AMDGPU])
+ fi
+ if test "x$LLVM_VERSION" = "x3.2"; then
+ LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`"
+ fi
+}
+
dnl Gallium drivers
dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
if test "x$with_gallium_drivers" != x; then
@@ -1812,9 +1826,7 @@ if test "x$with_gallium_drivers" != x; then
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
- if test "x$LLVM_VERSION" != "x3.1"; then
- AC_MSG_ERROR([LLVM 3.1 is required for the r600 llvm compiler.])
- fi
+ radeon_llvm_check
NEED_RADEON_GALLIUM=yes;
fi
if test "x$enable_r600_llvm" = xyes; then
@@ -1829,9 +1841,7 @@ if test "x$with_gallium_drivers" != x; then
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
- if test "x$LLVM_VERSION" != "x3.1"; then
- AC_MSG_ERROR([LLVM 3.1 is required to build the radeonsi driver.])
- fi
+ radeon_llvm_check
NEED_RADEON_GALLIUM=yes;
gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" ""
;;
@@ -1947,6 +1957,7 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
dnl Substitute the config
AC_CONFIG_FILES([configs/current
Makefile
+ src/Makefile
src/egl/Makefile
src/egl/drivers/Makefile
src/egl/drivers/dri2/Makefile
@@ -1972,7 +1983,6 @@ AC_CONFIG_FILES([configs/current
src/glx/Makefile
src/glx/tests/Makefile
src/gtest/Makefile
- src/Makefile
src/mapi/es1api/Makefile
src/mapi/es1api/glesv1_cm.pc
src/mapi/es2api/Makefile
diff --git a/mesalib/docs/contents.html b/mesalib/docs/contents.html
index b9a892201..57522992c 100644
--- a/mesalib/docs/contents.html
+++ b/mesalib/docs/contents.html
@@ -58,6 +58,7 @@
<b>User Topics</b>
<ul>
+<li><a href="shading.html" target="_parent">Shading Language</a>
<li><a href="egl.html" target="_parent">EGL</a>
<li><a href="opengles.html" target="_parent">OpenGL ES</a>
<li><a href="openvg.html" target="_parent">OpenVG / Vega</a>
diff --git a/mesalib/docs/devinfo.html b/mesalib/docs/devinfo.html
index 90752b750..8f4aeef5f 100644
--- a/mesalib/docs/devinfo.html
+++ b/mesalib/docs/devinfo.html
@@ -156,6 +156,30 @@ src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.
</p>
+<h2>Marking a commit as a candidate for a stable branch</h2>
+
+<p>
+If you want a commit to be applied to a stable branch,
+you should add an appropriate note to the commit message.
+</p>
+
+<p>
+Here are some examples of such a note:
+</p>
+<ul>
+ <li>NOTE: This is a candidate for the 9.0 branch.</li>
+ <li>NOTE: This is a candidate for the 8.0 and 9.0 branches.</li>
+ <li>NOTE: This is a candidate for the stable branches.</li>
+</ul>
+
+
+<h2>Cherry-picking candidates for a stable branch</h2>
+
+<p>
+Please use <code>git cherry-pick -x &lt;commit&gt;</code> for cherry-picking a commit
+from master to a stable branch.
+</p>
+
<h2>Making a New Mesa Release</h2>
<p>
diff --git a/mesalib/docs/dispatch.html b/mesalib/docs/dispatch.html
index 299d68a96..4b529bc04 100644
--- a/mesalib/docs/dispatch.html
+++ b/mesalib/docs/dispatch.html
@@ -205,7 +205,7 @@ few preprocessor defines.</p>
<ul>
<li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li>
-<li>If <tt>PTHREADS</tt> is defined, method #3 is used.</li>
+<li>If <tt>HAVE_PTHREAD</tt> is defined, method #3 is used.</li>
<li>If <tt>WIN32_THREADS</tt> is defined, method #2 is used.</li>
<li>If none of the preceeding are defined, method #1 is used.</li>
</ul>
diff --git a/mesalib/docs/helpwanted.html b/mesalib/docs/helpwanted.html
index 12a2bb5fc..859e65c88 100644
--- a/mesalib/docs/helpwanted.html
+++ b/mesalib/docs/helpwanted.html
@@ -51,21 +51,31 @@ the mailing list.
<p>
You can find some further To-do lists here:
</p>
+
+<p>
+<b>Common To-Do lists:</b>
+</p>
+<ul>
+ <li><a href="http://cgit.freedesktop.org/mesa/mesa/tree/docs/GL3.txt">
+ <b>GL3.txt</b></a> - Status of OpenGL 3.x / 4.x features in Mesa.</li>
+ <li><a href="http://dri.freedesktop.org/wiki/MissingFunctionality">
+ <b>MissingFunctionality</b></a> - Detailed information about missing OpenGL features.</li>
+</ul>
+
+<p>
+<b>Driver specific To-Do lists:</b>
+</p>
<ul>
- <li><a href="http://cgit.freedesktop.org/mesa/mesa/tree/docs/GL3.txt"
- ><b>GL3.txt</b></a></li>
- <li><a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/docs/llvm-todo.txt"
- ><b>LLVMpipe - todo</b></a></li>
- <li><a href="http://dri.freedesktop.org/wiki/MissingFunctionality"
- ><b>MissingFunctionality</b></a></li>
- <li><a href="http://dri.freedesktop.org/wiki/RadeonsiToDo"
- ><b>RadeonsiToDo</b></a></li>
- <li><a href="http://dri.freedesktop.org/wiki/R600ToDo"
- ><b>R600ToDo</b></a></li>
- <li><a href="http://dri.freedesktop.org/wiki/R300ToDo"
- ><b>R300ToDo</b></a></li>
- <li><a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/i915/TODO"
- ><b>i915g TODO</b></a></li>
+ <li><a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/docs/llvm-todo.txt">
+ <b>LLVMpipe</b></a> - Software driver using LLVM for runtime code generation.</li>
+ <li><a href="http://dri.freedesktop.org/wiki/RadeonsiToDo">
+ <b>radeonsi</b></a> - Driver for AMD Southern Island.</li>
+ <li><a href="http://dri.freedesktop.org/wiki/R600ToDo">
+ <b>r600g</b></a> - Driver for ATI/AMD R600 - Northern Island.</li>
+ <li><a href="http://dri.freedesktop.org/wiki/R300ToDo">
+ <b>r300g</b></a> - Driver for ATI R300 - R500.</li>
+ <li><a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/i915/TODO">
+ <b>i915g</b></a> - Driver for Intel i915/i945.</li>
</ul>
<p>
diff --git a/mesalib/docs/shading.html b/mesalib/docs/shading.html
index a12487bb8..19e20b183 100644
--- a/mesalib/docs/shading.html
+++ b/mesalib/docs/shading.html
@@ -27,7 +27,7 @@ Contents
</p>
<ul>
<li><a href="#envvars">Environment variables</a>
-<li><a href="#glsl120">GLSL 1.20 support</a>
+<li><a href="#support">GLSL 1.40 support</a>
<li><a href="#unsup">Unsupported Features</a>
<li><a href="#notes">Implementation Notes</a>
<li><a href="#hints">Programming Hints</a>
@@ -64,10 +64,10 @@ Example: export MESA_GLSL=dump,nopt
</p>
-<h2 id="glsl120">GLSL Version</h2>
+<h2 id="support">GLSL Version</h2>
<p>
-The GLSL compiler currently supports version 1.20 of the shading language.
+The GLSL compiler currently supports version 1.40 of the shading language.
</p>
<p>
@@ -75,9 +75,8 @@ Several GLSL extensions are also supported:
</p>
<ul>
<li>GL_ARB_draw_buffers
-<li>GL_ARB_texture_rectangle
<li>GL_ARB_fragment_coord_conventions
-<li>GL_EXT_texture_array
+<li>GL_ARB_shader_bit_encoding
</ul>
@@ -94,7 +93,6 @@ in Mesa:
<li>Linking of multiple shaders does not always work. Currently, linking
is implemented through shader concatenation and re-compiling. This
doesn't always work because of some #pragma and preprocessor issues.
-<li>gl_ClipVertex
<li>The gl_Color and gl_SecondaryColor varying vars are interpolated
without perspective correction
</ul>
@@ -251,8 +249,7 @@ regressions.
<p>
The <a href="http://piglit.freedesktop.org/">Piglit</a> project
-has many GLSL tests and the
-<a href="http://glean.sf.net">Glean</a> glsl1 test tests GLSL features.
+has many GLSL tests.
</p>
<p>
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index 1dd4e8187..c3f33a05a 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -251,7 +251,7 @@ def generate(env):
'_SVID_SOURCE',
'_BSD_SOURCE',
'_GNU_SOURCE',
- 'PTHREADS',
+ 'HAVE_PTHREAD',
'HAVE_POSIX_MEMALIGN',
]
if env['platform'] == 'darwin':
diff --git a/mesalib/src/glsl/Android.gen.mk b/mesalib/src/glsl/Android.gen.mk
index e4ccb7291..2ed9fa64b 100644
--- a/mesalib/src/glsl/Android.gen.mk
+++ b/mesalib/src/glsl/Android.gen.mk
@@ -52,10 +52,10 @@ define local-l-or-ll-to-c-or-cpp
$(hide) $(LEX) --nounistd -o$@ $<
endef
-define local-y-to-c-and-h
+define glsl_local-y-to-c-and-h
@mkdir -p $(dir $@)
@echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
- $(hide) $(YACC) -o $@ $<
+ $(hide) $(YACC) -o $@ -p "glcpp_parser_" $<
endef
define local-yy-to-cpp-and-h
@@ -80,7 +80,7 @@ $(intermediates)/glcpp/glcpp-lex.c: $(LOCAL_PATH)/glcpp/glcpp-lex.l
$(call local-l-or-ll-to-c-or-cpp)
$(intermediates)/glcpp/glcpp-parse.c: $(LOCAL_PATH)/glcpp/glcpp-parse.y
- $(call local-y-to-c-and-h)
+ $(call glsl_local-y-to-c-and-h)
BUILTIN_COMPILER := $(BUILD_OUT_EXECUTABLES)/mesa_builtin_compiler$(BUILD_EXECUTABLE_SUFFIX)
diff --git a/mesalib/src/glsl/Makefile.am b/mesalib/src/glsl/Makefile.am
index 20639c93d..1ecc0036c 100644
--- a/mesalib/src/glsl/Makefile.am
+++ b/mesalib/src/glsl/Makefile.am
@@ -23,7 +23,7 @@
# builtin_compiler is built before libglsl to generate builtin_function.cpp for libglsl.
# For this to work, a dummy version of builtin_function.cpp, builtin_stubs.cpp, is used.
-AM_CFLAGS = \
+AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa/ \
@@ -31,8 +31,8 @@ AM_CFLAGS = \
$(DEFINES) \
$(LIBRARY_DEFINES) \
$(API_DEFINES)
-
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CFLAGS = $(VISIBILITY_CFLAGS)
+AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
diff --git a/mesalib/src/mapi/glapi/gen/es_EXT.xml b/mesalib/src/mapi/glapi/gen/es_EXT.xml
index c38e65a24..9e735834d 100644
--- a/mesalib/src/mapi/glapi/gen/es_EXT.xml
+++ b/mesalib/src/mapi/glapi/gen/es_EXT.xml
@@ -731,4 +731,10 @@
<enum name="RG8_EXT" value="0x822B"/>
</category>
+<!-- 111. GL_ANGLE_texture_compression_dxt -->
+<category name="ANGLE_texture_compression_dxt" number="111">
+ <enum name="COMPRESSED_RGBA_S3TC_DXT3_ANGLE" value="0x83F2"/>
+ <enum name="COMPRESSED_RGBA_S3TC_DXT5_ANGLE" value="0x83F3"/>
+</category>
+
</OpenGLAPI>
diff --git a/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py b/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py
index 400e684da..553959687 100644
--- a/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py
+++ b/mesalib/src/mapi/glapi/gen/gl_SPARC_asm.py
@@ -120,7 +120,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\t sethi\tGL_OFF(off), %g3;\t\t\t\\'
print '\t.size\tfn,.-fn;'
print ''
- print '#elif defined(PTHREADS)'
+ print '#elif defined(HAVE_PTHREAD)'
print ''
print '\t/* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */'
print '\t/* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */'
diff --git a/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py b/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py
index 3ef5e08a9..9a085eaec 100644
--- a/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py
+++ b/mesalib/src/mapi/glapi/gen/gl_x86-64_asm.py
@@ -138,7 +138,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))'
print '# endif'
print ''
- print '#if defined(PTHREADS) || defined(_WIN32)'
+ print '#if defined(HAVE_PTHREAD) || defined(_WIN32)'
print '# define THREADS'
print '#endif'
print ''
@@ -158,7 +158,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\tret'
print '\t.size\t_x86_64_get_dispatch, .-_x86_64_get_dispatch'
print ''
- print '#elif defined(PTHREADS)'
+ print '#elif defined(HAVE_PTHREAD)'
print ''
print '\t.extern\t_glapi_Dispatch'
print '\t.extern\t_gl_DispatchTSD'
@@ -251,7 +251,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\tcall\t_x86_64_get_dispatch@PLT'
print '\tmovq\t%u(%%rax), %%r11' % (f.offset * 8)
print '\tjmp\t*%r11'
- print '#elif defined(PTHREADS)'
+ print '#elif defined(HAVE_PTHREAD)'
save_all_regs(registers)
print '\tcall\t_x86_64_get_dispatch@PLT'
diff --git a/mesalib/src/mapi/glapi/gen/gl_x86_asm.py b/mesalib/src/mapi/glapi/gen/gl_x86_asm.py
index 095edcdc0..5eaa340f7 100644
--- a/mesalib/src/mapi/glapi/gen/gl_x86_asm.py
+++ b/mesalib/src/mapi/glapi/gen/gl_x86_asm.py
@@ -78,7 +78,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '#define GLOBL_FN(x) GLOBL x'
print '#endif'
print ''
- print '#if defined(PTHREADS) || defined(_WIN32)'
+ print '#if defined(HAVE_PTHREAD) || defined(_WIN32)'
print '# define THREADS'
print '#endif'
print ''
@@ -98,7 +98,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\tCTX_INSNS ; \\'
print '\tJMP(GL_OFFSET(off))'
print ''
- print '#elif defined(PTHREADS)'
+ print '#elif defined(HAVE_PTHREAD)'
print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\'
print 'ALIGNTEXT16;\t\t\t\t\t\t\\'
print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\'
@@ -152,7 +152,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\tmovl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax'
print '\tret'
print ''
- print '#elif defined(PTHREADS)'
+ print '#elif defined(HAVE_PTHREAD)'
print 'EXTERN GLNAME(_glapi_Dispatch)'
print 'EXTERN GLNAME(_gl_DispatchTSD)'
print 'EXTERN GLNAME(pthread_getspecific)'
diff --git a/mesalib/src/mapi/glapi/glapi_entrypoint.c b/mesalib/src/mapi/glapi/glapi_entrypoint.c
index 993ccb94c..7a0eb3537 100644
--- a/mesalib/src/mapi/glapi/glapi_entrypoint.c
+++ b/mesalib/src/mapi/glapi/glapi_entrypoint.c
@@ -136,7 +136,7 @@ extern void __glapi_sparc_icache_flush(unsigned int *);
static void
init_glapi_relocs( void )
{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
+#if defined(HAVE_PTHREAD) || defined(GLX_USE_TLS)
static const unsigned int template[] = {
#ifdef GLX_USE_TLS
0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
@@ -266,7 +266,7 @@ init_glapi_relocs( void )
_glapi_proc
generate_entrypoint(GLuint functionOffset)
{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
+#if defined(HAVE_PTHREAD) || defined(GLX_USE_TLS)
static const unsigned int template[] = {
0x07000000, /* sethi %hi(0), %g3 */
0x8210000f, /* mov %o7, %g1 */
@@ -337,7 +337,7 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
void
init_glapi_relocs_once( void )
{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
+#if defined(HAVE_PTHREAD) || defined(GLX_USE_TLS)
static pthread_once_t once_control = PTHREAD_ONCE_INIT;
pthread_once( & once_control, init_glapi_relocs );
#endif
diff --git a/mesalib/src/mapi/mapi/stub.c b/mesalib/src/mapi/mapi/stub.c
index 99b475a3b..6fb8556d1 100644
--- a/mesalib/src/mapi/mapi/stub.c
+++ b/mesalib/src/mapi/mapi/stub.c
@@ -55,7 +55,7 @@ static int next_dynamic_slot = MAPI_TABLE_NUM_STATIC;
void
stub_init_once(void)
{
-#ifdef PTHREADS
+#ifdef HAVE_PTHREAD
static pthread_once_t once = PTHREAD_ONCE_INIT;
pthread_once(&once, entry_patch_public);
#else
diff --git a/mesalib/src/mapi/mapi/u_thread.h b/mesalib/src/mapi/mapi/u_thread.h
index e53f872c9..a5e504370 100644
--- a/mesalib/src/mapi/mapi/u_thread.h
+++ b/mesalib/src/mapi/mapi/u_thread.h
@@ -46,14 +46,14 @@
#include <stdlib.h>
#include "u_compiler.h"
-#if defined(PTHREADS)
+#if defined(HAVE_PTHREAD)
#include <pthread.h> /* POSIX threads headers */
#endif
#ifdef _WIN32
#include <windows.h>
#endif
-#if defined(PTHREADS) || defined(_WIN32)
+#if defined(HAVE_PTHREAD) || defined(_WIN32)
#ifndef THREADS
#define THREADS
#endif
@@ -88,7 +88,7 @@ extern "C" {
* compiler flag. On Solaris with gcc, use -D_REENTRANT to enable
* proper compiling for MT-safe libc etc.
*/
-#if defined(PTHREADS)
+#if defined(HAVE_PTHREAD)
struct u_tsd {
pthread_key_t key;
@@ -145,7 +145,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
}
}
-#endif /* PTHREADS */
+#endif /* HAVE_PTHREAD */
/*
diff --git a/mesalib/src/mesa/Android.gen.mk b/mesalib/src/mesa/Android.gen.mk
index f5e63234a..c17df1a1e 100644
--- a/mesalib/src/mesa/Android.gen.mk
+++ b/mesalib/src/mesa/Android.gen.mk
@@ -75,10 +75,10 @@ define local-l-to-c
$(hide) $(LEX) -o$@ $<
endef
-define local-y-to-c-and-h
+define mesa_local-y-to-c-and-h
@mkdir -p $(dir $@)
@echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
- $(hide) $(YACC) -o $@ $<
+ $(hide) $(YACC) -o $@ -p "_mesa_program_" $<
endef
define es-gen
@@ -104,7 +104,7 @@ $(intermediates)/main/api_exec_%_remap_helper.h: $(es_hdr_deps)
$(call es-gen, -c $*)
$(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program/program_parse.y
- $(local-y-to-c-and-h)
+ $(mesa_local-y-to-c-and-h)
$(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program/program_lexer.l
$(local-l-to-c)
diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am
index 8e4530da3..feec1070d 100644
--- a/mesalib/src/mesa/Makefile.am
+++ b/mesalib/src/mesa/Makefile.am
@@ -19,7 +19,11 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = x86 x86-64 . libdricore drivers
+if NEED_LIBDRICORE
+DRICORE_SUBDIR = libdricore
+endif
+
+SUBDIRS = x86 x86-64 . $(DRICORE_SUBDIR) drivers
gldir = $(includedir)/GL
gl_HEADERS = $(top_srcdir)/include/GL/*.h
@@ -94,8 +98,8 @@ BUILDDIR = $(top_builddir)/src/mesa/
include sources.mak
AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
-AM_CFLAGS = $(LLVM_CFLAGS)
-AM_CXXFLAGS = $(LLVM_CFLAGS)
+AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
+AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
# cannot just add $(MESA_ASM_FILES) to libmesa_la_SOURCES as it contains a configure substitution
MESA_ASM_FILES_FOR_ARCH =
diff --git a/mesalib/src/mesa/drivers/dri/common/Makefile.am b/mesalib/src/mesa/drivers/dri/common/Makefile.am
index 6e9d738fa..a662919b5 100644
--- a/mesalib/src/mesa/drivers/dri/common/Makefile.am
+++ b/mesalib/src/mesa/drivers/dri/common/Makefile.am
@@ -26,7 +26,8 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
$(DEFINES) \
$(API_DEFINES) \
- $(LIBDRM_CFLAGS)
+ $(LIBDRM_CFLAGS) \
+ $(VISIBILITY_CFLAGS)
noinst_LTLIBRARIES = \
libdricommon.la \
diff --git a/mesalib/src/mesa/drivers/dri/swrast/Makefile.am b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am
index 16a34413b..244aa8b27 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/Makefile.am
+++ b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am
@@ -34,7 +34,8 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
$(DEFINES) \
- $(API_DEFINES)
+ $(API_DEFINES) \
+ $(VISIBILITY_CFLAGS)
dridir = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/mesalib/src/mesa/main/APIspec.xml b/mesalib/src/mesa/main/APIspec.xml
index a65c5c529..c3969526f 100644
--- a/mesalib/src/mesa/main/APIspec.xml
+++ b/mesalib/src/mesa/main/APIspec.xml
@@ -2172,6 +2172,9 @@
<category name="NV_draw_buffers"/>
<category name="NV_read_buffer"/>
+ <!-- GL_ANGLE_texture_compression_dxt -->
+ <category name="ANGLE_texture_compression_dxt"/>
+
<function name="DrawBuffersNV" template="DrawBuffers"/>
<function name="ReadBufferNV" template="ReadBuffer"/>
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index bd7c7baf9..4971ebc93 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -195,6 +195,8 @@ static const struct extension extension_table[] = {
{ "GL_EXT_texture3D", o(EXT_texture3D), GLL, 1996 },
{ "GL_EXT_texture_array", o(EXT_texture_array), GL, 2006 },
{ "GL_EXT_texture_compression_dxt1", o(EXT_texture_compression_s3tc), GL | ES1 | ES2, 2004 },
+ { "GL_ANGLE_texture_compression_dxt3", o(ANGLE_texture_compression_dxt), ES2, 2011 },
+ { "GL_ANGLE_texture_compression_dxt5", o(ANGLE_texture_compression_dxt), ES2, 2011 },
{ "GL_EXT_texture_compression_latc", o(EXT_texture_compression_latc), GL, 2006 },
{ "GL_EXT_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 },
{ "GL_EXT_texture_compression_s3tc", o(EXT_texture_compression_s3tc), GL, 2000 },
@@ -480,6 +482,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
if (ctx->Mesa_DXTn) {
+ ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE;
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
_mesa_enable_extension(ctx, "GL_S3_s3tc");
}
diff --git a/mesalib/src/mesa/main/glformats.c b/mesalib/src/mesa/main/glformats.c
index 04029c07c..ccdf56b4f 100644
--- a/mesalib/src/mesa/main/glformats.c
+++ b/mesalib/src/mesa/main/glformats.c
@@ -791,8 +791,10 @@ _mesa_is_compressed_format(struct gl_context *ctx, GLenum format)
return ctx->Extensions.EXT_texture_compression_s3tc;
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- return _mesa_is_desktop_gl(ctx)
- && ctx->Extensions.EXT_texture_compression_s3tc;
+ return (_mesa_is_desktop_gl(ctx) &&
+ ctx->Extensions.EXT_texture_compression_s3tc) ||
+ (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt);
case GL_RGB_S3TC:
case GL_RGB4_S3TC:
case GL_RGBA_S3TC:
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index ba43e574d..e790e18c4 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -2946,6 +2946,7 @@ struct gl_extensions
GLboolean dummy; /* don't remove this! */
GLboolean dummy_true; /* Set true by _mesa_init_extensions(). */
GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */
+ GLboolean ANGLE_texture_compression_dxt;
GLboolean ARB_ES2_compatibility;
GLboolean ARB_base_instance;
GLboolean ARB_blend_func_extended;
diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c
index 17270ba92..f0bc7fdb9 100644
--- a/mesalib/src/mesa/main/texformat.c
+++ b/mesalib/src/mesa/main/texformat.c
@@ -302,7 +302,9 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
}
}
- if (ctx->Extensions.EXT_texture_compression_s3tc) {
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt)) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
@@ -604,12 +606,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- if (ctx->Extensions.EXT_texture_compression_s3tc)
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt))
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- if (ctx->Extensions.EXT_texture_compression_s3tc)
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt))
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT5);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index afda0eaaf..019516f00 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -203,6 +203,18 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
+ /* GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE && GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE */
+ if (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
if (ctx->Extensions.S3_s3tc) {
switch (internalFormat) {
case GL_RGB_S3TC:
@@ -2043,28 +2055,6 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,
goto error;
}
- /* check image size against compression block size */
- /* XXX possibly move this into the _mesa_legal_texture_dimensions() func */
- {
- gl_format texFormat =
- ctx->Driver.ChooseTextureFormat(ctx, target, proxy_format,
- choose_format, choose_type);
- GLuint bw, bh;
-
- _mesa_get_format_block_size(texFormat, &bw, &bh);
- if ((width > bw && width % bw > 0) ||
- (height > bh && height % bh > 0)) {
- /*
- * Per GL_ARB_texture_compression: GL_INVALID_OPERATION is
- * generated [...] if any parameter combinations are not
- * supported by the specific compressed internal format.
- */
- reason = "invalid width or height for compression format";
- error = GL_INVALID_OPERATION;
- goto error;
- }
- }
-
/* check image size in bytes */
if (expectedSize != imageSize) {
/* Per GL_ARB_texture_compression: GL_INVALID_VALUE is generated [...]
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c
index e2598a1dc..e6914553c 100644
--- a/mesalib/src/mesa/main/texstore.c
+++ b/mesalib/src/mesa/main/texstore.c
@@ -4476,12 +4476,6 @@ _mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims,
_mesa_get_format_block_size(texFormat, &bw, &bh);
- /* these should have been caught sooner */
- ASSERT((width % bw) == 0 || width < bw);
- ASSERT((height % bh) == 0 || height < bh);
- ASSERT((xoffset % bw) == 0);
- ASSERT((yoffset % bh) == 0);
-
/* get pointer to src pixels (may be in a pbo which we'll map here) */
data = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, data,
&ctx->Unpack,
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c
index 97d4e331c..88793dbdc 100644
--- a/mesalib/src/mesa/program/register_allocate.c
+++ b/mesalib/src/mesa/program/register_allocate.c
@@ -555,6 +555,13 @@ ra_get_best_spill_node(struct ra_graph *g)
if (cost <= 0.0)
continue;
+ /* Only consider registers for spilling if they are still in the
+ * interference graph (those on the stack have already been proven to be
+ * allocatable without spilling).
+ */
+ if (g->nodes[n].in_stack)
+ continue;
+
benefit = ra_get_spill_benefit(g, n);
if (benefit / cost > best_benefit) {
diff --git a/pixman/pixman/pixman-conical-gradient.c b/pixman/pixman/pixman-conical-gradient.c
index 8b52176e4..05d3595b6 100644
--- a/pixman/pixman/pixman-conical-gradient.c
+++ b/pixman/pixman/pixman-conical-gradient.c
@@ -180,7 +180,7 @@ _pixman_conical_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter)
}
PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_conical_gradient (pixman_point_fixed_t * center,
+pixman_image_create_conical_gradient (const pixman_point_fixed_t * center,
pixman_fixed_t angle,
const pixman_gradient_stop_t *stops,
int n_stops)
diff --git a/pixman/pixman/pixman-glyph.c b/pixman/pixman/pixman-glyph.c
index 30a409908..15b3f1fea 100644
--- a/pixman/pixman/pixman-glyph.c
+++ b/pixman/pixman/pixman-glyph.c
@@ -354,7 +354,7 @@ pixman_glyph_get_extents (pixman_glyph_cache_t *cache,
PIXMAN_EXPORT pixman_format_code_t
pixman_glyph_get_mask_format (pixman_glyph_cache_t *cache,
int n_glyphs,
- pixman_glyph_t * glyphs)
+ const pixman_glyph_t *glyphs)
{
pixman_format_code_t format = PIXMAN_a1;
int i;
@@ -401,7 +401,7 @@ pixman_composite_glyphs_no_mask (pixman_op_t op,
int32_t dest_y,
pixman_glyph_cache_t *cache,
int n_glyphs,
- pixman_glyph_t *glyphs)
+ const pixman_glyph_t *glyphs)
{
pixman_region32_t region;
pixman_format_code_t glyph_format = PIXMAN_null;
@@ -502,7 +502,7 @@ static void
add_glyphs (pixman_glyph_cache_t *cache,
pixman_image_t *dest,
int off_x, int off_y,
- int n_glyphs, pixman_glyph_t *glyphs)
+ int n_glyphs, const pixman_glyph_t *glyphs)
{
pixman_format_code_t glyph_format = PIXMAN_null;
uint32_t glyph_flags = 0;
@@ -560,7 +560,7 @@ add_glyphs (pixman_glyph_cache_t *cache,
{
if (!white_img)
{
- pixman_color_t white = { 0xffff, 0xffff, 0xffff, 0xffff };
+ static const pixman_color_t white = { 0xffff, 0xffff, 0xffff, 0xffff };
if (!(white_img = pixman_image_create_solid_fill (&white)))
goto out;
@@ -651,7 +651,7 @@ pixman_composite_glyphs (pixman_op_t op,
int32_t height,
pixman_glyph_cache_t *cache,
int n_glyphs,
- pixman_glyph_t *glyphs)
+ const pixman_glyph_t *glyphs)
{
pixman_image_t *mask;
diff --git a/pixman/pixman/pixman-linear-gradient.c b/pixman/pixman/pixman-linear-gradient.c
index 32b8ba786..e51136827 100644
--- a/pixman/pixman/pixman-linear-gradient.c
+++ b/pixman/pixman/pixman-linear-gradient.c
@@ -255,8 +255,8 @@ _pixman_linear_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter)
}
PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_linear_gradient (pixman_point_fixed_t * p1,
- pixman_point_fixed_t * p2,
+pixman_image_create_linear_gradient (const pixman_point_fixed_t * p1,
+ const pixman_point_fixed_t * p2,
const pixman_gradient_stop_t *stops,
int n_stops)
{
diff --git a/pixman/pixman/pixman-radial-gradient.c b/pixman/pixman/pixman-radial-gradient.c
index 715711fd6..41bb79d73 100644
--- a/pixman/pixman/pixman-radial-gradient.c
+++ b/pixman/pixman/pixman-radial-gradient.c
@@ -420,8 +420,8 @@ _pixman_radial_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter)
}
PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_radial_gradient (pixman_point_fixed_t * inner,
- pixman_point_fixed_t * outer,
+pixman_image_create_radial_gradient (const pixman_point_fixed_t * inner,
+ const pixman_point_fixed_t * outer,
pixman_fixed_t inner_radius,
pixman_fixed_t outer_radius,
const pixman_gradient_stop_t *stops,
diff --git a/pixman/pixman/pixman-solid-fill.c b/pixman/pixman/pixman-solid-fill.c
index 8b25d5d08..26f85cea3 100644
--- a/pixman/pixman/pixman-solid-fill.c
+++ b/pixman/pixman/pixman-solid-fill.c
@@ -72,7 +72,7 @@ color_to_uint64 (const pixman_color_t *color)
}
PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_solid_fill (pixman_color_t *color)
+pixman_image_create_solid_fill (const pixman_color_t *color)
{
pixman_image_t *img = _pixman_image_allocate ();
diff --git a/pixman/pixman/pixman-trap.c b/pixman/pixman/pixman-trap.c
index c6d90da24..ea3ae66f3 100644
--- a/pixman/pixman/pixman-trap.c
+++ b/pixman/pixman/pixman-trap.c
@@ -230,11 +230,11 @@ pixman_line_fixed_edge_init (pixman_edge_t * e,
}
PIXMAN_EXPORT void
-pixman_add_traps (pixman_image_t * image,
- int16_t x_off,
- int16_t y_off,
- int ntrap,
- pixman_trap_t * traps)
+pixman_add_traps (pixman_image_t * image,
+ int16_t x_off,
+ int16_t y_off,
+ int ntrap,
+ const pixman_trap_t *traps)
{
int bpp;
int height;
diff --git a/pixman/pixman/pixman.c b/pixman/pixman/pixman.c
index 739cc7994..bbe8b08fb 100644
--- a/pixman/pixman/pixman.c
+++ b/pixman/pixman/pixman.c
@@ -774,9 +774,9 @@ color_to_uint32 (const pixman_color_t *color)
}
static pixman_bool_t
-color_to_pixel (pixman_color_t * color,
- uint32_t * pixel,
- pixman_format_code_t format)
+color_to_pixel (const pixman_color_t *color,
+ uint32_t * pixel,
+ pixman_format_code_t format)
{
uint32_t c = color_to_uint32 (color);
@@ -833,7 +833,7 @@ color_to_pixel (pixman_color_t * color,
PIXMAN_EXPORT pixman_bool_t
pixman_image_fill_rectangles (pixman_op_t op,
pixman_image_t * dest,
- pixman_color_t * color,
+ const pixman_color_t * color,
int n_rects,
const pixman_rectangle16_t *rects)
{
@@ -872,7 +872,7 @@ pixman_image_fill_rectangles (pixman_op_t op,
PIXMAN_EXPORT pixman_bool_t
pixman_image_fill_boxes (pixman_op_t op,
pixman_image_t * dest,
- pixman_color_t * color,
+ const pixman_color_t *color,
int n_boxes,
const pixman_box32_t *boxes)
{
diff --git a/pixman/pixman/pixman.h b/pixman/pixman/pixman.h
index e1cb90a7d..1dc167a7a 100644
--- a/pixman/pixman/pixman.h
+++ b/pixman/pixman/pixman.h
@@ -737,18 +737,18 @@ pixman_bool_t pixman_format_supported_destination (pixman_format_code_t format);
pixman_bool_t pixman_format_supported_source (pixman_format_code_t format);
/* Constructors */
-pixman_image_t *pixman_image_create_solid_fill (pixman_color_t *color);
-pixman_image_t *pixman_image_create_linear_gradient (pixman_point_fixed_t *p1,
- pixman_point_fixed_t *p2,
+pixman_image_t *pixman_image_create_solid_fill (const pixman_color_t *color);
+pixman_image_t *pixman_image_create_linear_gradient (const pixman_point_fixed_t *p1,
+ const pixman_point_fixed_t *p2,
const pixman_gradient_stop_t *stops,
int n_stops);
-pixman_image_t *pixman_image_create_radial_gradient (pixman_point_fixed_t *inner,
- pixman_point_fixed_t *outer,
+pixman_image_t *pixman_image_create_radial_gradient (const pixman_point_fixed_t *inner,
+ const pixman_point_fixed_t *outer,
pixman_fixed_t inner_radius,
pixman_fixed_t outer_radius,
const pixman_gradient_stop_t *stops,
int n_stops);
-pixman_image_t *pixman_image_create_conical_gradient (pixman_point_fixed_t *center,
+pixman_image_t *pixman_image_create_conical_gradient (const pixman_point_fixed_t *center,
pixman_fixed_t angle,
const pixman_gradient_stop_t *stops,
int n_stops);
@@ -804,12 +804,12 @@ int pixman_image_get_depth (pixman_image_t *image);
pixman_format_code_t pixman_image_get_format (pixman_image_t *image);
pixman_bool_t pixman_image_fill_rectangles (pixman_op_t op,
pixman_image_t *image,
- pixman_color_t *color,
+ const pixman_color_t *color,
int n_rects,
const pixman_rectangle16_t *rects);
pixman_bool_t pixman_image_fill_boxes (pixman_op_t op,
pixman_image_t *dest,
- pixman_color_t *color,
+ const pixman_color_t *color,
int n_boxes,
const pixman_box32_t *boxes);
@@ -903,7 +903,7 @@ void pixman_glyph_get_extents (pixman_glyph_cache_t *cac
pixman_box32_t *extents);
pixman_format_code_t pixman_glyph_get_mask_format (pixman_glyph_cache_t *cache,
int n_glyphs,
- pixman_glyph_t * glyphs);
+ const pixman_glyph_t *glyphs);
void pixman_composite_glyphs (pixman_op_t op,
pixman_image_t *src,
pixman_image_t *dest,
@@ -918,7 +918,7 @@ void pixman_composite_glyphs (pixman_op_t op,
int32_t height,
pixman_glyph_cache_t *cache,
int n_glyphs,
- pixman_glyph_t *glyphs);
+ const pixman_glyph_t *glyphs);
void pixman_composite_glyphs_no_mask (pixman_op_t op,
pixman_image_t *src,
pixman_image_t *dest,
@@ -928,7 +928,7 @@ void pixman_composite_glyphs_no_mask (pixman_op_t op,
int32_t dest_y,
pixman_glyph_cache_t *cache,
int n_glyphs,
- pixman_glyph_t *glyphs);
+ const pixman_glyph_t *glyphs);
/*
* Trapezoids
@@ -1014,7 +1014,7 @@ void pixman_add_traps (pixman_image_t *image,
int16_t x_off,
int16_t y_off,
int ntrap,
- pixman_trap_t *traps);
+ const pixman_trap_t *traps);
void pixman_add_trapezoids (pixman_image_t *image,
int16_t x_off,
int y_off,