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 b74e8485aba..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 \ @@ -183,7 +184,7 @@ ultrix-gcc: # Rules for making release tarballs -VERSION=7.7-devel +VERSION=7.7 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) @@ -226,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 \ @@ -241,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] \ @@ -455,8 +460,7 @@ DEMO_FILES = \ $(DIRECTORY)/progs/windml/Makefile.ugl \ $(DIRECTORY)/progs/windml/*.c \ $(DIRECTORY)/progs/windml/*.bmp \ - $(DIRECTORY)/progs/ggi/*.c \ - $(DIRECTORY)/windows/VC7/progs/progs.sln + $(DIRECTORY)/progs/ggi/*.c GLUT_FILES = \ $(DIRECTORY)/include/GL/glut.h \ @@ -479,9 +483,7 @@ GLUT_FILES = \ $(DIRECTORY)/src/glut/mini/glut.pc.in \ $(DIRECTORY)/src/glut/directfb/Makefile \ $(DIRECTORY)/src/glut/directfb/NOTES \ - $(DIRECTORY)/src/glut/directfb/*[ch] \ - $(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \ - $(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj + $(DIRECTORY)/src/glut/directfb/*[ch] DEPEND_FILES = \ $(TOP)/src/mesa/depend \ diff --git a/SConstruct b/SConstruct index d53f4401e5a..5f6933eadff 100644 --- a/SConstruct +++ b/SConstruct @@ -32,10 +32,10 @@ import common default_statetrackers = 'mesa' if common.default_platform in ('linux', 'freebsd', 'darwin'): - default_drivers = 'softpipe,failover,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,i915,trace,identity' + default_drivers = 'softpipe,svga,i915,i965,trace,identity' default_winsys = 'all' else: default_drivers = 'all' @@ -46,9 +46,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', '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', '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'))) @@ -97,6 +97,9 @@ env.Append(CPPPATH = [ '#/src/gallium/drivers', ]) +if env['msvc']: + env.Append(CPPPATH = ['#include/c99']) + # Posix if platform in ('posix', 'linux', 'freebsd', 'darwin'): @@ -160,8 +163,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 db97087c0a6..9799a4ed277 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 -ruv 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" @@ -724,22 +791,10 @@ case $ARCH in # examine first object to determine ABI set ${OBJECTS} - ABI_PPC=`file $1 | grep ' ppc'` - ABI_I386=`file $1 | grep ' i386'` - ABI_PPC64=`file $1 | grep ' ppc64'` - ABI_X86_64=`file $1 | grep ' x86_64'` - if [ "${ABI_PPC}" ] ; then - OPTS="${OPTS} -arch ppc" - fi - if [ "${ABI_I386}" ] ; then - OPTS="${OPTS} -arch i386" - fi - if [ "${ABI_PPC64}" ] ; then - OPTS="${OPTS} -arch ppc64" - fi - if [ "${ABI_X86_64}" ] ; then - OPTS="${OPTS} -arch x86_64" - fi + ABIS=`lipo -info $1 | sed s/.*://` + for ABI in $ABIS; do + OPTS="${OPTS} -arch ${ABI}" + done if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} @@ -767,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} @@ -855,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} @@ -878,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*) @@ -900,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 @@ -948,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..c6d315e4d2e 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,6 +84,7 @@ PROGRAM_DIRS = @PROGRAM_DIRS@ # Driver specific build vars DRI_DIRS = @DRI_DIRS@ WINDOW_SYSTEM = @WINDOW_SYSTEM@ +EGL_DISPLAYS = @EGL_DISPLAYS@ USING_EGL = @USING_EGL@ # Dependencies diff --git a/configs/darwin b/configs/darwin index 213c397287e..7556688fe6d 100644 --- a/configs/darwin +++ b/configs/darwin @@ -12,10 +12,10 @@ X11_DIR = $(INSTALL_DIR) CC = gcc CXX = g++ PIC_FLAGS = -fPIC -DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \ - -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \ +DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \ -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING +# -D_GNU_SOURCE - for src/mesa/main ... # -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11 # -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile # -DIN_DRI_DRIVER @@ -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 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 c3bb47e70df..8b4557d26a8 100644 --- a/configs/default +++ b/configs/default @@ -9,7 +9,7 @@ CONFIG_NAME = default # Version info MESA_MAJOR=7 -MESA_MINOR=7 +MESA_MINOR=8 MESA_TINY=0 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) @@ -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 to build EGL_DRIVERS_DIRS = demo # 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 i915 failover trace identity +GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a +GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 i965 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_STATE_TRACKERS_DIRS = glx +# native displays EGL should support +EGL_DISPLAYS = x11 # Library dependencies #EXTRA_LIB_PATH ?= diff --git a/configs/linux b/configs/linux index 73a6b61b2f6..c60f0d8ac3b 100644 --- a/configs/linux +++ b/configs/linux @@ -23,11 +23,11 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ X11_INCLUDES = -I/usr/X11R6/include CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ - $(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math + -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ + $(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math -CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(X11_INCLUDES) +CXXFLAGS = -Wall -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ + $(DEFINES) $(X11_INCLUDES) # Work around aliasing bugs - developers should comment this out CFLAGS += -fno-strict-aliasing 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 bc6d2336fc3..8b0b3126db6 100644 --- a/configs/linux-debug +++ b/configs/linux-debug @@ -4,5 +4,6 @@ include $(TOP)/configs/linux CONFIG_NAME = linux-debug -OPT_FLAGS = -g -ansi -pedantic +OPT_FLAGS = -g +CFLAGS += -ansi -pedantic DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/configs/linux-dri b/configs/linux-dri index 6c3c0ab9211..ff9bcc9396a 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -60,8 +60,14 @@ EGL_DRIVERS_DIRS = demo glx DRIVER_DIRS = dri WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = drm -GALLIUM_WINSYS_DRM_DIRS = 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-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/configure.ac b/configure.ac index 2984ee24a03..1f94248824c 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,9 @@ AC_CANONICAL_HOST dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.15 -DRI2PROTO_REQUIRED=1.99.3 +LIBDRM_RADEON_REQUIRED=2.4.17 +DRI2PROTO_REQUIRED=2.2 +GLPROTO_REQUIRED=1.4.11 dnl Check for progs AC_PROG_CPP @@ -94,7 +96,7 @@ esac dnl Add flags for gcc and g++ if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math" + CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden" # Work around aliasing bugs - developers should comment this out CFLAGS="$CFLAGS -fno-strict-aliasing" @@ -242,24 +244,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 @@ -413,13 +419,12 @@ esac dnl dnl Driver specific build directories dnl -SRC_DIRS="mesa glew" +SRC_DIRS="glsl mesa 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="" @@ -446,10 +451,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 @@ -576,13 +578,7 @@ dri) PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" - - PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon], 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 + PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then @@ -803,6 +799,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 @@ -887,17 +906,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 @@ -1143,7 +1160,14 @@ yes) GALLIUM_STATE_TRACKERS_DIRS=glx ;; dri) - test "x$enable_egl" = xyes && GALLIUM_STATE_TRACKERS_DIRS=egl + GALLIUM_STATE_TRACKERS_DIRS="dri" + if test "x$enable_egl" = xyes; then + GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl egl_g3d" + fi + # Have only tested st/xorg on 1.6.0 servers + PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0], + HAVE_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg", + HAVE_XORG="no") ;; esac ;; @@ -1175,6 +1199,35 @@ yes) ;; 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_g3d/$dpy" || \ + AC_MSG_ERROR([EGL display '$dpy' does't exist]) + done + EGL_DISPLAYS="$egl_displays" + ;; +esac +AC_SUBST([EGL_DISPLAYS]) + AC_ARG_WITH([xorg-driver-dir], [AS_HELP_STRING([--with-xorg-driver-dir=DIR], [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])], @@ -1197,17 +1250,34 @@ AC_ARG_WITH([max-height], [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])] ) +dnl +dnl Gallium SVGA configuration +dnl +AC_ARG_ENABLE([gallium-svga], + [AS_HELP_STRING([--enable-gallium-svga], + [build gallium SVGA @<:@default=disabled@:>@])], + [enable_gallium_svga="$enableval"], + [enable_gallium_svga=auto]) +if test "x$enable_gallium_svga" = xyes; then + GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS vmware" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" +elif test "x$enable_gallium_svga" = xauto; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" +fi + dnl dnl Gallium Intel configuration dnl AC_ARG_ENABLE([gallium-intel], - [AS_HELP_STRING([--disable-gallium-intel], - [build gallium intel @<:@default=enabled@:>@])], + [AS_HELP_STRING([--enable-gallium-intel], + [build gallium intel @<:@default=disabled@:>@])], [enable_gallium_intel="$enableval"], - [enable_gallium_intel=yes]) + [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 i965" fi dnl @@ -1289,7 +1359,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/README.WIN32 b/docs/README.WIN32 index 97e1ffb7a75..204b8e66041 100644 --- a/docs/README.WIN32 +++ b/docs/README.WIN32 @@ -27,12 +27,6 @@ using the SDK with Visual Studio Express can be found at http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/ -If you are stuck using VC6 or VC7, you may start with these project -files, but you may need to modify them to reflect changes in the -Mesa source code tree. If you sucessfully update the project files, -please submit them to the author of this document so that they may -be included in the next distribution. - The project files to build the core Mesa library, Windows Mesa drivers, OSMesa, and GLU are in the mesa directory. The project files to build GLUT and some demo programs are in the progs directory. @@ -106,23 +100,6 @@ should build all the demos. Build System Notes ----- ------ ----- -VC6 (not actively supported) ---- - -Visual Studio 6 does not recognize files with the .cc extension as C++ -language files, without a lot of unnatural tweaking. So, the VC6 -build process uses custom build steps to compile these files in the -GLU library. - -Two additional configurations are provided, Debug x86 and Release x86 -that activate the shader code compilation by defining SLANG_86. It is -unknown if and how this works. - -VC7 (not actively supported) ---- - -The above-mentioned .cc problem does not exist in this version. - VC8 --- diff --git a/docs/install.html b/docs/install.html index 8c24cee7a3e..5aea92e0b51 100644 --- a/docs/install.html +++ b/docs/install.html @@ -351,20 +351,11 @@ example linux or windows, machine is x86 or x86_64, optionally followed by -debug for debug builds.

-

-The sample programs are built seperately. To build them do -

-    scons -C progs
-
-And the build output will be placed in progs/build/... -

-

To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do

     scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
-    scons -C progs platform=windows toolchain=crossmingw machine=x86 -k
 

This will create: diff --git a/docs/libGL.txt b/docs/libGL.txt new file mode 100644 index 00000000000..cb988404370 --- /dev/null +++ b/docs/libGL.txt @@ -0,0 +1,197 @@ + + + +Introduction +------------ + +This document describes the implementation of the XFree86 4.0 libGL.so +library defined by the Linux/OpenGL Base specification found at +http://reality.sgi.com/opengl/linux/linuxbase.html. + +The documentation is divided into two sections: + User's Guide + Driver Developer's Guide + +Author: Brian Paul (brian@precisioninsight.com) +Date: February 2000 + + + +User's Guide +------------ + +Using libGL.so + +The libGL.so library defines the gl- and glX-prefixed functions needed to +run OpenGL programs. OpenGL client applications should link with the +-lGL option to use it. + +libGL.so serves two primary functions: GLX protocol generation for indirect +rendering and loading/management of hardware drivers for direct rendering. + +When libGL.so initializes itself it uses the DRI to determine the +appropriate hardware driver for each screen on the local X display. +The hardware drivers are expected to be in the /usr/X11R6/lib/modules/dri/ +directory. Drivers are named with the convention _dri.so where + is a driver such as "tdfx", "i810", "gamma", etc. + +The LIBGL_DRIVERS_DIR environment variable may be used to specify a +different DRI modules directory, overriding /usr/X11R6/lib/modules/dri/. +This environment variable is ignored in setuid programs for security +reasons. + +When libGL.so is unable to locate appropriate hardware drivers it will +fall back to using indirect GLX rendering. + +To aid in solving problems, libGL.so will print diagnostic messages to +stderr if the LIBGL_DEBUG environment variable is defined. + +libGL.so is thread safe. The overhead of thread safety for common, +single-thread clients is negligible. However, the overhead of thread +safety for multi-threaded clients is significant. Each GL API call +requires two calls to pthread_get_specific() which can noticably +impact performance. Warning: libGL.so is thread safe but individual +DRI drivers may not be. Please consult the documentation for a driver +to learn if it is thread safe. + + + +Indirect Rendering + +You can force indirect rendering mode by setting the LIBGL_ALWAYS_INDIRECT +environment variable. Hardware acceleration will not be used. + + + +libGL.so Extensibility + +libGL.so is designed to be extended without upgrading. That is, +drivers may install new OpenGL extension functions into libGL.so +without requiring libGL.so to be replaced. Clients of libGL.so should +use the glXGetProcAddressEXT() function to obtain the address of +functions by name. For more details of GLX_ARB_get_proc_address see +http://oss.sgi.com/projects/ogl-sample/registry/ARB/get_proc_address.spec + +libGL.so is also designed with flexibility such that it may be used +with many generations of hardware drivers to come. + + + + +Driver Developer's Guide +------------------------ + +This section describes the requirements to make an XFree86 4.0 +libGL.so-compatible hardware driver. It is not intended for end +users of libGL.so. + + +XFree86 source files + +libGL.so is built inside XFree86 with sources found in xc/lib/GL/. +Specifically, libGL.so is built from: + + xc/lib/GL/glx/*.c + xc/lib/dri/XF86dri.c + xc/lib/dri/dri_glx.c + xc/lib/GL/mesa/src/glapi.c + xc/lib/GL/mesa/src/glapitemp.h + xc/lib/GL/mesa/src/glapitable.h + xc/lib/GL/mesa/src/glapioffsets.h + xc/lib/GL/mesa/src/glapinoop.c + xc/lib/GL/mesa/src/glheader.h + xc/lib/GL/mesa/src/glthread.c + xc/lib/GL/mesa/src/glthread.h + xc/lib/GL/mesa/src/X86/glapi_x86.S + xc/lib/GL/mesa/src/X86/assyntax.h + +Understand that the mesa/src/gl*.[ch] files are not tied to Mesa. They +have no dependencies on the rest of Mesa and are designed to be reusable +in a number of projects. + +The glapi_x86.X and assyntax.h files implement x86-optimized dispatch +of GL functions. They are not required; C-based dispatch can be used +instead, with a slight performance penalty. + + + +Driver loading and binding + +When libGL.so initializes itself (via the __glXInitialize function) a +call is made to driCreateDisplay(). This function uses DRI facilities +to determine the driver file appropriate for each screen on the local +display. Each screen's driver is then opened with dlopen() and asked +for its __driCreateScreen() function. The pointers to the __driCreateScreen() +functions are kept in an array, indexed by screen number, in the +__DRIdisplayRec struct. + +When a driver's __driCreateScreen() function is called, it must initialize +a __DRIscreenRec struct. This struct acts as the root of a tree of +function pointers which are called to create and destroy contexts and +drawables and perform all the operations needed by the GLX interface. +See the xc/lib/GL/glx/glxclient.h file for details. + + + +Dynamic Extension Function Registration + +In order to provide forward compatibility with future drivers, libGL.so +allows drivers to register new OpenGL extension functions which weren't +known when libGL.so was built. + +The register_extensions() function in xc/lib/GL/dri/dri_glx.c is called +as soon as libGL.so is loaded. This is done with gcc's constructor +attribute. This mechanism will likely have to be changed for other compilers. + +register_extensions() loops over all local displays and screens, determines +the DRI driver for each, and calls the driver's __driRegisterExtensions() +function, if present. + +The __driRegisterExtensions() function can add new entrypoints to libGL +by calling: + + GLboolean _glapi_add_entrypoint(const char *funcName, GLuint offset) + +The parameters are the name of the function (such as "glFoobarEXT") and the +offset of the dispatch slot in the API dispatch table. The return value +indicates success (GL_TRUE) or failure (GL_FALSE). + +_glapi_add_entrypoint() will synthesize entrypoint code in assembly +language. Assembly languages is required since parameter passing +can't be handled correctly using a C-based solution. + +The address of the new entrypoint is obtained by calling the +glXGetProcAddressARB() function. + +The dispatch offset number MUST be a number allocated by SGI in the same +manner in which new GL_* constants are allocated. Using an arbitrary +offset number will result in many problems. + + + +Dispatch Management + +When a GL context is made current, the driver must install its dispatch +table as the current dispatch table. This is done by calling + + void _glapi_set_dispatch(struct _glapi_table *dispatch); + +This will install the named dispatch table for the calling thread. +The current dispatch table for a thread can be obtained by calling + + struct _glapi_table *_glapi_get_dispatch(void); + +For higher performance in the common single-thread case, the global +variable _glapi_Dispatch will point to the current dispatch table. +This variable will be NULL when in multi-thread mode. + + + +Context Management + +libGL.so uses the XFree86 xthreads package to manage a thread-specific +current context pointer. See __glXGet/SetCurrentContext() in glext.c + +Drivers may use the _glapi_set/get_context() functions to maintain +a private thread-specific context pointer. + diff --git a/docs/news.html b/docs/news.html index 93da56a5c33..0a0be715c1b 100644 --- a/docs/news.html +++ b/docs/news.html @@ -10,6 +10,17 @@

News

+

December 21, 2009

+

+Mesa 7.6.1 is released. This is a bug-fix +release fixing issues found in the 7.6 release. +

+

+Also, Mesa 7.7 is released. This is a new +development release. +

+ +

September 28, 2009

Mesa 7.6 is released. This is a new feature diff --git a/docs/relnotes-7.6.1.html b/docs/relnotes-7.6.1.html index 9ee6babc9d8..1d0ecd2ac09 100644 --- a/docs/relnotes-7.6.1.html +++ b/docs/relnotes-7.6.1.html @@ -8,7 +8,7 @@ -

Mesa 7.6.1 Release Notes, (date tbd)

+

Mesa 7.6.1 Release Notes, 21 December 2009

Mesa 7.6.1 is a bug-fix release fixing issues since version 7.6. @@ -26,7 +26,15 @@ for DRI hardware acceleration.

MD5 checksums

-tbd
+e80fabad2e3eb7990adae773d6aeacba  MesaLib-7.6.1.tar.gz
+7db4617e9e10ad3aca1b64339fd71b7d  MesaLib-7.6.1.tar.bz2
+dd3275dbf9833480d2e92d0c69b22abd  MesaLib-7.6.1.zip
+f7fdcfe3c0f363e571c60f02f74368fb  MesaDemos-7.6.1.tar.gz
+a4226f06732a02556fcf6be290b86dff  MesaDemos-7.6.1.tar.bz2
+849425f356bd940726cebedfa79de176  MesaDemos-7.6.1.zip
+d40cc7c5e337a85b674e27a8e494f52f  MesaGLUT-7.6.1.tar.gz
+ca9aecb91f05b1da9fd7d5eeb19d47d7  MesaGLUT-7.6.1.tar.bz2
+23fad8398004c977a1d8953079b72ca6  MesaGLUT-7.6.1.zip
 
@@ -34,6 +42,7 @@ tbd @@ -52,7 +61,20 @@ tbd it returns the actual compressed format chosen.
  • Fixed glBitmap bugs in Intel drivers.
  • Fixed a number of Microsoft Visual Studio compilation problems. +
  • Fixed clipping / provoking vertex bugs in i965 driver. +
  • Assorted build fixes for AIX. +
  • Endianness fixes for the DRI swrast driver (bug 22767).
  • +
  • Point sprite fixes for i915/945 driver. +
  • Fixed assorted memory leaks (usually on error paths) +
  • Fixed some GLSL compiler bugs (ex: 25579) +
  • Assorted build fixes for BlueGene +

    Changes

    + + + diff --git a/docs/relnotes-7.7.1.html b/docs/relnotes-7.7.1.html new file mode 100644 index 00000000000..b20c8a7724f --- /dev/null +++ b/docs/relnotes-7.7.1.html @@ -0,0 +1,50 @@ + + +Mesa Release Notes + + + + + + + +

    Mesa 7.7.1 Release Notes / date tbd

    + +

    +Mesa 7.7.1 is a bug-fix release. +

    +

    +Mesa 7.7.1 implements the OpenGL 2.1 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 2.1. +

    +

    +See the Compiling/Installing page for prerequisites +for DRI hardware acceleration. +

    + + +

    MD5 checksums

    +
    +tbd
    +
    + + +

    New features

    + + + +

    Bug fixes

    + + + + + diff --git a/docs/relnotes-7.7.html b/docs/relnotes-7.7.html index 856b8fae3d7..c1ed6546135 100644 --- a/docs/relnotes-7.7.html +++ b/docs/relnotes-7.7.html @@ -8,7 +8,7 @@ -

    Mesa 7.7 Release Notes / date TBD

    +

    Mesa 7.7 Release Notes / 21 December 2009

    Mesa 7.7 is a new development release. @@ -28,12 +28,23 @@ for DRI hardware acceleration.

    MD5 checksums

    -tbd
    +395c9516edf1ad54b0934d8db15557bf  MesaLib-7.7.tar.gz
    +e3fa64a1508bc23dd9de9dd2cea7cfb1  MesaLib-7.7.tar.bz2
    +e54903eb5e49c3969821fa16b32da245  MesaLib-7.7.zip
    +53b5b6f78e55de170d43c98cb6aaab7e  MesaDemos-7.7.tar.gz
    +6fd616b27b9826d0faa23e08e05d9435  MesaDemos-7.7.tar.bz2
    +240fe06159ad73d5e22c27033b66c80a  MesaDemos-7.7.zip
    +9fe11a904b2a9d8cd06cc52bc330b716  MesaGLUT-7.7.tar.gz
    +e8dceed05a59a2d3c2619d7d734587e3  MesaGLUT-7.7.tar.bz2
    +96af041d435349ee23ead4667ec36363  MesaGLUT-7.7.zip
     

    New features