diff --git a/Android.common.mk b/Android.common.mk
new file mode 100644
index 00000000000..83177a0cbe7
--- /dev/null
+++ b/Android.common.mk
@@ -0,0 +1,48 @@
+# Mesa 3-D graphics library
+#
+# Copyright (C) 2010-2011 Chia-I Wu
+# Copyright (C) 2010-2011 LunarG Inc.
+#
+# 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
+# THE AUTHORS OR COPYRIGHT HOLDERS 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.
+
+LOCAL_C_INCLUDES += \
+ $(MESA_TOP)/include
+
+LOCAL_CFLAGS += \
+ -DPTHREADS \
+ -fvisibility=hidden \
+ -Wno-sign-compare
+
+ifeq ($(strip $(MESA_ENABLE_ASM)),true)
+ifeq ($(TARGET_ARCH),x86)
+LOCAL_CFLAGS += \
+ -DUSE_X86_ASM
+endif
+endif
+
+LOCAL_CPPFLAGS += \
+ -Wno-error=non-virtual-dtor \
+ -Wno-non-virtual-dtor
+
+# uncomment to keep the debug symbols
+#LOCAL_STRIP_MODULE := false
+
+ifeq ($(strip $(LOCAL_MODULE_TAGS)),)
+LOCAL_MODULE_TAGS := optional
+endif
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 00000000000..53c619ee50c
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,147 @@
+# Mesa 3-D graphics library
+#
+# Copyright (C) 2010-2011 Chia-I Wu
+# Copyright (C) 2010-2011 LunarG Inc.
+#
+# 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
+# THE AUTHORS OR COPYRIGHT HOLDERS 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.
+
+# BOARD_GPU_DRIVERS should be defined. The valid values are
+#
+# classic drivers:
+# gallium drivers: swrast r600g
+#
+# The main target is libGLES_mesa. There is no classic drivers yet.
+
+MESA_TOP := $(call my-dir)
+MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
+MESA_PYTHON2 := python
+
+DRM_TOP := external/drm
+DRM_GRALLOC_TOP := hardware/drm_gralloc
+
+classic_drivers :=
+gallium_drivers := swrast r600g
+
+MESA_GPU_DRIVERS := $(BOARD_GPU_DRIVERS)
+
+# warn about invalid drivers
+invalid_drivers := $(filter-out \
+ $(classic_drivers) $(gallium_drivers), $(MESA_GPU_DRIVERS))
+ifneq ($(invalid_drivers),)
+$(warning invalid GPU drivers: $(invalid_drivers))
+# tidy up
+MESA_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(MESA_GPU_DRIVERS))
+endif
+
+# host and target must be the same arch to generate matypes.h
+ifeq ($(TARGET_ARCH),$(HOST_ARCH))
+MESA_ENABLE_ASM := true
+else
+MESA_ENABLE_ASM := false
+endif
+
+ifneq ($(filter $(classic_drivers), $(MESA_GPU_DRIVERS)),)
+MESA_BUILD_CLASSIC := true
+else
+MESA_BUILD_CLASSIC := false
+endif
+
+ifneq ($(filter $(gallium_drivers), $(MESA_GPU_DRIVERS)),)
+MESA_BUILD_GALLIUM := true
+else
+MESA_BUILD_GALLIUM := false
+endif
+
+ifneq ($(strip $(MESA_GPU_DRIVERS)),)
+
+SUBDIRS := \
+ src/mapi \
+ src/glsl \
+ src/mesa \
+ src/egl/main
+
+ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
+SUBDIRS += src/gallium
+endif
+
+# ---------------------------------------
+# Build libGLES_mesa
+# ---------------------------------------
+
+LOCAL_PATH := $(MESA_TOP)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=
+LOCAL_CFLAGS :=
+LOCAL_C_INCLUDES :=
+
+LOCAL_STATIC_LIBRARIES :=
+LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_egl
+
+LOCAL_SHARED_LIBRARIES := \
+ libglapi \
+ libdrm \
+ libdl \
+ libhardware \
+ liblog \
+ libcutils
+
+ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
+
+gallium_DRIVERS :=
+
+# swrast
+gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
+
+# r600g
+ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
+gallium_DRIVERS += libmesa_winsys_radeon
+gallium_DRIVERS += libmesa_pipe_r600 libmesa_winsys_r600
+endif
+
+#
+# Notes about the order here:
+#
+# * libmesa_st_egl depends on libmesa_winsys_sw_android in $(gallium_DRIVERS)
+# * libmesa_st_mesa depends on libmesa_glsl
+# * libmesa_glsl depends on libmesa_glsl_utils
+#
+LOCAL_STATIC_LIBRARIES := \
+ libmesa_egl_gallium \
+ libmesa_st_egl \
+ $(gallium_DRIVERS) \
+ libmesa_st_mesa \
+ libmesa_glsl \
+ libmesa_glsl_utils \
+ libmesa_gallium \
+ $(LOCAL_STATIC_LIBRARIES)
+
+endif # MESA_BUILD_GALLIUM
+
+LOCAL_MODULE := libGLES_mesa
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
+
+include $(MESA_COMMON_MK)
+include $(BUILD_SHARED_LIBRARY)
+
+mkfiles := $(patsubst %,$(MESA_TOP)/%/Android.mk,$(SUBDIRS))
+include $(mkfiles)
+
+endif # MESA_GPU_DRIVERS
diff --git a/Makefile b/Makefile
index b0a2d8065f6..916c498416d 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,10 @@ all: default
doxygen:
cd doxygen && $(MAKE)
+check:
+ cd src/glsl/tests/ && ./optimization-test
+ @echo "All tests passed."
+
clean:
-@touch $(TOP)/configs/current
-@for dir in $(SUBDIRS) ; do \
@@ -51,7 +55,7 @@ install:
done
-.PHONY: default doxygen clean realclean distclean install
+.PHONY: default doxygen clean realclean distclean install check
# If there's no current configuration file
$(TOP)/configs/current:
@@ -203,12 +207,6 @@ EXTRA_FILES = \
IGNORE_FILES = \
-x autogen.sh
-DEPEND_FILES = \
- src/mesa/depend \
- src/glx/depend \
- src/glw/depend \
- src/glu/sgi/depend
-
parsers: configure
-@touch $(TOP)/configs/current
@@ -231,15 +229,9 @@ AUTOCONF = autoconf
AC_FLAGS =
aclocal.m4: configure.ac acinclude.m4
$(ACLOCAL) $(ACLOCAL_FLAGS)
-configure: rm_depend configure.ac aclocal.m4 acinclude.m4
+configure: configure.ac aclocal.m4 acinclude.m4
$(AUTOCONF) $(AC_FLAGS)
-rm_depend:
- @for dep in $(DEPEND_FILES) ; do \
- rm -f $$dep ; \
- touch $$dep ; \
- done
-
manifest.txt: .git
( \
ls -1 $(EXTRA_FILES) ; \
@@ -269,4 +261,4 @@ md5: $(ARCHIVES)
@-md5sum $(PACKAGE_NAME).tar.bz2
@-md5sum $(PACKAGE_NAME).zip
-.PHONY: tarballs rm_depend md5
+.PHONY: tarballs md5
diff --git a/common.py b/common.py
index 8657030ea3f..cfee1b5dc2e 100644
--- a/common.py
+++ b/common.py
@@ -88,6 +88,7 @@ def AddOptions(opts):
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 'no'))
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
+ opts.Add(BoolOption('openmp', 'EXPERIMENTAL: compile with openmp (swrast)', 'no'))
opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))
opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no'))
opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes'))
diff --git a/configs/darwin b/configs/darwin
index 41e7ba800bc..83f417ce0fd 100644
--- a/configs/darwin
+++ b/configs/darwin
@@ -50,7 +50,6 @@ GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
-# omit glw lib for now:
SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa gallium glu
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
diff --git a/configs/default b/configs/default
index e839a1e500a..078c85e8b4d 100644
--- a/configs/default
+++ b/configs/default
@@ -105,7 +105,7 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
# Directories to build
LIB_DIR = lib
SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
- gallium egl gallium/winsys gallium/targets glu glw
+ gallium egl gallium/winsys gallium/targets glu
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index fdf4b293acd..3c83872c08c 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -42,7 +42,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
# Directories
-SRC_DIRS = glx gallium mesa glu glw
+SRC_DIRS = glx gallium mesa glu
DRIVER_DIRS = dri
DRM_SOURCE_PATH=$(TOP)/../drm
diff --git a/configs/linux-cell b/configs/linux-cell
index e87e69a8065..7f38da971d1 100644
--- a/configs/linux-cell
+++ b/configs/linux-cell
@@ -36,7 +36,6 @@ CFLAGS = $(COMMON_C_CPP_FLAGS) -Wmissing-prototypes -std=c99
CXXFLAGS = $(COMMON_C_CPP_FLAGS)
-# Omitting glw here:
SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
gallium gallium/winsys gallium/targets glu
diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb
index 021aa3e8b20..15702da1904 100644
--- a/configs/linux-dri-xcb
+++ b/configs/linux-dri-xcb
@@ -49,7 +49,7 @@ DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(L
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
$(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
-SRC_DIRS = glx gallium mesa glu glw
+SRC_DIRS = glx gallium mesa glu
DRIVER_DIRS = dri
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon \
diff --git a/configs/linux-indirect b/configs/linux-indirect
index 82868c4a134..5592a8f2978 100644
--- a/configs/linux-indirect
+++ b/configs/linux-indirect
@@ -48,5 +48,5 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
# Directories
-SRC_DIRS = glx glu glw
+SRC_DIRS = glx glu
DRIVER_DIRS =
diff --git a/configure.ac b/configure.ac
index f72db119fb3..c461f43713a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,7 +359,6 @@ fi
GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION}
GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
-GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION}
OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION}
@@ -372,7 +371,6 @@ GBM_LIB_NAME='lib$(GBM_LIB).'${LIB_EXTENSION}
GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLUT_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLUT_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
-GLW_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLW_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
OSMESA_LIB_GLOB=${LIB_PREFIX_GLOB}'$(OSMESA_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
@@ -386,7 +384,6 @@ GBM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GBM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTE
AC_SUBST([GL_LIB_NAME])
AC_SUBST([GLU_LIB_NAME])
AC_SUBST([GLUT_LIB_NAME])
-AC_SUBST([GLW_LIB_NAME])
AC_SUBST([OSMESA_LIB_NAME])
AC_SUBST([EGL_LIB_NAME])
AC_SUBST([GLESv1_CM_LIB_NAME])
@@ -399,7 +396,6 @@ AC_SUBST([GBM_LIB_NAME])
AC_SUBST([GL_LIB_GLOB])
AC_SUBST([GLU_LIB_GLOB])
AC_SUBST([GLUT_LIB_GLOB])
-AC_SUBST([GLW_LIB_GLOB])
AC_SUBST([OSMESA_LIB_GLOB])
AC_SUBST([EGL_LIB_GLOB])
AC_SUBST([GLESv1_CM_LIB_GLOB])
@@ -951,7 +947,7 @@ xyesyes)
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
GL_PC_CFLAGS="$X11_INCLUDES"
fi
- GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
+ GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $DLOPEN_LIBS"
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
# if static, move the external libraries to the programs
@@ -1073,11 +1069,6 @@ AC_SUBST([MESA_MODULES])
AC_SUBST([HAVE_XF86VIDMODE])
-PKG_CHECK_MODULES([LIBDRM_RADEON],
- [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED],
- HAVE_LIBDRM_RADEON=yes,
- HAVE_LIBDRM_RADEON=no)
-
dnl
dnl More GLX setup
dnl
@@ -1270,6 +1261,11 @@ esac
case $DRI_DIRS in
*radeon*|*r200*|*r300*|*r600*)
+ PKG_CHECK_MODULES([LIBDRM_RADEON],
+ [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED],
+ HAVE_LIBDRM_RADEON=yes,
+ HAVE_LIBDRM_RADEON=no)
+
if test "x$HAVE_LIBDRM_RADEON" = xyes; then
RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
@@ -1325,47 +1321,6 @@ AC_SUBST([OSMESA_MESA_DEPS])
AC_SUBST([OSMESA_PC_REQ])
AC_SUBST([OSMESA_PC_LIB_PRIV])
-dnl
-dnl EGL configuration
-dnl
-EGL_CLIENT_APIS=""
-
-if test "x$enable_egl" = xyes; then
- SRC_DIRS="$SRC_DIRS egl"
- EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
- EGL_DRIVERS_DIRS=""
-
- if test "$enable_static" != yes; then
- # build egl_glx when libGL is built
- if test "x$enable_glx" = xyes; then
- EGL_DRIVERS_DIRS="glx"
- fi
-
- PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
- [have_libudev=yes],[have_libudev=no])
- if test "$have_libudev" = yes; then
- DEFINES="$DEFINES -DHAVE_LIBUDEV"
- fi
- if test "x$enable_dri" = xyes; then
- # build egl_dri2 when xcb-dri2 is available
- PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes],
- [have_xcb_dri2=yes],[have_xcb_dri2=no])
-
- if test "$have_xcb_dri2" = yes; then
- EGL_DRIVER_DRI2=dri2
- DEFINES="$DEFINES -DHAVE_XCB_DRI2"
- # workaround a bug in xcb-dri2 generated by xcb-proto 1.6
- AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
- [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
- fi
- fi
-
- EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS $EGL_DRIVER_DRI2"
- fi
-fi
-AC_SUBST([EGL_LIB_DEPS])
-AC_SUBST([EGL_DRIVERS_DIRS])
-
dnl
dnl gbm configuration
dnl
@@ -1401,6 +1356,49 @@ AC_SUBST([GBM_PC_REQ_PRIV])
AC_SUBST([GBM_PC_LIB_PRIV])
AC_SUBST([GBM_PC_CFLAGS])
+dnl
+dnl EGL configuration
+dnl
+EGL_CLIENT_APIS=""
+
+if test "x$enable_egl" = xyes; then
+ SRC_DIRS="$SRC_DIRS egl"
+ EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
+ EGL_DRIVERS_DIRS=""
+
+ AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"])
+
+ if test "$enable_static" != yes; then
+ # build egl_glx when libGL is built
+ if test "x$enable_glx" = xyes; then
+ EGL_DRIVERS_DIRS="glx"
+ fi
+
+ PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
+ [have_libudev=yes],[have_libudev=no])
+ if test "$have_libudev" = yes; then
+ DEFINES="$DEFINES -DHAVE_LIBUDEV"
+ fi
+ if test "x$enable_dri" = xyes; then
+ # build egl_dri2 when xcb-dri2 is available
+ PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes],
+ [have_xcb_dri2=yes],[have_xcb_dri2=no])
+
+ if test "$have_xcb_dri2" = yes; then
+ EGL_DRIVER_DRI2=dri2
+ DEFINES="$DEFINES -DHAVE_XCB_DRI2"
+ # workaround a bug in xcb-dri2 generated by xcb-proto 1.6
+ AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
+ [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
+ fi
+ fi
+
+ EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS $EGL_DRIVER_DRI2"
+ fi
+fi
+AC_SUBST([EGL_LIB_DEPS])
+AC_SUBST([EGL_DRIVERS_DIRS])
+
dnl
dnl EGL Gallium configuration
dnl
@@ -1602,77 +1600,6 @@ AC_SUBST([GLU_PC_REQ_PRIV])
AC_SUBST([GLU_PC_LIB_PRIV])
AC_SUBST([GLU_PC_CFLAGS])
-dnl
-dnl GLw configuration
-dnl
-AC_ARG_ENABLE([glw],
- [AS_HELP_STRING([--disable-glw],
- [enable Xt/Motif widget library @<:@default=enabled@:>@])],
- [enable_glw="$enableval"],
- [enable_glw=yes])
-dnl Don't build GLw on osmesa
-if test "x$enable_glw" = xyes -a "x$enable_glx" = xno; then
- AC_MSG_NOTICE([Disabling GLw since there is no OpenGL driver])
- enable_glw=no
-fi
-AC_ARG_ENABLE([motif],
- [AS_HELP_STRING([--enable-motif],
- [use Motif widgets in GLw @<:@default=disabled@:>@])],
- [enable_motif="$enableval"],
- [enable_motif=no])
-
-if test "x$enable_glw" = xyes; then
- SRC_DIRS="$SRC_DIRS glw"
- if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES([GLW],[x11 xt])
- GLW_PC_REQ_PRIV="x11 xt"
- GLW_LIB_DEPS="$GLW_LIBS"
- else
- # should check these...
- GLW_LIB_DEPS="$X_LIBS -lXt -lX11"
- GLW_PC_LIB_PRIV="$GLW_LIB_DEPS"
- GLW_PC_CFLAGS="$X11_INCLUDES"
- fi
-
- GLW_SOURCES="GLwDrawA.c"
- MOTIF_CFLAGS=
- if test "x$enable_motif" = xyes; then
- GLW_SOURCES="$GLW_SOURCES GLwMDrawA.c"
- AC_PATH_PROG([MOTIF_CONFIG], [motif-config], [no])
- if test "x$MOTIF_CONFIG" != xno; then
- MOTIF_CFLAGS=`$MOTIF_CONFIG --cflags`
- MOTIF_LIBS=`$MOTIF_CONFIG --libs`
- else
- AC_CHECK_HEADER([Xm/PrimitiveP.h], [],
- [AC_MSG_ERROR([Can't locate Motif headers])])
- AC_CHECK_LIB([Xm], [XmGetPixmap], [MOTIF_LIBS="-lXm"],
- [AC_MSG_ERROR([Can't locate Motif Xm library])])
- fi
- # MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11
- GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS"
- GLW_PC_LIB_PRIV="$MOTIF_LIBS $GLW_PC_LIB_PRIV"
- GLW_PC_CFLAGS="$MOTIF_CFLAGS $GLW_PC_CFLAGS"
- fi
-
- # If static, empty GLW_LIB_DEPS and add libs for programs to link
- GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV"
- if test "$enable_static" = no; then
- GLW_MESA_DEPS='-l$(GL_LIB)'
- GLW_LIB_DEPS="$GLW_LIB_DEPS"
- else
- APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
- GLW_LIB_DEPS=""
- GLW_MESA_DEPS=""
- fi
-fi
-AC_SUBST([GLW_LIB_DEPS])
-AC_SUBST([GLW_MESA_DEPS])
-AC_SUBST([GLW_SOURCES])
-AC_SUBST([MOTIF_CFLAGS])
-AC_SUBST([GLW_PC_REQ_PRIV])
-AC_SUBST([GLW_PC_LIB_PRIV])
-AC_SUBST([GLW_PC_CFLAGS])
-
dnl
dnl Program library dependencies
dnl Only libm is added here if necessary as the libraries should
@@ -1699,9 +1626,6 @@ dnl Gallium configuration
dnl
if test "x$with_gallium_drivers" != x; then
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
-else
- LLVM_CONFIG=no
fi
AC_SUBST([LLVM_CFLAGS])
@@ -1821,6 +1745,8 @@ if test "x$enable_gallium_llvm" = xauto; then
esac
fi
if test "x$enable_gallium_llvm" = xyes; then
+ AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
+
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version`
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed 's/-DNDEBUG\>//g'`
@@ -1929,7 +1855,7 @@ if test "x$with_gallium_drivers" != x; then
;;
xr600)
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
- gallium_check_st "r600/drm" "dri-r600" "" "" "xvmc-r600" "vdpau-r600" "va-r600"
+ gallium_check_st "r600/drm radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" "va-r600"
;;
xnouveau)
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
@@ -1937,11 +1863,12 @@ if test "x$with_gallium_drivers" != x; then
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau"
;;
xswrast)
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS softpipe"
+ if test "x$MESA_LLVM" = x1; then
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
+ fi
+
if test "x$HAVE_ST_DRI" = xyes; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS softpipe"
- if test "x$MESA_LLVM" = x1; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
- fi
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
fi
if test "x$HAVE_ST_VDPAU" = xyes; then
@@ -1959,9 +1886,6 @@ if test "x$with_gallium_drivers" != x; then
if test "x$HAVE_WINSYS_XLIB" != xyes; then
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
fi
- if test "x$HAVE_ST_DRI" != xyes; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS softpipe"
- fi
fi
;;
*)
@@ -2054,7 +1978,6 @@ esac
echo ""
echo " GLU: $enable_glu"
-echo " GLw: $enable_glw (Motif: $enable_motif)"
dnl EGL
echo ""
diff --git a/docs/GL3.txt b/docs/GL3.txt
index 135bc4bab67..ff1f5020a5b 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -114,6 +114,19 @@ GL_ARB_vertex_attrib_64bit not started
GL_ARB_viewport_array not started
+GL 4.2:
+GLSL 4.2 not started
+GL_ARB_texture_compression_bptc not started
+GL_ARB_compressed_texture_pixel_storage not started
+GL_ARB_shader_atomic_counters not started
+GL_ARB_texture_storage not started
+GL_ARB_transform_feedback_instanced not started
+GL_ARB_base_instance not started
+GL_ARB_shader_image_load_store not started
+GL_ARB_conservative_depth DONE (compiler)
+GL_ARB_shading_language_420pack not started
+GL_ARB_internalformat_query not started
+GL_ARB_map_buffer_alignment not started
More info about these features and the work involved can be found at
diff --git a/docs/autoconf.html b/docs/autoconf.html
index 64bcbd48a67..895cf665c5b 100644
--- a/docs/autoconf.html
+++ b/docs/autoconf.html
@@ -20,7 +20,6 @@
Library Options
Demo Program Options
@@ -245,12 +244,6 @@ instructions.
on all drivers. This can be disable with the option
--disable-glu.
-
-
-GLw - The libGLw library will be built by default
-if libGLU has been enabled. This can be disable with the option
---disable-glw.
-
diff --git a/docs/contents.html b/docs/contents.html
index 8fc2ac0da9f..46e458ee174 100644
--- a/docs/contents.html
+++ b/docs/contents.html
@@ -63,6 +63,7 @@ a:visited {
Mesa Extensions
Function Name Mangling
Gallium llvmpipe driver
+Gallium post-processing
Developer Topics
diff --git a/docs/devinfo.html b/docs/devinfo.html
index 8887dd02624..d9e82e29d0b 100644
--- a/docs/devinfo.html
+++ b/docs/devinfo.html
@@ -71,6 +71,13 @@ well documented. Also, strive to write clean, easily understandable code.
If you use tabs, set them to 8 columns
+
+Line width: the preferred width to fill comments and code in Mesa is 78
+columns. Exceptions are sometimes made for clarity (e.g. tabular data is
+sometimes filled to a much larger width so that extraneous carriage returns
+don't obscure the table).
+
+
Brace example:
@@ -81,10 +88,26 @@ Brace example:
else {
bar;
}
+
+ switch (condition) {
+ case 0:
+ foo();
+ break;
+
+ case 1: {
+ ...
+ break;
+ }
+
+ default:
+ ...
+ break;
+ }
Here's the GNU indent command which will best approximate my preferred style:
+(Note that it won't format switch statements in the preferred way)
indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
@@ -114,6 +137,16 @@ Function name examples:
_mesa_foo_bar() - an internal non-static Mesa function
+
+Places that are not directly visible to the GL API should prefer the use
+of bool , true , and
+false over GLboolean , GL_TRUE , and
+GL_FALSE . In C code, this may mean that
+#include <stdbool.h> need to be added. The
+try_emit_ * methods in src/mesa/program/ir_to_mesa.cpp and
+src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as an example.
+
+
Making a New Mesa Release
diff --git a/docs/download.html b/docs/download.html
index 3c4d5976c2c..4e8fc2f02f0 100644
--- a/docs/download.html
+++ b/docs/download.html
@@ -84,7 +84,6 @@ src/mesa - sources for the main Mesa library and device drivers
src/gallium - sources for Gallium and Gallium drivers
src/glu - libGLU source code
src/glx - sources for building libGL with full GLX and DRI support
-src/glw - Xt/Motif/OpenGL widget code
If you downloaded and unpacked the MesaGLUT.x.y.z package:
diff --git a/docs/faq.html b/docs/faq.html
index 071381c5a1c..bf6545fd5f7 100644
--- a/docs/faq.html
+++ b/docs/faq.html
@@ -204,8 +204,13 @@ If you don't already have GLUT installed, you should grab
+
+
+GLw (OpenGL widget library) is now available from a separate git repository . Unless you're using very old Xt/Motif applications with OpenGL, you shouldn't need it.
+
-
+
+
On Linux-based systems you'll want to follow the
libGLU.so
lrwxrwxrwx 1 brian users 12 Mar 26 07:53 libglut.so -> libglut.so.3*
lrwxrwxrwx 1 brian users 16 Mar 26 07:53 libglut.so.3 -> libglut.so.3.7.1*
-rwxr-xr-x 1 brian users 597754 Mar 26 07:53 libglut.so.3.7.1*
-lrwxrwxrwx 1 brian users 11 Mar 26 08:04 libGLw.so -> libGLw.so.1*
-lrwxrwxrwx 1 brian users 15 Mar 26 08:04 libGLw.so.1 -> libGLw.so.1.0.0*
--rwxr-xr-x 1 brian users 20750 Mar 26 08:04 libGLw.so.1.0.0*
lrwxrwxrwx 1 brian users 14 Mar 26 07:53 libOSMesa.so -> libOSMesa.so.6*
lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSMesa.so.6.1.060100*
-rwxr-xr-x 1 brian users 23871 Mar 26 07:53 libOSMesa.so.6.1.060100*
@@ -172,8 +169,6 @@ lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSM
libglut is the GLUT library.
-libGLw is the Xt/Motif OpenGL drawing area widget library.
-
libOSMesa is the OSMesa (Off-Screen) interface library.
diff --git a/docs/postprocess.html b/docs/postprocess.html
new file mode 100644
index 00000000000..2a379694298
--- /dev/null
+++ b/docs/postprocess.html
@@ -0,0 +1,56 @@
+
+
+Gallium Post-processing
+
+
+
+
+
+Gallium Post-processing
+
+
+The Gallium drivers support user-defined image post-processing.
+At the end of drawing a frame a post-processing filter can be applied to
+the rendered image.
+Example filters include morphological antialiasing and cell shading.
+
+
+
+The filters can be toggled per-app via driconf, or per-session via the
+corresponding environment variables.
+
+
+
+Multiple filters can be used together.
+
+
+
+PP environment variables
+
+
+PP_DEBUG - If defined debug information will be printed to stderr.
+
+
+Current filters
+
+
+pp_nored, pp_nogreen, pp_noblue - set to 1 to remove the corresponding color channel.
+These are basic filters for easy testing of the PP queue.
+ pp_jimenezmlaa, pp_jimenezmlaa_color -
+Jimenez's MLAA
+is a morphological antialiasing filter.
+The two versions use depth and color data, respectively.
+Which works better depends on the app - depth will not blur text, but it will
+miss transparent textures for example.
+Set to a number from 2 to 32, roughly corresponding to quality.
+Numbers higher than 8 see minimizing gains.
+ pp_celshade - set to 1 to enable cell shading (a more complex color filter).
+
+
+
+
+
+
+
+
+