From: Brian Paul Date: Tue, 26 Jan 2010 20:23:25 +0000 (-0700) Subject: Merge branch 'mesa_7_7_branch' X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=43867acb6afc7fad26cdc2f22b2a3bb6eeefb2da;hp=68ca19afd7299fa9c686f95d53b7e14df37aba4c Merge branch 'mesa_7_7_branch' Merging was easier than cherry picking in this instance. --- diff --git a/.gitignore b/.gitignore index 1c3d44665e0..f43ff3766cb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.ilk *.o *.obj +*.os *.pc *.pdb *.pyc diff --git a/Makefile b/Makefile index b10d1fe862d..16395bcc8b9 100644 --- a/Makefile +++ b/Makefile @@ -105,6 +105,7 @@ irix6-n32-static \ irix6-o32 \ irix6-o32-static \ linux \ +linux-i965 \ linux-alpha \ linux-alpha-static \ linux-cell \ @@ -126,6 +127,7 @@ linux-ia64-icc-static \ linux-icc \ linux-icc-static \ linux-llvm \ +linux-opengl-es \ linux-osmesa \ linux-osmesa-static \ linux-osmesa16 \ @@ -182,7 +184,7 @@ ultrix-gcc: # Rules for making release tarballs -VERSION=7.7.1-devel +VERSION=7.7 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) @@ -225,6 +227,11 @@ MAIN_FILES = \ $(DIRECTORY)/include/GL/vms_x_fix.h \ $(DIRECTORY)/include/GL/wglext.h \ $(DIRECTORY)/include/GL/wmesa.h \ + $(DIRECTORY)/src/glsl/Makefile \ + $(DIRECTORY)/src/glsl/Makefile.template \ + $(DIRECTORY)/src/glsl/*/Makefile \ + $(DIRECTORY)/src/glsl/*/SConscript \ + $(DIRECTORY)/src/glsl/*/*.[ch] \ $(DIRECTORY)/src/Makefile \ $(DIRECTORY)/src/mesa/Makefile* \ $(DIRECTORY)/src/mesa/sources.mak \ @@ -240,7 +247,6 @@ MAIN_FILES = \ $(DIRECTORY)/src/mesa/shader/*.[chly] \ $(DIRECTORY)/src/mesa/shader/Makefile \ $(DIRECTORY)/src/mesa/shader/descrip.mms \ - $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \ $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \ $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \ $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \ @@ -303,10 +309,25 @@ MAIN_FILES = \ $(DIRECTORY)/progs/util/sampleMakefile \ $(DIRECTORY)/windows/VC8/ -EGL_FILES = \ - $(DIRECTORY)/include/EGL/*.h \ +ES_FILES = \ $(DIRECTORY)/include/GLES/*.h \ $(DIRECTORY)/include/GLES2/*.h \ + $(DIRECTORY)/src/mesa/glapi/*.xml \ + $(DIRECTORY)/src/mesa/glapi/*.py \ + $(DIRECTORY)/src/mesa/glapi/*.dtd \ + $(DIRECTORY)/src/mesa/es/glapi/Makefile \ + $(DIRECTORY)/src/mesa/es/glapi/*.xml \ + $(DIRECTORY)/src/mesa/es/glapi/*.py \ + $(DIRECTORY)/src/mesa/es/state_tracker/*.[ch] \ + $(DIRECTORY)/src/mesa/es/main/*.[ch] \ + $(DIRECTORY)/src/mesa/es/main/*.xml \ + $(DIRECTORY)/src/mesa/es/main/*.py \ + $(DIRECTORY)/src/mesa/es/main/*.dtd \ + $(DIRECTORY)/src/mesa/es/Makefile \ + $(DIRECTORY)/src/mesa/es/sources.mak \ + +EGL_FILES = \ + $(DIRECTORY)/include/EGL/*.h \ $(DIRECTORY)/src/egl/Makefile \ $(DIRECTORY)/src/egl/*/Makefile \ $(DIRECTORY)/src/egl/*/*.[ch] \ @@ -474,6 +495,7 @@ DEPEND_FILES = \ LIB_FILES = \ $(MAIN_FILES) \ + $(ES_FILES) \ $(EGL_FILES) \ $(GALLIUM_FILES) \ $(DRI_FILES) \ diff --git a/SConstruct b/SConstruct index 455b4719db9..3a40244d887 100644 --- a/SConstruct +++ b/SConstruct @@ -23,6 +23,7 @@ import os import os.path import sys +import SCons.Util import common @@ -32,10 +33,10 @@ import common default_statetrackers = 'mesa' if common.default_platform in ('linux', 'freebsd', 'darwin'): - default_drivers = 'softpipe,failover,svga,i915,trace,identity,llvmpipe' + default_drivers = 'softpipe,failover,svga,i915,i965,trace,identity,llvmpipe' default_winsys = 'xlib' elif common.default_platform in ('winddk',): - default_drivers = 'softpipe,svga,i915,trace,identity' + default_drivers = 'softpipe,svga,i915,i965,trace,identity' default_winsys = 'all' else: default_drivers = 'all' @@ -46,9 +47,9 @@ common.AddOptions(opts) opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statetrackers, ['mesa', 'python', 'xorg'])) opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers, - ['softpipe', 'failover', 'svga', 'i915', 'cell', 'trace', 'r300', 'identity', 'llvmpipe'])) + ['softpipe', 'failover', 'svga', 'i915', 'i965', 'trace', 'r300', 'identity', 'llvmpipe'])) opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys, - ['xlib', 'vmware', 'intel', 'gdi', 'radeon'])) + ['xlib', 'vmware', 'intel', 'i965', 'gdi', 'radeon'])) opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0'))) @@ -59,6 +60,17 @@ env = Environment( ENV = os.environ, ) +if os.environ.has_key('CC'): + env['CC'] = os.environ['CC'] +if os.environ.has_key('CFLAGS'): + env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS']) +if os.environ.has_key('CXX'): + env['CXX'] = os.environ['CXX'] +if os.environ.has_key('CXXFLAGS'): + env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS']) +if os.environ.has_key('LDFLAGS'): + env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS']) + Help(opts.GenerateHelpText(env)) # replicate options values in local variables @@ -97,6 +109,9 @@ env.Append(CPPPATH = [ '#/src/gallium/drivers', ]) +if env['msvc']: + env.Append(CPPPATH = ['#include/c99']) + # Posix if platform in ('posix', 'linux', 'freebsd', 'darwin'): @@ -162,8 +177,36 @@ Export('env') # TODO: Build several variants at the same time? # http://www.scons.org/wiki/SimultaneousVariantBuilds +if env['platform'] != common.default_platform: + # GLSL code has to be built twice -- one for the host OS, another for the target OS... + + host_env = Environment( + # options are ignored + # default tool is used + tools = ['default', 'custom'], + toolpath = ['#scons'], + ENV = os.environ, + ) + + host_env['platform'] = common.default_platform + host_env['machine'] = common.default_machine + host_env['debug'] = env['debug'] + + SConscript( + 'src/glsl/SConscript', + variant_dir = os.path.join(env['build'], 'host'), + duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html + exports={'env':host_env}, + ) + SConscript( 'src/SConscript', variant_dir = env['build'], duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html ) + +SConscript( + 'progs/SConscript', + variant_dir = os.path.join('progs', env['build']), + duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html +) diff --git a/bin/mklib b/bin/mklib index 3bec160b40c..9e6e46de8b9 100755 --- a/bin/mklib +++ b/bin/mklib @@ -25,6 +25,124 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# Given a list of files, look for .a archives and unpack them. +# Return the original list of files minus the .a files plus the unpacked files. +expand_archives() { + DIR=$1 + shift + FILES=$@ + NEWFILES="" + ORIG_DIR=`pwd` + mkdir -p "$DIR" + cd "$DIR" + for FILE in $FILES ; do + case $FILE in + *.a) + # extract the .o files from this .a archive + case $FILE in + /*) ;; + *) FILE="$ORIG_DIR/$FILE" ;; + esac + MEMBERS=`ar t $FILE` + ar x $FILE + for MEMBER in $MEMBERS ; do + NEWFILES="$NEWFILES $DIR/$MEMBER" + done + ;; + *) + # other file type, just add to list + NEWFILES="$NEWFILES $FILE" + ;; + esac + done + cd "$ORIG_DIR" + echo $NEWFILES +} + + +# Given a list of files, look for .a archives and return a list of all objects +# in the .a archives. +contents_of_archives() { + FILES=$@ + NEWFILES="" + for FILE in $FILES ; do + case $FILE in + *.a) + # get list of members in this .a archive + MEMBERS=`ar t $FILE` + NEWFILES="$NEWFILES $MEMBERS" + ;; + *) + # skip other file types + ;; + esac + done + echo $NEWFILES +} + + +# Make static library with 'ar' +# params: +# options to ar +# 1 or 0 to indicate if ranlib should be run +# libname to make +# list of object files +# Return name of library we made +# Example: "make_ar_static_lib -ru 1 libfoo.a foo.o bar.o" +make_ar_static_lib() { + OPTS=$1 + shift; + RANLIB=$1 + shift; + LIBNAME=$1 + shift; + OBJECTS=$@ + + # remove existing lib, if present + rm -f ${LIBNAME} + + # make static lib + ar ${OPTS} ${LIBNAME} ${OBJECTS} + + # run ranlib + if [ ${RANLIB} = 1 ] ; then + ranlib ${LIBNAME} + fi + + echo ${LIBNAME} +} + + +# Print usage info. +usage() { + echo 'Usage: mklib [options] objects' + echo 'Create a shared library from object files.' + echo ' -o LIBRARY specifies the name of the resulting library, without' + echo ' the leading "lib" or any suffix.' + echo ' (eg: "-o GL" might result in "libGL.so" being made)' + echo ' -major N specifies major version number (default is 1)' + echo ' -minor N specifies minor version number (default is 0)' + echo ' -patch N specifies patch version number (default is 0)' + echo ' -lLIBRARY specifies a dependency on LIBRARY' + echo ' -LDIR search in DIR for library dependencies at build time' + echo ' -RDIR search in DIR for library dependencies at run time' + echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' + echo ' Not observed on all systems at this time.' + echo ' -ldflags OPT specify any additional linker flags in OPT' + echo ' -cplusplus link with C++ runtime' + echo ' -static make a static library (default is dynamic/shared)' + echo ' -dlopen make a shared library suitable for dynamic loading' + echo ' -install DIR put resulting library file(s) in DIR' + echo ' -arch ARCH override using `uname` to determine host system' + echo ' -archopt OPT specify an extra achitecture-specific option OPT' + echo ' -altopts OPTS alternate options to override all others' + echo " -noprefix don't prefix library name with 'lib' nor add any suffix" + echo ' -exports FILE only export the symbols listed in FILE' + echo ' -id NAME Sets the id of the dylib (Darwin)' + echo ' -h, --help display this information and exit' +} + + # # Option defaults # @@ -52,31 +170,7 @@ while true do case $1 in '-h' | '--help') - echo 'Usage: mklib [options] objects' - echo 'Create a shared library from object files.' - echo ' -o LIBRARY specifies the name of the resulting library, without' - echo ' the leading "lib" or any suffix.' - echo ' (eg: "-o GL" might result in "libGL.so" being made)' - echo ' -major N specifies major version number (default is 1)' - echo ' -minor N specifies minor version number (default is 0)' - echo ' -patch N specifies patch version number (default is 0)' - echo ' -lLIBRARY specifies a dependency on LIBRARY' - echo ' -LDIR search in DIR for library dependencies at build time' - echo ' -RDIR search in DIR for library dependencies at run time' - echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' - echo ' Not observed on all systems at this time.' - echo ' -ldflags OPT specify any additional linker flags in OPT' - echo ' -cplusplus link with C++ runtime' - echo ' -static make a static library (default is dynamic/shared)' - echo ' -dlopen make a shared library suitable for dynamic loading' - echo ' -install DIR put resulting library file(s) in DIR' - echo ' -arch ARCH override using `uname` to determine host system' - echo ' -archopt OPT specify an extra achitecture-specific option OPT' - echo ' -altopts OPTS alternate options to override all others' - echo " -noprefix don't prefix library name with 'lib' nor add any suffix" - echo ' -exports FILE only export the symbols listed in FILE' - echo ' -id NAME Sets the id of the dylib (Darwin)' - echo ' -h, --help display this information and exit' + usage exit 1 ;; '-o') @@ -197,11 +291,11 @@ fi # Error checking # if [ "x${LIBNAME}" = "x" ] ; then - echo "mklib: Error: no library name specified" + echo "mklib: Error: no library name specified (-h for help)" exit 1 fi if [ "x${OBJECTS}" = "x" ] ; then - echo "mklib: Error: no object files specified" + echo "mklib: Error: no object files specified (-h for help)" exit 1 fi @@ -269,45 +363,24 @@ case $ARCH in # finish up FINAL_LIBS="${LIBNAME}" elif [ $STATIC = 1 ] ; then + # make a static .a library LIBNAME="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a" echo "mklib: Making" $ARCH "static library: " ${LIBNAME} - LINK="ar" OPTS="-ru" if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - rm -f ${LIBNAME} - # expand any .a objects into constituent .o files. - NEWOBJECTS="" - DELETIA="" - for OBJ in $OBJECTS ; do - case $OBJ in - *.a) - # extract the .o files from this .a archive - FILES=`ar t $OBJ` - ar x $OBJ - NEWOBJECTS="$NEWOBJECTS $FILES" - # keep track of temporary .o files and delete them below - DELETIA="$DELETIA $FILES" - ;; - *) - # ordinary .o file - NEWOBJECTS="$NEWOBJECTS $OBJ" - ;; - esac - done + # expand .a into .o files + NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS` - # make lib - ${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS} - ranlib ${LIBNAME} + # make static lib + FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}` # remove temporary extracted .o files - rm -f ${DELETIA} - - # finish up - FINAL_LIBS=${LIBNAME} + rm -rf ${LIBNAME}.obj else + # make dynamic library LIBNAME="lib${LIBNAME}" # prefix with "lib" case $ARCH in 'Linux' | 'GNU' | GNU/*) OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" @@ -368,9 +441,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making SunOS static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruc 0 ${LIBNAME} ${OBJECTS}` else if [ $NOPREFIX = 0 ] ; then LIBNAME="lib${LIBNAME}.so" @@ -489,13 +560,19 @@ case $ARCH in ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} FINAL_LIBS=${LIBNAME} elif [ $STATIC = 1 ] ; then + # make a static .a library STLIB="lib${LIBNAME}.a" echo "mklib: Making FreeBSD static library: " ${STLIB} - rm -f ${STLIB} - ar cq ${STLIB} ${OBJECTS} - ranlib ${STLIB} - FINAL_LIBS=${STLIB} + + # expand .a into .o files + NEW_OBJECTS=`expand_archives ${STLIB}.obj $OBJECTS` + + FINAL_LIBS=`make_ar_static_lib cq 1 ${STLIB} ${NEW_OBJECTS}` + + # remove temporary extracted .o files + rm -rf ${STLIB}.obj else + # make dynamic library SHLIB="lib${LIBNAME}.so.${MAJOR}" OPTS="-shared -Wl,-soname,${SHLIB}" if [ "${ALTOPTS}" ] ; then @@ -513,10 +590,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}_pic.a" echo "mklib: Making NetBSD PIC static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar cq ${LIBNAME} ${OBJECTS} - ranlib ${LIBNAME} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}" echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME} @@ -529,9 +603,7 @@ case $ARCH in 'IRIX' | 'IRIX64') if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" - rm -f ${LIBNAME} - ar rc ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib rc 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" @@ -582,9 +654,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making HP-UX static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}` else # HP uses a .2 for their current GL/GLU libraries if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then @@ -614,8 +684,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making AIX static library: " ${LIBNAME} - ar -ruv ${X64} ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}` else EXPFILE="lib${LIBNAME}.exp" LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries @@ -666,9 +735,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making OSF/1 static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}` else VERSION="${MAJOR}.${MINOR}" LIBNAME="lib${LIBNAME}.so" @@ -755,16 +822,14 @@ case $ARCH in 'LynxOS') LIBNAME="lib${LIBNAME}.a" echo "mklib: Making LynxOS static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ru 0 ${LIBNAME} ${OBJECTS}` ;; 'BeOS') if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making BeOS static library: " ${LIBNAME} - ar -cru "${LIBNAME}" ${OBJECTS} + FINAL_LIBS=`make_ar_static_lib -cru 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" echo "mklib: Making BeOS shared library: " ${LIBNAME} @@ -843,9 +908,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making AIX GCC static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" echo "mklib: Making AIX GCC shared library: " ${LIBNAME} @@ -866,9 +929,7 @@ case $ARCH in fi LIBNAME="lib${LIBNAME}.a" echo "mklib: Making static library for Ultrix: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS="${LIBNAME}" + FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}` ;; CYGWIN*) @@ -888,17 +949,13 @@ case $ARCH in LIBNAME="lib${LIBNAME}" # prefix with "lib" if [ $STATIC = 1 ] ; then - echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a - LINK="ar" + LIBNAME=${LIBNAME}.a + echo "mklib: Making" $ARCH "static library: " ${LIBNAME} OPTS="-ru" if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - # make lib - ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} - ranlib ${LIBNAME}.a - # finish up - FINAL_LIBS=${LIBNAME}.a + FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${OBJECTS}` else OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" if [ "${ALTOPTS}" ] ; then @@ -936,9 +993,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making static library for example arch: " ${LIBNAME} - rm -f ${LIBNAME} - ar rv ${LIBNAME} ${OBJECTS} - FINAL_LIBS="${LIBNAME}" + FINAL_LIBS=`make_ar_static_lib rv 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" echo "mklib: Making shared library for example arch: " ${LIBNAME} diff --git a/common.py b/common.py index 3b6bf52c035..101fc558f40 100644 --- a/common.py +++ b/common.py @@ -12,7 +12,7 @@ import platform as _platform _platform_map = { 'linux2': 'linux', - 'win32': 'winddk', + 'win32': 'windows', } default_platform = sys.platform diff --git a/configs/autoconf.in b/configs/autoconf.in index a7f3c9df926..b0024ec6899 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -22,6 +22,8 @@ LDFLAGS = @LDFLAGS@ EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ RADEON_CFLAGS = @RADEON_CFLAGS@ RADEON_LDFLAGS = @RADEON_LDFLAGS@ +INTEL_LIBS = @INTEL_LIBS@ +INTEL_CFLAGS = @INTEL_CFLAGS@ # Assembler MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ @@ -52,6 +54,7 @@ GLU_LIB_NAME = @GLU_LIB_NAME@ GLUT_LIB_NAME = @GLUT_LIB_NAME@ GLW_LIB_NAME = @GLW_LIB_NAME@ OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ +EGL_LIB_NAME = @EGL_LIB_NAME@ # Globs used to install the lib and all symlinks GL_LIB_GLOB = @GL_LIB_GLOB@ @@ -59,19 +62,20 @@ GLU_LIB_GLOB = @GLU_LIB_GLOB@ GLUT_LIB_GLOB = @GLUT_LIB_GLOB@ GLW_LIB_GLOB = @GLW_LIB_GLOB@ OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ +EGL_LIB_GLOB = @EGL_LIB_GLOB@ # Directories to build LIB_DIR = @LIB_DIR@ SRC_DIRS = @SRC_DIRS@ GLU_DIRS = @GLU_DIRS@ DRIVER_DIRS = @DRIVER_DIRS@ +EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@ GALLIUM_DIRS = @GALLIUM_DIRS@ -GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@ GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@ GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) +GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) # Which subdirs under $(TOP)/progs/ to enter: @@ -80,7 +84,7 @@ PROGRAM_DIRS = @PROGRAM_DIRS@ # Driver specific build vars DRI_DIRS = @DRI_DIRS@ WINDOW_SYSTEM = @WINDOW_SYSTEM@ -USING_EGL = @USING_EGL@ +EGL_DISPLAYS = @EGL_DISPLAYS@ # Dependencies X11_INCLUDES = @X11_INCLUDES@ @@ -126,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ # Where libGL will look for DRI hardware drivers DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@ +# EGL driver install directory +EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@ + # Xorg driver install directory (for xorg state-tracker) XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ diff --git a/configs/darwin b/configs/darwin index 336b54e0674..7556688fe6d 100644 --- a/configs/darwin +++ b/configs/darwin @@ -49,7 +49,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X 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 = glx/x11 mesa gallium glu glut/glx glew +SRC_DIRS = glsl glx/x11 mesa gallium glu glut/glx glew GLU_DIRS = sgi DRIVER_DIRS = osmesa #DRIVER_DIRS = dri diff --git a/configs/default b/configs/default index c9616bb563c..d79039561e2 100644 --- a/configs/default +++ b/configs/default @@ -9,8 +9,8 @@ CONFIG_NAME = default # Version info MESA_MAJOR=7 -MESA_MINOR=7 -MESA_TINY=1 +MESA_MINOR=8 +MESA_TINY=0 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) # external projects. This should be useless now that we use libdrm. @@ -55,6 +55,7 @@ GLUT_LIB = glut GLEW_LIB = GLEW GLW_LIB = GLw OSMESA_LIB = OSMesa +EGL_LIB = EGL # Library names (actual file names) @@ -64,6 +65,7 @@ GLUT_LIB_NAME = lib$(GLUT_LIB).so GLEW_LIB_NAME = lib$(GLEW_LIB).a GLW_LIB_NAME = lib$(GLW_LIB).so OSMESA_LIB_NAME = lib$(OSMESA_LIB).so +EGL_LIB_NAME = lib$(EGL_LIB).so # globs used to install the lib and all symlinks GL_LIB_GLOB = $(GL_LIB_NAME)* @@ -71,6 +73,7 @@ GLU_LIB_GLOB = $(GLU_LIB_NAME)* GLUT_LIB_GLOB = $(GLUT_LIB_NAME)* GLW_LIB_GLOB = $(GLW_LIB_NAME)* OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)* +EGL_LIB_GLOB = $(EGL_LIB_NAME)* # Optional assembly language optimization files for libGL MESA_ASM_SOURCES = @@ -83,25 +86,26 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 # Directories to build LIB_DIR = lib -SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw +SRC_DIRS = glsl mesa gallium egl gallium/winsys glu glut/glx glew glw GLU_DIRS = sgi DRIVER_DIRS = x11 osmesa # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl objviewer xdemos -# EGL directories -EGL_DRIVERS_DIRS = demo +# EGL drivers to build +EGL_DRIVERS_DIRS = glx # Gallium directories and GALLIUM_DIRS = auxiliary drivers state_trackers -GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 trace identity +GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a +GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 i965 r300 trace identity GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) -GALLIUM_WINSYS_DIRS = xlib egl_xlib -GALLIUM_WINSYS_DRM_DIRS = +GALLIUM_WINSYS_DIRS = drm xlib +GALLIUM_WINSYS_DRM_DIRS = swrast GALLIUM_STATE_TRACKERS_DIRS = glx +# native displays EGL should support +EGL_DISPLAYS = x11 # Library dependencies #EXTRA_LIB_PATH ?= @@ -126,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri # Where libGL will look for DRI hardware drivers DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) +# EGL driver install directory +EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl + # Xorg driver install directory (for xorg state-tracker) XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers diff --git a/configs/linux-cell b/configs/linux-cell index 19d435fecce..221655c35dc 100644 --- a/configs/linux-cell +++ b/configs/linux-cell @@ -33,7 +33,7 @@ CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \ CXXFLAGS = $(CFLAGS) # Omitting glw here: -SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew +SRC_DIRS = glsl mesa gallium gallium/winsys glu glut/glx glew # Build no traditional Mesa drivers: DRIVER_DIRS = diff --git a/configs/linux-debug b/configs/linux-debug index 8b0b3126db6..01763b1a30d 100644 --- a/configs/linux-debug +++ b/configs/linux-debug @@ -5,5 +5,5 @@ include $(TOP)/configs/linux CONFIG_NAME = linux-debug OPT_FLAGS = -g -CFLAGS += -ansi -pedantic +CFLAGS += -pedantic DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/configs/linux-dri b/configs/linux-dri index 0802543347a..95f77ade1dd 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -55,13 +55,19 @@ SRC_DIRS := glx/x11 egl $(SRC_DIRS) PROGRAM_DIRS := egl $(PROGRAM_DIRS) # EGL directories -EGL_DRIVERS_DIRS = demo glx +EGL_DRIVERS_DIRS = glx DRIVER_DIRS = dri WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = drm -GALLIUM_WINSYS_DRM_DIRS = vmware intel +GALLIUM_WINSYS_DRM_DIRS = vmware intel i965 GALLIUM_STATE_TRACKERS_DIRS = egl DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \ savage sis tdfx unichrome ffb swrast + +INTEL_LIBS = `pkg-config --libs libdrm_intel` +INTEL_CFLAGS = `pkg-config --cflags libdrm_intel` + +RADEON_LIBS = `pkg-config --libs libdrm_radeon` +RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon` diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb index 827fb973308..7b99dccdb88 100644 --- a/configs/linux-dri-xcb +++ b/configs/linux-dri-xcb @@ -47,21 +47,8 @@ DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) 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) - -# This is now 0 by default since it seems to confuse the hell out of people -# and generate a lot of extra noise on bugzilla. If you need to build with -# EGL, do 'make linux-dri USING_EGL=1' - -USING_EGL=0 - -# Directories -ifeq ($(USING_EGL), 1) -SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw -PROGRAM_DIRS = egl -else SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw PROGRAM_DIRS = xdemos -endif DRIVER_DIRS = dri WINDOW_SYSTEM=dri diff --git a/configs/linux-egl b/configs/linux-egl index e906806f4b8..6494a68aeb1 100644 --- a/configs/linux-egl +++ b/configs/linux-egl @@ -46,12 +46,6 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ $(LIBDRM_LIB) -# This is now 0 by default since it seems to confuse the hell out of people -# and generate a lot of extra noise on bugzilla. If you need to build with -# EGL, do 'make linux-dri USING_EGL=1' - -USING_EGL=0 - # Directories SRC_DIRS = gallium mesa gallium/winsys glu egl PROGRAM_DIRS = egl diff --git a/configs/linux-i965 b/configs/linux-i965 new file mode 100644 index 00000000000..e66abc347bb --- /dev/null +++ b/configs/linux-i965 @@ -0,0 +1,8 @@ +# Configuration for standalone mode i965 debug + +include $(TOP)/configs/linux-debug + +CONFIG_NAME = linux-i965 + +GALLIUM_DRIVER_DIRS = i965 +GALLIUM_WINSYS_DIRS = drm/i965/xlib diff --git a/configs/linux-llvm b/configs/linux-llvm index 19b53cc5461..dbf7e3ed7a9 100644 --- a/configs/linux-llvm +++ b/configs/linux-llvm @@ -6,8 +6,6 @@ include $(TOP)/configs/linux CONFIG_NAME = linux-llvm -#GALLIUM_AUXILIARY_DIRS += gallivm - # Add llvmpipe driver GALLIUM_DRIVERS_DIRS += llvmpipe diff --git a/configs/linux-opengl-es b/configs/linux-opengl-es new file mode 100644 index 00000000000..259c26a931b --- /dev/null +++ b/configs/linux-opengl-es @@ -0,0 +1,28 @@ +# Configuration for OpenGL ES on Linux + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-opengl-es + +# Directories to build +LIB_DIR = lib +SRC_DIRS = egl glsl mesa/es gallium gallium/winsys +PROGRAM_DIRS = es1/screen es1/xegl es2/xegl + +# egl st needs this +DEFINES += -DGLX_DIRECT_RENDERING + +# no mesa or egl drivers +DRIVER_DIRS = +EGL_DRIVERS_DIRS = + +GALLIUM_DRIVERS_DIRS = softpipe + +# build libGLES*.so +GALLIUM_STATE_TRACKERS_DIRS = es + +# build egl_x11_{swrast,i915}.so +GALLIUM_DRIVERS_DIRS += trace i915 +GALLIUM_STATE_TRACKERS_DIRS += egl +GALLIUM_WINSYS_DIRS += drm +GALLIUM_WINSYS_DRM_DIRS += intel swrast diff --git a/configure.ac b/configure.ac index a15ca111e27..10e0bd47aba 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,8 @@ AC_CANONICAL_HOST dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.15 LIBDRM_RADEON_REQUIRED=2.4.17 -DRI2PROTO_REQUIRED=1.99.3 +DRI2PROTO_REQUIRED=2.2 +GLPROTO_REQUIRED=1.4.11 dnl Check for progs AC_PROG_CPP @@ -97,6 +98,13 @@ dnl Add flags for gcc and g++ if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math" + # Enable -fvisibility=hidden if using a gcc that supports it + save_CFLAGS="$CFLAGS" + AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) + CFLAGS="$CFLAGS -fvisibility=hidden" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [CFLAGS="$save_CFLAGS" ; AC_MSG_RESULT([no])]); + # Work around aliasing bugs - developers should comment this out CFLAGS="$CFLAGS -fno-strict-aliasing" fi @@ -243,24 +251,28 @@ 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} GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*' GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*' GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*' GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*' OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*' +EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*' 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([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]) dnl dnl Arch/platform-specific settings @@ -414,13 +426,16 @@ esac dnl dnl Driver specific build directories dnl -SRC_DIRS="mesa glew" + +dnl this variable will be prepended to SRC_DIRS and is not exported +CORE_DIRS="glsl mesa" + +SRC_DIRS="glew" GLU_DIRS="sgi" WINDOW_SYSTEM="" GALLIUM_DIRS="auxiliary drivers state_trackers" GALLIUM_WINSYS_DIRS="" GALLIUM_WINSYS_DRM_DIRS="" -GALLIUM_AUXILIARY_DIRS="rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl" GALLIUM_DRIVERS_DIRS="softpipe failover trace identity" GALLIUM_STATE_TRACKERS_DIRS="" @@ -430,7 +445,7 @@ xlib) GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS xlib" ;; dri) - SRC_DIRS="glx/x11 $SRC_DIRS" + SRC_DIRS="$SRC_DIRS glx/x11" DRIVER_DIRS="dri" WINDOW_SYSTEM="dri" GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm" @@ -447,10 +462,7 @@ AC_SUBST([GALLIUM_DIRS]) AC_SUBST([GALLIUM_WINSYS_DIRS]) AC_SUBST([GALLIUM_WINSYS_DRM_DIRS]) AC_SUBST([GALLIUM_DRIVERS_DIRS]) -AC_SUBST([GALLIUM_AUXILIARY_DIRS]) AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS]) -AC_SUBST([RADEON_CFLAGS]) -AC_SUBST([RADEON_LDFLAGS]) dnl dnl User supplied program configuration @@ -575,16 +587,10 @@ dri) # Check for libdrm PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) - GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" + PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) + GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED" DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" - PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no) - - if test "$HAVE_LIBDRM_RADEON" = yes; then - RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" - RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS - fi - # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then # add xcb modules if necessary @@ -693,10 +699,6 @@ yes) ;; esac -dnl Just default to no EGL for now -USING_EGL=0 -AC_SUBST([USING_EGL]) - dnl Set DRI_DIRS, DEFINES and LIB_DEPS if test "$mesa_driver" = dri; then # Use TLS in GLX? @@ -704,10 +706,6 @@ if test "$mesa_driver" = dri; then DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS" fi - if test "x$USING_EGL" = x1; then - PROGRAM_DIRS="egl" - fi - # Platform specific settings and drivers to build case "$host_os" in linux*) @@ -804,6 +802,29 @@ AC_SUBST([DRI_DIRS]) AC_SUBST([EXPAT_INCLUDES]) AC_SUBST([DRI_LIB_DEPS]) +case $DRI_DIRS in +*i915*|*i965*) + PKG_CHECK_MODULES([INTEL], [libdrm_intel]) + ;; +esac + +case $DRI_DIRS in +*radeon*|*r200*|*r300*|*r600*) + PKG_CHECK_MODULES([LIBDRM_RADEON], + [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], + HAVE_LIBDRM_RADEON=yes, + HAVE_LIBDRM_RADEON=no) + + if test "$HAVE_LIBDRM_RADEON" = yes; then + RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" + RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS + fi + ;; +esac +AC_SUBST([RADEON_CFLAGS]) +AC_SUBST([RADEON_LDFLAGS]) + + dnl dnl OSMesa configuration dnl @@ -888,17 +909,15 @@ AC_ARG_ENABLE([egl], [enable_egl=yes]) if test "x$enable_egl" = xyes; then SRC_DIRS="$SRC_DIRS egl" - - if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([EGL], [x11]) - EGL_LIB_DEPS="$EGL_LIBS" - else - # should check these... - EGL_LIB_DEPS="$X_LIBS -lX11" + EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread" + EGL_DRIVERS_DIRS="" + if test "$enable_static" != yes && test "$mesa_driver" != osmesa; then + # build egl_glx when libGL is built + EGL_DRIVERS_DIRS="glx" fi - EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS" fi AC_SUBST([EGL_LIB_DEPS]) +AC_SUBST([EGL_DRIVERS_DIRS]) dnl dnl GLU configuration @@ -1162,19 +1181,63 @@ yes) test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ AC_MSG_ERROR([state tracker '$tracker' doesn't exist]) - if test "$tracker" = egl && test "x$enable_egl" != xyes; then - AC_MSG_ERROR([cannot build egl state tracker without EGL library]) - fi - if test "$tracker" = xorg; then + case "$tracker" in + egl) + if test "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + ;; + xorg) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71", HAVE_XEXTPROTO_71="no") - fi + ;; + es) + # mesa/es is required to build es state tracker + CORE_DIRS="$CORE_DIRS mesa/es" + ;; + esac done GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" ;; esac +AC_ARG_WITH([egl-displays], + [AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@], + [comma delimited native displays libEGL supports, e.g. + "x11,kms" @<:@default=auto@:>@])], + [with_egl_displays="$withval"], + [with_egl_displays=yes]) + +EGL_DISPLAYS="" +case "$with_egl_displays" in +yes) + if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then + EGL_DISPLAYS="x11" + fi + ;; +*) + if test "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + # verify the requested driver directories exist + egl_displays=`IFS=', '; echo $with_egl_displays` + for dpy in $egl_displays; do + test -d "$srcdir/src/gallium/state_trackers/egl/$dpy" || \ + AC_MSG_ERROR([EGL display '$dpy' does't exist]) + done + EGL_DISPLAYS="$egl_displays" + ;; +esac +AC_SUBST([EGL_DISPLAYS]) + +AC_ARG_WITH([egl-driver-dir], + [AS_HELP_STRING([--with-egl-driver-dir=DIR], + [directory for EGL drivers [[default=${libdir}/egl]]])], + [EGL_DRIVER_INSTALL_DIR="$withval"], + [EGL_DRIVER_INSTALL_DIR='${libdir}/egl']) +AC_SUBST([EGL_DRIVER_INSTALL_DIR]) + AC_ARG_WITH([xorg-driver-dir], [AS_HELP_STRING([--with-xorg-driver-dir=DIR], [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])], @@ -1221,10 +1284,10 @@ AC_ARG_ENABLE([gallium-intel], [enable_gallium_intel="$enableval"], [enable_gallium_intel=auto]) if test "x$enable_gallium_intel" = xyes; then - GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" + GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel i965" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965" elif test "x$enable_gallium_intel" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965" fi dnl @@ -1234,10 +1297,12 @@ AC_ARG_ENABLE([gallium-radeon], [AS_HELP_STRING([--enable-gallium-radeon], [build gallium radeon @<:@default=disabled@:>@])], [enable_gallium_radeon="$enableval"], - [enable_gallium_radeon=no]) + [enable_gallium_radeon=auto]) if test "x$enable_gallium_radeon" = xyes; then GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS radeon" GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" +elif test "x$enable_gallium_radeon" = xauto; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" fi dnl @@ -1253,6 +1318,20 @@ if test "x$enable_gallium_nouveau" = xyes; then GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv04 nv10 nv20 nv30 nv40 nv50" fi +dnl +dnl Gallium swrast configuration +dnl +AC_ARG_ENABLE([gallium-swrast], + [AS_HELP_STRING([--enable-gallium-swrast], + [build gallium swrast @<:@default=disabled@:>@])], + [enable_gallium_swrast="$enableval"], + [enable_gallium_swrast=auto]) +if test "x$enable_gallium_swrast" = xyes; then + GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS swrast" +fi + +dnl prepend CORE_DIRS to SRC_DIRS +SRC_DIRS="$CORE_DIRS $SRC_DIRS" dnl Restore LDFLAGS and CPPFLAGS LDFLAGS="$_SAVE_LDFLAGS" @@ -1306,7 +1385,6 @@ if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then echo " Gallium dirs: $GALLIUM_DIRS" echo " Winsys dirs: $GALLIUM_WINSYS_DIRS" echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS" - echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS" echo " Driver dirs: $GALLIUM_DRIVERS_DIRS" echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS" else diff --git a/docs/GL3.txt b/docs/GL3.txt new file mode 100644 index 00000000000..df3fd745498 --- /dev/null +++ b/docs/GL3.txt @@ -0,0 +1,69 @@ + +Status of OpenGL 3.x features in Mesa + + +Note: when an item is marked as "DONE" it means all the core Mesa +infrastructure is complete but it may be the case that few (if any) drivers +implement the features. + + +Feature Status +----------------------------------------------------- ------------------------ + +GL 3.0: + +GLSL changes (GL_EXT_gpu_shader4, etc) not started +Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe) +Map buffer subranges (GL_APPLE_flush_buffer_range) not started +Float textures, renderbuffers some infrastructure done +Framebuffer objects (GL_EXT_framebuffer_object) DONE +Half-float some infrastructure done +Multisample blit DONE +Non-normalized Integer texture/framebuffer formats not started +1D/2D Texture arrays mostly done +Packed depth/stencil formats DONE +Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE +GL_EXT_texture_compression_rgtc not started +Red and red/green texture formats Ian? +Transform feedback (GL_EXT_transform_feedback) not started +Vertex array objects (GL_APPLE_vertex_array_object) DONE +sRGB framebuffer format (GL_EXT_framebuffer_sRGB) not started +glClearBuffer commands DONE, except for dispatch +glGetStringi command DONE, except for dispatch +glTexParameterI, glGetTexParameterI commands DONE, except for dispatch +glVertexAttribI commands not started +glBindFragDataLocation, glGetFragDataLocation cmds not started +glBindBufferRange, glBindBufferBase commands not started + + +GL 3.1: + +GLSL 1.30 and 1.40 not started +Instanced drawing (GL_ARB_draw_instanced) not started +Buffer copying (GL_ARB_copy_buffer) DONE +Primitive restart (GL_NV_primitive_restart) not started +16 vertex texture image units not started +Texture buffer objs (GL_ARB_textur_buffer_object) not started +Rectangular textures (GL_ARB_texture_rectangle) DONE +Uniform buffer objs (GL_ARB_uniform_buffer_object) not started +Signed normalized texture formats not started + + +GL 3.2: + +Core/compatibility profiles not started +GLSL 1.50 not started +Geometry shaders (GL_ARB_geometry_shader4) partially done (Zack) +BGRA vertex order (GL_ARB_vertex_array_bgra) DONE +Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE +Frag shader coord (GL_ARB_fragment_coord_conventions) not started +Provoking vertex (GL_ARB_provoking_vertex) DONE +Seamless cubemaps (GL_ARB_seamless_cube_map) DONE, mostly? +Multisample textures (GL_ARB_texture_multisample) not started +Frag depth clamp (GL_ARB_depth_clamp) DONE +Fence objects (GL_ARB_sync) DONE + + + +More info about these features and the work involved can be found at +http://dri.freedesktop.org/wiki/MissingFunctionality diff --git a/docs/contents.html b/docs/contents.html index d15e6c1e336..f0646ffb402 100644 --- a/docs/contents.html +++ b/docs/contents.html @@ -52,9 +52,12 @@ a:visited { User Topics