Compare commits
	
		
			92 Commits
		
	
	
		
			mesa_7_4_r
			...
			mesa_7_4_2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					da709f163f | ||
| 
						 | 
					3a1bcbe579 | ||
| 
						 | 
					ec863602f2 | ||
| 
						 | 
					2ff47b80f5 | ||
| 
						 | 
					63cde0ea0e | ||
| 
						 | 
					c521d4629b | ||
| 
						 | 
					e9d5569bf3 | ||
| 
						 | 
					6337525497 | ||
| 
						 | 
					7541c3806a | ||
| 
						 | 
					a1ce4efefb | ||
| 
						 | 
					656cd707db | ||
| 
						 | 
					ce7f78694d | ||
| 
						 | 
					fd95e8ee33 | ||
| 
						 | 
					d2b8c41b7a | ||
| 
						 | 
					bfd6bb31a6 | ||
| 
						 | 
					c3e7fc394f | ||
| 
						 | 
					dd56897b27 | ||
| 
						 | 
					e8807a14a6 | ||
| 
						 | 
					c38397866d | ||
| 
						 | 
					dce84002c2 | ||
| 
						 | 
					c490349825 | ||
| 
						 | 
					f62d45fd0d | ||
| 
						 | 
					b2dfc29a82 | ||
| 
						 | 
					7c1e61f41c | ||
| 
						 | 
					5654197d12 | ||
| 
						 | 
					87cb55e9c6 | ||
| 
						 | 
					e7d499f935 | ||
| 
						 | 
					51e7600d77 | ||
| 
						 | 
					69b17abd6b | ||
| 
						 | 
					a975da7aca | ||
| 
						 | 
					ecf47b5046 | ||
| 
						 | 
					fed8dc53ad | ||
| 
						 | 
					1f462e26c0 | ||
| 
						 | 
					85396d8ef4 | ||
| 
						 | 
					f11b84998d | ||
| 
						 | 
					d2f6791062 | ||
| 
						 | 
					49e0c74ddd | ||
| 
						 | 
					83e14773c5 | ||
| 
						 | 
					4605937843 | ||
| 
						 | 
					b8ef30c45c | ||
| 
						 | 
					4f17040cb1 | ||
| 
						 | 
					98c2c9ef8c | ||
| 
						 | 
					d805c82068 | ||
| 
						 | 
					6c3bec4387 | ||
| 
						 | 
					7d3561c871 | ||
| 
						 | 
					5c47d53924 | ||
| 
						 | 
					a18216308a | ||
| 
						 | 
					14f13fbcfa | ||
| 
						 | 
					ca24095c1e | ||
| 
						 | 
					d5e0e03d43 | ||
| 
						 | 
					775ca8e3fa | ||
| 
						 | 
					39345a4928 | ||
| 
						 | 
					7be149cfd1 | ||
| 
						 | 
					8c9d7b2474 | ||
| 
						 | 
					6ef0951b17 | ||
| 
						 | 
					2b33b77337 | ||
| 
						 | 
					0590edeea0 | ||
| 
						 | 
					7511d76bd7 | ||
| 
						 | 
					7f30aba920 | ||
| 
						 | 
					4fa700260e | ||
| 
						 | 
					781fb79c59 | ||
| 
						 | 
					5b7e9f2f3a | ||
| 
						 | 
					d4d4b63d7f | ||
| 
						 | 
					9e9fe51acd | ||
| 
						 | 
					b65bc1b6cb | ||
| 
						 | 
					6cb796f6fc | ||
| 
						 | 
					de197cf991 | ||
| 
						 | 
					bf1e6581a5 | ||
| 
						 | 
					80ec7843bc | ||
| 
						 | 
					366d6e8cd1 | ||
| 
						 | 
					63ed288396 | ||
| 
						 | 
					88ce34f400 | ||
| 
						 | 
					f535de8721 | ||
| 
						 | 
					1db913f687 | ||
| 
						 | 
					0e5d1f43af | ||
| 
						 | 
					09c587ae55 | ||
| 
						 | 
					775d8431e9 | ||
| 
						 | 
					3217ea8a1d | ||
| 
						 | 
					00aea5853d | ||
| 
						 | 
					20d34b50b5 | ||
| 
						 | 
					9cff0acb36 | ||
| 
						 | 
					791b59493f | ||
| 
						 | 
					7dff7029fa | ||
| 
						 | 
					f8fd9bc46b | ||
| 
						 | 
					53f0e141c0 | ||
| 
						 | 
					14a794300e | ||
| 
						 | 
					912ec292c1 | ||
| 
						 | 
					e814b5ae2f | ||
| 
						 | 
					0fea05915a | ||
| 
						 | 
					dfa44f0ff9 | ||
| 
						 | 
					f850ff2bcc | ||
| 
						 | 
					66f972ab55 | 
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							@@ -35,6 +35,8 @@ realclean: clean
 | 
			
		||||
	  -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
distclean: realclean
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
	@for dir in $(SUBDIRS) ; do \
 | 
			
		||||
@@ -48,7 +50,9 @@ install:
 | 
			
		||||
linux-directfb-install:
 | 
			
		||||
	cd src/mesa/drivers/directfb && $(MAKE) install
 | 
			
		||||
 | 
			
		||||
.PHONY: default doxygen clean realclean install linux-directfb-install
 | 
			
		||||
 | 
			
		||||
.PHONY: default doxygen clean realclean distclean install linux-directfb-install
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# If there's no current configuration file
 | 
			
		||||
$(TOP)/configs/current:
 | 
			
		||||
@@ -174,7 +178,7 @@ ultrix-gcc:
 | 
			
		||||
 | 
			
		||||
# Rules for making release tarballs
 | 
			
		||||
 | 
			
		||||
VERSION=7.4-rc1
 | 
			
		||||
VERSION=7.4.2
 | 
			
		||||
DIRECTORY = Mesa-$(VERSION)
 | 
			
		||||
LIB_NAME = MesaLib-$(VERSION)
 | 
			
		||||
DEMO_NAME = MesaDemos-$(VERSION)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										28
									
								
								bin/mklib
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								bin/mklib
									
									
									
									
									
								
							@@ -394,6 +394,30 @@ case $ARCH in
 | 
			
		||||
		fi
 | 
			
		||||
	    fi
 | 
			
		||||
 | 
			
		||||
	    # If using Sun C++ compiler, need to tell it not to add runpaths
 | 
			
		||||
	    # that are specific to the build machine
 | 
			
		||||
	    if [ ${LINK} = "CC" ] ; then
 | 
			
		||||
		OPTS="${OPTS} -norunpath"
 | 
			
		||||
	    fi
 | 
			
		||||
 | 
			
		||||
	    # Solaris linker requires explicitly listing the Standard C & C++
 | 
			
		||||
	    # libraries in the link path when building shared objects
 | 
			
		||||
	    if [ ${LINK} = "CC" ] ; then
 | 
			
		||||
		DEPS="${DEPS} -lCrun"
 | 
			
		||||
	    fi
 | 
			
		||||
	    DEPS="${DEPS} -lc"
 | 
			
		||||
 | 
			
		||||
	    if [ $EXPORTS ] ; then
 | 
			
		||||
		# Make the 'mapfile.scope' linker mapfile
 | 
			
		||||
		echo "{" > mapfile.scope
 | 
			
		||||
		echo "global:" >> mapfile.scope
 | 
			
		||||
		sed 's/$/;/' ${EXPORTS} >> mapfile.scope
 | 
			
		||||
		echo "local:" >> mapfile.scope
 | 
			
		||||
		echo "    *;" >> mapfile.scope
 | 
			
		||||
		echo "};" >> mapfile.scope
 | 
			
		||||
		OPTS="${OPTS} -Wl,-Mmapfile.scope"
 | 
			
		||||
	    fi
 | 
			
		||||
 | 
			
		||||
	    # Check if objects are SPARC v9
 | 
			
		||||
	    # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
 | 
			
		||||
	    set ${OBJECTS}
 | 
			
		||||
@@ -406,17 +430,19 @@ case $ARCH in
 | 
			
		||||
            if [ "${ALTOPTS}" ] ; then
 | 
			
		||||
                OPTS=${ALTOPTS}
 | 
			
		||||
            fi
 | 
			
		||||
 | 
			
		||||
	    # for debug:
 | 
			
		||||
	    #echo "mklib: linker is" ${LINK} ${OPTS}
 | 
			
		||||
	    if [ $NOPREFIX = 1 ] ; then
 | 
			
		||||
		rm -f ${LIBNAME}
 | 
			
		||||
		${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
 | 
			
		||||
		FINAL_LIBS="${LIBNAME}"
 | 
			
		||||
	    else
 | 
			
		||||
		rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
 | 
			
		||||
		${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
 | 
			
		||||
		ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
 | 
			
		||||
		FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
 | 
			
		||||
	    fi
 | 
			
		||||
	    FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
 | 
			
		||||
	fi
 | 
			
		||||
	;;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,8 @@ CONFIG_NAME = darwin
 | 
			
		||||
 | 
			
		||||
INSTALL_DIR = /usr/X11
 | 
			
		||||
 | 
			
		||||
X11_DIR = $(INSTALL_DIR)
 | 
			
		||||
 | 
			
		||||
# Compiler and flags
 | 
			
		||||
CC = gcc
 | 
			
		||||
CXX = gcc
 | 
			
		||||
@@ -21,9 +23,9 @@ DEFINES =  -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
 | 
			
		||||
ARCH_FLAGS += $(RC_CFLAGS)
 | 
			
		||||
 | 
			
		||||
CFLAGS =  -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
 | 
			
		||||
	-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
 | 
			
		||||
	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
 | 
			
		||||
CXXFLAGS =  -ggdb3 -Os -Wall -fno-strict-aliasing \
 | 
			
		||||
	-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
 | 
			
		||||
	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
 | 
			
		||||
 | 
			
		||||
# Library names (actual file names)
 | 
			
		||||
GL_LIB_NAME = libGL.dylib
 | 
			
		||||
@@ -39,12 +41,12 @@ GLUT_LIB_GLOB = libglut.*dylib
 | 
			
		||||
GLW_LIB_GLOB = libGLw.*dylib
 | 
			
		||||
OSMESA_LIB_GLOB = libOSMesa.*dylib
 | 
			
		||||
 | 
			
		||||
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
 | 
			
		||||
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
 | 
			
		||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
 | 
			
		||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
 | 
			
		||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB)  -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
 | 
			
		||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXt
 | 
			
		||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
 | 
			
		||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB)  -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
 | 
			
		||||
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 = glx/x11 mesa glu glut/glx
 | 
			
		||||
 
 | 
			
		||||
@@ -9,8 +9,8 @@ CONFIG_NAME = default
 | 
			
		||||
 | 
			
		||||
# Version info
 | 
			
		||||
MESA_MAJOR=7
 | 
			
		||||
MESA_MINOR=3
 | 
			
		||||
MESA_TINY=0
 | 
			
		||||
MESA_MINOR=4
 | 
			
		||||
MESA_TINY=2
 | 
			
		||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
 | 
			
		||||
 | 
			
		||||
# external projects.  This should be useless now that we use libdrm.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										33
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								configure.ac
									
									
									
									
									
								
							@@ -346,17 +346,6 @@ if test "x$enable_selinux" = "xyes"; then
 | 
			
		||||
    DEFINES="$DEFINES -DMESA_SELINUX"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
dnl OS-specific libraries
 | 
			
		||||
OS_LIBS=""
 | 
			
		||||
case "$host_os" in
 | 
			
		||||
solaris*)
 | 
			
		||||
    OS_LIBS="-lc"
 | 
			
		||||
    if test "x$GXX" != xyes; then
 | 
			
		||||
        OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS"
 | 
			
		||||
    fi
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
dnl
 | 
			
		||||
dnl Driver configuration. Options are xlib, dri and osmesa right now.
 | 
			
		||||
dnl More later: directfb, fbdev, ...
 | 
			
		||||
@@ -518,8 +507,8 @@ xlib)
 | 
			
		||||
        GL_PC_LIB_PRIV="$GL_LIB_DEPS"
 | 
			
		||||
        GL_PC_CFLAGS="$X11_INCLUDES"
 | 
			
		||||
    fi
 | 
			
		||||
    GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
 | 
			
		||||
    GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $OS_LIBS"
 | 
			
		||||
    GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
 | 
			
		||||
    GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
 | 
			
		||||
 | 
			
		||||
    # if static, move the external libraries to the programs
 | 
			
		||||
    # and empty the libraries for libGL
 | 
			
		||||
@@ -569,12 +558,12 @@ dri)
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # need DRM libs, -lpthread, etc.
 | 
			
		||||
    GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
 | 
			
		||||
    GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS $OS_LIBS"
 | 
			
		||||
    GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
 | 
			
		||||
    GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
 | 
			
		||||
    ;;
 | 
			
		||||
osmesa)
 | 
			
		||||
    # No libGL for osmesa
 | 
			
		||||
    GL_LIB_DEPS="$OS_LIBS"
 | 
			
		||||
    GL_LIB_DEPS=""
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
AC_SUBST([GL_LIB_DEPS])
 | 
			
		||||
@@ -817,9 +806,9 @@ osmesa)
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
if test "$enable_static" = no; then
 | 
			
		||||
    OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
 | 
			
		||||
    OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS"
 | 
			
		||||
fi
 | 
			
		||||
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV $OS_LIBS"
 | 
			
		||||
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
 | 
			
		||||
AC_SUBST([OSMESA_LIB_DEPS])
 | 
			
		||||
AC_SUBST([OSMESA_MESA_DEPS])
 | 
			
		||||
AC_SUBST([OSMESA_PC_REQ])
 | 
			
		||||
@@ -932,10 +921,10 @@ if test "x$enable_glw" = xyes; then
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # If static, empty GLW_LIB_DEPS and add libs for programs to link
 | 
			
		||||
    GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV $OS_LIBS"
 | 
			
		||||
    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 $OS_LIBS"
 | 
			
		||||
        GLW_LIB_DEPS="$GLW_LIB_DEPS"
 | 
			
		||||
    else
 | 
			
		||||
        APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
 | 
			
		||||
        GLW_LIB_DEPS=""
 | 
			
		||||
@@ -991,8 +980,8 @@ if test "x$enable_glut" = xyes; then
 | 
			
		||||
        GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
 | 
			
		||||
        GLUT_PC_CFLAGS="$X11_INCLUDES"
 | 
			
		||||
    fi
 | 
			
		||||
    GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
 | 
			
		||||
    GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm $OS_LIBS"
 | 
			
		||||
    GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
 | 
			
		||||
    GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"
 | 
			
		||||
 | 
			
		||||
    # If glut is available, we can build most programs
 | 
			
		||||
    if test "$with_demos" = yes; then
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
<H1>Downloading</H1>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
Current stable release: <b>7.4</b>
 | 
			
		||||
Current stable release: <b>7.4.2</b>
 | 
			
		||||
<br>
 | 
			
		||||
Last unstable/development release: <b>7.3</b>
 | 
			
		||||
</p>
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,21 @@
 | 
			
		||||
<H1>News</H1>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>March ??, 2009</h2>
 | 
			
		||||
<h2>May 15, 2009</h2>
 | 
			
		||||
<p>
 | 
			
		||||
<a href="relnotes-7.4.2.html">Mesa 7.4.2</a> is released.
 | 
			
		||||
This is a stable release fixing bugs since the 7.4.1 release.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>April 18, 2009</h2>
 | 
			
		||||
<p>
 | 
			
		||||
<a href="relnotes-7.4.1.html">Mesa 7.4.1</a> is released.
 | 
			
		||||
This is a stable release fixing bugs since the 7.4 release.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>March 27, 2009</h2>
 | 
			
		||||
<p>
 | 
			
		||||
<a href="relnotes-7.4.html">Mesa 7.4</a> is released.
 | 
			
		||||
This is a stable release fixing bugs since the 7.3 release.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										79
									
								
								docs/relnotes-7.4.1.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								docs/relnotes-7.4.1.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,79 @@
 | 
			
		||||
<HTML>
 | 
			
		||||
 | 
			
		||||
<TITLE>Mesa Release Notes</TITLE>
 | 
			
		||||
 | 
			
		||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
 | 
			
		||||
 | 
			
		||||
<BODY>
 | 
			
		||||
 | 
			
		||||
<body bgcolor="#eeeeee">
 | 
			
		||||
 | 
			
		||||
<H1>Mesa 7.4.1 Release Notes / 18 April 2009</H1>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
Mesa 7.4.1 is a stable development release fixing bugs since the 7.4 release.
 | 
			
		||||
</p>
 | 
			
		||||
<p>
 | 
			
		||||
Mesa 7.4.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.
 | 
			
		||||
</p>
 | 
			
		||||
<p>
 | 
			
		||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
 | 
			
		||||
for DRI hardware acceleration.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>MD5 checksums</h2>
 | 
			
		||||
<pre>
 | 
			
		||||
0c3a72f3295a53a134c04bd7d209ea62  MesaLib-7.4.1.tar.gz
 | 
			
		||||
423260578b653818ba66c2fcbde6d7ad  MesaLib-7.4.1.tar.bz2
 | 
			
		||||
84f78b154d4bd5c3ecc42eeff2e56676  MesaLib-7.4.1.zip
 | 
			
		||||
aa0ad323e59d6d10ff33ac0dde462a60  MesaDemos-7.4.1.tar.gz
 | 
			
		||||
1e169fb6abc2b45613f1c98a82dfe690  MesaDemos-7.4.1.tar.bz2
 | 
			
		||||
294e42be2d74176596c994ec23322fcf  MesaDemos-7.4.1.zip
 | 
			
		||||
92373bfa48e7b68dddf356e86b0e5699  MesaGLUT-7.4.1.tar.gz
 | 
			
		||||
336f3824b578b072211e0beecf4f04f4  MesaGLUT-7.4.1.tar.bz2
 | 
			
		||||
20751388d8ef16b42d25d9e3d705d101  MesaGLUT-7.4.1.zip
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>Bug fixes</h2>
 | 
			
		||||
<ul>
 | 
			
		||||
<li>Fixed a two-sided lighting bug in fixed-function-to-GPU code generation
 | 
			
		||||
<li>Fixed some Darwin issues (Jeremy Huddleston)
 | 
			
		||||
<li>Indexing the GLSL gl_EyePlane[] or gl_ObjectPlane[] arrays with a variable
 | 
			
		||||
    was broken, bug 20986
 | 
			
		||||
<li>Fixed incorrect texture unit bias in TXB instruction
 | 
			
		||||
<li>glTexParameter settings weren't always propogated to drivers
 | 
			
		||||
<li>Assorted vertex/fragment program bug fixes
 | 
			
		||||
<li>Fixed point rendering in software rasterizer
 | 
			
		||||
<li>Fixed potential deadlock in object hash functions
 | 
			
		||||
<li>Fix a couple bugs surrounding front-buffer rendering with DRI2, but this
 | 
			
		||||
    is not quite complete.
 | 
			
		||||
<li>Fixed glPopAttrib() bug when restoring user clip planes
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>Driver Status</h2>
 | 
			
		||||
 | 
			
		||||
<pre>
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	----------------------
 | 
			
		||||
DRI drivers		varies with the driver
 | 
			
		||||
XMesa/GLX (on Xlib)	implements OpenGL 2.1
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 2.1
 | 
			
		||||
Windows/Win32		implements OpenGL 2.1
 | 
			
		||||
Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			unsupported
 | 
			
		||||
Wind River UGL		unsupported
 | 
			
		||||
DJGPP			unsupported
 | 
			
		||||
GGI			unsupported
 | 
			
		||||
BeOS			unsupported
 | 
			
		||||
Allegro			unsupported
 | 
			
		||||
D3D			unsupported
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										66
									
								
								docs/relnotes-7.4.2.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								docs/relnotes-7.4.2.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,66 @@
 | 
			
		||||
<HTML>
 | 
			
		||||
 | 
			
		||||
<TITLE>Mesa Release Notes</TITLE>
 | 
			
		||||
 | 
			
		||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
 | 
			
		||||
 | 
			
		||||
<BODY>
 | 
			
		||||
 | 
			
		||||
<body bgcolor="#eeeeee">
 | 
			
		||||
 | 
			
		||||
<H1>Mesa 7.4.2 Release Notes / May 15, 2009</H1>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
Mesa 7.4.2 is a stable development release fixing bugs since the 7.4.1 release.
 | 
			
		||||
</p>
 | 
			
		||||
<p>
 | 
			
		||||
Mesa 7.4.2 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.
 | 
			
		||||
</p>
 | 
			
		||||
<p>
 | 
			
		||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
 | 
			
		||||
for DRI hardware acceleration.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>MD5 checksums</h2>
 | 
			
		||||
<pre>
 | 
			
		||||
tbd
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>Bug fixes</h2>
 | 
			
		||||
<ul>
 | 
			
		||||
<li>Fixed segfault when rendering to front buffer with DRI 1.
 | 
			
		||||
<li>Fixed swrast texture rectangle bug when wrap mode = GL_CLAMP_TO_BORDER and
 | 
			
		||||
    filter mode = GL_LINEAR.  (bug 21461)
 | 
			
		||||
<li>Fixed texture object mem leak during context destruction.
 | 
			
		||||
<li>Fixed a state validation bug in glCopyTex[Sub]Image()
 | 
			
		||||
<li>Fixed some i965 GLSL bugs.
 | 
			
		||||
<li>Fixed an R300 driver texture object bad memory reference.
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>Driver Status</h2>
 | 
			
		||||
 | 
			
		||||
<pre>
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	----------------------
 | 
			
		||||
DRI drivers		varies with the driver
 | 
			
		||||
XMesa/GLX (on Xlib)	implements OpenGL 2.1
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 2.1
 | 
			
		||||
Windows/Win32		implements OpenGL 2.1
 | 
			
		||||
Glide (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			unsupported
 | 
			
		||||
Wind River UGL		unsupported
 | 
			
		||||
DJGPP			unsupported
 | 
			
		||||
GGI			unsupported
 | 
			
		||||
BeOS			unsupported
 | 
			
		||||
Allegro			unsupported
 | 
			
		||||
D3D			unsupported
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
 | 
			
		||||
<body bgcolor="#eeeeee">
 | 
			
		||||
 | 
			
		||||
<H1>Mesa 7.4 Release Notes / date TBD</H1>
 | 
			
		||||
<H1>Mesa 7.4 Release Notes / 27 March 2009</H1>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
Mesa 7.4 is a stable development release fixing bugs since the 7.3 release.
 | 
			
		||||
@@ -20,13 +20,21 @@ Some drivers don't support all the features required in OpenGL 2.1.
 | 
			
		||||
</p>
 | 
			
		||||
<p>
 | 
			
		||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
 | 
			
		||||
for DRI ardware acceleration.
 | 
			
		||||
for DRI hardware acceleration.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<h2>MD5 checksums</h2>
 | 
			
		||||
<pre>
 | 
			
		||||
tbd
 | 
			
		||||
ed6bd7437177307e51e16d0c7c381dfa  MesaLib-7.4.tar.gz
 | 
			
		||||
7ecddb341a2691e0dfdb02f697109834  MesaLib-7.4.tar.bz2
 | 
			
		||||
433e823f8245f9fd5f397e7b719a8e47  MesaLib-7.4.zip
 | 
			
		||||
656eee6128016fb237e01aa8dabbc703  MesaDemos-7.4.tar.gz
 | 
			
		||||
02816f10f30b1dc5e069e0f68c177c98  MesaDemos-7.4.tar.bz2
 | 
			
		||||
44a70d6db4aa4c64ecc47871b6aceee8  MesaDemos-7.4.zip
 | 
			
		||||
25f80db4f8645cd3e58e2c9af53ec341  MesaGLUT-7.4.tar.gz
 | 
			
		||||
04ec01caebde44f5b0d619f00716b368  MesaGLUT-7.4.tar.bz2
 | 
			
		||||
019dc213baecaa3cb1278847d41b8591  MesaGLUT-7.4.zip
 | 
			
		||||
</pre>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -52,7 +60,8 @@ tbd
 | 
			
		||||
 | 
			
		||||
<h2>Changes</h2>
 | 
			
		||||
<ul>
 | 
			
		||||
<li>Updated GL/glxext.h to version 46
 | 
			
		||||
<li>Updated GL/glxext.h to version 48
 | 
			
		||||
<li>Assorted updates for building on Solaris
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -20,6 +20,8 @@ The release notes summarize what's new or changed in each Mesa release.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<UL>
 | 
			
		||||
<LI><A HREF="relnotes-7.4.2.html">7.4.2 release notes</A>
 | 
			
		||||
<LI><A HREF="relnotes-7.4.1.html">7.4.1 release notes</A>
 | 
			
		||||
<LI><A HREF="relnotes-7.4.html">7.4 release notes</A>
 | 
			
		||||
<LI><A HREF="relnotes-7.3.html">7.3 release notes</A>
 | 
			
		||||
<LI><A HREF="relnotes-7.2.html">7.2 release notes</A>
 | 
			
		||||
 
 | 
			
		||||
@@ -48,34 +48,49 @@
 | 
			
		||||
#define glAsyncMarkerSGIX		MANGLE(AsyncMarkerSGIX)
 | 
			
		||||
#define glAttachObjectARB		MANGLE(AttachObjectARB)
 | 
			
		||||
#define glAttachShader		MANGLE(AttachShader)
 | 
			
		||||
#define glBeginConditionalRender		MANGLE(BeginConditionalRender)
 | 
			
		||||
#define glBeginConditionalRenderNV		MANGLE(BeginConditionalRenderNV)
 | 
			
		||||
#define glBeginFragmentShaderATI		MANGLE(BeginFragmentShaderATI)
 | 
			
		||||
#define glBegin		MANGLE(Begin)
 | 
			
		||||
#define glBeginOcclusionQueryNV		MANGLE(BeginOcclusionQueryNV)
 | 
			
		||||
#define glBeginQueryARB		MANGLE(BeginQueryARB)
 | 
			
		||||
#define glBeginQuery		MANGLE(BeginQuery)
 | 
			
		||||
#define glBeginTransformFeedbackEXT		MANGLE(BeginTransformFeedbackEXT)
 | 
			
		||||
#define glBeginTransformFeedback		MANGLE(BeginTransformFeedback)
 | 
			
		||||
#define glBeginTransformFeedbackNV		MANGLE(BeginTransformFeedbackNV)
 | 
			
		||||
#define glBeginVertexShaderEXT		MANGLE(BeginVertexShaderEXT)
 | 
			
		||||
#define glBindAttribLocationARB		MANGLE(BindAttribLocationARB)
 | 
			
		||||
#define glBindAttribLocation		MANGLE(BindAttribLocation)
 | 
			
		||||
#define glBindBufferARB		MANGLE(BindBufferARB)
 | 
			
		||||
#define glBindBufferBaseEXT		MANGLE(BindBufferBaseEXT)
 | 
			
		||||
#define glBindBufferBase		MANGLE(BindBufferBase)
 | 
			
		||||
#define glBindBufferBaseNV		MANGLE(BindBufferBaseNV)
 | 
			
		||||
#define glBindBuffer		MANGLE(BindBuffer)
 | 
			
		||||
#define glBindBufferOffsetEXT		MANGLE(BindBufferOffsetEXT)
 | 
			
		||||
#define glBindBufferOffsetNV		MANGLE(BindBufferOffsetNV)
 | 
			
		||||
#define glBindBufferRangeEXT		MANGLE(BindBufferRangeEXT)
 | 
			
		||||
#define glBindBufferRange		MANGLE(BindBufferRange)
 | 
			
		||||
#define glBindBufferRangeNV		MANGLE(BindBufferRangeNV)
 | 
			
		||||
#define glBindFragDataLocationEXT		MANGLE(BindFragDataLocationEXT)
 | 
			
		||||
#define glBindFragDataLocation		MANGLE(BindFragDataLocation)
 | 
			
		||||
#define glBindFragmentShaderATI		MANGLE(BindFragmentShaderATI)
 | 
			
		||||
#define glBindFramebufferEXT		MANGLE(BindFramebufferEXT)
 | 
			
		||||
#define glBindFramebuffer		MANGLE(BindFramebuffer)
 | 
			
		||||
#define glBindLightParameterEXT		MANGLE(BindLightParameterEXT)
 | 
			
		||||
#define glBindMaterialParameterEXT		MANGLE(BindMaterialParameterEXT)
 | 
			
		||||
#define glBindMultiTextureEXT		MANGLE(BindMultiTextureEXT)
 | 
			
		||||
#define glBindParameterEXT		MANGLE(BindParameterEXT)
 | 
			
		||||
#define glBindProgramARB		MANGLE(BindProgramARB)
 | 
			
		||||
#define glBindProgramNV		MANGLE(BindProgramNV)
 | 
			
		||||
#define glBindRenderbufferEXT		MANGLE(BindRenderbufferEXT)
 | 
			
		||||
#define glBindRenderbuffer		MANGLE(BindRenderbuffer)
 | 
			
		||||
#define glBindTexGenParameterEXT		MANGLE(BindTexGenParameterEXT)
 | 
			
		||||
#define glBindTextureEXT		MANGLE(BindTextureEXT)
 | 
			
		||||
#define glBindTexture		MANGLE(BindTexture)
 | 
			
		||||
#define glBindTextureUnitParameterEXT		MANGLE(BindTextureUnitParameterEXT)
 | 
			
		||||
#define glBindTransformFeedbackNV		MANGLE(BindTransformFeedbackNV)
 | 
			
		||||
#define glBindVertexArrayAPPLE		MANGLE(BindVertexArrayAPPLE)
 | 
			
		||||
#define glBindVertexArray		MANGLE(BindVertexArray)
 | 
			
		||||
#define glBindVertexShaderEXT		MANGLE(BindVertexShaderEXT)
 | 
			
		||||
#define glBinormal3bEXT		MANGLE(Binormal3bEXT)
 | 
			
		||||
#define glBinormal3bvEXT		MANGLE(Binormal3bvEXT)
 | 
			
		||||
@@ -101,6 +116,7 @@
 | 
			
		||||
#define glBlendFuncSeparateINGR		MANGLE(BlendFuncSeparateINGR)
 | 
			
		||||
#define glBlendFuncSeparate		MANGLE(BlendFuncSeparate)
 | 
			
		||||
#define glBlitFramebufferEXT		MANGLE(BlitFramebufferEXT)
 | 
			
		||||
#define glBlitFramebuffer		MANGLE(BlitFramebuffer)
 | 
			
		||||
#define glBufferDataARB		MANGLE(BufferDataARB)
 | 
			
		||||
#define glBufferData		MANGLE(BufferData)
 | 
			
		||||
#define glBufferParameteriAPPLE		MANGLE(BufferParameteriAPPLE)
 | 
			
		||||
@@ -109,8 +125,15 @@
 | 
			
		||||
#define glCallList		MANGLE(CallList)
 | 
			
		||||
#define glCallLists		MANGLE(CallLists)
 | 
			
		||||
#define glCheckFramebufferStatusEXT		MANGLE(CheckFramebufferStatusEXT)
 | 
			
		||||
#define glCheckFramebufferStatus		MANGLE(CheckFramebufferStatus)
 | 
			
		||||
#define glCheckNamedFramebufferStatusEXT		MANGLE(CheckNamedFramebufferStatusEXT)
 | 
			
		||||
#define glClampColorARB		MANGLE(ClampColorARB)
 | 
			
		||||
#define glClampColor		MANGLE(ClampColor)
 | 
			
		||||
#define glClearAccum		MANGLE(ClearAccum)
 | 
			
		||||
#define glClearBufferfi		MANGLE(ClearBufferfi)
 | 
			
		||||
#define glClearBufferfv		MANGLE(ClearBufferfv)
 | 
			
		||||
#define glClearBufferiv		MANGLE(ClearBufferiv)
 | 
			
		||||
#define glClearBufferuiv		MANGLE(ClearBufferuiv)
 | 
			
		||||
#define glClearColorIiEXT		MANGLE(ClearColorIiEXT)
 | 
			
		||||
#define glClearColorIuiEXT		MANGLE(ClearColorIuiEXT)
 | 
			
		||||
#define glClearColor		MANGLE(ClearColor)
 | 
			
		||||
@@ -123,6 +146,7 @@
 | 
			
		||||
#define glClientActiveTextureARB		MANGLE(ClientActiveTextureARB)
 | 
			
		||||
#define glClientActiveTexture		MANGLE(ClientActiveTexture)
 | 
			
		||||
#define glClientActiveVertexStreamATI		MANGLE(ClientActiveVertexStreamATI)
 | 
			
		||||
#define glClientAttribDefaultEXT		MANGLE(ClientAttribDefaultEXT)
 | 
			
		||||
#define glClipPlane		MANGLE(ClipPlane)
 | 
			
		||||
#define glColor3b		MANGLE(Color3b)
 | 
			
		||||
#define glColor3bv		MANGLE(Color3bv)
 | 
			
		||||
@@ -171,6 +195,7 @@
 | 
			
		||||
#define glColorFragmentOp1ATI		MANGLE(ColorFragmentOp1ATI)
 | 
			
		||||
#define glColorFragmentOp2ATI		MANGLE(ColorFragmentOp2ATI)
 | 
			
		||||
#define glColorFragmentOp3ATI		MANGLE(ColorFragmentOp3ATI)
 | 
			
		||||
#define glColorMaski		MANGLE(ColorMaski)
 | 
			
		||||
#define glColorMaskIndexedEXT		MANGLE(ColorMaskIndexedEXT)
 | 
			
		||||
#define glColorMask		MANGLE(ColorMask)
 | 
			
		||||
#define glColorMaterial		MANGLE(ColorMaterial)
 | 
			
		||||
@@ -196,6 +221,12 @@
 | 
			
		||||
#define glCombinerStageParameterfvNV		MANGLE(CombinerStageParameterfvNV)
 | 
			
		||||
#define glCompileShaderARB		MANGLE(CompileShaderARB)
 | 
			
		||||
#define glCompileShader		MANGLE(CompileShader)
 | 
			
		||||
#define glCompressedMultiTexImage1DEXT		MANGLE(CompressedMultiTexImage1DEXT)
 | 
			
		||||
#define glCompressedMultiTexImage2DEXT		MANGLE(CompressedMultiTexImage2DEXT)
 | 
			
		||||
#define glCompressedMultiTexImage3DEXT		MANGLE(CompressedMultiTexImage3DEXT)
 | 
			
		||||
#define glCompressedMultiTexSubImage1DEXT		MANGLE(CompressedMultiTexSubImage1DEXT)
 | 
			
		||||
#define glCompressedMultiTexSubImage2DEXT		MANGLE(CompressedMultiTexSubImage2DEXT)
 | 
			
		||||
#define glCompressedMultiTexSubImage3DEXT		MANGLE(CompressedMultiTexSubImage3DEXT)
 | 
			
		||||
#define glCompressedTexImage1DARB		MANGLE(CompressedTexImage1DARB)
 | 
			
		||||
#define glCompressedTexImage1D		MANGLE(CompressedTexImage1D)
 | 
			
		||||
#define glCompressedTexImage2DARB		MANGLE(CompressedTexImage2DARB)
 | 
			
		||||
@@ -208,6 +239,12 @@
 | 
			
		||||
#define glCompressedTexSubImage2D		MANGLE(CompressedTexSubImage2D)
 | 
			
		||||
#define glCompressedTexSubImage3DARB		MANGLE(CompressedTexSubImage3DARB)
 | 
			
		||||
#define glCompressedTexSubImage3D		MANGLE(CompressedTexSubImage3D)
 | 
			
		||||
#define glCompressedTextureImage1DEXT		MANGLE(CompressedTextureImage1DEXT)
 | 
			
		||||
#define glCompressedTextureImage2DEXT		MANGLE(CompressedTextureImage2DEXT)
 | 
			
		||||
#define glCompressedTextureImage3DEXT		MANGLE(CompressedTextureImage3DEXT)
 | 
			
		||||
#define glCompressedTextureSubImage1DEXT		MANGLE(CompressedTextureSubImage1DEXT)
 | 
			
		||||
#define glCompressedTextureSubImage2DEXT		MANGLE(CompressedTextureSubImage2DEXT)
 | 
			
		||||
#define glCompressedTextureSubImage3DEXT		MANGLE(CompressedTextureSubImage3DEXT)
 | 
			
		||||
#define glConvolutionFilter1DEXT		MANGLE(ConvolutionFilter1DEXT)
 | 
			
		||||
#define glConvolutionFilter1D		MANGLE(ConvolutionFilter1D)
 | 
			
		||||
#define glConvolutionFilter2DEXT		MANGLE(ConvolutionFilter2DEXT)
 | 
			
		||||
@@ -228,6 +265,11 @@
 | 
			
		||||
#define glCopyConvolutionFilter1D		MANGLE(CopyConvolutionFilter1D)
 | 
			
		||||
#define glCopyConvolutionFilter2DEXT		MANGLE(CopyConvolutionFilter2DEXT)
 | 
			
		||||
#define glCopyConvolutionFilter2D		MANGLE(CopyConvolutionFilter2D)
 | 
			
		||||
#define glCopyMultiTexImage1DEXT		MANGLE(CopyMultiTexImage1DEXT)
 | 
			
		||||
#define glCopyMultiTexImage2DEXT		MANGLE(CopyMultiTexImage2DEXT)
 | 
			
		||||
#define glCopyMultiTexSubImage1DEXT		MANGLE(CopyMultiTexSubImage1DEXT)
 | 
			
		||||
#define glCopyMultiTexSubImage2DEXT		MANGLE(CopyMultiTexSubImage2DEXT)
 | 
			
		||||
#define glCopyMultiTexSubImage3DEXT		MANGLE(CopyMultiTexSubImage3DEXT)
 | 
			
		||||
#define glCopyPixels		MANGLE(CopyPixels)
 | 
			
		||||
#define glCopyTexImage1DEXT		MANGLE(CopyTexImage1DEXT)
 | 
			
		||||
#define glCopyTexImage1D		MANGLE(CopyTexImage1D)
 | 
			
		||||
@@ -239,6 +281,11 @@
 | 
			
		||||
#define glCopyTexSubImage2D		MANGLE(CopyTexSubImage2D)
 | 
			
		||||
#define glCopyTexSubImage3DEXT		MANGLE(CopyTexSubImage3DEXT)
 | 
			
		||||
#define glCopyTexSubImage3D		MANGLE(CopyTexSubImage3D)
 | 
			
		||||
#define glCopyTextureImage1DEXT		MANGLE(CopyTextureImage1DEXT)
 | 
			
		||||
#define glCopyTextureImage2DEXT		MANGLE(CopyTextureImage2DEXT)
 | 
			
		||||
#define glCopyTextureSubImage1DEXT		MANGLE(CopyTextureSubImage1DEXT)
 | 
			
		||||
#define glCopyTextureSubImage2DEXT		MANGLE(CopyTextureSubImage2DEXT)
 | 
			
		||||
#define glCopyTextureSubImage3DEXT		MANGLE(CopyTextureSubImage3DEXT)
 | 
			
		||||
#define glCreateDebugObjectMESA		MANGLE(CreateDebugObjectMESA)
 | 
			
		||||
#define glCreateProgram		MANGLE(CreateProgram)
 | 
			
		||||
#define glCreateProgramObjectARB		MANGLE(CreateProgramObjectARB)
 | 
			
		||||
@@ -258,6 +305,7 @@
 | 
			
		||||
#define glDeleteFencesNV		MANGLE(DeleteFencesNV)
 | 
			
		||||
#define glDeleteFragmentShaderATI		MANGLE(DeleteFragmentShaderATI)
 | 
			
		||||
#define glDeleteFramebuffersEXT		MANGLE(DeleteFramebuffersEXT)
 | 
			
		||||
#define glDeleteFramebuffers		MANGLE(DeleteFramebuffers)
 | 
			
		||||
#define glDeleteLists		MANGLE(DeleteLists)
 | 
			
		||||
#define glDeleteObjectARB		MANGLE(DeleteObjectARB)
 | 
			
		||||
#define glDeleteOcclusionQueriesNV		MANGLE(DeleteOcclusionQueriesNV)
 | 
			
		||||
@@ -267,10 +315,13 @@
 | 
			
		||||
#define glDeleteQueriesARB		MANGLE(DeleteQueriesARB)
 | 
			
		||||
#define glDeleteQueries		MANGLE(DeleteQueries)
 | 
			
		||||
#define glDeleteRenderbuffersEXT		MANGLE(DeleteRenderbuffersEXT)
 | 
			
		||||
#define glDeleteRenderbuffers		MANGLE(DeleteRenderbuffers)
 | 
			
		||||
#define glDeleteShader		MANGLE(DeleteShader)
 | 
			
		||||
#define glDeleteTexturesEXT		MANGLE(DeleteTexturesEXT)
 | 
			
		||||
#define glDeleteTextures		MANGLE(DeleteTextures)
 | 
			
		||||
#define glDeleteTransformFeedbacksNV		MANGLE(DeleteTransformFeedbacksNV)
 | 
			
		||||
#define glDeleteVertexArraysAPPLE		MANGLE(DeleteVertexArraysAPPLE)
 | 
			
		||||
#define glDeleteVertexArrays		MANGLE(DeleteVertexArrays)
 | 
			
		||||
#define glDeleteVertexShaderEXT		MANGLE(DeleteVertexShaderEXT)
 | 
			
		||||
#define glDepthBoundsdNV		MANGLE(DepthBoundsdNV)
 | 
			
		||||
#define glDepthBoundsEXT		MANGLE(DepthBoundsEXT)
 | 
			
		||||
@@ -281,13 +332,16 @@
 | 
			
		||||
#define glDetachObjectARB		MANGLE(DetachObjectARB)
 | 
			
		||||
#define glDetachShader		MANGLE(DetachShader)
 | 
			
		||||
#define glDetailTexFuncSGIS		MANGLE(DetailTexFuncSGIS)
 | 
			
		||||
#define glDisableClientStateIndexedEXT		MANGLE(DisableClientStateIndexedEXT)
 | 
			
		||||
#define glDisableClientState		MANGLE(DisableClientState)
 | 
			
		||||
#define glDisablei		MANGLE(Disablei)
 | 
			
		||||
#define glDisableIndexedEXT		MANGLE(DisableIndexedEXT)
 | 
			
		||||
#define glDisable		MANGLE(Disable)
 | 
			
		||||
#define glDisableVariantClientStateEXT		MANGLE(DisableVariantClientStateEXT)
 | 
			
		||||
#define glDisableVertexAttribArrayARB		MANGLE(DisableVertexAttribArrayARB)
 | 
			
		||||
#define glDisableVertexAttribArray		MANGLE(DisableVertexAttribArray)
 | 
			
		||||
#define glDrawArraysEXT		MANGLE(DrawArraysEXT)
 | 
			
		||||
#define glDrawArraysInstancedARB		MANGLE(DrawArraysInstancedARB)
 | 
			
		||||
#define glDrawArraysInstancedEXT		MANGLE(DrawArraysInstancedEXT)
 | 
			
		||||
#define glDrawArrays		MANGLE(DrawArrays)
 | 
			
		||||
#define glDrawBuffer		MANGLE(DrawBuffer)
 | 
			
		||||
@@ -296,6 +350,7 @@
 | 
			
		||||
#define glDrawBuffers		MANGLE(DrawBuffers)
 | 
			
		||||
#define glDrawElementArrayAPPLE		MANGLE(DrawElementArrayAPPLE)
 | 
			
		||||
#define glDrawElementArrayATI		MANGLE(DrawElementArrayATI)
 | 
			
		||||
#define glDrawElementsInstancedARB		MANGLE(DrawElementsInstancedARB)
 | 
			
		||||
#define glDrawElementsInstancedEXT		MANGLE(DrawElementsInstancedEXT)
 | 
			
		||||
#define glDrawElements		MANGLE(DrawElements)
 | 
			
		||||
#define glDrawMeshArraysSUN		MANGLE(DrawMeshArraysSUN)
 | 
			
		||||
@@ -304,6 +359,7 @@
 | 
			
		||||
#define glDrawRangeElementArrayATI		MANGLE(DrawRangeElementArrayATI)
 | 
			
		||||
#define glDrawRangeElementsEXT		MANGLE(DrawRangeElementsEXT)
 | 
			
		||||
#define glDrawRangeElements		MANGLE(DrawRangeElements)
 | 
			
		||||
#define glDrawTransformFeedbackNV		MANGLE(DrawTransformFeedbackNV)
 | 
			
		||||
#define glEdgeFlag		MANGLE(EdgeFlag)
 | 
			
		||||
#define glEdgeFlagPointerEXT		MANGLE(EdgeFlagPointerEXT)
 | 
			
		||||
#define glEdgeFlagPointerListIBM		MANGLE(EdgeFlagPointerListIBM)
 | 
			
		||||
@@ -311,18 +367,24 @@
 | 
			
		||||
#define glEdgeFlagv		MANGLE(EdgeFlagv)
 | 
			
		||||
#define glElementPointerAPPLE		MANGLE(ElementPointerAPPLE)
 | 
			
		||||
#define glElementPointerATI		MANGLE(ElementPointerATI)
 | 
			
		||||
#define glEnableClientStateIndexedEXT		MANGLE(EnableClientStateIndexedEXT)
 | 
			
		||||
#define glEnableClientState		MANGLE(EnableClientState)
 | 
			
		||||
#define glEnablei		MANGLE(Enablei)
 | 
			
		||||
#define glEnableIndexedEXT		MANGLE(EnableIndexedEXT)
 | 
			
		||||
#define glEnable		MANGLE(Enable)
 | 
			
		||||
#define glEnableVariantClientStateEXT		MANGLE(EnableVariantClientStateEXT)
 | 
			
		||||
#define glEnableVertexAttribArrayARB		MANGLE(EnableVertexAttribArrayARB)
 | 
			
		||||
#define glEnableVertexAttribArray		MANGLE(EnableVertexAttribArray)
 | 
			
		||||
#define glEndConditionalRender		MANGLE(EndConditionalRender)
 | 
			
		||||
#define glEndConditionalRenderNV		MANGLE(EndConditionalRenderNV)
 | 
			
		||||
#define glEndFragmentShaderATI		MANGLE(EndFragmentShaderATI)
 | 
			
		||||
#define glEndList		MANGLE(EndList)
 | 
			
		||||
#define glEnd		MANGLE(End)
 | 
			
		||||
#define glEndOcclusionQueryNV		MANGLE(EndOcclusionQueryNV)
 | 
			
		||||
#define glEndQueryARB		MANGLE(EndQueryARB)
 | 
			
		||||
#define glEndQuery		MANGLE(EndQuery)
 | 
			
		||||
#define glEndTransformFeedbackEXT		MANGLE(EndTransformFeedbackEXT)
 | 
			
		||||
#define glEndTransformFeedback		MANGLE(EndTransformFeedback)
 | 
			
		||||
#define glEndTransformFeedbackNV		MANGLE(EndTransformFeedbackNV)
 | 
			
		||||
#define glEndVertexShaderEXT		MANGLE(EndVertexShaderEXT)
 | 
			
		||||
#define glEvalCoord1d		MANGLE(EvalCoord1d)
 | 
			
		||||
@@ -350,6 +412,7 @@
 | 
			
		||||
#define glFinishTextureSUNX		MANGLE(FinishTextureSUNX)
 | 
			
		||||
#define glFlush		MANGLE(Flush)
 | 
			
		||||
#define glFlushMappedBufferRangeAPPLE		MANGLE(FlushMappedBufferRangeAPPLE)
 | 
			
		||||
#define glFlushMappedBufferRange		MANGLE(FlushMappedBufferRange)
 | 
			
		||||
#define glFlushPixelDataRangeNV		MANGLE(FlushPixelDataRangeNV)
 | 
			
		||||
#define glFlushRasterSGIX		MANGLE(FlushRasterSGIX)
 | 
			
		||||
#define glFlushVertexArrayRangeAPPLE		MANGLE(FlushVertexArrayRangeAPPLE)
 | 
			
		||||
@@ -385,13 +448,25 @@
 | 
			
		||||
#define glFragmentMaterialfvSGIX		MANGLE(FragmentMaterialfvSGIX)
 | 
			
		||||
#define glFragmentMaterialiSGIX		MANGLE(FragmentMaterialiSGIX)
 | 
			
		||||
#define glFragmentMaterialivSGIX		MANGLE(FragmentMaterialivSGIX)
 | 
			
		||||
#define glFramebufferDrawBufferEXT		MANGLE(FramebufferDrawBufferEXT)
 | 
			
		||||
#define glFramebufferDrawBuffersEXT		MANGLE(FramebufferDrawBuffersEXT)
 | 
			
		||||
#define glFramebufferReadBufferEXT		MANGLE(FramebufferReadBufferEXT)
 | 
			
		||||
#define glFramebufferRenderbufferEXT		MANGLE(FramebufferRenderbufferEXT)
 | 
			
		||||
#define glFramebufferRenderbuffer		MANGLE(FramebufferRenderbuffer)
 | 
			
		||||
#define glFramebufferTexture1DEXT		MANGLE(FramebufferTexture1DEXT)
 | 
			
		||||
#define glFramebufferTexture1D		MANGLE(FramebufferTexture1D)
 | 
			
		||||
#define glFramebufferTexture2DEXT		MANGLE(FramebufferTexture2DEXT)
 | 
			
		||||
#define glFramebufferTexture2D		MANGLE(FramebufferTexture2D)
 | 
			
		||||
#define glFramebufferTexture3DEXT		MANGLE(FramebufferTexture3DEXT)
 | 
			
		||||
#define glFramebufferTexture3D		MANGLE(FramebufferTexture3D)
 | 
			
		||||
#define glFramebufferTextureARB		MANGLE(FramebufferTextureARB)
 | 
			
		||||
#define glFramebufferTextureEXT		MANGLE(FramebufferTextureEXT)
 | 
			
		||||
#define glFramebufferTextureFaceARB		MANGLE(FramebufferTextureFaceARB)
 | 
			
		||||
#define glFramebufferTextureFaceEXT		MANGLE(FramebufferTextureFaceEXT)
 | 
			
		||||
#define glFramebufferTextureLayerARB		MANGLE(FramebufferTextureLayerARB)
 | 
			
		||||
#define glFramebufferTextureLayerEXT		MANGLE(FramebufferTextureLayerEXT)
 | 
			
		||||
#define glFramebufferTextureLayer		MANGLE(FramebufferTextureLayer)
 | 
			
		||||
#define glFrameTerminatorGREMEDY		MANGLE(FrameTerminatorGREMEDY)
 | 
			
		||||
#define glFrameZoomSGIX		MANGLE(FrameZoomSGIX)
 | 
			
		||||
#define glFreeObjectBufferATI		MANGLE(FreeObjectBufferATI)
 | 
			
		||||
#define glFrontFace		MANGLE(FrontFace)
 | 
			
		||||
@@ -400,10 +475,14 @@
 | 
			
		||||
#define glGenBuffersARB		MANGLE(GenBuffersARB)
 | 
			
		||||
#define glGenBuffers		MANGLE(GenBuffers)
 | 
			
		||||
#define glGenerateMipmapEXT		MANGLE(GenerateMipmapEXT)
 | 
			
		||||
#define glGenerateMipmap		MANGLE(GenerateMipmap)
 | 
			
		||||
#define glGenerateMultiTexMipmapEXT		MANGLE(GenerateMultiTexMipmapEXT)
 | 
			
		||||
#define glGenerateTextureMipmapEXT		MANGLE(GenerateTextureMipmapEXT)
 | 
			
		||||
#define glGenFencesAPPLE		MANGLE(GenFencesAPPLE)
 | 
			
		||||
#define glGenFencesNV		MANGLE(GenFencesNV)
 | 
			
		||||
#define glGenFragmentShadersATI		MANGLE(GenFragmentShadersATI)
 | 
			
		||||
#define glGenFramebuffersEXT		MANGLE(GenFramebuffersEXT)
 | 
			
		||||
#define glGenFramebuffers		MANGLE(GenFramebuffers)
 | 
			
		||||
#define glGenLists		MANGLE(GenLists)
 | 
			
		||||
#define glGenOcclusionQueriesNV		MANGLE(GenOcclusionQueriesNV)
 | 
			
		||||
#define glGenProgramsARB		MANGLE(GenProgramsARB)
 | 
			
		||||
@@ -411,10 +490,13 @@
 | 
			
		||||
#define glGenQueriesARB		MANGLE(GenQueriesARB)
 | 
			
		||||
#define glGenQueries		MANGLE(GenQueries)
 | 
			
		||||
#define glGenRenderbuffersEXT		MANGLE(GenRenderbuffersEXT)
 | 
			
		||||
#define glGenRenderbuffers		MANGLE(GenRenderbuffers)
 | 
			
		||||
#define glGenSymbolsEXT		MANGLE(GenSymbolsEXT)
 | 
			
		||||
#define glGenTexturesEXT		MANGLE(GenTexturesEXT)
 | 
			
		||||
#define glGenTextures		MANGLE(GenTextures)
 | 
			
		||||
#define glGenTransformFeedbacksNV		MANGLE(GenTransformFeedbacksNV)
 | 
			
		||||
#define glGenVertexArraysAPPLE		MANGLE(GenVertexArraysAPPLE)
 | 
			
		||||
#define glGenVertexArrays		MANGLE(GenVertexArrays)
 | 
			
		||||
#define glGenVertexShadersEXT		MANGLE(GenVertexShadersEXT)
 | 
			
		||||
#define glGetActiveAttribARB		MANGLE(GetActiveAttribARB)
 | 
			
		||||
#define glGetActiveAttrib		MANGLE(GetActiveAttrib)
 | 
			
		||||
@@ -428,6 +510,7 @@
 | 
			
		||||
#define glGetAttribLocationARB		MANGLE(GetAttribLocationARB)
 | 
			
		||||
#define glGetAttribLocation		MANGLE(GetAttribLocation)
 | 
			
		||||
#define glGetBooleanIndexedvEXT		MANGLE(GetBooleanIndexedvEXT)
 | 
			
		||||
#define glGetBooleani_v		MANGLE(GetBooleani_v)
 | 
			
		||||
#define glGetBooleanv		MANGLE(GetBooleanv)
 | 
			
		||||
#define glGetBufferParameterivARB		MANGLE(GetBufferParameterivARB)
 | 
			
		||||
#define glGetBufferParameteriv		MANGLE(GetBufferParameteriv)
 | 
			
		||||
@@ -450,8 +533,10 @@
 | 
			
		||||
#define glGetCombinerOutputParameterfvNV		MANGLE(GetCombinerOutputParameterfvNV)
 | 
			
		||||
#define glGetCombinerOutputParameterivNV		MANGLE(GetCombinerOutputParameterivNV)
 | 
			
		||||
#define glGetCombinerStageParameterfvNV		MANGLE(GetCombinerStageParameterfvNV)
 | 
			
		||||
#define glGetCompressedMultiTexImageEXT		MANGLE(GetCompressedMultiTexImageEXT)
 | 
			
		||||
#define glGetCompressedTexImageARB		MANGLE(GetCompressedTexImageARB)
 | 
			
		||||
#define glGetCompressedTexImage		MANGLE(GetCompressedTexImage)
 | 
			
		||||
#define glGetCompressedTextureImageEXT		MANGLE(GetCompressedTextureImageEXT)
 | 
			
		||||
#define glGetConvolutionFilterEXT		MANGLE(GetConvolutionFilterEXT)
 | 
			
		||||
#define glGetConvolutionFilter		MANGLE(GetConvolutionFilter)
 | 
			
		||||
#define glGetConvolutionParameterfvEXT		MANGLE(GetConvolutionParameterfvEXT)
 | 
			
		||||
@@ -461,19 +546,24 @@
 | 
			
		||||
#define glGetDebugLogLengthMESA		MANGLE(GetDebugLogLengthMESA)
 | 
			
		||||
#define glGetDebugLogMESA		MANGLE(GetDebugLogMESA)
 | 
			
		||||
#define glGetDetailTexFuncSGIS		MANGLE(GetDetailTexFuncSGIS)
 | 
			
		||||
#define glGetDoubleIndexedvEXT		MANGLE(GetDoubleIndexedvEXT)
 | 
			
		||||
#define glGetDoublev		MANGLE(GetDoublev)
 | 
			
		||||
#define glGetError		MANGLE(GetError)
 | 
			
		||||
#define glGetFenceivNV		MANGLE(GetFenceivNV)
 | 
			
		||||
#define glGetFinalCombinerInputParameterfvNV		MANGLE(GetFinalCombinerInputParameterfvNV)
 | 
			
		||||
#define glGetFinalCombinerInputParameterivNV		MANGLE(GetFinalCombinerInputParameterivNV)
 | 
			
		||||
#define glGetFloatIndexedvEXT		MANGLE(GetFloatIndexedvEXT)
 | 
			
		||||
#define glGetFloatv		MANGLE(GetFloatv)
 | 
			
		||||
#define glGetFogFuncSGIS		MANGLE(GetFogFuncSGIS)
 | 
			
		||||
#define glGetFragDataLocationEXT		MANGLE(GetFragDataLocationEXT)
 | 
			
		||||
#define glGetFragDataLocation		MANGLE(GetFragDataLocation)
 | 
			
		||||
#define glGetFragmentLightfvSGIX		MANGLE(GetFragmentLightfvSGIX)
 | 
			
		||||
#define glGetFragmentLightivSGIX		MANGLE(GetFragmentLightivSGIX)
 | 
			
		||||
#define glGetFragmentMaterialfvSGIX		MANGLE(GetFragmentMaterialfvSGIX)
 | 
			
		||||
#define glGetFragmentMaterialivSGIX		MANGLE(GetFragmentMaterialivSGIX)
 | 
			
		||||
#define glGetFramebufferAttachmentParameterivEXT		MANGLE(GetFramebufferAttachmentParameterivEXT)
 | 
			
		||||
#define glGetFramebufferAttachmentParameteriv		MANGLE(GetFramebufferAttachmentParameteriv)
 | 
			
		||||
#define glGetFramebufferParameterivEXT		MANGLE(GetFramebufferParameterivEXT)
 | 
			
		||||
#define glGetHandleARB		MANGLE(GetHandleARB)
 | 
			
		||||
#define glGetHistogramEXT		MANGLE(GetHistogramEXT)
 | 
			
		||||
#define glGetHistogram		MANGLE(GetHistogram)
 | 
			
		||||
@@ -486,6 +576,7 @@
 | 
			
		||||
#define glGetInfoLogARB		MANGLE(GetInfoLogARB)
 | 
			
		||||
#define glGetInstrumentsSGIX		MANGLE(GetInstrumentsSGIX)
 | 
			
		||||
#define glGetIntegerIndexedvEXT		MANGLE(GetIntegerIndexedvEXT)
 | 
			
		||||
#define glGetIntegeri_v		MANGLE(GetIntegeri_v)
 | 
			
		||||
#define glGetIntegerv		MANGLE(GetIntegerv)
 | 
			
		||||
#define glGetInvariantBooleanvEXT		MANGLE(GetInvariantBooleanvEXT)
 | 
			
		||||
#define glGetInvariantFloatvEXT		MANGLE(GetInvariantFloatvEXT)
 | 
			
		||||
@@ -513,6 +604,30 @@
 | 
			
		||||
#define glGetMinmaxParameterfv		MANGLE(GetMinmaxParameterfv)
 | 
			
		||||
#define glGetMinmaxParameterivEXT		MANGLE(GetMinmaxParameterivEXT)
 | 
			
		||||
#define glGetMinmaxParameteriv		MANGLE(GetMinmaxParameteriv)
 | 
			
		||||
#define glGetMultisamplefvNV		MANGLE(GetMultisamplefvNV)
 | 
			
		||||
#define glGetMultiTexEnvfvEXT		MANGLE(GetMultiTexEnvfvEXT)
 | 
			
		||||
#define glGetMultiTexEnvivEXT		MANGLE(GetMultiTexEnvivEXT)
 | 
			
		||||
#define glGetMultiTexGendvEXT		MANGLE(GetMultiTexGendvEXT)
 | 
			
		||||
#define glGetMultiTexGenfvEXT		MANGLE(GetMultiTexGenfvEXT)
 | 
			
		||||
#define glGetMultiTexGenivEXT		MANGLE(GetMultiTexGenivEXT)
 | 
			
		||||
#define glGetMultiTexImageEXT		MANGLE(GetMultiTexImageEXT)
 | 
			
		||||
#define glGetMultiTexLevelParameterfvEXT		MANGLE(GetMultiTexLevelParameterfvEXT)
 | 
			
		||||
#define glGetMultiTexLevelParameterivEXT		MANGLE(GetMultiTexLevelParameterivEXT)
 | 
			
		||||
#define glGetMultiTexParameterfvEXT		MANGLE(GetMultiTexParameterfvEXT)
 | 
			
		||||
#define glGetMultiTexParameterIivEXT		MANGLE(GetMultiTexParameterIivEXT)
 | 
			
		||||
#define glGetMultiTexParameterIuivEXT		MANGLE(GetMultiTexParameterIuivEXT)
 | 
			
		||||
#define glGetMultiTexParameterivEXT		MANGLE(GetMultiTexParameterivEXT)
 | 
			
		||||
#define glGetNamedBufferParameterivEXT		MANGLE(GetNamedBufferParameterivEXT)
 | 
			
		||||
#define glGetNamedBufferPointervEXT		MANGLE(GetNamedBufferPointervEXT)
 | 
			
		||||
#define glGetNamedBufferSubDataEXT		MANGLE(GetNamedBufferSubDataEXT)
 | 
			
		||||
#define glGetNamedFramebufferAttachmentParameterivEXT		MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
 | 
			
		||||
#define glGetNamedProgramivEXT		MANGLE(GetNamedProgramivEXT)
 | 
			
		||||
#define glGetNamedProgramLocalParameterdvEXT		MANGLE(GetNamedProgramLocalParameterdvEXT)
 | 
			
		||||
#define glGetNamedProgramLocalParameterfvEXT		MANGLE(GetNamedProgramLocalParameterfvEXT)
 | 
			
		||||
#define glGetNamedProgramLocalParameterIivEXT		MANGLE(GetNamedProgramLocalParameterIivEXT)
 | 
			
		||||
#define glGetNamedProgramLocalParameterIuivEXT		MANGLE(GetNamedProgramLocalParameterIuivEXT)
 | 
			
		||||
#define glGetNamedProgramStringEXT		MANGLE(GetNamedProgramStringEXT)
 | 
			
		||||
#define glGetNamedRenderbufferParameterivEXT		MANGLE(GetNamedRenderbufferParameterivEXT)
 | 
			
		||||
#define glGetObjectBufferfvATI		MANGLE(GetObjectBufferfvATI)
 | 
			
		||||
#define glGetObjectBufferivATI		MANGLE(GetObjectBufferivATI)
 | 
			
		||||
#define glGetObjectParameterfvARB		MANGLE(GetObjectParameterfvARB)
 | 
			
		||||
@@ -524,6 +639,7 @@
 | 
			
		||||
#define glGetPixelMapusv		MANGLE(GetPixelMapusv)
 | 
			
		||||
#define glGetPixelTexGenParameterfvSGIS		MANGLE(GetPixelTexGenParameterfvSGIS)
 | 
			
		||||
#define glGetPixelTexGenParameterivSGIS		MANGLE(GetPixelTexGenParameterivSGIS)
 | 
			
		||||
#define glGetPointerIndexedvEXT		MANGLE(GetPointerIndexedvEXT)
 | 
			
		||||
#define glGetPointervEXT		MANGLE(GetPointervEXT)
 | 
			
		||||
#define glGetPointerv		MANGLE(GetPointerv)
 | 
			
		||||
#define glGetPolygonStipple		MANGLE(GetPolygonStipple)
 | 
			
		||||
@@ -555,6 +671,7 @@
 | 
			
		||||
#define glGetQueryObjectuivARB		MANGLE(GetQueryObjectuivARB)
 | 
			
		||||
#define glGetQueryObjectuiv		MANGLE(GetQueryObjectuiv)
 | 
			
		||||
#define glGetRenderbufferParameterivEXT		MANGLE(GetRenderbufferParameterivEXT)
 | 
			
		||||
#define glGetRenderbufferParameteriv		MANGLE(GetRenderbufferParameteriv)
 | 
			
		||||
#define glGetSeparableFilterEXT		MANGLE(GetSeparableFilterEXT)
 | 
			
		||||
#define glGetSeparableFilter		MANGLE(GetSeparableFilter)
 | 
			
		||||
#define glGetShaderInfoLog		MANGLE(GetShaderInfoLog)
 | 
			
		||||
@@ -562,6 +679,7 @@
 | 
			
		||||
#define glGetShaderSourceARB		MANGLE(GetShaderSourceARB)
 | 
			
		||||
#define glGetShaderSource		MANGLE(GetShaderSource)
 | 
			
		||||
#define glGetSharpenTexFuncSGIS		MANGLE(GetSharpenTexFuncSGIS)
 | 
			
		||||
#define glGetStringi		MANGLE(GetStringi)
 | 
			
		||||
#define glGetString		MANGLE(GetString)
 | 
			
		||||
#define glGetTexBumpParameterfvATI		MANGLE(GetTexBumpParameterfvATI)
 | 
			
		||||
#define glGetTexBumpParameterivATI		MANGLE(GetTexBumpParameterivATI)
 | 
			
		||||
@@ -576,9 +694,20 @@
 | 
			
		||||
#define glGetTexLevelParameteriv		MANGLE(GetTexLevelParameteriv)
 | 
			
		||||
#define glGetTexParameterfv		MANGLE(GetTexParameterfv)
 | 
			
		||||
#define glGetTexParameterIivEXT		MANGLE(GetTexParameterIivEXT)
 | 
			
		||||
#define glGetTexParameterIiv		MANGLE(GetTexParameterIiv)
 | 
			
		||||
#define glGetTexParameterIuivEXT		MANGLE(GetTexParameterIuivEXT)
 | 
			
		||||
#define glGetTexParameterIuiv		MANGLE(GetTexParameterIuiv)
 | 
			
		||||
#define glGetTexParameteriv		MANGLE(GetTexParameteriv)
 | 
			
		||||
#define glGetTextureImageEXT		MANGLE(GetTextureImageEXT)
 | 
			
		||||
#define glGetTextureLevelParameterfvEXT		MANGLE(GetTextureLevelParameterfvEXT)
 | 
			
		||||
#define glGetTextureLevelParameterivEXT		MANGLE(GetTextureLevelParameterivEXT)
 | 
			
		||||
#define glGetTextureParameterfvEXT		MANGLE(GetTextureParameterfvEXT)
 | 
			
		||||
#define glGetTextureParameterIivEXT		MANGLE(GetTextureParameterIivEXT)
 | 
			
		||||
#define glGetTextureParameterIuivEXT		MANGLE(GetTextureParameterIuivEXT)
 | 
			
		||||
#define glGetTextureParameterivEXT		MANGLE(GetTextureParameterivEXT)
 | 
			
		||||
#define glGetTrackMatrixivNV		MANGLE(GetTrackMatrixivNV)
 | 
			
		||||
#define glGetTransformFeedbackVaryingEXT		MANGLE(GetTransformFeedbackVaryingEXT)
 | 
			
		||||
#define glGetTransformFeedbackVarying		MANGLE(GetTransformFeedbackVarying)
 | 
			
		||||
#define glGetTransformFeedbackVaryingNV		MANGLE(GetTransformFeedbackVaryingNV)
 | 
			
		||||
#define glGetUniformBufferSizeEXT		MANGLE(GetUniformBufferSizeEXT)
 | 
			
		||||
#define glGetUniformfvARB		MANGLE(GetUniformfvARB)
 | 
			
		||||
@@ -589,6 +718,7 @@
 | 
			
		||||
#define glGetUniformLocation		MANGLE(GetUniformLocation)
 | 
			
		||||
#define glGetUniformOffsetEXT		MANGLE(GetUniformOffsetEXT)
 | 
			
		||||
#define glGetUniformuivEXT		MANGLE(GetUniformuivEXT)
 | 
			
		||||
#define glGetUniformuiv		MANGLE(GetUniformuiv)
 | 
			
		||||
#define glGetVariantArrayObjectfvATI		MANGLE(GetVariantArrayObjectfvATI)
 | 
			
		||||
#define glGetVariantArrayObjectivATI		MANGLE(GetVariantArrayObjectivATI)
 | 
			
		||||
#define glGetVariantBooleanvEXT		MANGLE(GetVariantBooleanvEXT)
 | 
			
		||||
@@ -605,7 +735,9 @@
 | 
			
		||||
#define glGetVertexAttribfv		MANGLE(GetVertexAttribfv)
 | 
			
		||||
#define glGetVertexAttribfvNV		MANGLE(GetVertexAttribfvNV)
 | 
			
		||||
#define glGetVertexAttribIivEXT		MANGLE(GetVertexAttribIivEXT)
 | 
			
		||||
#define glGetVertexAttribIiv		MANGLE(GetVertexAttribIiv)
 | 
			
		||||
#define glGetVertexAttribIuivEXT		MANGLE(GetVertexAttribIuivEXT)
 | 
			
		||||
#define glGetVertexAttribIuiv		MANGLE(GetVertexAttribIuiv)
 | 
			
		||||
#define glGetVertexAttribivARB		MANGLE(GetVertexAttribivARB)
 | 
			
		||||
#define glGetVertexAttribiv		MANGLE(GetVertexAttribiv)
 | 
			
		||||
#define glGetVertexAttribivNV		MANGLE(GetVertexAttribivNV)
 | 
			
		||||
@@ -652,11 +784,13 @@
 | 
			
		||||
#define glIsAsyncMarkerSGIX		MANGLE(IsAsyncMarkerSGIX)
 | 
			
		||||
#define glIsBufferARB		MANGLE(IsBufferARB)
 | 
			
		||||
#define glIsBuffer		MANGLE(IsBuffer)
 | 
			
		||||
#define glIsEnabledi		MANGLE(IsEnabledi)
 | 
			
		||||
#define glIsEnabledIndexedEXT		MANGLE(IsEnabledIndexedEXT)
 | 
			
		||||
#define glIsEnabled		MANGLE(IsEnabled)
 | 
			
		||||
#define glIsFenceAPPLE		MANGLE(IsFenceAPPLE)
 | 
			
		||||
#define glIsFenceNV		MANGLE(IsFenceNV)
 | 
			
		||||
#define glIsFramebufferEXT		MANGLE(IsFramebufferEXT)
 | 
			
		||||
#define glIsFramebuffer		MANGLE(IsFramebuffer)
 | 
			
		||||
#define glIsList		MANGLE(IsList)
 | 
			
		||||
#define glIsObjectBufferATI		MANGLE(IsObjectBufferATI)
 | 
			
		||||
#define glIsOcclusionQueryNV		MANGLE(IsOcclusionQueryNV)
 | 
			
		||||
@@ -666,11 +800,14 @@
 | 
			
		||||
#define glIsQueryARB		MANGLE(IsQueryARB)
 | 
			
		||||
#define glIsQuery		MANGLE(IsQuery)
 | 
			
		||||
#define glIsRenderbufferEXT		MANGLE(IsRenderbufferEXT)
 | 
			
		||||
#define glIsRenderbuffer		MANGLE(IsRenderbuffer)
 | 
			
		||||
#define glIsShader		MANGLE(IsShader)
 | 
			
		||||
#define glIsTextureEXT		MANGLE(IsTextureEXT)
 | 
			
		||||
#define glIsTexture		MANGLE(IsTexture)
 | 
			
		||||
#define glIsTransformFeedbackNV		MANGLE(IsTransformFeedbackNV)
 | 
			
		||||
#define glIsVariantEnabledEXT		MANGLE(IsVariantEnabledEXT)
 | 
			
		||||
#define glIsVertexArrayAPPLE		MANGLE(IsVertexArrayAPPLE)
 | 
			
		||||
#define glIsVertexArray		MANGLE(IsVertexArray)
 | 
			
		||||
#define glLightEnviSGIX		MANGLE(LightEnviSGIX)
 | 
			
		||||
#define glLightf		MANGLE(Lightf)
 | 
			
		||||
#define glLightfv		MANGLE(Lightfv)
 | 
			
		||||
@@ -707,11 +844,13 @@
 | 
			
		||||
#define glMap2f		MANGLE(Map2f)
 | 
			
		||||
#define glMapBufferARB		MANGLE(MapBufferARB)
 | 
			
		||||
#define glMapBuffer		MANGLE(MapBuffer)
 | 
			
		||||
#define glMapBufferRange		MANGLE(MapBufferRange)
 | 
			
		||||
#define glMapControlPointsNV		MANGLE(MapControlPointsNV)
 | 
			
		||||
#define glMapGrid1d		MANGLE(MapGrid1d)
 | 
			
		||||
#define glMapGrid1f		MANGLE(MapGrid1f)
 | 
			
		||||
#define glMapGrid2d		MANGLE(MapGrid2d)
 | 
			
		||||
#define glMapGrid2f		MANGLE(MapGrid2f)
 | 
			
		||||
#define glMapNamedBufferEXT		MANGLE(MapNamedBufferEXT)
 | 
			
		||||
#define glMapObjectBufferATI		MANGLE(MapObjectBufferATI)
 | 
			
		||||
#define glMapParameterfvNV		MANGLE(MapParameterfvNV)
 | 
			
		||||
#define glMapParameterivNV		MANGLE(MapParameterivNV)
 | 
			
		||||
@@ -719,11 +858,30 @@
 | 
			
		||||
#define glMaterialfv		MANGLE(Materialfv)
 | 
			
		||||
#define glMateriali		MANGLE(Materiali)
 | 
			
		||||
#define glMaterialiv		MANGLE(Materialiv)
 | 
			
		||||
#define glMatrixFrustumEXT		MANGLE(MatrixFrustumEXT)
 | 
			
		||||
#define glMatrixIndexPointerARB		MANGLE(MatrixIndexPointerARB)
 | 
			
		||||
#define glMatrixIndexubvARB		MANGLE(MatrixIndexubvARB)
 | 
			
		||||
#define glMatrixIndexuivARB		MANGLE(MatrixIndexuivARB)
 | 
			
		||||
#define glMatrixIndexusvARB		MANGLE(MatrixIndexusvARB)
 | 
			
		||||
#define glMatrixLoaddEXT		MANGLE(MatrixLoaddEXT)
 | 
			
		||||
#define glMatrixLoadfEXT		MANGLE(MatrixLoadfEXT)
 | 
			
		||||
#define glMatrixLoadIdentityEXT		MANGLE(MatrixLoadIdentityEXT)
 | 
			
		||||
#define glMatrixLoadTransposedEXT		MANGLE(MatrixLoadTransposedEXT)
 | 
			
		||||
#define glMatrixLoadTransposefEXT		MANGLE(MatrixLoadTransposefEXT)
 | 
			
		||||
#define glMatrixMode		MANGLE(MatrixMode)
 | 
			
		||||
#define glMatrixMultdEXT		MANGLE(MatrixMultdEXT)
 | 
			
		||||
#define glMatrixMultfEXT		MANGLE(MatrixMultfEXT)
 | 
			
		||||
#define glMatrixMultTransposedEXT		MANGLE(MatrixMultTransposedEXT)
 | 
			
		||||
#define glMatrixMultTransposefEXT		MANGLE(MatrixMultTransposefEXT)
 | 
			
		||||
#define glMatrixOrthoEXT		MANGLE(MatrixOrthoEXT)
 | 
			
		||||
#define glMatrixPopEXT		MANGLE(MatrixPopEXT)
 | 
			
		||||
#define glMatrixPushEXT		MANGLE(MatrixPushEXT)
 | 
			
		||||
#define glMatrixRotatedEXT		MANGLE(MatrixRotatedEXT)
 | 
			
		||||
#define glMatrixRotatefEXT		MANGLE(MatrixRotatefEXT)
 | 
			
		||||
#define glMatrixScaledEXT		MANGLE(MatrixScaledEXT)
 | 
			
		||||
#define glMatrixScalefEXT		MANGLE(MatrixScalefEXT)
 | 
			
		||||
#define glMatrixTranslatedEXT		MANGLE(MatrixTranslatedEXT)
 | 
			
		||||
#define glMatrixTranslatefEXT		MANGLE(MatrixTranslatefEXT)
 | 
			
		||||
#define glMinmaxEXT		MANGLE(MinmaxEXT)
 | 
			
		||||
#define glMinmax		MANGLE(Minmax)
 | 
			
		||||
#define glMultiDrawArraysEXT		MANGLE(MultiDrawArraysEXT)
 | 
			
		||||
@@ -734,6 +892,7 @@
 | 
			
		||||
#define glMultiDrawRangeElementArrayAPPLE		MANGLE(MultiDrawRangeElementArrayAPPLE)
 | 
			
		||||
#define glMultiModeDrawArraysIBM		MANGLE(MultiModeDrawArraysIBM)
 | 
			
		||||
#define glMultiModeDrawElementsIBM		MANGLE(MultiModeDrawElementsIBM)
 | 
			
		||||
#define glMultiTexBufferEXT		MANGLE(MultiTexBufferEXT)
 | 
			
		||||
#define glMultiTexCoord1dARB		MANGLE(MultiTexCoord1dARB)
 | 
			
		||||
#define glMultiTexCoord1d		MANGLE(MultiTexCoord1d)
 | 
			
		||||
#define glMultiTexCoord1dvARB		MANGLE(MultiTexCoord1dvARB)
 | 
			
		||||
@@ -806,12 +965,60 @@
 | 
			
		||||
#define glMultiTexCoord4s		MANGLE(MultiTexCoord4s)
 | 
			
		||||
#define glMultiTexCoord4svARB		MANGLE(MultiTexCoord4svARB)
 | 
			
		||||
#define glMultiTexCoord4sv		MANGLE(MultiTexCoord4sv)
 | 
			
		||||
#define glMultiTexCoordPointerEXT		MANGLE(MultiTexCoordPointerEXT)
 | 
			
		||||
#define glMultiTexEnvfEXT		MANGLE(MultiTexEnvfEXT)
 | 
			
		||||
#define glMultiTexEnvfvEXT		MANGLE(MultiTexEnvfvEXT)
 | 
			
		||||
#define glMultiTexEnviEXT		MANGLE(MultiTexEnviEXT)
 | 
			
		||||
#define glMultiTexEnvivEXT		MANGLE(MultiTexEnvivEXT)
 | 
			
		||||
#define glMultiTexGendEXT		MANGLE(MultiTexGendEXT)
 | 
			
		||||
#define glMultiTexGendvEXT		MANGLE(MultiTexGendvEXT)
 | 
			
		||||
#define glMultiTexGenfEXT		MANGLE(MultiTexGenfEXT)
 | 
			
		||||
#define glMultiTexGenfvEXT		MANGLE(MultiTexGenfvEXT)
 | 
			
		||||
#define glMultiTexGeniEXT		MANGLE(MultiTexGeniEXT)
 | 
			
		||||
#define glMultiTexGenivEXT		MANGLE(MultiTexGenivEXT)
 | 
			
		||||
#define glMultiTexImage1DEXT		MANGLE(MultiTexImage1DEXT)
 | 
			
		||||
#define glMultiTexImage2DEXT		MANGLE(MultiTexImage2DEXT)
 | 
			
		||||
#define glMultiTexImage3DEXT		MANGLE(MultiTexImage3DEXT)
 | 
			
		||||
#define glMultiTexParameterfEXT		MANGLE(MultiTexParameterfEXT)
 | 
			
		||||
#define glMultiTexParameterfvEXT		MANGLE(MultiTexParameterfvEXT)
 | 
			
		||||
#define glMultiTexParameteriEXT		MANGLE(MultiTexParameteriEXT)
 | 
			
		||||
#define glMultiTexParameterIivEXT		MANGLE(MultiTexParameterIivEXT)
 | 
			
		||||
#define glMultiTexParameterIuivEXT		MANGLE(MultiTexParameterIuivEXT)
 | 
			
		||||
#define glMultiTexParameterivEXT		MANGLE(MultiTexParameterivEXT)
 | 
			
		||||
#define glMultiTexRenderbufferEXT		MANGLE(MultiTexRenderbufferEXT)
 | 
			
		||||
#define glMultiTexSubImage1DEXT		MANGLE(MultiTexSubImage1DEXT)
 | 
			
		||||
#define glMultiTexSubImage2DEXT		MANGLE(MultiTexSubImage2DEXT)
 | 
			
		||||
#define glMultiTexSubImage3DEXT		MANGLE(MultiTexSubImage3DEXT)
 | 
			
		||||
#define glMultMatrixd		MANGLE(MultMatrixd)
 | 
			
		||||
#define glMultMatrixf		MANGLE(MultMatrixf)
 | 
			
		||||
#define glMultTransposeMatrixdARB		MANGLE(MultTransposeMatrixdARB)
 | 
			
		||||
#define glMultTransposeMatrixd		MANGLE(MultTransposeMatrixd)
 | 
			
		||||
#define glMultTransposeMatrixfARB		MANGLE(MultTransposeMatrixfARB)
 | 
			
		||||
#define glMultTransposeMatrixf		MANGLE(MultTransposeMatrixf)
 | 
			
		||||
#define glNamedBufferDataEXT		MANGLE(NamedBufferDataEXT)
 | 
			
		||||
#define glNamedBufferSubDataEXT		MANGLE(NamedBufferSubDataEXT)
 | 
			
		||||
#define glNamedFramebufferRenderbufferEXT		MANGLE(NamedFramebufferRenderbufferEXT)
 | 
			
		||||
#define glNamedFramebufferTexture1DEXT		MANGLE(NamedFramebufferTexture1DEXT)
 | 
			
		||||
#define glNamedFramebufferTexture2DEXT		MANGLE(NamedFramebufferTexture2DEXT)
 | 
			
		||||
#define glNamedFramebufferTexture3DEXT		MANGLE(NamedFramebufferTexture3DEXT)
 | 
			
		||||
#define glNamedFramebufferTextureEXT		MANGLE(NamedFramebufferTextureEXT)
 | 
			
		||||
#define glNamedFramebufferTextureFaceEXT		MANGLE(NamedFramebufferTextureFaceEXT)
 | 
			
		||||
#define glNamedFramebufferTextureLayerEXT		MANGLE(NamedFramebufferTextureLayerEXT)
 | 
			
		||||
#define glNamedProgramLocalParameter4dEXT		MANGLE(NamedProgramLocalParameter4dEXT)
 | 
			
		||||
#define glNamedProgramLocalParameter4dvEXT		MANGLE(NamedProgramLocalParameter4dvEXT)
 | 
			
		||||
#define glNamedProgramLocalParameter4fEXT		MANGLE(NamedProgramLocalParameter4fEXT)
 | 
			
		||||
#define glNamedProgramLocalParameter4fvEXT		MANGLE(NamedProgramLocalParameter4fvEXT)
 | 
			
		||||
#define glNamedProgramLocalParameterI4iEXT		MANGLE(NamedProgramLocalParameterI4iEXT)
 | 
			
		||||
#define glNamedProgramLocalParameterI4ivEXT		MANGLE(NamedProgramLocalParameterI4ivEXT)
 | 
			
		||||
#define glNamedProgramLocalParameterI4uiEXT		MANGLE(NamedProgramLocalParameterI4uiEXT)
 | 
			
		||||
#define glNamedProgramLocalParameterI4uivEXT		MANGLE(NamedProgramLocalParameterI4uivEXT)
 | 
			
		||||
#define glNamedProgramLocalParameters4fvEXT		MANGLE(NamedProgramLocalParameters4fvEXT)
 | 
			
		||||
#define glNamedProgramLocalParametersI4ivEXT		MANGLE(NamedProgramLocalParametersI4ivEXT)
 | 
			
		||||
#define glNamedProgramLocalParametersI4uivEXT		MANGLE(NamedProgramLocalParametersI4uivEXT)
 | 
			
		||||
#define glNamedProgramStringEXT		MANGLE(NamedProgramStringEXT)
 | 
			
		||||
#define glNamedRenderbufferStorageEXT		MANGLE(NamedRenderbufferStorageEXT)
 | 
			
		||||
#define glNamedRenderbufferStorageMultisampleCoverageEXT		MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
 | 
			
		||||
#define glNamedRenderbufferStorageMultisampleEXT		MANGLE(NamedRenderbufferStorageMultisampleEXT)
 | 
			
		||||
#define glNewList		MANGLE(NewList)
 | 
			
		||||
#define glNewObjectBufferATI		MANGLE(NewObjectBufferATI)
 | 
			
		||||
#define glNormal3b		MANGLE(Normal3b)
 | 
			
		||||
@@ -845,6 +1052,7 @@
 | 
			
		||||
#define glOrtho		MANGLE(Ortho)
 | 
			
		||||
#define glPassTexCoordATI		MANGLE(PassTexCoordATI)
 | 
			
		||||
#define glPassThrough		MANGLE(PassThrough)
 | 
			
		||||
#define glPauseTransformFeedbackNV		MANGLE(PauseTransformFeedbackNV)
 | 
			
		||||
#define glPixelDataRangeNV		MANGLE(PixelDataRangeNV)
 | 
			
		||||
#define glPixelMapfv		MANGLE(PixelMapfv)
 | 
			
		||||
#define glPixelMapuiv		MANGLE(PixelMapuiv)
 | 
			
		||||
@@ -926,12 +1134,47 @@
 | 
			
		||||
#define glProgramParameter4dvNV		MANGLE(ProgramParameter4dvNV)
 | 
			
		||||
#define glProgramParameter4fNV		MANGLE(ProgramParameter4fNV)
 | 
			
		||||
#define glProgramParameter4fvNV		MANGLE(ProgramParameter4fvNV)
 | 
			
		||||
#define glProgramParameteriARB		MANGLE(ProgramParameteriARB)
 | 
			
		||||
#define glProgramParameteriEXT		MANGLE(ProgramParameteriEXT)
 | 
			
		||||
#define glProgramParameters4dvNV		MANGLE(ProgramParameters4dvNV)
 | 
			
		||||
#define glProgramParameters4fvNV		MANGLE(ProgramParameters4fvNV)
 | 
			
		||||
#define glProgramStringARB		MANGLE(ProgramStringARB)
 | 
			
		||||
#define glProgramUniform1fEXT		MANGLE(ProgramUniform1fEXT)
 | 
			
		||||
#define glProgramUniform1fvEXT		MANGLE(ProgramUniform1fvEXT)
 | 
			
		||||
#define glProgramUniform1iEXT		MANGLE(ProgramUniform1iEXT)
 | 
			
		||||
#define glProgramUniform1ivEXT		MANGLE(ProgramUniform1ivEXT)
 | 
			
		||||
#define glProgramUniform1uiEXT		MANGLE(ProgramUniform1uiEXT)
 | 
			
		||||
#define glProgramUniform1uivEXT		MANGLE(ProgramUniform1uivEXT)
 | 
			
		||||
#define glProgramUniform2fEXT		MANGLE(ProgramUniform2fEXT)
 | 
			
		||||
#define glProgramUniform2fvEXT		MANGLE(ProgramUniform2fvEXT)
 | 
			
		||||
#define glProgramUniform2iEXT		MANGLE(ProgramUniform2iEXT)
 | 
			
		||||
#define glProgramUniform2ivEXT		MANGLE(ProgramUniform2ivEXT)
 | 
			
		||||
#define glProgramUniform2uiEXT		MANGLE(ProgramUniform2uiEXT)
 | 
			
		||||
#define glProgramUniform2uivEXT		MANGLE(ProgramUniform2uivEXT)
 | 
			
		||||
#define glProgramUniform3fEXT		MANGLE(ProgramUniform3fEXT)
 | 
			
		||||
#define glProgramUniform3fvEXT		MANGLE(ProgramUniform3fvEXT)
 | 
			
		||||
#define glProgramUniform3iEXT		MANGLE(ProgramUniform3iEXT)
 | 
			
		||||
#define glProgramUniform3ivEXT		MANGLE(ProgramUniform3ivEXT)
 | 
			
		||||
#define glProgramUniform3uiEXT		MANGLE(ProgramUniform3uiEXT)
 | 
			
		||||
#define glProgramUniform3uivEXT		MANGLE(ProgramUniform3uivEXT)
 | 
			
		||||
#define glProgramUniform4fEXT		MANGLE(ProgramUniform4fEXT)
 | 
			
		||||
#define glProgramUniform4fvEXT		MANGLE(ProgramUniform4fvEXT)
 | 
			
		||||
#define glProgramUniform4iEXT		MANGLE(ProgramUniform4iEXT)
 | 
			
		||||
#define glProgramUniform4ivEXT		MANGLE(ProgramUniform4ivEXT)
 | 
			
		||||
#define glProgramUniform4uiEXT		MANGLE(ProgramUniform4uiEXT)
 | 
			
		||||
#define glProgramUniform4uivEXT		MANGLE(ProgramUniform4uivEXT)
 | 
			
		||||
#define glProgramUniformMatrix2fvEXT		MANGLE(ProgramUniformMatrix2fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix2x3fvEXT		MANGLE(ProgramUniformMatrix2x3fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix2x4fvEXT		MANGLE(ProgramUniformMatrix2x4fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix3fvEXT		MANGLE(ProgramUniformMatrix3fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix3x2fvEXT		MANGLE(ProgramUniformMatrix3x2fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix3x4fvEXT		MANGLE(ProgramUniformMatrix3x4fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix4fvEXT		MANGLE(ProgramUniformMatrix4fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix4x2fvEXT		MANGLE(ProgramUniformMatrix4x2fvEXT)
 | 
			
		||||
#define glProgramUniformMatrix4x3fvEXT		MANGLE(ProgramUniformMatrix4x3fvEXT)
 | 
			
		||||
#define glProgramVertexLimitNV		MANGLE(ProgramVertexLimitNV)
 | 
			
		||||
#define glPushAttrib		MANGLE(PushAttrib)
 | 
			
		||||
#define glPushClientAttribDefaultEXT		MANGLE(PushClientAttribDefaultEXT)
 | 
			
		||||
#define glPushClientAttrib		MANGLE(PushClientAttrib)
 | 
			
		||||
#define glPushMatrix		MANGLE(PushMatrix)
 | 
			
		||||
#define glPushName		MANGLE(PushName)
 | 
			
		||||
@@ -972,8 +1215,10 @@
 | 
			
		||||
#define glRectsv		MANGLE(Rectsv)
 | 
			
		||||
#define glReferencePlaneSGIX		MANGLE(ReferencePlaneSGIX)
 | 
			
		||||
#define glRenderbufferStorageEXT		MANGLE(RenderbufferStorageEXT)
 | 
			
		||||
#define glRenderbufferStorage		MANGLE(RenderbufferStorage)
 | 
			
		||||
#define glRenderbufferStorageMultisampleCoverageNV		MANGLE(RenderbufferStorageMultisampleCoverageNV)
 | 
			
		||||
#define glRenderbufferStorageMultisampleEXT		MANGLE(RenderbufferStorageMultisampleEXT)
 | 
			
		||||
#define glRenderbufferStorageMultisample		MANGLE(RenderbufferStorageMultisample)
 | 
			
		||||
#define glRenderMode		MANGLE(RenderMode)
 | 
			
		||||
#define glReplacementCodePointerSUN		MANGLE(ReplacementCodePointerSUN)
 | 
			
		||||
#define glReplacementCodeubSUN		MANGLE(ReplacementCodeubSUN)
 | 
			
		||||
@@ -1004,12 +1249,14 @@
 | 
			
		||||
#define glResetMinmaxEXT		MANGLE(ResetMinmaxEXT)
 | 
			
		||||
#define glResetMinmax		MANGLE(ResetMinmax)
 | 
			
		||||
#define glResizeBuffersMESA		MANGLE(ResizeBuffersMESA)
 | 
			
		||||
#define glResumeTransformFeedbackNV		MANGLE(ResumeTransformFeedbackNV)
 | 
			
		||||
#define glRotated		MANGLE(Rotated)
 | 
			
		||||
#define glRotatef		MANGLE(Rotatef)
 | 
			
		||||
#define glSampleCoverageARB		MANGLE(SampleCoverageARB)
 | 
			
		||||
#define glSampleCoverage		MANGLE(SampleCoverage)
 | 
			
		||||
#define glSampleMapATI		MANGLE(SampleMapATI)
 | 
			
		||||
#define glSampleMaskEXT		MANGLE(SampleMaskEXT)
 | 
			
		||||
#define glSampleMaskIndexedNV		MANGLE(SampleMaskIndexedNV)
 | 
			
		||||
#define glSampleMaskSGIS		MANGLE(SampleMaskSGIS)
 | 
			
		||||
#define glSamplePatternEXT		MANGLE(SamplePatternEXT)
 | 
			
		||||
#define glSamplePatternSGIS		MANGLE(SamplePatternSGIS)
 | 
			
		||||
@@ -1101,6 +1348,7 @@
 | 
			
		||||
#define glTestFenceAPPLE		MANGLE(TestFenceAPPLE)
 | 
			
		||||
#define glTestFenceNV		MANGLE(TestFenceNV)
 | 
			
		||||
#define glTestObjectAPPLE		MANGLE(TestObjectAPPLE)
 | 
			
		||||
#define glTexBufferARB		MANGLE(TexBufferARB)
 | 
			
		||||
#define glTexBufferEXT		MANGLE(TexBufferEXT)
 | 
			
		||||
#define glTexBumpParameterfvATI		MANGLE(TexBumpParameterfvATI)
 | 
			
		||||
#define glTexBumpParameterivATI		MANGLE(TexBumpParameterivATI)
 | 
			
		||||
@@ -1181,9 +1429,12 @@
 | 
			
		||||
#define glTexParameterf		MANGLE(TexParameterf)
 | 
			
		||||
#define glTexParameterfv		MANGLE(TexParameterfv)
 | 
			
		||||
#define glTexParameterIivEXT		MANGLE(TexParameterIivEXT)
 | 
			
		||||
#define glTexParameterIiv		MANGLE(TexParameterIiv)
 | 
			
		||||
#define glTexParameteri		MANGLE(TexParameteri)
 | 
			
		||||
#define glTexParameterIuivEXT		MANGLE(TexParameterIuivEXT)
 | 
			
		||||
#define glTexParameterIuiv		MANGLE(TexParameterIuiv)
 | 
			
		||||
#define glTexParameteriv		MANGLE(TexParameteriv)
 | 
			
		||||
#define glTexRenderbufferNV		MANGLE(TexRenderbufferNV)
 | 
			
		||||
#define glTexSubImage1DEXT		MANGLE(TexSubImage1DEXT)
 | 
			
		||||
#define glTexSubImage1D		MANGLE(TexSubImage1D)
 | 
			
		||||
#define glTexSubImage2DEXT		MANGLE(TexSubImage2DEXT)
 | 
			
		||||
@@ -1191,12 +1442,28 @@
 | 
			
		||||
#define glTexSubImage3DEXT		MANGLE(TexSubImage3DEXT)
 | 
			
		||||
#define glTexSubImage3D		MANGLE(TexSubImage3D)
 | 
			
		||||
#define glTexSubImage4DSGIS		MANGLE(TexSubImage4DSGIS)
 | 
			
		||||
#define glTextureBufferEXT		MANGLE(TextureBufferEXT)
 | 
			
		||||
#define glTextureColorMaskSGIS		MANGLE(TextureColorMaskSGIS)
 | 
			
		||||
#define glTextureImage1DEXT		MANGLE(TextureImage1DEXT)
 | 
			
		||||
#define glTextureImage2DEXT		MANGLE(TextureImage2DEXT)
 | 
			
		||||
#define glTextureImage3DEXT		MANGLE(TextureImage3DEXT)
 | 
			
		||||
#define glTextureLightEXT		MANGLE(TextureLightEXT)
 | 
			
		||||
#define glTextureMaterialEXT		MANGLE(TextureMaterialEXT)
 | 
			
		||||
#define glTextureNormalEXT		MANGLE(TextureNormalEXT)
 | 
			
		||||
#define glTextureParameterfEXT		MANGLE(TextureParameterfEXT)
 | 
			
		||||
#define glTextureParameterfvEXT		MANGLE(TextureParameterfvEXT)
 | 
			
		||||
#define glTextureParameteriEXT		MANGLE(TextureParameteriEXT)
 | 
			
		||||
#define glTextureParameterIivEXT		MANGLE(TextureParameterIivEXT)
 | 
			
		||||
#define glTextureParameterIuivEXT		MANGLE(TextureParameterIuivEXT)
 | 
			
		||||
#define glTextureParameterivEXT		MANGLE(TextureParameterivEXT)
 | 
			
		||||
#define glTextureRenderbufferEXT		MANGLE(TextureRenderbufferEXT)
 | 
			
		||||
#define glTextureSubImage1DEXT		MANGLE(TextureSubImage1DEXT)
 | 
			
		||||
#define glTextureSubImage2DEXT		MANGLE(TextureSubImage2DEXT)
 | 
			
		||||
#define glTextureSubImage3DEXT		MANGLE(TextureSubImage3DEXT)
 | 
			
		||||
#define glTrackMatrixNV		MANGLE(TrackMatrixNV)
 | 
			
		||||
#define glTransformFeedbackAttribsNV		MANGLE(TransformFeedbackAttribsNV)
 | 
			
		||||
#define glTransformFeedbackVaryingsEXT		MANGLE(TransformFeedbackVaryingsEXT)
 | 
			
		||||
#define glTransformFeedbackVaryings		MANGLE(TransformFeedbackVaryings)
 | 
			
		||||
#define glTransformFeedbackVaryingsNV		MANGLE(TransformFeedbackVaryingsNV)
 | 
			
		||||
#define glTranslated		MANGLE(Translated)
 | 
			
		||||
#define glTranslatef		MANGLE(Translatef)
 | 
			
		||||
@@ -1209,7 +1476,9 @@
 | 
			
		||||
#define glUniform1ivARB		MANGLE(Uniform1ivARB)
 | 
			
		||||
#define glUniform1iv		MANGLE(Uniform1iv)
 | 
			
		||||
#define glUniform1uiEXT		MANGLE(Uniform1uiEXT)
 | 
			
		||||
#define glUniform1ui		MANGLE(Uniform1ui)
 | 
			
		||||
#define glUniform1uivEXT		MANGLE(Uniform1uivEXT)
 | 
			
		||||
#define glUniform1uiv		MANGLE(Uniform1uiv)
 | 
			
		||||
#define glUniform2fARB		MANGLE(Uniform2fARB)
 | 
			
		||||
#define glUniform2f		MANGLE(Uniform2f)
 | 
			
		||||
#define glUniform2fvARB		MANGLE(Uniform2fvARB)
 | 
			
		||||
@@ -1219,7 +1488,9 @@
 | 
			
		||||
#define glUniform2ivARB		MANGLE(Uniform2ivARB)
 | 
			
		||||
#define glUniform2iv		MANGLE(Uniform2iv)
 | 
			
		||||
#define glUniform2uiEXT		MANGLE(Uniform2uiEXT)
 | 
			
		||||
#define glUniform2ui		MANGLE(Uniform2ui)
 | 
			
		||||
#define glUniform2uivEXT		MANGLE(Uniform2uivEXT)
 | 
			
		||||
#define glUniform2uiv		MANGLE(Uniform2uiv)
 | 
			
		||||
#define glUniform3fARB		MANGLE(Uniform3fARB)
 | 
			
		||||
#define glUniform3f		MANGLE(Uniform3f)
 | 
			
		||||
#define glUniform3fvARB		MANGLE(Uniform3fvARB)
 | 
			
		||||
@@ -1229,7 +1500,9 @@
 | 
			
		||||
#define glUniform3ivARB		MANGLE(Uniform3ivARB)
 | 
			
		||||
#define glUniform3iv		MANGLE(Uniform3iv)
 | 
			
		||||
#define glUniform3uiEXT		MANGLE(Uniform3uiEXT)
 | 
			
		||||
#define glUniform3ui		MANGLE(Uniform3ui)
 | 
			
		||||
#define glUniform3uivEXT		MANGLE(Uniform3uivEXT)
 | 
			
		||||
#define glUniform3uiv		MANGLE(Uniform3uiv)
 | 
			
		||||
#define glUniform4fARB		MANGLE(Uniform4fARB)
 | 
			
		||||
#define glUniform4f		MANGLE(Uniform4f)
 | 
			
		||||
#define glUniform4fvARB		MANGLE(Uniform4fvARB)
 | 
			
		||||
@@ -1239,7 +1512,9 @@
 | 
			
		||||
#define glUniform4ivARB		MANGLE(Uniform4ivARB)
 | 
			
		||||
#define glUniform4iv		MANGLE(Uniform4iv)
 | 
			
		||||
#define glUniform4uiEXT		MANGLE(Uniform4uiEXT)
 | 
			
		||||
#define glUniform4ui		MANGLE(Uniform4ui)
 | 
			
		||||
#define glUniform4uivEXT		MANGLE(Uniform4uivEXT)
 | 
			
		||||
#define glUniform4uiv		MANGLE(Uniform4uiv)
 | 
			
		||||
#define glUniformBufferEXT		MANGLE(UniformBufferEXT)
 | 
			
		||||
#define glUniformMatrix2fvARB		MANGLE(UniformMatrix2fvARB)
 | 
			
		||||
#define glUniformMatrix2fv		MANGLE(UniformMatrix2fv)
 | 
			
		||||
@@ -1256,6 +1531,7 @@
 | 
			
		||||
#define glUnlockArraysEXT		MANGLE(UnlockArraysEXT)
 | 
			
		||||
#define glUnmapBufferARB		MANGLE(UnmapBufferARB)
 | 
			
		||||
#define glUnmapBuffer		MANGLE(UnmapBuffer)
 | 
			
		||||
#define glUnmapNamedBufferEXT		MANGLE(UnmapNamedBufferEXT)
 | 
			
		||||
#define glUnmapObjectBufferATI		MANGLE(UnmapObjectBufferATI)
 | 
			
		||||
#define glUpdateObjectBufferATI		MANGLE(UpdateObjectBufferATI)
 | 
			
		||||
#define glUseProgram		MANGLE(UseProgram)
 | 
			
		||||
@@ -1412,27 +1688,49 @@
 | 
			
		||||
#define glVertexAttrib4usvARB		MANGLE(VertexAttrib4usvARB)
 | 
			
		||||
#define glVertexAttrib4usv		MANGLE(VertexAttrib4usv)
 | 
			
		||||
#define glVertexAttribArrayObjectATI		MANGLE(VertexAttribArrayObjectATI)
 | 
			
		||||
#define glVertexAttribDivisor		MANGLE(VertexAttribDivisor)
 | 
			
		||||
#define glVertexAttribI1iEXT		MANGLE(VertexAttribI1iEXT)
 | 
			
		||||
#define glVertexAttribI1i		MANGLE(VertexAttribI1i)
 | 
			
		||||
#define glVertexAttribI1ivEXT		MANGLE(VertexAttribI1ivEXT)
 | 
			
		||||
#define glVertexAttribI1iv		MANGLE(VertexAttribI1iv)
 | 
			
		||||
#define glVertexAttribI1uiEXT		MANGLE(VertexAttribI1uiEXT)
 | 
			
		||||
#define glVertexAttribI1ui		MANGLE(VertexAttribI1ui)
 | 
			
		||||
#define glVertexAttribI1uivEXT		MANGLE(VertexAttribI1uivEXT)
 | 
			
		||||
#define glVertexAttribI1uiv		MANGLE(VertexAttribI1uiv)
 | 
			
		||||
#define glVertexAttribI2iEXT		MANGLE(VertexAttribI2iEXT)
 | 
			
		||||
#define glVertexAttribI2i		MANGLE(VertexAttribI2i)
 | 
			
		||||
#define glVertexAttribI2ivEXT		MANGLE(VertexAttribI2ivEXT)
 | 
			
		||||
#define glVertexAttribI2iv		MANGLE(VertexAttribI2iv)
 | 
			
		||||
#define glVertexAttribI2uiEXT		MANGLE(VertexAttribI2uiEXT)
 | 
			
		||||
#define glVertexAttribI2ui		MANGLE(VertexAttribI2ui)
 | 
			
		||||
#define glVertexAttribI2uivEXT		MANGLE(VertexAttribI2uivEXT)
 | 
			
		||||
#define glVertexAttribI2uiv		MANGLE(VertexAttribI2uiv)
 | 
			
		||||
#define glVertexAttribI3iEXT		MANGLE(VertexAttribI3iEXT)
 | 
			
		||||
#define glVertexAttribI3i		MANGLE(VertexAttribI3i)
 | 
			
		||||
#define glVertexAttribI3ivEXT		MANGLE(VertexAttribI3ivEXT)
 | 
			
		||||
#define glVertexAttribI3iv		MANGLE(VertexAttribI3iv)
 | 
			
		||||
#define glVertexAttribI3uiEXT		MANGLE(VertexAttribI3uiEXT)
 | 
			
		||||
#define glVertexAttribI3ui		MANGLE(VertexAttribI3ui)
 | 
			
		||||
#define glVertexAttribI3uivEXT		MANGLE(VertexAttribI3uivEXT)
 | 
			
		||||
#define glVertexAttribI3uiv		MANGLE(VertexAttribI3uiv)
 | 
			
		||||
#define glVertexAttribI4bvEXT		MANGLE(VertexAttribI4bvEXT)
 | 
			
		||||
#define glVertexAttribI4bv		MANGLE(VertexAttribI4bv)
 | 
			
		||||
#define glVertexAttribI4iEXT		MANGLE(VertexAttribI4iEXT)
 | 
			
		||||
#define glVertexAttribI4i		MANGLE(VertexAttribI4i)
 | 
			
		||||
#define glVertexAttribI4ivEXT		MANGLE(VertexAttribI4ivEXT)
 | 
			
		||||
#define glVertexAttribI4iv		MANGLE(VertexAttribI4iv)
 | 
			
		||||
#define glVertexAttribI4svEXT		MANGLE(VertexAttribI4svEXT)
 | 
			
		||||
#define glVertexAttribI4sv		MANGLE(VertexAttribI4sv)
 | 
			
		||||
#define glVertexAttribI4ubvEXT		MANGLE(VertexAttribI4ubvEXT)
 | 
			
		||||
#define glVertexAttribI4ubv		MANGLE(VertexAttribI4ubv)
 | 
			
		||||
#define glVertexAttribI4uiEXT		MANGLE(VertexAttribI4uiEXT)
 | 
			
		||||
#define glVertexAttribI4ui		MANGLE(VertexAttribI4ui)
 | 
			
		||||
#define glVertexAttribI4uivEXT		MANGLE(VertexAttribI4uivEXT)
 | 
			
		||||
#define glVertexAttribI4uiv		MANGLE(VertexAttribI4uiv)
 | 
			
		||||
#define glVertexAttribI4usvEXT		MANGLE(VertexAttribI4usvEXT)
 | 
			
		||||
#define glVertexAttribI4usv		MANGLE(VertexAttribI4usv)
 | 
			
		||||
#define glVertexAttribIPointerEXT		MANGLE(VertexAttribIPointerEXT)
 | 
			
		||||
#define glVertexAttribIPointer		MANGLE(VertexAttribIPointer)
 | 
			
		||||
#define glVertexAttribPointerARB		MANGLE(VertexAttribPointerARB)
 | 
			
		||||
#define glVertexAttribPointer		MANGLE(VertexAttribPointer)
 | 
			
		||||
#define glVertexAttribPointerNV		MANGLE(VertexAttribPointerNV)
 | 
			
		||||
 
 | 
			
		||||
@@ -46,9 +46,9 @@ extern "C" {
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
/* Header file version number, required by OpenGL ABI for Linux */
 | 
			
		||||
/* glext.h last updated 2009/03/04 */
 | 
			
		||||
/* glext.h last updated 2009/03/19 */
 | 
			
		||||
/* Current version at http://www.opengl.org/registry/ */
 | 
			
		||||
#define GL_GLEXT_VERSION 46
 | 
			
		||||
#define GL_GLEXT_VERSION 48
 | 
			
		||||
 | 
			
		||||
#ifndef GL_VERSION_1_2
 | 
			
		||||
#define GL_UNSIGNED_BYTE_3_3_2            0x8032
 | 
			
		||||
@@ -3878,6 +3878,26 @@ extern "C" {
 | 
			
		||||
#define GL_PERFMON_RESULT_AMD             0x8BC6
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_AMD_texture_texture4
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_AMD_vertex_shader_tesselator
 | 
			
		||||
#define GL_SAMPLER_BUFFER_AMD             0x9001
 | 
			
		||||
#define GL_INT_SAMPLER_BUFFER_AMD         0x9002
 | 
			
		||||
#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
 | 
			
		||||
#define GL_TESSELLATION_MODE_AMD          0x9004
 | 
			
		||||
#define GL_TESSELLATION_FACTOR_AMD        0x9005
 | 
			
		||||
#define GL_DISCRETE_AMD                   0x9006
 | 
			
		||||
#define GL_CONTINUOUS_AMD                 0x9007
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_EXT_provoking_vertex
 | 
			
		||||
#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
 | 
			
		||||
#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D
 | 
			
		||||
#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E
 | 
			
		||||
#define GL_PROVOKING_VERTEX_EXT           0x8E4F
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
@@ -4503,8 +4523,8 @@ GLAPI void APIENTRY glBeginTransformFeedback (GLenum);
 | 
			
		||||
GLAPI void APIENTRY glEndTransformFeedback (void);
 | 
			
		||||
GLAPI void APIENTRY glBindBufferRange (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
 | 
			
		||||
GLAPI void APIENTRY glBindBufferBase (GLenum, GLuint, GLuint);
 | 
			
		||||
GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLint *, GLenum);
 | 
			
		||||
GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLint *);
 | 
			
		||||
GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLchar* *, GLenum);
 | 
			
		||||
GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
 | 
			
		||||
GLAPI void APIENTRY glClampColor (GLenum, GLenum);
 | 
			
		||||
GLAPI void APIENTRY glBeginConditionalRender (GLuint, GLenum);
 | 
			
		||||
GLAPI void APIENTRY glEndConditionalRender (void);
 | 
			
		||||
@@ -4562,8 +4582,8 @@ typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
 | 
			
		||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
 | 
			
		||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
 | 
			
		||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
 | 
			
		||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
 | 
			
		||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLint *location);
 | 
			
		||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
 | 
			
		||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
 | 
			
		||||
typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
 | 
			
		||||
typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
 | 
			
		||||
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
 | 
			
		||||
@@ -8053,16 +8073,16 @@ GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
 | 
			
		||||
GLAPI void APIENTRY glBindBufferRangeEXT (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
 | 
			
		||||
GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum, GLuint, GLuint, GLintptr);
 | 
			
		||||
GLAPI void APIENTRY glBindBufferBaseEXT (GLenum, GLuint, GLuint);
 | 
			
		||||
GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLint *, GLenum);
 | 
			
		||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLint *);
 | 
			
		||||
GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLchar* *, GLenum);
 | 
			
		||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
 | 
			
		||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
 | 
			
		||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
 | 
			
		||||
typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
 | 
			
		||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
 | 
			
		||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
 | 
			
		||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLint *location);
 | 
			
		||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
 | 
			
		||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_EXT_direct_state_access
 | 
			
		||||
@@ -8515,6 +8535,28 @@ typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
 | 
			
		||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_AMD_texture_texture4
 | 
			
		||||
#define GL_AMD_texture_texture4 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_AMD_vertex_shader_tesselator
 | 
			
		||||
#define GL_AMD_vertex_shader_tesselator 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
GLAPI void APIENTRY glTessellationFactorAMD (GLfloat);
 | 
			
		||||
GLAPI void APIENTRY glTessellationModeAMD (GLenum);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
 | 
			
		||||
typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_EXT_provoking_vertex
 | 
			
		||||
#define GL_EXT_provoking_vertex 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
GLAPI void APIENTRY glProvokingVertexEXT (GLenum);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -636,7 +636,7 @@ struct __DRIbufferRec {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define __DRI_DRI2_LOADER "DRI_DRI2Loader"
 | 
			
		||||
#define __DRI_DRI2_LOADER_VERSION 1
 | 
			
		||||
#define __DRI_DRI2_LOADER_VERSION 2
 | 
			
		||||
struct __DRIdri2LoaderExtensionRec {
 | 
			
		||||
    __DRIextension base;
 | 
			
		||||
 | 
			
		||||
@@ -644,6 +644,19 @@ struct __DRIdri2LoaderExtensionRec {
 | 
			
		||||
			       int *width, int *height,
 | 
			
		||||
			       unsigned int *attachments, int count,
 | 
			
		||||
			       int *out_count, void *loaderPrivate);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Flush pending front-buffer rendering
 | 
			
		||||
     *
 | 
			
		||||
     * Any rendering that has been performed to the
 | 
			
		||||
     * \c __DRI_BUFFER_FAKE_FRONT_LEFT will be flushed to the
 | 
			
		||||
     * \c __DRI_BUFFER_FRONT_LEFT.
 | 
			
		||||
     *
 | 
			
		||||
     * \param driDrawable    Drawable whose front-buffer is to be flushed
 | 
			
		||||
     * \param loaderPrivate  Loader's private data that was previously passed
 | 
			
		||||
     *                       into __DRIdri2ExtensionRec::createNewDrawable
 | 
			
		||||
     */
 | 
			
		||||
    void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -103,7 +103,7 @@ static void PrintColorStrings( void )
 | 
			
		||||
{
 | 
			
		||||
    GLubyte ubbuf[3];
 | 
			
		||||
    int i, xleft, xright;
 | 
			
		||||
    char colorString[18];
 | 
			
		||||
    char colorString[100];
 | 
			
		||||
 | 
			
		||||
    xleft = 5 + windW/4;
 | 
			
		||||
    xright = 5 + windW/2;
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,7 @@ xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
 | 
			
		||||
	$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
 | 
			
		||||
 | 
			
		||||
corender: corender.o ipc.o
 | 
			
		||||
	$(CC) $(CFLAGS) corender.o ipc.o $(LIBS) -o $@
 | 
			
		||||
	$(CC) $(CFLAGS) $(LDFLAGS) corender.o ipc.o $(LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
corender.o: corender.c ipc.h
 | 
			
		||||
	$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c
 | 
			
		||||
 
 | 
			
		||||
@@ -385,6 +385,10 @@ draw( Display *dpy, Window win )
 | 
			
		||||
   } else
 | 
			
		||||
      do_draw();
 | 
			
		||||
 | 
			
		||||
   glDeleteLists(gear1, 1);
 | 
			
		||||
   glDeleteLists(gear2, 1);
 | 
			
		||||
   glDeleteLists(gear3, 1);
 | 
			
		||||
 | 
			
		||||
   glXSwapBuffers(dpy, win);
 | 
			
		||||
   glXDestroyContext(dpy, ctx);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -253,7 +253,7 @@ DRI2Buffer *DRI2GetBuffers(Display *dpy, XID drawable,
 | 
			
		||||
    *height = rep.height;
 | 
			
		||||
    *outCount = rep.count;
 | 
			
		||||
 | 
			
		||||
    buffers = Xmalloc(count * sizeof buffers[0]);
 | 
			
		||||
    buffers = Xmalloc(rep.count * sizeof buffers[0]);
 | 
			
		||||
    if (buffers == NULL) {
 | 
			
		||||
	_XEatData(dpy, rep.count * sizeof repBuffer);
 | 
			
		||||
	UnlockDisplay(dpy);
 | 
			
		||||
 
 | 
			
		||||
@@ -60,9 +60,6 @@ struct __GLXDRIdisplayPrivateRec {
 | 
			
		||||
    int driMajor;
 | 
			
		||||
    int driMinor;
 | 
			
		||||
    int driPatch;
 | 
			
		||||
 | 
			
		||||
    unsigned long configureSeqno;
 | 
			
		||||
    Bool (*oldConfigProc)(Display *, XEvent *, xEvent *);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct __GLXDRIcontextPrivateRec {
 | 
			
		||||
@@ -76,9 +73,7 @@ struct __GLXDRIdrawablePrivateRec {
 | 
			
		||||
    __DRIbuffer buffers[5];
 | 
			
		||||
    int bufferCount;
 | 
			
		||||
    int width, height;
 | 
			
		||||
    unsigned long configureSeqno;
 | 
			
		||||
    int have_back;
 | 
			
		||||
    int have_front;
 | 
			
		||||
    int have_fake_front;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -174,7 +169,6 @@ static __GLXDRIdrawable *dri2CreateDrawable(__GLXscreenConfigs *psc,
 | 
			
		||||
    pdraw->base.drawable = drawable;
 | 
			
		||||
    pdraw->base.psc = psc;
 | 
			
		||||
    pdraw->bufferCount = 0;
 | 
			
		||||
    pdraw->configureSeqno = ~0;
 | 
			
		||||
 | 
			
		||||
    DRI2CreateDrawable(psc->dpy, xDrawable);
 | 
			
		||||
 | 
			
		||||
@@ -200,7 +194,7 @@ static void dri2CopySubBuffer(__GLXDRIdrawable *pdraw,
 | 
			
		||||
    XserverRegion region;
 | 
			
		||||
 | 
			
		||||
    /* Check we have the right attachments */
 | 
			
		||||
    if (!(priv->have_front && priv->have_back))
 | 
			
		||||
    if (!priv->have_back)
 | 
			
		||||
    	return;
 | 
			
		||||
 | 
			
		||||
    xrect.x = x;
 | 
			
		||||
@@ -228,7 +222,7 @@ static void dri2WaitX(__GLXDRIdrawable *pdraw)
 | 
			
		||||
    XserverRegion region;
 | 
			
		||||
 | 
			
		||||
    /* Check we have the right attachments */
 | 
			
		||||
    if (!(priv->have_fake_front && priv->have_front))
 | 
			
		||||
    if (!priv->have_fake_front)
 | 
			
		||||
    	return;
 | 
			
		||||
 | 
			
		||||
    xrect.x = 0;
 | 
			
		||||
@@ -248,7 +242,7 @@ static void dri2WaitGL(__GLXDRIdrawable *pdraw)
 | 
			
		||||
    XRectangle xrect;
 | 
			
		||||
    XserverRegion region;
 | 
			
		||||
 | 
			
		||||
    if (!(priv->have_fake_front && priv->have_front))
 | 
			
		||||
    if (!priv->have_fake_front)
 | 
			
		||||
    	return;
 | 
			
		||||
 | 
			
		||||
    xrect.x = 0;
 | 
			
		||||
@@ -262,6 +256,15 @@ static void dri2WaitGL(__GLXDRIdrawable *pdraw)
 | 
			
		||||
    XFixesDestroyRegion(pdraw->psc->dpy, region);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void dri2FlushFrontBuffer(__DRIdrawable *driDrawable,
 | 
			
		||||
				 void *loaderPrivate)
 | 
			
		||||
{
 | 
			
		||||
    (void) driDrawable;
 | 
			
		||||
    dri2WaitGL((__GLXDRIdrawable *) loaderPrivate);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void dri2DestroyScreen(__GLXscreenConfigs *psc)
 | 
			
		||||
{
 | 
			
		||||
    /* Free the direct rendering per screen data */
 | 
			
		||||
@@ -277,30 +280,9 @@ dri2GetBuffers(__DRIdrawable *driDrawable,
 | 
			
		||||
	       int *out_count, void *loaderPrivate)
 | 
			
		||||
{
 | 
			
		||||
    __GLXDRIdrawablePrivate *pdraw = loaderPrivate;
 | 
			
		||||
    __GLXdisplayPrivate *dpyPriv = __glXInitialize(pdraw->base.psc->dpy);
 | 
			
		||||
    __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;
 | 
			
		||||
    DRI2Buffer *buffers;
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Check if a ConfigureNotify has come in since we last asked for the
 | 
			
		||||
     * buffers associated with this drawable.  If not, we can assume that they're
 | 
			
		||||
     * the same set at glViewport time, and save a synchronous round-trip to the
 | 
			
		||||
     * X Server.
 | 
			
		||||
     */
 | 
			
		||||
    if (pdraw->configureSeqno == pdp->configureSeqno &&
 | 
			
		||||
	count == pdraw->bufferCount) {
 | 
			
		||||
	for (i = 0; i < count; i++) {
 | 
			
		||||
	    if (pdraw->buffers[i].attachment != attachments[i])
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
	if (i == count) {
 | 
			
		||||
	    *out_count = pdraw->bufferCount;
 | 
			
		||||
	    return pdraw->buffers;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
    pdraw->configureSeqno = pdp->configureSeqno;
 | 
			
		||||
 | 
			
		||||
    buffers = DRI2GetBuffers(pdraw->base.psc->dpy, pdraw->base.xDrawable,
 | 
			
		||||
			     width, height, attachments, count, out_count);
 | 
			
		||||
    if (buffers == NULL)
 | 
			
		||||
@@ -309,7 +291,6 @@ dri2GetBuffers(__DRIdrawable *driDrawable,
 | 
			
		||||
    pdraw->width = *width;
 | 
			
		||||
    pdraw->height = *height;
 | 
			
		||||
    pdraw->bufferCount = *out_count;
 | 
			
		||||
    pdraw->have_front = 0;
 | 
			
		||||
    pdraw->have_fake_front = 0;
 | 
			
		||||
    pdraw->have_back = 0;
 | 
			
		||||
 | 
			
		||||
@@ -321,8 +302,6 @@ dri2GetBuffers(__DRIdrawable *driDrawable,
 | 
			
		||||
	pdraw->buffers[i].pitch = buffers[i].pitch;
 | 
			
		||||
	pdraw->buffers[i].cpp = buffers[i].cpp;
 | 
			
		||||
	pdraw->buffers[i].flags = buffers[i].flags;
 | 
			
		||||
	if (pdraw->buffers[i].attachment == __DRI_BUFFER_FRONT_LEFT)
 | 
			
		||||
	    pdraw->have_front = 1;
 | 
			
		||||
	if (pdraw->buffers[i].attachment == __DRI_BUFFER_FAKE_FRONT_LEFT)
 | 
			
		||||
	    pdraw->have_fake_front = 1;
 | 
			
		||||
	if (pdraw->buffers[i].attachment == __DRI_BUFFER_BACK_LEFT)
 | 
			
		||||
@@ -337,6 +316,7 @@ dri2GetBuffers(__DRIdrawable *driDrawable,
 | 
			
		||||
static const __DRIdri2LoaderExtension dri2LoaderExtension = {
 | 
			
		||||
    { __DRI_DRI2_LOADER, __DRI_DRI2_LOADER_VERSION },
 | 
			
		||||
    dri2GetBuffers,
 | 
			
		||||
    dri2FlushFrontBuffer
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static const __DRIextension *loader_extensions[] = {
 | 
			
		||||
@@ -446,28 +426,6 @@ static void dri2DestroyDisplay(__GLXDRIdisplay *dpy)
 | 
			
		||||
    Xfree(dpy);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Makes a note on receiving ConfigureNotify that we need to re-check the
 | 
			
		||||
 * DRI2 buffers, as window sizes may have resulted in reallocation.
 | 
			
		||||
 */
 | 
			
		||||
static Bool dri2ConfigureNotifyProc(Display *dpy, XEvent *re, xEvent *event)
 | 
			
		||||
{
 | 
			
		||||
    __GLXdisplayPrivate *dpyPriv = __glXInitialize(dpy);
 | 
			
		||||
    __GLXDRIdisplayPrivate *pdp;
 | 
			
		||||
    Bool ret;
 | 
			
		||||
 | 
			
		||||
    /* We should always be able to find our pdp, as it only gets torn down
 | 
			
		||||
     * when the Display is torn down.
 | 
			
		||||
     */
 | 
			
		||||
    pdp = (__GLXDRIdisplayPrivate *)dpyPriv->dri2Display;
 | 
			
		||||
 | 
			
		||||
    ret = pdp->oldConfigProc(dpy, re, event);
 | 
			
		||||
 | 
			
		||||
    pdp->configureSeqno = re->xconfigure.serial;
 | 
			
		||||
 | 
			
		||||
    return ret;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Allocate, initialize and return a __DRIdisplayPrivate object.
 | 
			
		||||
 * This is called from __glXInitialize() when we are given a new
 | 
			
		||||
@@ -490,11 +448,7 @@ _X_HIDDEN __GLXDRIdisplay *dri2CreateDisplay(Display *dpy)
 | 
			
		||||
	return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pdp->oldConfigProc = XESetWireToEvent(dpy, ConfigureNotify,
 | 
			
		||||
					  dri2ConfigureNotifyProc);
 | 
			
		||||
 | 
			
		||||
    pdp->driPatch = 0;
 | 
			
		||||
    pdp->configureSeqno = 0;
 | 
			
		||||
 | 
			
		||||
    pdp->base.destroyDisplay = dri2DestroyDisplay;
 | 
			
		||||
    pdp->base.createScreen = dri2CreateScreen;
 | 
			
		||||
 
 | 
			
		||||
@@ -600,7 +600,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
 | 
			
		||||
    char *driverName;
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    psp = Xmalloc(sizeof *psp);
 | 
			
		||||
    psp = Xcalloc(1, sizeof *psp);
 | 
			
		||||
    if (psp == NULL)
 | 
			
		||||
	return NULL;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -359,7 +359,7 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
 | 
			
		||||
   const char *driverName = "swrast";
 | 
			
		||||
   int i;
 | 
			
		||||
 | 
			
		||||
   psp = Xmalloc(sizeof *psp);
 | 
			
		||||
   psp = Xcalloc(1, sizeof *psp);
 | 
			
		||||
   if (psp == NULL)
 | 
			
		||||
      return NULL;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -604,7 +604,6 @@ extern void __glXSendLargeCommand(__GLXcontext *, const GLvoid *, GLint,
 | 
			
		||||
				  const GLvoid *, GLint);
 | 
			
		||||
 | 
			
		||||
/* Initialize the GLX extension for dpy */
 | 
			
		||||
extern __GLXdisplayPrivate * __glXGetPrivateFromDisplay(Display *dpy);
 | 
			
		||||
extern __GLXdisplayPrivate *__glXInitialize(Display*);
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 
 | 
			
		||||
@@ -1702,7 +1702,8 @@ PUBLIC GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
 | 
			
		||||
    int   i;
 | 
			
		||||
 | 
			
		||||
    *nelements = 0;
 | 
			
		||||
    if ( (priv->screenConfigs != NULL)
 | 
			
		||||
    if ( priv
 | 
			
		||||
         && (priv->screenConfigs != NULL)
 | 
			
		||||
	 && (screen >= 0) && (screen <= ScreenCount(dpy))
 | 
			
		||||
	 && (priv->screenConfigs[screen].configs != NULL)
 | 
			
		||||
	 && (priv->screenConfigs[screen].configs->fbconfigID != GLX_DONT_CARE) ) {
 | 
			
		||||
 
 | 
			
		||||
@@ -5198,9 +5198,13 @@ glDeleteTexturesEXT(GLsizei n, const GLuint * textures)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
 | 
			
		||||
    } else {
 | 
			
		||||
#else
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 4 + __GLX_PAD((n * 4));
 | 
			
		||||
@@ -5266,9 +5270,13 @@ glGenTexturesEXT(GLsizei n, GLuint * textures)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GenTextures(GET_DISPATCH(), (n, textures));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 4;
 | 
			
		||||
@@ -5328,9 +5336,13 @@ glIsTextureEXT(GLuint texture)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        return CALL_IsTexture(GET_DISPATCH(), (texture));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        GLboolean retval = (GLboolean) 0;
 | 
			
		||||
@@ -5641,9 +5653,13 @@ glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        const __GLXattribute *const state = gc->client_state_private;
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
@@ -5714,10 +5730,14 @@ glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetColorTableParameterfv(GET_DISPATCH(),
 | 
			
		||||
                                      (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
@@ -5784,10 +5804,14 @@ glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetColorTableParameteriv(GET_DISPATCH(),
 | 
			
		||||
                                      (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
@@ -6107,10 +6131,14 @@ gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type,
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetConvolutionFilter(GET_DISPATCH(),
 | 
			
		||||
                                  (target, format, type, image));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        const __GLXattribute *const state = gc->client_state_private;
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
@@ -6182,10 +6210,14 @@ gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetConvolutionParameterfv(GET_DISPATCH(),
 | 
			
		||||
                                       (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
@@ -6252,10 +6284,14 @@ gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetConvolutionParameteriv(GET_DISPATCH(),
 | 
			
		||||
                                       (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
@@ -6329,10 +6365,14 @@ gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format,
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetHistogram(GET_DISPATCH(),
 | 
			
		||||
                          (target, reset, format, type, values));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        const __GLXattribute *const state = gc->client_state_private;
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
@@ -6403,9 +6443,13 @@ gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
@@ -6471,9 +6515,13 @@ gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
@@ -6543,9 +6591,13 @@ gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format,
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        const __GLXattribute *const state = gc->client_state_private;
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
@@ -6614,9 +6666,13 @@ gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
@@ -6679,9 +6735,13 @@ gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params)
 | 
			
		||||
{
 | 
			
		||||
    __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
 | 
			
		||||
#ifdef GLX_DIRECT_RENDERING    
 | 
			
		||||
    if (gc->driContext) {
 | 
			
		||||
        CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
 | 
			
		||||
    } else {
 | 
			
		||||
#else 
 | 
			
		||||
    {
 | 
			
		||||
#endif
 | 
			
		||||
        __GLXcontext *const gc = __glXGetCurrentContext();
 | 
			
		||||
        Display *const dpy = gc->currentDpy;
 | 
			
		||||
        const GLuint cmdlen = 8;
 | 
			
		||||
 
 | 
			
		||||
@@ -30,6 +30,10 @@
 | 
			
		||||
#include "indirect_vertex_array.h"
 | 
			
		||||
#include <GL/glxproto.h>
 | 
			
		||||
 | 
			
		||||
#if !defined __GNUC__ || __GNUC__ < 3
 | 
			
		||||
#  define __builtin_expect(x, y) x
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
do_vertex_attrib_enable(GLuint index, GLboolean val)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -31,6 +31,10 @@
 | 
			
		||||
#include "glxclient.h"
 | 
			
		||||
#include "indirect.h"
 | 
			
		||||
 | 
			
		||||
#if !defined __GNUC__ || __GNUC__ < 3
 | 
			
		||||
#  define __builtin_expect(x, y) x
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Send glPixelStore command to the server
 | 
			
		||||
 * 
 | 
			
		||||
 
 | 
			
		||||
@@ -59,37 +59,6 @@ static GLboolean have_attr(struct brw_sf_compile *c,
 | 
			
		||||
   return (c->key.attrs & (1<<attr)) ? 1 : 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Sets VERT_RESULT_FOGC.Y  for gl_FrontFacing
 | 
			
		||||
 *
 | 
			
		||||
 * This is currently executed if the fragment program uses VERT_RESULT_FOGC
 | 
			
		||||
 * at all, but this could be eliminated with a scan of the FP contents.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
do_front_facing( struct brw_sf_compile *c )
 | 
			
		||||
{
 | 
			
		||||
   struct brw_compile *p = &c->func; 
 | 
			
		||||
   int i;
 | 
			
		||||
 | 
			
		||||
   if (!have_attr(c, VERT_RESULT_FOGC))
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   brw_push_insn_state(p);
 | 
			
		||||
   brw_CMP(p, brw_null_reg(), 
 | 
			
		||||
        c->key.frontface_ccw ? BRW_CONDITIONAL_G : BRW_CONDITIONAL_L,
 | 
			
		||||
        c->det, brw_imm_f(0));
 | 
			
		||||
   brw_set_predicate_control(p, BRW_PREDICATE_NONE);
 | 
			
		||||
   for (i = 0; i < 3; i++) {
 | 
			
		||||
       struct brw_reg fogc = get_vert_attr(c, c->vert[i],FRAG_ATTRIB_FOGC);
 | 
			
		||||
       brw_MOV(p, get_element(fogc, 1), brw_imm_f(0));
 | 
			
		||||
       brw_set_predicate_control(p, BRW_PREDICATE_NORMAL);
 | 
			
		||||
       brw_MOV(p, get_element(fogc, 1), brw_imm_f(1));
 | 
			
		||||
       brw_set_predicate_control(p, BRW_PREDICATE_NONE);
 | 
			
		||||
   }
 | 
			
		||||
   brw_pop_insn_state(p);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
			 
 | 
			
		||||
/*********************************************************************** 
 | 
			
		||||
 * Twoside lighting
 | 
			
		||||
 */
 | 
			
		||||
@@ -384,7 +353,6 @@ void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate)
 | 
			
		||||
 | 
			
		||||
   invert_det(c);
 | 
			
		||||
   copy_z_inv_w(c);
 | 
			
		||||
   do_front_facing(c);
 | 
			
		||||
 | 
			
		||||
   if (c->key.do_twoside_color) 
 | 
			
		||||
      do_twoside_color(c);
 | 
			
		||||
 
 | 
			
		||||
@@ -43,10 +43,11 @@ static void upload_sf_vp(struct brw_context *brw)
 | 
			
		||||
   const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
 | 
			
		||||
   struct brw_sf_viewport sfv;
 | 
			
		||||
   GLfloat y_scale, y_bias;
 | 
			
		||||
   const GLboolean render_to_fbo = (ctx->DrawBuffer->Name != 0);
 | 
			
		||||
 | 
			
		||||
   memset(&sfv, 0, sizeof(sfv));
 | 
			
		||||
 | 
			
		||||
   if (intel_rendering_to_texture(ctx)) {
 | 
			
		||||
   if (render_to_fbo) {
 | 
			
		||||
      y_scale = 1.0;
 | 
			
		||||
      y_bias = 0;
 | 
			
		||||
   }
 | 
			
		||||
@@ -75,7 +76,7 @@ static void upload_sf_vp(struct brw_context *brw)
 | 
			
		||||
    * Note that the hardware's coordinates are inclusive, while Mesa's min is
 | 
			
		||||
    * inclusive but max is exclusive.
 | 
			
		||||
    */
 | 
			
		||||
   if (intel_rendering_to_texture(ctx)) {
 | 
			
		||||
   if (render_to_fbo) {
 | 
			
		||||
      /* texmemory: Y=0=bottom */
 | 
			
		||||
      sfv.scissor.xmin = ctx->DrawBuffer->_Xmin;
 | 
			
		||||
      sfv.scissor.xmax = ctx->DrawBuffer->_Xmax - 1;
 | 
			
		||||
@@ -114,7 +115,7 @@ struct brw_sf_unit_key {
 | 
			
		||||
   GLboolean scissor, line_smooth, point_sprite, point_attenuated;
 | 
			
		||||
   float line_width;
 | 
			
		||||
   float point_size;
 | 
			
		||||
   GLboolean render_to_texture;
 | 
			
		||||
   GLboolean render_to_fbo;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@@ -147,7 +148,7 @@ sf_unit_populate_key(struct brw_context *brw, struct brw_sf_unit_key *key)
 | 
			
		||||
   key->point_size = ctx->Point.Size;
 | 
			
		||||
   key->point_attenuated = ctx->Point._Attenuated;
 | 
			
		||||
 | 
			
		||||
   key->render_to_texture = intel_rendering_to_texture(&brw->intel.ctx);
 | 
			
		||||
   key->render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static dri_bo *
 | 
			
		||||
@@ -194,10 +195,10 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
 | 
			
		||||
   else
 | 
			
		||||
      sf.sf5.front_winding = BRW_FRONTWINDING_CW;
 | 
			
		||||
 | 
			
		||||
   /* The viewport is inverted for rendering to texture, and that inverts
 | 
			
		||||
   /* The viewport is inverted for rendering to a FBO, and that inverts
 | 
			
		||||
    * polygon front/back orientation.
 | 
			
		||||
    */
 | 
			
		||||
   sf.sf5.front_winding ^= key->render_to_texture;
 | 
			
		||||
   sf.sf5.front_winding ^= key->render_to_fbo;
 | 
			
		||||
 | 
			
		||||
   switch (key->cull_face) {
 | 
			
		||||
   case GL_FRONT:
 | 
			
		||||
 
 | 
			
		||||
@@ -40,6 +40,8 @@
 | 
			
		||||
GLuint brw_wm_nr_args( GLuint opcode )
 | 
			
		||||
{
 | 
			
		||||
   switch (opcode) {
 | 
			
		||||
   case WM_FRONTFACING:
 | 
			
		||||
      return 0;
 | 
			
		||||
   case WM_PIXELXY:
 | 
			
		||||
   case WM_CINTERP:
 | 
			
		||||
   case WM_WPOSXY:
 | 
			
		||||
 
 | 
			
		||||
@@ -172,7 +172,8 @@ struct brw_wm_instruction {
 | 
			
		||||
#define WM_CINTERP        (MAX_OPCODE + 5)
 | 
			
		||||
#define WM_WPOSXY         (MAX_OPCODE + 6)
 | 
			
		||||
#define WM_FB_WRITE       (MAX_OPCODE + 7)
 | 
			
		||||
#define MAX_WM_OPCODE     (MAX_OPCODE + 8)
 | 
			
		||||
#define WM_FRONTFACING    (MAX_OPCODE + 8)
 | 
			
		||||
#define MAX_WM_OPCODE     (MAX_OPCODE + 9)
 | 
			
		||||
 | 
			
		||||
#define PROGRAM_PAYLOAD   (PROGRAM_FILE_MAX)
 | 
			
		||||
#define PAYLOAD_DEPTH     (FRAG_ATTRIB_MAX)
 | 
			
		||||
 
 | 
			
		||||
@@ -130,6 +130,9 @@ void brw_wm_print_insn( struct brw_wm_compile *c,
 | 
			
		||||
   case WM_FB_WRITE:
 | 
			
		||||
      _mesa_printf(" = FB_WRITE");
 | 
			
		||||
      break;
 | 
			
		||||
   case WM_FRONTFACING:
 | 
			
		||||
      _mesa_printf(" = FRONTFACING");
 | 
			
		||||
      break;
 | 
			
		||||
   default:
 | 
			
		||||
      _mesa_printf(" = %s", _mesa_opcode_string(inst->opcode));
 | 
			
		||||
      break;
 | 
			
		||||
 
 | 
			
		||||
@@ -254,6 +254,34 @@ static void emit_cinterp( struct brw_compile *p,
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Sets the destination channels to 1.0 or 0.0 according to glFrontFacing. */
 | 
			
		||||
static void emit_frontfacing( struct brw_compile *p,
 | 
			
		||||
			      const struct brw_reg *dst,
 | 
			
		||||
			      GLuint mask )
 | 
			
		||||
{
 | 
			
		||||
   struct brw_reg r1_6ud = retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_UD);
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   if (!(mask & WRITEMASK_XYZW))
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < 4; i++) {
 | 
			
		||||
      if (mask & (1<<i)) {
 | 
			
		||||
	 brw_MOV(p, dst[i], brw_imm_f(0.0));
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* bit 31 is "primitive is back face", so checking < (1 << 31) gives
 | 
			
		||||
    * us front face
 | 
			
		||||
    */
 | 
			
		||||
   brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_L, r1_6ud, brw_imm_ud(1 << 31));
 | 
			
		||||
   for (i = 0; i < 4; i++) {
 | 
			
		||||
      if (mask & (1<<i)) {
 | 
			
		||||
	 brw_MOV(p, dst[i], brw_imm_f(1.0));
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   brw_set_predicate_control_flag_value(p, 0xff);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void emit_alu1( struct brw_compile *p, 
 | 
			
		||||
		       struct brw_instruction *(*func)(struct brw_compile *, 
 | 
			
		||||
@@ -1158,6 +1186,10 @@ void brw_wm_emit( struct brw_wm_compile *c )
 | 
			
		||||
	 emit_fb_write(c, args[0], args[1], args[2], inst->target, inst->eot);
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      case WM_FRONTFACING:
 | 
			
		||||
	 emit_frontfacing(p, dst, dst_flags);
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
	 /* Straightforward arithmetic:
 | 
			
		||||
	  */
 | 
			
		||||
      case OPCODE_ADD:
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,8 @@ static const char *wm_opcode_strings[] = {
 | 
			
		||||
   "PINTERP",
 | 
			
		||||
   "CINTERP",
 | 
			
		||||
   "WPOSXY",
 | 
			
		||||
   "FB_WRITE"
 | 
			
		||||
   "FB_WRITE",
 | 
			
		||||
   "FRONTFACING",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
@@ -180,7 +181,7 @@ static struct prog_instruction *emit_insn(struct brw_wm_compile *c,
 | 
			
		||||
   return inst;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static struct prog_instruction * emit_op(struct brw_wm_compile *c,
 | 
			
		||||
static struct prog_instruction * emit_tex_op(struct brw_wm_compile *c,
 | 
			
		||||
				       GLuint op,
 | 
			
		||||
				       struct prog_dst_register dest,
 | 
			
		||||
				       GLuint saturate,
 | 
			
		||||
@@ -206,6 +207,20 @@ static struct prog_instruction * emit_op(struct brw_wm_compile *c,
 | 
			
		||||
}
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
static struct prog_instruction * emit_op(struct brw_wm_compile *c,
 | 
			
		||||
				       GLuint op,
 | 
			
		||||
				       struct prog_dst_register dest,
 | 
			
		||||
				       GLuint saturate,
 | 
			
		||||
				       struct prog_src_register src0,
 | 
			
		||||
				       struct prog_src_register src1,
 | 
			
		||||
				       struct prog_src_register src2 )
 | 
			
		||||
{
 | 
			
		||||
   return emit_tex_op(c, op, dest, saturate,
 | 
			
		||||
                      0, 0,  /* tex unit, target */
 | 
			
		||||
                      src0, src1, src2);
 | 
			
		||||
}
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/***********************************************************************
 | 
			
		||||
@@ -227,7 +242,7 @@ static struct prog_src_register get_pixel_xy( struct brw_wm_compile *c )
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      WM_PIXELXY,
 | 
			
		||||
	      dst_mask(pixel_xy, WRITEMASK_XY),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      payload_r0_depth,
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -250,7 +265,7 @@ static struct prog_src_register get_delta_xy( struct brw_wm_compile *c )
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      WM_DELTAXY,
 | 
			
		||||
	      dst_mask(delta_xy, WRITEMASK_XY),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      pixel_xy, 
 | 
			
		||||
	      payload_r0_depth,
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -274,7 +289,7 @@ static struct prog_src_register get_pixel_w( struct brw_wm_compile *c )
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      WM_PIXELW,
 | 
			
		||||
	      dst_mask(pixel_w, WRITEMASK_W),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      interp_wpos,
 | 
			
		||||
	      deltas, 
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -292,24 +307,19 @@ static void emit_interp( struct brw_wm_compile *c,
 | 
			
		||||
   struct prog_dst_register dst = dst_reg(PROGRAM_INPUT, idx);
 | 
			
		||||
   struct prog_src_register interp = src_reg(PROGRAM_PAYLOAD, idx);
 | 
			
		||||
   struct prog_src_register deltas = get_delta_xy(c);
 | 
			
		||||
   struct prog_src_register arg2;
 | 
			
		||||
   GLuint opcode;
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
   /* Need to use PINTERP on attributes which have been
 | 
			
		||||
    * multiplied by 1/W in the SF program, and LINTERP on those
 | 
			
		||||
    * which have not:
 | 
			
		||||
    */
 | 
			
		||||
   switch (idx) {
 | 
			
		||||
   case FRAG_ATTRIB_WPOS:
 | 
			
		||||
      opcode = WM_LINTERP;
 | 
			
		||||
      arg2 = src_undef();
 | 
			
		||||
 | 
			
		||||
      /* Have to treat wpos.xy specially:
 | 
			
		||||
       */
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      WM_WPOSXY,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_XY),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      get_pixel_xy(c),
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -321,10 +331,10 @@ static void emit_interp( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      WM_LINTERP,
 | 
			
		||||
	      dst,
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      interp,
 | 
			
		||||
	      deltas,
 | 
			
		||||
	      arg2);
 | 
			
		||||
	      src_undef());
 | 
			
		||||
      break;
 | 
			
		||||
   case FRAG_ATTRIB_COL0:
 | 
			
		||||
   case FRAG_ATTRIB_COL1:
 | 
			
		||||
@@ -332,7 +342,7 @@ static void emit_interp( struct brw_wm_compile *c,
 | 
			
		||||
	 emit_op(c,
 | 
			
		||||
		 WM_CINTERP,
 | 
			
		||||
		 dst,
 | 
			
		||||
		 0, 0, 0,
 | 
			
		||||
		 0,
 | 
			
		||||
		 interp,
 | 
			
		||||
		 src_undef(),
 | 
			
		||||
		 src_undef());
 | 
			
		||||
@@ -341,17 +351,67 @@ static void emit_interp( struct brw_wm_compile *c,
 | 
			
		||||
	 emit_op(c,
 | 
			
		||||
		 WM_LINTERP,
 | 
			
		||||
		 dst,
 | 
			
		||||
		 0, 0, 0,
 | 
			
		||||
		 0,
 | 
			
		||||
		 interp,
 | 
			
		||||
		 deltas,
 | 
			
		||||
		 src_undef());
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   case FRAG_ATTRIB_FOGC:
 | 
			
		||||
      /* The FOGC input is really special.  When a program uses glFogFragCoord,
 | 
			
		||||
       * the results returned are supposed to be (f,0,0,1).  But for Mesa GLSL,
 | 
			
		||||
       * the glFrontFacing and glPointCoord values are also stashed in FOGC.
 | 
			
		||||
       * So, write the interpolated fog value to X, then either 0, 1, or the
 | 
			
		||||
       * stashed values to Y, Z, W.  Note that this means that
 | 
			
		||||
       * glFogFragCoord.yzw can be wrong in those cases!
 | 
			
		||||
       */
 | 
			
		||||
 | 
			
		||||
      /* Interpolate the fog coordinate */
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      WM_PINTERP,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_X),
 | 
			
		||||
	      0,
 | 
			
		||||
	      interp,
 | 
			
		||||
	      deltas,
 | 
			
		||||
	      get_pixel_w(c));
 | 
			
		||||
 | 
			
		||||
      /* Move the front facing value into FOGC.y if it's needed. */
 | 
			
		||||
      if (c->fp->program.UsesFrontFacing) {
 | 
			
		||||
	 emit_op(c,
 | 
			
		||||
		 WM_FRONTFACING,
 | 
			
		||||
		 dst_mask(dst, WRITEMASK_Y),
 | 
			
		||||
		 0,
 | 
			
		||||
		 src_undef(),
 | 
			
		||||
		 src_undef(),
 | 
			
		||||
		 src_undef());
 | 
			
		||||
      } else {
 | 
			
		||||
	 emit_op(c,
 | 
			
		||||
		 OPCODE_MOV,
 | 
			
		||||
		 dst_mask(dst, WRITEMASK_Y),
 | 
			
		||||
		 0,
 | 
			
		||||
		 src_swizzle1(interp, SWIZZLE_ZERO),
 | 
			
		||||
		 src_undef(),
 | 
			
		||||
		 src_undef());
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /* Should do the PointCoord thing here. */
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MOV,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_ZW),
 | 
			
		||||
	      0,
 | 
			
		||||
	      src_swizzle(interp,
 | 
			
		||||
			  SWIZZLE_ZERO,
 | 
			
		||||
			  SWIZZLE_ZERO,
 | 
			
		||||
			  SWIZZLE_ZERO,
 | 
			
		||||
			  SWIZZLE_ONE),
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
      break;
 | 
			
		||||
   default:
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      WM_PINTERP,
 | 
			
		||||
	      dst,
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      interp,
 | 
			
		||||
	      deltas,
 | 
			
		||||
	      get_pixel_w(c));
 | 
			
		||||
@@ -371,7 +431,7 @@ static void emit_ddx( struct brw_wm_compile *c,
 | 
			
		||||
    emit_op(c,
 | 
			
		||||
            OPCODE_DDX,
 | 
			
		||||
            inst->DstReg,
 | 
			
		||||
            0, 0, 0,
 | 
			
		||||
            0,
 | 
			
		||||
            interp,
 | 
			
		||||
            get_pixel_w(c),
 | 
			
		||||
            src_undef());
 | 
			
		||||
@@ -387,7 +447,7 @@ static void emit_ddy( struct brw_wm_compile *c,
 | 
			
		||||
    emit_op(c,
 | 
			
		||||
            OPCODE_DDY,
 | 
			
		||||
            inst->DstReg,
 | 
			
		||||
            0, 0, 0,
 | 
			
		||||
            0,
 | 
			
		||||
            interp,
 | 
			
		||||
            get_pixel_w(c),
 | 
			
		||||
            src_undef());
 | 
			
		||||
@@ -482,7 +542,7 @@ static void precalc_dst( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MUL,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_Y),
 | 
			
		||||
	      inst->SaturateMode, 0, 0,
 | 
			
		||||
	      inst->SaturateMode,
 | 
			
		||||
	      src0,
 | 
			
		||||
	      src1,
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -498,7 +558,7 @@ static void precalc_dst( struct brw_wm_compile *c,
 | 
			
		||||
      swz = emit_op(c,
 | 
			
		||||
		    OPCODE_SWZ,
 | 
			
		||||
		    dst_mask(dst, WRITEMASK_XZ),
 | 
			
		||||
		    inst->SaturateMode, 0, 0,
 | 
			
		||||
		    inst->SaturateMode,
 | 
			
		||||
		    src_swizzle(src0, SWIZZLE_ONE, z, z, z),
 | 
			
		||||
		    src_undef(),
 | 
			
		||||
		    src_undef());
 | 
			
		||||
@@ -511,7 +571,7 @@ static void precalc_dst( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MOV,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_W),
 | 
			
		||||
	      inst->SaturateMode, 0, 0,
 | 
			
		||||
	      inst->SaturateMode,
 | 
			
		||||
	      src1,
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -533,7 +593,7 @@ static void precalc_lit( struct brw_wm_compile *c,
 | 
			
		||||
      swz = emit_op(c,
 | 
			
		||||
		    OPCODE_SWZ,
 | 
			
		||||
		    dst_mask(dst, WRITEMASK_XW),
 | 
			
		||||
		    0, 0, 0,
 | 
			
		||||
		    0,
 | 
			
		||||
		    src_swizzle1(src0, SWIZZLE_ONE),
 | 
			
		||||
		    src_undef(),
 | 
			
		||||
		    src_undef());
 | 
			
		||||
@@ -546,19 +606,26 @@ static void precalc_lit( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_LIT,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_YZ),
 | 
			
		||||
	      inst->SaturateMode, 0, 0,
 | 
			
		||||
	      inst->SaturateMode,
 | 
			
		||||
	      src0,
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Some TEX instructions require extra code, cube map coordinate
 | 
			
		||||
 * normalization, or coordinate scaling for RECT textures, etc.
 | 
			
		||||
 * This function emits those extra instructions and the TEX
 | 
			
		||||
 * instruction itself.
 | 
			
		||||
 */
 | 
			
		||||
static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
			 const struct prog_instruction *inst )
 | 
			
		||||
{
 | 
			
		||||
   struct prog_src_register coord;
 | 
			
		||||
   struct prog_dst_register tmpcoord;
 | 
			
		||||
   GLuint unit = c->fp->program.Base.SamplerUnits[inst->TexSrcUnit];
 | 
			
		||||
   const GLuint unit = c->fp->program.Base.SamplerUnits[inst->TexSrcUnit];
 | 
			
		||||
 | 
			
		||||
   if (inst->TexSrcTarget == TEXTURE_CUBE_INDEX) {
 | 
			
		||||
       struct prog_instruction *out;
 | 
			
		||||
@@ -568,49 +635,56 @@ static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
       struct prog_src_register tmp1src = src_reg_from_dst(tmp1);
 | 
			
		||||
       struct prog_src_register src0 = inst->SrcReg[0];
 | 
			
		||||
 | 
			
		||||
       /* find longest component of coord vector and normalize it */
 | 
			
		||||
       tmpcoord = get_temp(c);
 | 
			
		||||
       coord = src_reg_from_dst(tmpcoord);
 | 
			
		||||
 | 
			
		||||
       /* tmpcoord = src0 (i.e.: coord = src0) */
 | 
			
		||||
       out = emit_op(c, OPCODE_MOV,
 | 
			
		||||
                     tmpcoord,
 | 
			
		||||
                     0, 0, 0,
 | 
			
		||||
                     0,
 | 
			
		||||
                     src0,
 | 
			
		||||
                     src_undef(),
 | 
			
		||||
                     src_undef());
 | 
			
		||||
       out->SrcReg[0].NegateBase = 0;
 | 
			
		||||
       out->SrcReg[0].Abs = 1;
 | 
			
		||||
 | 
			
		||||
       /* tmp0 = MAX(coord.X, coord.Y) */
 | 
			
		||||
       emit_op(c, OPCODE_MAX,
 | 
			
		||||
               tmp0,
 | 
			
		||||
               0, 0, 0,
 | 
			
		||||
               0,
 | 
			
		||||
               src_swizzle1(coord, X),
 | 
			
		||||
               src_swizzle1(coord, Y),
 | 
			
		||||
               src_undef());
 | 
			
		||||
 | 
			
		||||
       /* tmp1 = MAX(tmp0, coord.Z) */
 | 
			
		||||
       emit_op(c, OPCODE_MAX,
 | 
			
		||||
               tmp1,
 | 
			
		||||
               0, 0, 0,
 | 
			
		||||
               0,
 | 
			
		||||
               tmp0src,
 | 
			
		||||
               src_swizzle1(coord, Z),
 | 
			
		||||
               src_undef());
 | 
			
		||||
 | 
			
		||||
       /* tmp0 = 1 / tmp1 */
 | 
			
		||||
       emit_op(c, OPCODE_RCP,
 | 
			
		||||
               tmp0,
 | 
			
		||||
               0, 0, 0,
 | 
			
		||||
               0,
 | 
			
		||||
               tmp1src,
 | 
			
		||||
               src_undef(),
 | 
			
		||||
               src_undef());
 | 
			
		||||
 | 
			
		||||
       /* tmpCoord = src0 * tmp0 */
 | 
			
		||||
       emit_op(c, OPCODE_MUL,
 | 
			
		||||
               tmpcoord,
 | 
			
		||||
               0, 0, 0,
 | 
			
		||||
               0,
 | 
			
		||||
               src0,
 | 
			
		||||
               tmp0src,
 | 
			
		||||
               src_undef());
 | 
			
		||||
 | 
			
		||||
       release_temp(c, tmp0);
 | 
			
		||||
       release_temp(c, tmp1);
 | 
			
		||||
   } else if (inst->TexSrcTarget == TEXTURE_RECT_INDEX) {
 | 
			
		||||
   }
 | 
			
		||||
   else if (inst->TexSrcTarget == TEXTURE_RECT_INDEX) {
 | 
			
		||||
      struct prog_src_register scale = 
 | 
			
		||||
	 search_or_add_param5( c, 
 | 
			
		||||
			       STATE_INTERNAL, 
 | 
			
		||||
@@ -625,7 +699,7 @@ static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MUL,
 | 
			
		||||
	      tmpcoord,
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      inst->SrcReg[0],
 | 
			
		||||
	      scale,
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -641,19 +715,9 @@ static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
    * conversion requires allocating a temporary variable which we
 | 
			
		||||
    * don't have the facility to do that late in the compilation.
 | 
			
		||||
    */
 | 
			
		||||
   if (!(c->key.yuvtex_mask & (1<<unit))) {
 | 
			
		||||
      emit_op(c, 
 | 
			
		||||
	      OPCODE_TEX,
 | 
			
		||||
	      inst->DstReg,
 | 
			
		||||
	      inst->SaturateMode,
 | 
			
		||||
	      unit,
 | 
			
		||||
	      inst->TexSrcTarget,
 | 
			
		||||
	      coord,
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
       GLboolean  swap_uv = c->key.yuvtex_swap_mask & (1<<unit);
 | 
			
		||||
   if (c->key.yuvtex_mask & (1 << unit)) {
 | 
			
		||||
      /* convert ycbcr to RGBA */
 | 
			
		||||
      GLboolean  swap_uv = c->key.yuvtex_swap_mask & (1<<unit);
 | 
			
		||||
 | 
			
		||||
      /* 
 | 
			
		||||
	 CONST C0 = { -.5, -.0625,  -.5, 1.164 }
 | 
			
		||||
@@ -675,22 +739,22 @@ static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
     
 | 
			
		||||
      /* tmp     = TEX ...
 | 
			
		||||
       */
 | 
			
		||||
      emit_op(c, 
 | 
			
		||||
	      OPCODE_TEX,
 | 
			
		||||
	      tmp,
 | 
			
		||||
	      inst->SaturateMode,
 | 
			
		||||
	      unit,
 | 
			
		||||
	      inst->TexSrcTarget,
 | 
			
		||||
	      coord,
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
      emit_tex_op(c, 
 | 
			
		||||
                  OPCODE_TEX,
 | 
			
		||||
                  tmp,
 | 
			
		||||
                  inst->SaturateMode,
 | 
			
		||||
                  unit,
 | 
			
		||||
                  inst->TexSrcTarget,
 | 
			
		||||
                  coord,
 | 
			
		||||
                  src_undef(),
 | 
			
		||||
                  src_undef());
 | 
			
		||||
 | 
			
		||||
      /* tmp.xyz =  ADD TMP, C0
 | 
			
		||||
       */
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_ADD,
 | 
			
		||||
	      dst_mask(tmp, WRITEMASK_XYZ),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      tmpsrc,
 | 
			
		||||
	      C0,
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -701,7 +765,7 @@ static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MUL,
 | 
			
		||||
	      dst_mask(tmp, WRITEMASK_Y),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      tmpsrc,
 | 
			
		||||
	      src_swizzle1(C0, W),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -716,7 +780,7 @@ static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MAD,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_XYZ),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      swap_uv?src_swizzle(tmpsrc, Z,Z,X,X):src_swizzle(tmpsrc, X,X,Z,Z),
 | 
			
		||||
	      C1,
 | 
			
		||||
	      src_swizzle1(tmpsrc, Y));
 | 
			
		||||
@@ -726,13 +790,25 @@ static void precalc_tex( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MAD,
 | 
			
		||||
	      dst_mask(dst, WRITEMASK_Y),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      src_swizzle1(tmpsrc, Z),
 | 
			
		||||
	      src_swizzle1(C1, W),
 | 
			
		||||
	      src_swizzle1(src_reg_from_dst(dst), Y));
 | 
			
		||||
 | 
			
		||||
      release_temp(c, tmp);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* ordinary RGBA tex instruction */
 | 
			
		||||
      emit_tex_op(c, 
 | 
			
		||||
                  OPCODE_TEX,
 | 
			
		||||
                  inst->DstReg,
 | 
			
		||||
                  inst->SaturateMode,
 | 
			
		||||
                  unit,
 | 
			
		||||
                  inst->TexSrcTarget,
 | 
			
		||||
                  coord,
 | 
			
		||||
                  src_undef(),
 | 
			
		||||
                  src_undef());
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if ((inst->TexSrcTarget == TEXTURE_RECT_INDEX) ||
 | 
			
		||||
       (inst->TexSrcTarget == TEXTURE_CUBE_INDEX))
 | 
			
		||||
@@ -777,7 +853,7 @@ static void precalc_txp( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_RCP,
 | 
			
		||||
	      dst_mask(tmp, WRITEMASK_W),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      src_swizzle1(src0, GET_SWZ(src0.Swizzle, W)),
 | 
			
		||||
	      src_undef(),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -787,7 +863,7 @@ static void precalc_txp( struct brw_wm_compile *c,
 | 
			
		||||
      emit_op(c,
 | 
			
		||||
	      OPCODE_MUL,
 | 
			
		||||
	      dst_mask(tmp, WRITEMASK_XYZ),
 | 
			
		||||
	      0, 0, 0,
 | 
			
		||||
	      0,
 | 
			
		||||
	      src0,
 | 
			
		||||
	      src_swizzle1(src_reg_from_dst(tmp), W),
 | 
			
		||||
	      src_undef());
 | 
			
		||||
@@ -827,13 +903,13 @@ static void emit_fb_write( struct brw_wm_compile *c )
 | 
			
		||||
       for (i = 0 ; i < brw->state.nr_draw_regions; i++) {
 | 
			
		||||
	   outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_DATA0 + i);
 | 
			
		||||
	   last_inst = inst = emit_op(c,
 | 
			
		||||
		   WM_FB_WRITE, dst_mask(dst_undef(),0), 0, 0, 0,
 | 
			
		||||
		   WM_FB_WRITE, dst_mask(dst_undef(),0), 0,
 | 
			
		||||
		   outcolor, payload_r0_depth, outdepth);
 | 
			
		||||
	   inst->Sampler = (i<<1);
 | 
			
		||||
	   if (c->fp_fragcolor_emitted) {
 | 
			
		||||
	       outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_COLR);
 | 
			
		||||
	       last_inst = inst = emit_op(c, WM_FB_WRITE, dst_mask(dst_undef(),0),
 | 
			
		||||
		       0, 0, 0, outcolor, payload_r0_depth, outdepth);
 | 
			
		||||
		       0, outcolor, payload_r0_depth, outdepth);
 | 
			
		||||
	       inst->Sampler = (i<<1);
 | 
			
		||||
	   }
 | 
			
		||||
       }
 | 
			
		||||
@@ -847,7 +923,7 @@ static void emit_fb_write( struct brw_wm_compile *c )
 | 
			
		||||
         outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_COLR);
 | 
			
		||||
 | 
			
		||||
       inst = emit_op(c, WM_FB_WRITE, dst_mask(dst_undef(),0),
 | 
			
		||||
	       0, 0, 0, outcolor, payload_r0_depth, outdepth);
 | 
			
		||||
	       0, outcolor, payload_r0_depth, outdepth);
 | 
			
		||||
       inst->Sampler = 1|(0<<1);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -564,6 +564,36 @@ static void emit_pinterp(struct brw_wm_compile *c,
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Sets the destination channels to 1.0 or 0.0 according to glFrontFacing. */
 | 
			
		||||
static void emit_frontfacing(struct brw_wm_compile *c,
 | 
			
		||||
			     struct prog_instruction *inst)
 | 
			
		||||
{
 | 
			
		||||
    struct brw_compile *p = &c->func;
 | 
			
		||||
    struct brw_reg r1_6ud = retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_UD);
 | 
			
		||||
    struct brw_reg dst;
 | 
			
		||||
    GLuint mask = inst->DstReg.WriteMask;
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < 4; i++) {
 | 
			
		||||
	if (mask & (1<<i)) {
 | 
			
		||||
	    dst = get_dst_reg(c, inst, i, 1);
 | 
			
		||||
	    brw_MOV(p, dst, brw_imm_f(0.0));
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* bit 31 is "primitive is back face", so checking < (1 << 31) gives
 | 
			
		||||
     * us front face
 | 
			
		||||
     */
 | 
			
		||||
    brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_L, r1_6ud, brw_imm_ud(1 << 31));
 | 
			
		||||
    for (i = 0; i < 4; i++) {
 | 
			
		||||
	if (mask & (1<<i)) {
 | 
			
		||||
	    dst = get_dst_reg(c, inst, i, 1);
 | 
			
		||||
	    brw_MOV(p, dst, brw_imm_f(1.0));
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
    brw_set_predicate_control_flag_value(p, 0xff);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void emit_xpd(struct brw_wm_compile *c,
 | 
			
		||||
		struct prog_instruction *inst)
 | 
			
		||||
{
 | 
			
		||||
@@ -2342,6 +2372,9 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
 | 
			
		||||
	    case WM_FB_WRITE:
 | 
			
		||||
		emit_fb_write(c, inst);
 | 
			
		||||
		break;
 | 
			
		||||
	    case WM_FRONTFACING:
 | 
			
		||||
		emit_frontfacing(c, inst);
 | 
			
		||||
		break;
 | 
			
		||||
	    case OPCODE_ABS:
 | 
			
		||||
		emit_abs(c, inst);
 | 
			
		||||
		break;
 | 
			
		||||
 
 | 
			
		||||
@@ -260,6 +260,7 @@ void brw_wm_pass1( struct brw_wm_compile *c )
 | 
			
		||||
 | 
			
		||||
      case OPCODE_DST:
 | 
			
		||||
      case OPCODE_TXP:
 | 
			
		||||
      case WM_FRONTFACING:
 | 
			
		||||
      default:
 | 
			
		||||
	 break;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,7 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
 | 
			
		||||
   key->uses_kill = fp->UsesKill || ctx->Color.AlphaEnabled;
 | 
			
		||||
   key->is_glsl = brw_wm_is_glsl(fp);
 | 
			
		||||
 | 
			
		||||
   /* XXX: This needs a flag to indicate when it changes. */
 | 
			
		||||
   /* _NEW_DEPTH */
 | 
			
		||||
   key->stats_wm = intel->stats_wm;
 | 
			
		||||
 | 
			
		||||
   /* _NEW_LINE */
 | 
			
		||||
@@ -278,7 +278,8 @@ const struct brw_tracked_state brw_wm_unit = {
 | 
			
		||||
      .mesa = (_NEW_POLYGON | 
 | 
			
		||||
	       _NEW_POLYGONSTIPPLE | 
 | 
			
		||||
	       _NEW_LINE | 
 | 
			
		||||
	       _NEW_COLOR),
 | 
			
		||||
	       _NEW_COLOR |
 | 
			
		||||
	       _NEW_DEPTH),
 | 
			
		||||
 | 
			
		||||
      .brw = (BRW_NEW_FRAGMENT_PROGRAM | 
 | 
			
		||||
	      BRW_NEW_CURBE_OFFSETS |
 | 
			
		||||
 
 | 
			
		||||
@@ -310,6 +310,7 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
 | 
			
		||||
      GLubyte color_mask[4];
 | 
			
		||||
      GLboolean color_blend;
 | 
			
		||||
      uint32_t tiling;
 | 
			
		||||
      uint32_t draw_offset;
 | 
			
		||||
   } key;
 | 
			
		||||
 | 
			
		||||
   memset(&key, 0, sizeof(key));
 | 
			
		||||
@@ -326,6 +327,7 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
 | 
			
		||||
      key.width = region->pitch; /* XXX: not really! */
 | 
			
		||||
      key.height = region->height;
 | 
			
		||||
      key.cpp = region->cpp;
 | 
			
		||||
      key.draw_offset = region->draw_offset; /* cur 3d or cube face offset */
 | 
			
		||||
   } else {
 | 
			
		||||
      key.surface_type = BRW_SURFACE_NULL;
 | 
			
		||||
      key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
 | 
			
		||||
@@ -333,6 +335,7 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
 | 
			
		||||
      key.width = 1;
 | 
			
		||||
      key.height = 1;
 | 
			
		||||
      key.cpp = 4;
 | 
			
		||||
      key.draw_offset = 0;
 | 
			
		||||
   }
 | 
			
		||||
   memcpy(key.color_mask, ctx->Color.ColorMask,
 | 
			
		||||
	  sizeof(key.color_mask));
 | 
			
		||||
@@ -354,8 +357,9 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
 | 
			
		||||
 | 
			
		||||
      surf.ss0.surface_format = key.surface_format;
 | 
			
		||||
      surf.ss0.surface_type = key.surface_type;
 | 
			
		||||
      surf.ss1.base_addr =  key.draw_offset;
 | 
			
		||||
      if (region_bo != NULL)
 | 
			
		||||
	 surf.ss1.base_addr = region_bo->offset; /* reloc */
 | 
			
		||||
	 surf.ss1.base_addr += region_bo->offset; /* reloc */
 | 
			
		||||
 | 
			
		||||
      surf.ss2.width = key.width - 1;
 | 
			
		||||
      surf.ss2.height = key.height - 1;
 | 
			
		||||
@@ -380,12 +384,12 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
 | 
			
		||||
	  * them both.  We might be able to figure out from other state
 | 
			
		||||
	  * a more restrictive relocation to emit.
 | 
			
		||||
	  */
 | 
			
		||||
	 dri_bo_emit_reloc(brw->wm.surf_bo[unit],
 | 
			
		||||
			   I915_GEM_DOMAIN_RENDER,
 | 
			
		||||
			   I915_GEM_DOMAIN_RENDER,
 | 
			
		||||
			   0,
 | 
			
		||||
			   offsetof(struct brw_surface_state, ss1),
 | 
			
		||||
			   region_bo);
 | 
			
		||||
	 drm_intel_bo_emit_reloc(brw->wm.surf_bo[unit],
 | 
			
		||||
				 offsetof(struct brw_surface_state, ss1),
 | 
			
		||||
				 region_bo,
 | 
			
		||||
				 key.draw_offset,
 | 
			
		||||
				 I915_GEM_DOMAIN_RENDER,
 | 
			
		||||
				 I915_GEM_DOMAIN_RENDER);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -204,6 +204,8 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
 | 
			
		||||
	       intel_batchbuffer_flush(intel->batch);
 | 
			
		||||
	    intel->front_cliprects = GL_TRUE;
 | 
			
		||||
	    colorRegions[0] = intel_get_rb_region(fb, BUFFER_FRONT_LEFT);
 | 
			
		||||
 | 
			
		||||
	    intel->front_buffer_dirty = GL_TRUE;
 | 
			
		||||
	 }
 | 
			
		||||
	 else {
 | 
			
		||||
	    if (!intel->constant_cliprect && intel->front_cliprects)
 | 
			
		||||
@@ -328,6 +330,12 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
 | 
			
		||||
static void
 | 
			
		||||
intelDrawBuffer(GLcontext * ctx, GLenum mode)
 | 
			
		||||
{
 | 
			
		||||
   if ((ctx->DrawBuffer != NULL) && (ctx->DrawBuffer->Name == 0)) {
 | 
			
		||||
      struct intel_context *const intel = intel_context(ctx);
 | 
			
		||||
 | 
			
		||||
      intel->is_front_buffer_rendering = (mode == GL_FRONT_LEFT);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   intel_draw_buffer(ctx, ctx->DrawBuffer);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -93,6 +93,7 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
 | 
			
		||||
		    GL_CURRENT_BIT |
 | 
			
		||||
		    GL_DEPTH_BUFFER_BIT |
 | 
			
		||||
		    GL_ENABLE_BIT |
 | 
			
		||||
		    GL_POLYGON_BIT |
 | 
			
		||||
		    GL_STENCIL_BUFFER_BIT |
 | 
			
		||||
		    GL_TRANSFORM_BIT |
 | 
			
		||||
		    GL_CURRENT_BIT);
 | 
			
		||||
@@ -114,6 +115,7 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
 | 
			
		||||
   _mesa_Disable(GL_CLIP_PLANE3);
 | 
			
		||||
   _mesa_Disable(GL_CLIP_PLANE4);
 | 
			
		||||
   _mesa_Disable(GL_CLIP_PLANE5);
 | 
			
		||||
   _mesa_PolygonMode(GL_FRONT_AND_BACK, GL_FILL);
 | 
			
		||||
   if (ctx->Extensions.ARB_fragment_program && ctx->FragmentProgram.Enabled) {
 | 
			
		||||
      saved_fp_enable = GL_TRUE;
 | 
			
		||||
      _mesa_Disable(GL_FRAGMENT_PROGRAM_ARB);
 | 
			
		||||
@@ -146,6 +148,11 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
#if FEATURE_ARB_vertex_buffer_object
 | 
			
		||||
   _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
 | 
			
		||||
   _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   intel_meta_set_passthrough_transform(intel);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < 4; i++) {
 | 
			
		||||
 
 | 
			
		||||
@@ -97,7 +97,7 @@ int INTEL_DEBUG = (0);
 | 
			
		||||
 | 
			
		||||
#include "extension_helper.h"
 | 
			
		||||
 | 
			
		||||
#define DRIVER_DATE                     "20090316 2009Q1 RC1"
 | 
			
		||||
#define DRIVER_DATE                     "20090418 2009Q1"
 | 
			
		||||
#define DRIVER_DATE_GEM                 "GEM " DRIVER_DATE
 | 
			
		||||
 | 
			
		||||
static const GLubyte *
 | 
			
		||||
@@ -265,6 +265,11 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
 | 
			
		||||
	   region_name = "dri2 front buffer";
 | 
			
		||||
	   break;
 | 
			
		||||
 | 
			
		||||
       case __DRI_BUFFER_FAKE_FRONT_LEFT:
 | 
			
		||||
	   rb = intel_fb->color_rb[0];
 | 
			
		||||
	   region_name = "dri2 fake front buffer";
 | 
			
		||||
	   break;
 | 
			
		||||
 | 
			
		||||
       case __DRI_BUFFER_BACK_LEFT:
 | 
			
		||||
	   rb = intel_fb->color_rb[1];
 | 
			
		||||
	   region_name = "dri2 back buffer";
 | 
			
		||||
@@ -525,6 +530,27 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
 | 
			
		||||
 | 
			
		||||
   if (intel->batch->map != intel->batch->ptr)
 | 
			
		||||
      intel_batchbuffer_flush(intel->batch);
 | 
			
		||||
 | 
			
		||||
   if ((ctx->DrawBuffer->Name == 0) && intel->front_buffer_dirty) {
 | 
			
		||||
      __DRIscreen *const screen = intel->intelScreen->driScrnPriv;
 | 
			
		||||
 | 
			
		||||
      if (screen->dri2.loader
 | 
			
		||||
          && (screen->dri2.loader->base.version >= 2)
 | 
			
		||||
	  && (screen->dri2.loader->flushFrontBuffer != NULL)) {
 | 
			
		||||
	 (*screen->dri2.loader->flushFrontBuffer)(intel->driDrawable,
 | 
			
		||||
						  intel->driDrawable->loaderPrivate);
 | 
			
		||||
 | 
			
		||||
	 /* Only clear the dirty bit if front-buffer rendering is no longer
 | 
			
		||||
	  * enabled.  This is done so that the dirty bit can only be set in
 | 
			
		||||
	  * glDrawBuffer.  Otherwise the dirty bit would have to be set at
 | 
			
		||||
	  * each of N places that do rendering.  This has worse performances,
 | 
			
		||||
	  * but it is much easier to get correct.
 | 
			
		||||
	  */
 | 
			
		||||
	 if (intel->is_front_buffer_rendering) {
 | 
			
		||||
	    intel->front_buffer_dirty = GL_FALSE;
 | 
			
		||||
	 }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
@@ -533,7 +559,7 @@ intelFlush(GLcontext * ctx)
 | 
			
		||||
   intel_flush(ctx, GL_FALSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
void
 | 
			
		||||
intel_glFlush(GLcontext *ctx)
 | 
			
		||||
{
 | 
			
		||||
   intel_flush(ctx, GL_TRUE);
 | 
			
		||||
 
 | 
			
		||||
@@ -260,11 +260,29 @@ struct intel_context
 | 
			
		||||
    * flush time while the lock is held.
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean constant_cliprect;
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * In !constant_cliprect mode, set to true if the front cliprects should be
 | 
			
		||||
    * used instead of back.
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean front_cliprects;
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * Set if rendering has occured to the drawable's front buffer.
 | 
			
		||||
    *
 | 
			
		||||
    * This is used in the DRI2 case to detect that glFlush should also copy
 | 
			
		||||
    * the contents of the fake front buffer to the real front buffer.
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean front_buffer_dirty;
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * Track whether front-buffer rendering is currently enabled
 | 
			
		||||
    *
 | 
			
		||||
    * A separate flag is used to track this in order to support MRT more
 | 
			
		||||
    * easily.
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean is_front_buffer_rendering;
 | 
			
		||||
 | 
			
		||||
   drm_clip_rect_t fboRect;     /**< cliprect for FBO rendering */
 | 
			
		||||
 | 
			
		||||
   int perf_boxes;
 | 
			
		||||
@@ -440,6 +458,7 @@ extern void intelGetLock(struct intel_context *intel, GLuint flags);
 | 
			
		||||
 | 
			
		||||
extern void intelFinish(GLcontext * ctx);
 | 
			
		||||
extern void intelFlush(GLcontext * ctx);
 | 
			
		||||
extern void intel_glFlush(GLcontext *ctx);
 | 
			
		||||
 | 
			
		||||
extern void intelInitDriverFunctions(struct dd_function_table *functions);
 | 
			
		||||
extern void intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging);
 | 
			
		||||
 
 | 
			
		||||
@@ -183,7 +183,7 @@ intel_meta_set_passthrough_transform(struct intel_context *intel)
 | 
			
		||||
   intel->meta.saved_vp_height = ctx->Viewport.Height;
 | 
			
		||||
   intel->meta.saved_matrix_mode = ctx->Transform.MatrixMode;
 | 
			
		||||
 | 
			
		||||
   /*   _mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);*/
 | 
			
		||||
   _mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);
 | 
			
		||||
 | 
			
		||||
   _mesa_MatrixMode(GL_PROJECTION);
 | 
			
		||||
   _mesa_PushMatrix();
 | 
			
		||||
@@ -205,8 +205,8 @@ intel_meta_restore_transform(struct intel_context *intel)
 | 
			
		||||
 | 
			
		||||
   _mesa_MatrixMode(intel->meta.saved_matrix_mode);
 | 
			
		||||
 | 
			
		||||
   /*   _mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y,
 | 
			
		||||
	intel->meta.saved_vp_width, intel->meta.saved_vp_height);*/
 | 
			
		||||
   _mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y,
 | 
			
		||||
		  intel->meta.saved_vp_width, intel->meta.saved_vp_height);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -104,7 +104,7 @@ do_copy_texsubimage(struct intel_context *intel,
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   intelFlush(ctx);
 | 
			
		||||
   intel_glFlush(ctx);
 | 
			
		||||
   LOCK_HARDWARE(intel);
 | 
			
		||||
   {
 | 
			
		||||
      GLuint image_offset = intel_miptree_image_offset(intelImage->mt,
 | 
			
		||||
@@ -155,6 +155,7 @@ do_copy_texsubimage(struct intel_context *intel,
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   UNLOCK_HARDWARE(intel);
 | 
			
		||||
   intel_glFlush(ctx);
 | 
			
		||||
 | 
			
		||||
   /* GL_SGIS_generate_mipmap */
 | 
			
		||||
   if (intelImage->level == texObj->BaseLevel && texObj->GenerateMipmap) {
 | 
			
		||||
 
 | 
			
		||||
@@ -211,7 +211,7 @@ struct r300_tex_obj {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct r300_texture_env_state {
 | 
			
		||||
	r300TexObjPtr texobj;
 | 
			
		||||
	struct gl_texture_object *texobj;
 | 
			
		||||
	GLenum format;
 | 
			
		||||
	GLenum envMode;
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -1487,7 +1487,7 @@ static void r300SetupTextures(GLcontext * ctx)
 | 
			
		||||
#endif
 | 
			
		||||
			tmu_mappings[i] = hw_tmu;
 | 
			
		||||
 | 
			
		||||
			t = r300->state.texture.unit[i].texobj;
 | 
			
		||||
			t = (r300TexObjPtr) r300->state.texture.unit[i].texobj->DriverData;
 | 
			
		||||
			/* XXX questionable fix for bug 9170: */
 | 
			
		||||
			if (!t)
 | 
			
		||||
				continue;
 | 
			
		||||
 
 | 
			
		||||
@@ -44,6 +44,7 @@ SOFTWARE.
 | 
			
		||||
#include "main/colormac.h"
 | 
			
		||||
#include "main/macros.h"
 | 
			
		||||
#include "main/simple_list.h"
 | 
			
		||||
#include "main/texobj.h"
 | 
			
		||||
#include "radeon_reg.h"		/* gets definition for usleep */
 | 
			
		||||
#include "r300_context.h"
 | 
			
		||||
#include "r300_state.h"
 | 
			
		||||
@@ -71,8 +72,8 @@ void r300DestroyTexObj(r300ContextPtr rmesa, r300TexObjPtr t)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
 | 
			
		||||
		if (rmesa->state.texture.unit[i].texobj == t) {
 | 
			
		||||
			rmesa->state.texture.unit[i].texobj = NULL;
 | 
			
		||||
		if (rmesa->state.texture.unit[i].texobj == t->base.tObj) {
 | 
			
		||||
			_mesa_reference_texobj(&rmesa->state.texture.unit[i].texobj, NULL);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -567,19 +567,20 @@ static GLboolean r300UpdateTexture(GLcontext * ctx, int unit)
 | 
			
		||||
	/* Update state if this is a different texture object to last
 | 
			
		||||
	 * time.
 | 
			
		||||
	 */
 | 
			
		||||
	if (rmesa->state.texture.unit[unit].texobj != t) {
 | 
			
		||||
	if (rmesa->state.texture.unit[unit].texobj != tObj) {
 | 
			
		||||
		if (rmesa->state.texture.unit[unit].texobj != NULL) {
 | 
			
		||||
			r300TexObjPtr t_old = (r300TexObjPtr) rmesa->state.texture.unit[unit].texobj->DriverData;
 | 
			
		||||
 | 
			
		||||
			/* The old texture is no longer bound to this texture unit.
 | 
			
		||||
			 * Mark it as such.
 | 
			
		||||
			 */
 | 
			
		||||
 | 
			
		||||
			rmesa->state.texture.unit[unit].texobj->base.bound &=
 | 
			
		||||
			    ~(1 << unit);
 | 
			
		||||
			t_old->base.bound &= ~(1 << unit);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		rmesa->state.texture.unit[unit].texobj = t;
 | 
			
		||||
		_mesa_reference_texobj(&rmesa->state.texture.unit[unit].texobj, tObj);
 | 
			
		||||
		t->base.bound |= (1 << unit);
 | 
			
		||||
		driUpdateTextureLRU((driTextureObject *) t);	/* XXX: should be locked! */
 | 
			
		||||
		driUpdateTextureLRU(&t->base);	/* XXX: should be locked! */
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return !t->border_fallback;
 | 
			
		||||
 
 | 
			
		||||
@@ -259,8 +259,6 @@ radeonFillInModes( __DRIscreenPrivate *psp,
 | 
			
		||||
    __GLcontextModes *m;
 | 
			
		||||
    unsigned depth_buffer_factor;
 | 
			
		||||
    unsigned back_buffer_factor;
 | 
			
		||||
    GLenum fb_format;
 | 
			
		||||
    GLenum fb_type;
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    /* Right now GLX_SWAP_COPY_OML isn't supported, but it would be easy
 | 
			
		||||
@@ -289,19 +287,24 @@ radeonFillInModes( __DRIscreenPrivate *psp,
 | 
			
		||||
    depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
 | 
			
		||||
    back_buffer_factor  = (have_back_buffer) ? 2 : 1;
 | 
			
		||||
 | 
			
		||||
    if ( pixel_bits == 16 ) {
 | 
			
		||||
        fb_format = GL_RGB;
 | 
			
		||||
        fb_type = GL_UNSIGNED_SHORT_5_6_5;
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        fb_format = GL_BGRA;
 | 
			
		||||
        fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
 | 
			
		||||
    }
 | 
			
		||||
    if (pixel_bits == 16) {
 | 
			
		||||
	__DRIconfig **configs_a8r8g8b8;
 | 
			
		||||
	__DRIconfig **configs_r5g6b5;
 | 
			
		||||
 | 
			
		||||
	configs_r5g6b5 = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
 | 
			
		||||
					  depth_bits_array, stencil_bits_array,
 | 
			
		||||
					  depth_buffer_factor, back_buffer_modes,
 | 
			
		||||
					  back_buffer_factor);
 | 
			
		||||
	configs_a8r8g8b8 = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
 | 
			
		||||
					    depth_bits_array, stencil_bits_array,
 | 
			
		||||
					    1, back_buffer_modes, 1);
 | 
			
		||||
	configs = driConcatConfigs(configs_r5g6b5, configs_a8r8g8b8);
 | 
			
		||||
   } else
 | 
			
		||||
	configs = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
 | 
			
		||||
				   depth_bits_array, stencil_bits_array,
 | 
			
		||||
				   depth_buffer_factor,
 | 
			
		||||
				   back_buffer_modes, back_buffer_factor);
 | 
			
		||||
 | 
			
		||||
    configs = driCreateConfigs(fb_format, fb_type,
 | 
			
		||||
			       depth_bits_array, stencil_bits_array,
 | 
			
		||||
			       depth_buffer_factor,
 | 
			
		||||
			       back_buffer_modes, back_buffer_factor);
 | 
			
		||||
    if (configs == NULL) {
 | 
			
		||||
	fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
 | 
			
		||||
		 __func__, __LINE__ );
 | 
			
		||||
@@ -551,11 +554,8 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
 | 
			
		||||
      screen->chip_family = CHIP_FAMILY_RS300;
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
      /* 9500 with 1 pipe verified by: Reid Linnemann <lreid@cs.okstate.edu> */
 | 
			
		||||
 | 
			
		||||
   case PCI_CHIP_R300_AD:
 | 
			
		||||
      screen->chip_family = CHIP_FAMILY_RV350;
 | 
			
		||||
      screen->chip_flags = RADEON_CHIPSET_TCL;
 | 
			
		||||
      break;
 | 
			
		||||
   case PCI_CHIP_R300_AE:
 | 
			
		||||
   case PCI_CHIP_R300_AF:
 | 
			
		||||
   case PCI_CHIP_R300_AG:
 | 
			
		||||
@@ -883,6 +883,18 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
 | 
			
		||||
       } else {
 | 
			
		||||
	   screen->num_gb_pipes = temp;
 | 
			
		||||
       }
 | 
			
		||||
 | 
			
		||||
       /* pipe overrides */
 | 
			
		||||
       switch (dri_priv->deviceID) {
 | 
			
		||||
       case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <lreid@cs.okstate.edu> */
 | 
			
		||||
       case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */
 | 
			
		||||
       case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */
 | 
			
		||||
	   screen->num_gb_pipes = 1;
 | 
			
		||||
	   break;
 | 
			
		||||
       default:
 | 
			
		||||
	   break;
 | 
			
		||||
       }
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if ( sPriv->drm_version.minor >= 10 ) {
 | 
			
		||||
 
 | 
			
		||||
@@ -166,17 +166,27 @@ swrastFillInModes(__DRIscreen *psp,
 | 
			
		||||
    depth_buffer_factor = 4;
 | 
			
		||||
    back_buffer_factor = 2;
 | 
			
		||||
 | 
			
		||||
    if (pixel_bits == 8) {
 | 
			
		||||
    switch (pixel_bits) {
 | 
			
		||||
    case 8:
 | 
			
		||||
	fb_format = GL_RGB;
 | 
			
		||||
	fb_type = GL_UNSIGNED_BYTE_2_3_3_REV;
 | 
			
		||||
    }
 | 
			
		||||
    else if (pixel_bits == 16) {
 | 
			
		||||
	break;
 | 
			
		||||
    case 16:
 | 
			
		||||
	fb_format = GL_RGB;
 | 
			
		||||
	fb_type = GL_UNSIGNED_SHORT_5_6_5;
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
	break;
 | 
			
		||||
    case 24:
 | 
			
		||||
	fb_format = GL_BGR;
 | 
			
		||||
	fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
 | 
			
		||||
	break;
 | 
			
		||||
    case 32:
 | 
			
		||||
	fb_format = GL_BGRA;
 | 
			
		||||
	fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
 | 
			
		||||
	break;
 | 
			
		||||
    default:
 | 
			
		||||
	fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__,
 | 
			
		||||
		pixel_bits);
 | 
			
		||||
	return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    configs = driCreateConfigs(fb_format, fb_type,
 | 
			
		||||
@@ -198,7 +208,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions,
 | 
			
		||||
{
 | 
			
		||||
    static const __DRIextension *emptyExtensionList[] = { NULL };
 | 
			
		||||
    __DRIscreen *psp;
 | 
			
		||||
    __DRIconfig **configs8, **configs16, **configs32;
 | 
			
		||||
    const __DRIconfig **configs8, **configs16, **configs24, **configs32;
 | 
			
		||||
 | 
			
		||||
    (void) data;
 | 
			
		||||
 | 
			
		||||
@@ -215,11 +225,12 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions,
 | 
			
		||||
 | 
			
		||||
    configs8  = swrastFillInModes(psp,  8,  8, 0, 1);
 | 
			
		||||
    configs16 = swrastFillInModes(psp, 16, 16, 0, 1);
 | 
			
		||||
    configs24 = swrastFillInModes(psp, 24, 24, 8, 1);
 | 
			
		||||
    configs32 = swrastFillInModes(psp, 32, 24, 8, 1);
 | 
			
		||||
 | 
			
		||||
    configs16 = (__DRIconfig **)driConcatConfigs(configs8, configs16);
 | 
			
		||||
 | 
			
		||||
    *driver_configs = driConcatConfigs(configs16, configs32);
 | 
			
		||||
    configs16 = driConcatConfigs(configs8, configs16);
 | 
			
		||||
    configs24 = driConcatConfigs(configs16, configs24);
 | 
			
		||||
    *driver_configs = driConcatConfigs(configs24, configs32);
 | 
			
		||||
 | 
			
		||||
    driInitExtensions( NULL, card_extensions, GL_FALSE );
 | 
			
		||||
 | 
			
		||||
@@ -251,19 +262,24 @@ static GLuint
 | 
			
		||||
choose_pixel_format(const GLvisual *v)
 | 
			
		||||
{
 | 
			
		||||
    if (v->rgbMode) {
 | 
			
		||||
	int bpp = v->rgbBits;
 | 
			
		||||
	int depth = v->rgbBits;
 | 
			
		||||
 | 
			
		||||
	if (bpp == 32
 | 
			
		||||
	if (depth == 32
 | 
			
		||||
	    && v->redMask   == 0xff0000
 | 
			
		||||
	    && v->greenMask == 0x00ff00
 | 
			
		||||
	    && v->blueMask  == 0x0000ff)
 | 
			
		||||
	    return PF_A8R8G8B8;
 | 
			
		||||
	else if (bpp == 16
 | 
			
		||||
	else if (depth == 24
 | 
			
		||||
	    && v->redMask   == 0xff0000
 | 
			
		||||
	    && v->greenMask == 0x00ff00
 | 
			
		||||
	    && v->blueMask  == 0x0000ff)
 | 
			
		||||
	    return PF_X8R8G8B8;
 | 
			
		||||
	else if (depth == 16
 | 
			
		||||
	    && v->redMask   == 0xf800
 | 
			
		||||
	    && v->greenMask == 0x07e0
 | 
			
		||||
	    && v->blueMask  == 0x001f)
 | 
			
		||||
	    return PF_R5G6B5;
 | 
			
		||||
	else if (bpp == 8
 | 
			
		||||
	else if (depth == 8
 | 
			
		||||
	    && v->redMask   == 0x07
 | 
			
		||||
	    && v->greenMask == 0x38
 | 
			
		||||
	    && v->blueMask  == 0xc0)
 | 
			
		||||
@@ -292,7 +308,6 @@ swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
 | 
			
		||||
			   GLenum internalFormat, GLuint width, GLuint height)
 | 
			
		||||
{
 | 
			
		||||
    struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
 | 
			
		||||
    int bpp;
 | 
			
		||||
    unsigned mask = PITCH_ALIGN_BITS - 1;
 | 
			
		||||
 | 
			
		||||
    TRACE;
 | 
			
		||||
@@ -301,23 +316,8 @@ swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
 | 
			
		||||
    rb->Width = width;
 | 
			
		||||
    rb->Height = height;
 | 
			
		||||
 | 
			
		||||
    switch (internalFormat) {
 | 
			
		||||
    case GL_RGB:
 | 
			
		||||
	bpp = rb->RedBits + rb->GreenBits + rb->BlueBits;
 | 
			
		||||
	break;
 | 
			
		||||
    case GL_RGBA:
 | 
			
		||||
	bpp = rb->RedBits + rb->GreenBits + rb->BlueBits + rb->AlphaBits;
 | 
			
		||||
	break;
 | 
			
		||||
    case GL_COLOR_INDEX8_EXT:
 | 
			
		||||
	bpp = rb->IndexBits;
 | 
			
		||||
	break;
 | 
			
		||||
    default:
 | 
			
		||||
	_mesa_problem( NULL, "unexpected format in %s", __FUNCTION__ );
 | 
			
		||||
	return GL_FALSE;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* always pad to PITCH_ALIGN_BITS */
 | 
			
		||||
    xrb->pitch = ((width * bpp + mask) & ~mask) / 8;
 | 
			
		||||
    xrb->pitch = ((width * xrb->bpp + mask) & ~mask) / 8;
 | 
			
		||||
 | 
			
		||||
    return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
@@ -373,6 +373,17 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
 | 
			
		||||
	xrb->Base.GreenBits = 8 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.BlueBits  = 8 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.AlphaBits = 8 * sizeof(GLubyte);
 | 
			
		||||
	xrb->bpp = 32;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_X8R8G8B8:
 | 
			
		||||
	xrb->Base.InternalFormat = GL_RGB;
 | 
			
		||||
	xrb->Base._BaseFormat = GL_RGB;
 | 
			
		||||
	xrb->Base.DataType = GL_UNSIGNED_BYTE;
 | 
			
		||||
	xrb->Base.RedBits   = 8 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.GreenBits = 8 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.BlueBits  = 8 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.AlphaBits = 0;
 | 
			
		||||
	xrb->bpp = 32;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_R5G6B5:
 | 
			
		||||
	xrb->Base.InternalFormat = GL_RGB;
 | 
			
		||||
@@ -382,6 +393,7 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
 | 
			
		||||
	xrb->Base.GreenBits = 6 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.BlueBits  = 5 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.AlphaBits = 0;
 | 
			
		||||
	xrb->bpp = 16;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_R3G3B2:
 | 
			
		||||
	xrb->Base.InternalFormat = GL_RGB;
 | 
			
		||||
@@ -391,12 +403,14 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
 | 
			
		||||
	xrb->Base.GreenBits = 3 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.BlueBits  = 2 * sizeof(GLubyte);
 | 
			
		||||
	xrb->Base.AlphaBits = 0;
 | 
			
		||||
	xrb->bpp = 8;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_CI8:
 | 
			
		||||
	xrb->Base.InternalFormat = GL_COLOR_INDEX8_EXT;
 | 
			
		||||
	xrb->Base._BaseFormat = GL_COLOR_INDEX;
 | 
			
		||||
	xrb->Base.DataType = GL_UNSIGNED_BYTE;
 | 
			
		||||
	xrb->Base.IndexBits = 8 * sizeof(GLubyte);
 | 
			
		||||
	xrb->bpp = 8;
 | 
			
		||||
	break;
 | 
			
		||||
    default:
 | 
			
		||||
	return NULL;
 | 
			
		||||
 
 | 
			
		||||
@@ -90,6 +90,8 @@ struct swrast_renderbuffer {
 | 
			
		||||
 | 
			
		||||
    /* renderbuffer pitch (in bytes) */
 | 
			
		||||
    GLuint pitch;
 | 
			
		||||
   /* bits per pixel of storage */
 | 
			
		||||
    GLuint bpp;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static INLINE __DRIcontext *
 | 
			
		||||
@@ -115,10 +117,10 @@ swrast_renderbuffer(struct gl_renderbuffer *rb)
 | 
			
		||||
 * Pixel formats we support
 | 
			
		||||
 */
 | 
			
		||||
#define PF_CI8        1		/**< Color Index mode */
 | 
			
		||||
#define PF_A8R8G8B8   2		/**< 32-bit TrueColor:  8-A, 8-R, 8-G, 8-B bits */
 | 
			
		||||
#define PF_R5G6B5     3		/**< 16-bit TrueColor:  5-R, 6-G, 5-B bits */
 | 
			
		||||
#define PF_R3G3B2     4		/**<  8-bit TrueColor:  3-R, 3-G, 2-B bits */
 | 
			
		||||
 | 
			
		||||
#define PF_A8R8G8B8   2		/**< 32bpp TrueColor:  8-A, 8-R, 8-G, 8-B bits */
 | 
			
		||||
#define PF_R5G6B5     3		/**< 16bpp TrueColor:  5-R, 6-G, 5-B bits */
 | 
			
		||||
#define PF_R3G3B2     4		/**<  8bpp TrueColor:  3-R, 3-G, 2-B bits */
 | 
			
		||||
#define PF_X8R8G8B8   5		/**< 32bpp TrueColor:  8-R, 8-G, 8-B bits */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Renderbuffer pitch alignment (in bits).
 | 
			
		||||
 
 | 
			
		||||
@@ -79,6 +79,24 @@ static const GLubyte kernel[16] = {
 | 
			
		||||
   DST[BCOMP] = SRC[0]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 32-bit BGRX */
 | 
			
		||||
#define STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) \
 | 
			
		||||
   DST[3] = 0xff; \
 | 
			
		||||
   DST[2] = VALUE[RCOMP]; \
 | 
			
		||||
   DST[1] = VALUE[GCOMP]; \
 | 
			
		||||
   DST[0] = VALUE[BCOMP]
 | 
			
		||||
#define STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE) \
 | 
			
		||||
   DST[3] = 0xff; \
 | 
			
		||||
   DST[2] = VALUE[RCOMP]; \
 | 
			
		||||
   DST[1] = VALUE[GCOMP]; \
 | 
			
		||||
   DST[0] = VALUE[BCOMP]
 | 
			
		||||
#define FETCH_PIXEL_X8R8G8B8(DST, SRC) \
 | 
			
		||||
   DST[ACOMP] = 0xff; \
 | 
			
		||||
   DST[RCOMP] = SRC[2]; \
 | 
			
		||||
   DST[GCOMP] = SRC[1]; \
 | 
			
		||||
   DST[BCOMP] = SRC[0]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 16-bit BGR */
 | 
			
		||||
#define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \
 | 
			
		||||
   do { \
 | 
			
		||||
@@ -139,6 +157,24 @@ static const GLubyte kernel[16] = {
 | 
			
		||||
#include "swrast/s_spantemp.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 32-bit BGRX */
 | 
			
		||||
#define NAME(FUNC) FUNC##_X8R8G8B8
 | 
			
		||||
#define RB_TYPE GLubyte
 | 
			
		||||
#define SPAN_VARS \
 | 
			
		||||
   struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
 | 
			
		||||
#define INIT_PIXEL_PTR(P, X, Y) \
 | 
			
		||||
   GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4;
 | 
			
		||||
#define INC_PIXEL_PTR(P) P += 4
 | 
			
		||||
#define STORE_PIXEL(DST, X, Y, VALUE) \
 | 
			
		||||
   STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE)
 | 
			
		||||
#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
 | 
			
		||||
   STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE)
 | 
			
		||||
#define FETCH_PIXEL(DST, SRC) \
 | 
			
		||||
   FETCH_PIXEL_X8R8G8B8(DST, SRC)
 | 
			
		||||
 | 
			
		||||
#include "swrast/s_spantemp.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 16-bit BGR */
 | 
			
		||||
#define NAME(FUNC) FUNC##_R5G6B5
 | 
			
		||||
#define RB_TYPE GLubyte
 | 
			
		||||
@@ -210,6 +246,24 @@ static const GLubyte kernel[16] = {
 | 
			
		||||
#include "swrast_spantemp.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 32-bit BGRX */
 | 
			
		||||
#define NAME(FUNC) FUNC##_X8R8G8B8_front
 | 
			
		||||
#define RB_TYPE GLubyte
 | 
			
		||||
#define SPAN_VARS \
 | 
			
		||||
   struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
 | 
			
		||||
#define INIT_PIXEL_PTR(P, X, Y) \
 | 
			
		||||
   GLubyte *P = (GLubyte *)row;
 | 
			
		||||
#define INC_PIXEL_PTR(P) P += 4
 | 
			
		||||
#define STORE_PIXEL(DST, X, Y, VALUE) \
 | 
			
		||||
   STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE)
 | 
			
		||||
#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
 | 
			
		||||
   STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE)
 | 
			
		||||
#define FETCH_PIXEL(DST, SRC) \
 | 
			
		||||
   FETCH_PIXEL_X8R8G8B8(DST, SRC)
 | 
			
		||||
 | 
			
		||||
#include "swrast_spantemp.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* 16-bit BGR */
 | 
			
		||||
#define NAME(FUNC) FUNC##_R5G6B5_front
 | 
			
		||||
#define RB_TYPE GLubyte
 | 
			
		||||
@@ -279,6 +333,15 @@ swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb,
 | 
			
		||||
	xrb->Base.PutValues = put_values_A8R8G8B8;
 | 
			
		||||
	xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_X8R8G8B8:
 | 
			
		||||
	xrb->Base.GetRow = get_row_X8R8G8B8;
 | 
			
		||||
	xrb->Base.GetValues = get_values_X8R8G8B8;
 | 
			
		||||
	xrb->Base.PutRow = put_row_X8R8G8B8;
 | 
			
		||||
	xrb->Base.PutRowRGB = put_row_rgb_X8R8G8B8;
 | 
			
		||||
	xrb->Base.PutMonoRow = put_mono_row_X8R8G8B8;
 | 
			
		||||
	xrb->Base.PutValues = put_values_X8R8G8B8;
 | 
			
		||||
	xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_R5G6B5:
 | 
			
		||||
	xrb->Base.GetRow = get_row_R5G6B5;
 | 
			
		||||
	xrb->Base.GetValues = get_values_R5G6B5;
 | 
			
		||||
@@ -334,6 +397,15 @@ swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb,
 | 
			
		||||
	xrb->Base.PutValues = put_values_A8R8G8B8_front;
 | 
			
		||||
	xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8_front;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_X8R8G8B8:
 | 
			
		||||
	xrb->Base.GetRow = get_row_X8R8G8B8_front;
 | 
			
		||||
	xrb->Base.GetValues = get_values_X8R8G8B8_front;
 | 
			
		||||
	xrb->Base.PutRow = put_row_X8R8G8B8_front;
 | 
			
		||||
	xrb->Base.PutRowRGB = put_row_rgb_X8R8G8B8_front;
 | 
			
		||||
	xrb->Base.PutMonoRow = put_mono_row_X8R8G8B8_front;
 | 
			
		||||
	xrb->Base.PutValues = put_values_X8R8G8B8_front;
 | 
			
		||||
	xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8_front;
 | 
			
		||||
	break;
 | 
			
		||||
    case PF_R5G6B5:
 | 
			
		||||
	xrb->Base.GetRow = get_row_R5G6B5_front;
 | 
			
		||||
	xrb->Base.GetValues = get_values_R5G6B5_front;
 | 
			
		||||
 
 | 
			
		||||
@@ -1374,7 +1374,12 @@ _glxapi_get_proc_address(const char *funcName)
 | 
			
		||||
{
 | 
			
		||||
   GLuint i;
 | 
			
		||||
   for (i = 0; GLX_functions[i].Name; i++) {
 | 
			
		||||
#ifdef MANGLE
 | 
			
		||||
      /* skip the "m" prefix on the name */
 | 
			
		||||
      if (strcmp(GLX_functions[i].Name, funcName+1) == 0)
 | 
			
		||||
#else
 | 
			
		||||
      if (strcmp(GLX_functions[i].Name, funcName) == 0)
 | 
			
		||||
#endif
 | 
			
		||||
         return GLX_functions[i].Address;
 | 
			
		||||
   }
 | 
			
		||||
   return NULL;
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,13 @@ find_entry( const char * n )
 | 
			
		||||
   GLuint i;
 | 
			
		||||
   for (i = 0; static_functions[i].Name_offset >= 0; i++) {
 | 
			
		||||
      const char *testName = gl_string_table + static_functions[i].Name_offset;
 | 
			
		||||
      if (strcmp(testName, n) == 0) {
 | 
			
		||||
#ifdef MANGLE
 | 
			
		||||
      /* skip the "m" prefix on the name */
 | 
			
		||||
      if (strcmp(testName, n + 1) == 0)
 | 
			
		||||
#else
 | 
			
		||||
      if (strcmp(testName, n) == 0)
 | 
			
		||||
#endif
 | 
			
		||||
      {
 | 
			
		||||
	 return &static_functions[i];
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
@@ -1176,7 +1176,7 @@ _mesa_PopAttrib(void)
 | 
			
		||||
 | 
			
		||||
               /* restore clip planes */
 | 
			
		||||
               for (i = 0; i < MAX_CLIP_PLANES; i++) {
 | 
			
		||||
                  const GLuint mask = 1 << 1;
 | 
			
		||||
                  const GLuint mask = 1 << i;
 | 
			
		||||
                  const GLfloat *eyePlane = xform->EyeUserPlane[i];
 | 
			
		||||
                  COPY_4V(ctx->Transform.EyeUserPlane[i], eyePlane);
 | 
			
		||||
                  if (xform->ClipPlanesEnabled & mask) {
 | 
			
		||||
 
 | 
			
		||||
@@ -77,28 +77,30 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ctx->RenderMode == GL_RENDER) {
 | 
			
		||||
      /* Round, to satisfy conformance tests (matches SGI's OpenGL) */
 | 
			
		||||
      GLint x = IROUND(ctx->Current.RasterPos[0]);
 | 
			
		||||
      GLint y = IROUND(ctx->Current.RasterPos[1]);
 | 
			
		||||
      if (width > 0 && height > 0) {
 | 
			
		||||
         /* Round, to satisfy conformance tests (matches SGI's OpenGL) */
 | 
			
		||||
         GLint x = IROUND(ctx->Current.RasterPos[0]);
 | 
			
		||||
         GLint y = IROUND(ctx->Current.RasterPos[1]);
 | 
			
		||||
 | 
			
		||||
      if (ctx->Unpack.BufferObj->Name) {
 | 
			
		||||
         /* unpack from PBO */
 | 
			
		||||
         if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, 1,
 | 
			
		||||
                                        format, type, pixels)) {
 | 
			
		||||
            _mesa_error(ctx, GL_INVALID_OPERATION,
 | 
			
		||||
                        "glDrawPixels(invalid PBO access)");
 | 
			
		||||
            return;
 | 
			
		||||
         }
 | 
			
		||||
         if (ctx->Unpack.BufferObj->Pointer) {
 | 
			
		||||
            /* buffer is mapped - that's an error */
 | 
			
		||||
            _mesa_error(ctx, GL_INVALID_OPERATION,
 | 
			
		||||
                        "glDrawPixels(PBO is mapped)");
 | 
			
		||||
            return;
 | 
			
		||||
         if (ctx->Unpack.BufferObj->Name) {
 | 
			
		||||
            /* unpack from PBO */
 | 
			
		||||
            if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, 1,
 | 
			
		||||
                                           format, type, pixels)) {
 | 
			
		||||
               _mesa_error(ctx, GL_INVALID_OPERATION,
 | 
			
		||||
                           "glDrawPixels(invalid PBO access)");
 | 
			
		||||
               return;
 | 
			
		||||
            }
 | 
			
		||||
            if (ctx->Unpack.BufferObj->Pointer) {
 | 
			
		||||
               /* buffer is mapped - that's an error */
 | 
			
		||||
               _mesa_error(ctx, GL_INVALID_OPERATION,
 | 
			
		||||
                           "glDrawPixels(PBO is mapped)");
 | 
			
		||||
               return;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         ctx->Driver.DrawPixels(ctx, x, y, width, height, format, type,
 | 
			
		||||
                                &ctx->Unpack, pixels);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      ctx->Driver.DrawPixels(ctx, x, y, width, height, format, type,
 | 
			
		||||
			     &ctx->Unpack, pixels);
 | 
			
		||||
   }
 | 
			
		||||
   else if (ctx->RenderMode == GL_FEEDBACK) {
 | 
			
		||||
      /* Feedback the current raster pos info */
 | 
			
		||||
@@ -159,10 +161,12 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
 | 
			
		||||
 | 
			
		||||
   if (ctx->RenderMode == GL_RENDER) {
 | 
			
		||||
      /* Round to satisfy conformance tests (matches SGI's OpenGL) */
 | 
			
		||||
      GLint destx = IROUND(ctx->Current.RasterPos[0]);
 | 
			
		||||
      GLint desty = IROUND(ctx->Current.RasterPos[1]);
 | 
			
		||||
      ctx->Driver.CopyPixels( ctx, srcx, srcy, width, height, destx, desty,
 | 
			
		||||
			      type );
 | 
			
		||||
      if (width > 0 && height > 0) {
 | 
			
		||||
         GLint destx = IROUND(ctx->Current.RasterPos[0]);
 | 
			
		||||
         GLint desty = IROUND(ctx->Current.RasterPos[1]);
 | 
			
		||||
         ctx->Driver.CopyPixels( ctx, srcx, srcy, width, height, destx, desty,
 | 
			
		||||
                                 type );
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else if (ctx->RenderMode == GL_FEEDBACK) {
 | 
			
		||||
      FLUSH_CURRENT( ctx, 0 );
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__)
 | 
			
		||||
#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun)
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Allocate a large block of memory which can hold code then dole it out
 | 
			
		||||
 
 | 
			
		||||
@@ -1104,6 +1104,9 @@ static void build_lighting( struct tnl_program *p )
 | 
			
		||||
 | 
			
		||||
   if (twoside) {
 | 
			
		||||
      if (!p->state->material_shininess_is_zero) {
 | 
			
		||||
         /* Note that we negate the back-face specular exponent here.
 | 
			
		||||
          * The negation will be un-done later in the back-face code below.
 | 
			
		||||
          */
 | 
			
		||||
         struct ureg shininess = get_material(p, 1, STATE_SHININESS);
 | 
			
		||||
         emit_op1(p, OPCODE_MOV, dots, WRITEMASK_Z, 
 | 
			
		||||
                  negate(swizzle1(shininess,X)));
 | 
			
		||||
@@ -1309,6 +1312,11 @@ static void build_lighting( struct tnl_program *p )
 | 
			
		||||
	       mask1 = 0;
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
            /* For the back face we need to negate the X and Y component
 | 
			
		||||
             * dot products.  dots.Z has the negated back-face specular
 | 
			
		||||
             * exponent.  We swizzle that into the W position.  This
 | 
			
		||||
             * negation makes the back-face specular term positive again.
 | 
			
		||||
             */
 | 
			
		||||
            dots = negate(swizzle(dots,X,Y,W,Z));
 | 
			
		||||
 | 
			
		||||
	    if (!is_undef(att)) {
 | 
			
		||||
@@ -1327,8 +1335,10 @@ static void build_lighting( struct tnl_program *p )
 | 
			
		||||
 | 
			
		||||
	    emit_op3(p, OPCODE_MAD, res0, mask0, swizzle1(lit,Y), diffuse, _bfc0);
 | 
			
		||||
	    emit_op3(p, OPCODE_MAD, res1, mask1, swizzle1(lit,Z), specular, _bfc1);
 | 
			
		||||
            /* restore negate flag for next lighting */
 | 
			
		||||
            dots = negate(dots);
 | 
			
		||||
            /* restore dots to its original state for subsequent lights
 | 
			
		||||
             * by negating and swizzling again.
 | 
			
		||||
             */
 | 
			
		||||
            dots = negate(swizzle(dots,X,Y,W,Z));
 | 
			
		||||
 | 
			
		||||
	    release_temp(p, ambient);
 | 
			
		||||
	    release_temp(p, diffuse);
 | 
			
		||||
 
 | 
			
		||||
@@ -145,7 +145,10 @@
 | 
			
		||||
#if defined(__linux__)
 | 
			
		||||
#include <byteswap.h>
 | 
			
		||||
#define CPU_TO_LE32( x )	bswap_32( x )
 | 
			
		||||
#else /*__linux__*/
 | 
			
		||||
#elif defined(__APPLE__)
 | 
			
		||||
#include <CoreFoundation/CFByteOrder.h>
 | 
			
		||||
#define CPU_TO_LE32( x )	CFSwapInt32HostToLittle( x )
 | 
			
		||||
#else /*__linux__ __APPLE__*/
 | 
			
		||||
#include <sys/endian.h>
 | 
			
		||||
#define CPU_TO_LE32( x )	bswap32( x )
 | 
			
		||||
#endif /*__linux__*/
 | 
			
		||||
 
 | 
			
		||||
@@ -63,6 +63,7 @@ struct _mesa_HashTable {
 | 
			
		||||
   struct HashEntry *Table[TABLE_SIZE];  /**< the lookup table */
 | 
			
		||||
   GLuint MaxKey;                        /**< highest key inserted so far */
 | 
			
		||||
   _glthread_Mutex Mutex;                /**< mutual exclusion lock */
 | 
			
		||||
   _glthread_Mutex WalkMutex;            /**< for _mesa_HashWalk() */
 | 
			
		||||
   GLboolean InDeleteAll;                /**< Debug check */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -79,6 +80,7 @@ _mesa_NewHashTable(void)
 | 
			
		||||
   struct _mesa_HashTable *table = CALLOC_STRUCT(_mesa_HashTable);
 | 
			
		||||
   if (table) {
 | 
			
		||||
      _glthread_INIT_MUTEX(table->Mutex);
 | 
			
		||||
      _glthread_INIT_MUTEX(table->WalkMutex);
 | 
			
		||||
   }
 | 
			
		||||
   return table;
 | 
			
		||||
}
 | 
			
		||||
@@ -111,6 +113,7 @@ _mesa_DeleteHashTable(struct _mesa_HashTable *table)
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   _glthread_DESTROY_MUTEX(table->Mutex);
 | 
			
		||||
   _glthread_DESTROY_MUTEX(table->WalkMutex);
 | 
			
		||||
   _mesa_free(table);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -285,6 +288,11 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table,
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Walk over all entries in a hash table, calling callback function for each.
 | 
			
		||||
 * Note: we use a separate mutex in this function to avoid a recursive
 | 
			
		||||
 * locking deadlock (in case the callback calls _mesa_HashRemove()) and to
 | 
			
		||||
 * prevent multiple threads/contexts from getting tangled up.
 | 
			
		||||
 * A lock-less version of this function could be used when the table will
 | 
			
		||||
 * not be modified.
 | 
			
		||||
 * \param table  the hash table to walk
 | 
			
		||||
 * \param callback  the callback function
 | 
			
		||||
 * \param userData  arbitrary pointer to pass along to the callback
 | 
			
		||||
@@ -300,14 +308,16 @@ _mesa_HashWalk(const struct _mesa_HashTable *table,
 | 
			
		||||
   GLuint pos;
 | 
			
		||||
   ASSERT(table);
 | 
			
		||||
   ASSERT(callback);
 | 
			
		||||
   _glthread_LOCK_MUTEX(table2->Mutex);
 | 
			
		||||
   _glthread_LOCK_MUTEX(table2->WalkMutex);
 | 
			
		||||
   for (pos = 0; pos < TABLE_SIZE; pos++) {
 | 
			
		||||
      struct HashEntry *entry;
 | 
			
		||||
      for (entry = table->Table[pos]; entry; entry = entry->Next) {
 | 
			
		||||
      struct HashEntry *entry, *next;
 | 
			
		||||
      for (entry = table->Table[pos]; entry; entry = next) {
 | 
			
		||||
         /* save 'next' pointer now in case the callback deletes the entry */
 | 
			
		||||
         next = entry->Next;
 | 
			
		||||
         callback(entry->Key, entry->Data, userData);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   _glthread_UNLOCK_MUTEX(table2->Mutex);
 | 
			
		||||
   _glthread_UNLOCK_MUTEX(table2->WalkMutex);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -209,7 +209,6 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
 | 
			
		||||
	 _math_matrix_analyse(ctx->ModelviewMatrixStack.Top);
 | 
			
		||||
      }
 | 
			
		||||
      TRANSFORM_DIRECTION(temp, params, ctx->ModelviewMatrixStack.Top->m);
 | 
			
		||||
      NORMALIZE_3FV(temp);
 | 
			
		||||
      params = temp;
 | 
			
		||||
      break;
 | 
			
		||||
   case GL_SPOT_EXPONENT:
 | 
			
		||||
@@ -1137,12 +1136,18 @@ compute_light_positions( GLcontext *ctx )
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (light->_Flags & LIGHT_SPOT) {
 | 
			
		||||
         /* Note: we normalize the spot direction now */
 | 
			
		||||
 | 
			
		||||
	 if (ctx->_NeedEyeCoords) {
 | 
			
		||||
	    COPY_3V( light->_NormDirection, light->EyeDirection );
 | 
			
		||||
            NORMALIZE_3FV( light->_NormDirection );
 | 
			
		||||
	 }
 | 
			
		||||
         else {
 | 
			
		||||
            GLfloat spotDir[3];
 | 
			
		||||
            COPY_3V(spotDir, light->EyeDirection);
 | 
			
		||||
            NORMALIZE_3FV(spotDir);
 | 
			
		||||
	    TRANSFORM_NORMAL( light->_NormDirection,
 | 
			
		||||
			      light->EyeDirection,
 | 
			
		||||
			      spotDir,
 | 
			
		||||
			      ctx->ModelviewMatrixStack.Top->m);
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -170,6 +170,9 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (width == 0 || height == 0)
 | 
			
		||||
      return; /* nothing to do */
 | 
			
		||||
 | 
			
		||||
   if (ctx->Pack.BufferObj->Name) {
 | 
			
		||||
      if (!_mesa_validate_pbo_access(2, &ctx->Pack, width, height, 1,
 | 
			
		||||
                                     format, type, pixels)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -558,7 +558,6 @@ _mesa_update_state_locked( GLcontext *ctx )
 | 
			
		||||
    * Set ctx->NewState to zero to avoid recursion if
 | 
			
		||||
    * Driver.UpdateState() has to call FLUSH_VERTICES().  (fixed?)
 | 
			
		||||
    */
 | 
			
		||||
 out:
 | 
			
		||||
   new_state = ctx->NewState | new_prog_state;
 | 
			
		||||
   ctx->NewState = 0;
 | 
			
		||||
   ctx->Driver.UpdateState(ctx, new_state);
 | 
			
		||||
 
 | 
			
		||||
@@ -49,6 +49,17 @@
 | 
			
		||||
#include "mtypes.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * State changes which we care about for glCopyTex[Sub]Image() calls.
 | 
			
		||||
 * In particular, we care about pixel transfer state and buffer state
 | 
			
		||||
 * (such as glReadBuffer to make sure we read from the right renderbuffer).
 | 
			
		||||
 */
 | 
			
		||||
#define NEW_COPY_TEX_STATE (_IMAGE_NEW_TRANSFER_STATE | \
 | 
			
		||||
                            _NEW_BUFFERS | \
 | 
			
		||||
                            _NEW_PIXEL)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * We allocate texture memory on 512-byte boundaries so we can use MMX/SSE
 | 
			
		||||
 * elsewhere.
 | 
			
		||||
@@ -2918,7 +2929,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 | 
			
		||||
 | 
			
		||||
   if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
 | 
			
		||||
   if (ctx->NewState & NEW_COPY_TEX_STATE)
 | 
			
		||||
      _mesa_update_state(ctx);
 | 
			
		||||
 | 
			
		||||
#if FEATURE_convolve
 | 
			
		||||
@@ -2983,7 +2994,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 | 
			
		||||
 | 
			
		||||
   if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
 | 
			
		||||
   if (ctx->NewState & NEW_COPY_TEX_STATE)
 | 
			
		||||
      _mesa_update_state(ctx);
 | 
			
		||||
 | 
			
		||||
#if FEATURE_convolve
 | 
			
		||||
@@ -3051,7 +3062,7 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 | 
			
		||||
 | 
			
		||||
   if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
 | 
			
		||||
   if (ctx->NewState & NEW_COPY_TEX_STATE)
 | 
			
		||||
      _mesa_update_state(ctx);
 | 
			
		||||
 | 
			
		||||
   if (copytexsubimage_error_check1(ctx, 1, target, level))
 | 
			
		||||
@@ -3106,7 +3117,7 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 | 
			
		||||
 | 
			
		||||
   if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
 | 
			
		||||
   if (ctx->NewState & NEW_COPY_TEX_STATE)
 | 
			
		||||
      _mesa_update_state(ctx);
 | 
			
		||||
 | 
			
		||||
   if (copytexsubimage_error_check1(ctx, 2, target, level))
 | 
			
		||||
@@ -3161,7 +3172,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 | 
			
		||||
 | 
			
		||||
   if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
 | 
			
		||||
   if (ctx->NewState & NEW_COPY_TEX_STATE)
 | 
			
		||||
      _mesa_update_state(ctx);
 | 
			
		||||
 | 
			
		||||
   if (copytexsubimage_error_check1(ctx, 3, target, level))
 | 
			
		||||
 
 | 
			
		||||
@@ -139,8 +139,11 @@ flush(GLcontext *ctx, struct gl_texture_object *texObj)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/** Set an integer-valued texture parameter */
 | 
			
		||||
static void
 | 
			
		||||
/**
 | 
			
		||||
 * Set an integer-valued texture parameter
 | 
			
		||||
 * \return GL_TRUE if legal AND the value changed, GL_FALSE otherwise
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean
 | 
			
		||||
set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
                   struct gl_texture_object *texObj,
 | 
			
		||||
                   GLenum pname, const GLint *params)
 | 
			
		||||
@@ -148,13 +151,13 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
   switch (pname) {
 | 
			
		||||
   case GL_TEXTURE_MIN_FILTER:
 | 
			
		||||
      if (texObj->MinFilter == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      switch (params[0]) {
 | 
			
		||||
      case GL_NEAREST:
 | 
			
		||||
      case GL_LINEAR:
 | 
			
		||||
         flush(ctx, texObj);
 | 
			
		||||
         texObj->MinFilter = params[0];
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      case GL_NEAREST_MIPMAP_NEAREST:
 | 
			
		||||
      case GL_LINEAR_MIPMAP_NEAREST:
 | 
			
		||||
      case GL_NEAREST_MIPMAP_LINEAR:
 | 
			
		||||
@@ -162,77 +165,80 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
         if (texObj->Target != GL_TEXTURE_RECTANGLE_NV) {
 | 
			
		||||
            flush(ctx, texObj);
 | 
			
		||||
            texObj->MinFilter = params[0];
 | 
			
		||||
            return;
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
         /* fall-through */
 | 
			
		||||
      default:
 | 
			
		||||
         _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_MAG_FILTER:
 | 
			
		||||
      if (texObj->MagFilter == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      switch (params[0]) {
 | 
			
		||||
      case GL_NEAREST:
 | 
			
		||||
      case GL_LINEAR:
 | 
			
		||||
         flush(ctx, texObj);
 | 
			
		||||
         texObj->MagFilter = params[0];
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      default:
 | 
			
		||||
         _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_WRAP_S:
 | 
			
		||||
      if (texObj->WrapS == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
 | 
			
		||||
         flush(ctx, texObj);
 | 
			
		||||
         texObj->WrapS = params[0];
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_WRAP_T:
 | 
			
		||||
      if (texObj->WrapT == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
 | 
			
		||||
         flush(ctx, texObj);
 | 
			
		||||
         texObj->WrapT = params[0];
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_WRAP_R:
 | 
			
		||||
      if (texObj->WrapR == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
 | 
			
		||||
         flush(ctx, texObj);
 | 
			
		||||
         texObj->WrapR = params[0];
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_BASE_LEVEL:
 | 
			
		||||
      if (texObj->BaseLevel == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      if (params[0] < 0 ||
 | 
			
		||||
          (texObj->Target == GL_TEXTURE_RECTANGLE_ARB && params[0] != 0)) {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)");
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
      flush(ctx, texObj);
 | 
			
		||||
      texObj->BaseLevel = params[0];
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_MAX_LEVEL:
 | 
			
		||||
      if (texObj->MaxLevel == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      if (params[0] < 0 || texObj->Target == GL_TEXTURE_RECTANGLE_ARB) {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(param)");
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
      flush(ctx, texObj);
 | 
			
		||||
      texObj->MaxLevel = params[0];
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_COMPARE_SGIX:
 | 
			
		||||
      if (ctx->Extensions.SGIX_shadow) {
 | 
			
		||||
@@ -243,7 +249,7 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM,
 | 
			
		||||
                     "glTexParameter(pname=GL_TEXTURE_COMPARE_SGIX)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
 | 
			
		||||
      if (ctx->Extensions.SGIX_shadow &&
 | 
			
		||||
@@ -256,20 +262,22 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM,
 | 
			
		||||
                     "glTexParameter(GL_TEXTURE_COMPARE_OPERATOR_SGIX)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   case GL_GENERATE_MIPMAP_SGIS:
 | 
			
		||||
      if (ctx->Extensions.SGIS_generate_mipmap) {
 | 
			
		||||
         if (texObj->GenerateMipmap != params[0]) {
 | 
			
		||||
            flush(ctx, texObj);
 | 
			
		||||
            texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM,
 | 
			
		||||
                     "glTexParameter(pname=GL_GENERATE_MIPMAP_SGIS)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_COMPARE_MODE_ARB:
 | 
			
		||||
      if (ctx->Extensions.ARB_shadow &&
 | 
			
		||||
@@ -278,24 +286,26 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
         if (texObj->CompareMode != params[0]) {
 | 
			
		||||
            flush(ctx, texObj);
 | 
			
		||||
            texObj->CompareMode = params[0];
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM,
 | 
			
		||||
                     "glTexParameter(GL_TEXTURE_COMPARE_MODE_ARB)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_COMPARE_FUNC_ARB:
 | 
			
		||||
      if (ctx->Extensions.ARB_shadow) {
 | 
			
		||||
         if (texObj->CompareFunc == params[0])
 | 
			
		||||
            return;
 | 
			
		||||
            return GL_FALSE;
 | 
			
		||||
         switch (params[0]) {
 | 
			
		||||
         case GL_LEQUAL:
 | 
			
		||||
         case GL_GEQUAL:
 | 
			
		||||
            flush(ctx, texObj);
 | 
			
		||||
            texObj->CompareFunc = params[0];
 | 
			
		||||
            return;
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
         case GL_EQUAL:
 | 
			
		||||
         case GL_NOTEQUAL:
 | 
			
		||||
         case GL_LESS:
 | 
			
		||||
@@ -305,7 +315,7 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
            if (ctx->Extensions.EXT_shadow_funcs) {
 | 
			
		||||
               flush(ctx, texObj);
 | 
			
		||||
               texObj->CompareFunc = params[0];
 | 
			
		||||
               return;
 | 
			
		||||
               return GL_TRUE;
 | 
			
		||||
            }
 | 
			
		||||
            /* fall-through */
 | 
			
		||||
         default:
 | 
			
		||||
@@ -316,7 +326,7 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
      else {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_DEPTH_TEXTURE_MODE_ARB:
 | 
			
		||||
      if (ctx->Extensions.ARB_depth_texture &&
 | 
			
		||||
@@ -326,13 +336,14 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
         if (texObj->DepthMode != params[0]) {
 | 
			
		||||
            flush(ctx, texObj);
 | 
			
		||||
            texObj->DepthMode = params[0];
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM,
 | 
			
		||||
                     "glTexParameter(GL_DEPTH_TEXTURE_MODE_ARB)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
#ifdef FEATURE_OES_draw_texture
 | 
			
		||||
   case GL_TEXTURE_CROP_RECT_OES:
 | 
			
		||||
@@ -340,17 +351,21 @@ set_tex_parameteri(GLcontext *ctx,
 | 
			
		||||
      texObj->CropRect[1] = params[1];
 | 
			
		||||
      texObj->CropRect[2] = params[2];
 | 
			
		||||
      texObj->CropRect[3] = params[3];
 | 
			
		||||
      break;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   default:
 | 
			
		||||
      _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
 | 
			
		||||
   }
 | 
			
		||||
   return GL_FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/** Set a float-valued texture parameter */
 | 
			
		||||
static void
 | 
			
		||||
/**
 | 
			
		||||
 * Set a float-valued texture parameter
 | 
			
		||||
 * \return GL_TRUE if legal AND the value changed, GL_FALSE otherwise
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean
 | 
			
		||||
set_tex_parameterf(GLcontext *ctx,
 | 
			
		||||
                   struct gl_texture_object *texObj,
 | 
			
		||||
                   GLenum pname, const GLfloat *params)
 | 
			
		||||
@@ -358,54 +373,56 @@ set_tex_parameterf(GLcontext *ctx,
 | 
			
		||||
   switch (pname) {
 | 
			
		||||
   case GL_TEXTURE_MIN_LOD:
 | 
			
		||||
      if (texObj->MinLod == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      flush(ctx, texObj);
 | 
			
		||||
      texObj->MinLod = params[0];
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_MAX_LOD:
 | 
			
		||||
      if (texObj->MaxLod == params[0])
 | 
			
		||||
         return;
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      flush(ctx, texObj);
 | 
			
		||||
      texObj->MaxLod = params[0];
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_PRIORITY:
 | 
			
		||||
      flush(ctx, texObj);
 | 
			
		||||
      texObj->Priority = CLAMP(params[0], 0.0F, 1.0F);
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_MAX_ANISOTROPY_EXT:
 | 
			
		||||
      if (ctx->Extensions.EXT_texture_filter_anisotropic) {
 | 
			
		||||
         if (texObj->MaxAnisotropy == params[0])
 | 
			
		||||
            return;
 | 
			
		||||
            return GL_FALSE;
 | 
			
		||||
         if (params[0] < 1.0) {
 | 
			
		||||
            _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
 | 
			
		||||
            return;
 | 
			
		||||
            return GL_FALSE;
 | 
			
		||||
         }
 | 
			
		||||
         flush(ctx, texObj);
 | 
			
		||||
         /* clamp to max, that's what NVIDIA does */
 | 
			
		||||
         texObj->MaxAnisotropy = MIN2(params[0],
 | 
			
		||||
                                      ctx->Const.MaxTextureMaxAnisotropy);
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM,
 | 
			
		||||
                     "glTexParameter(pname=GL_TEXTURE_MAX_ANISOTROPY_EXT)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
 | 
			
		||||
      if (ctx->Extensions.SGIX_shadow_ambient) {
 | 
			
		||||
         if (texObj->ShadowAmbient != params[0]) {
 | 
			
		||||
            flush(ctx, texObj);
 | 
			
		||||
            texObj->ShadowAmbient = CLAMP(params[0], 0.0F, 1.0F);
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         _mesa_error(ctx, GL_INVALID_ENUM,
 | 
			
		||||
                     "glTexParameter(pname=GL_SHADOW_AMBIENT_SGIX)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   case GL_TEXTURE_LOD_BIAS:
 | 
			
		||||
      /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */
 | 
			
		||||
@@ -413,7 +430,9 @@ set_tex_parameterf(GLcontext *ctx,
 | 
			
		||||
         if (texObj->LodBias != params[0]) {
 | 
			
		||||
            flush(ctx, texObj);
 | 
			
		||||
            texObj->LodBias = params[0];
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
@@ -427,17 +446,19 @@ set_tex_parameterf(GLcontext *ctx,
 | 
			
		||||
      UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[GCOMP], params[1]);
 | 
			
		||||
      UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[BCOMP], params[2]);
 | 
			
		||||
      UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[ACOMP], params[3]);
 | 
			
		||||
      return;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   default:
 | 
			
		||||
      _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
 | 
			
		||||
   }
 | 
			
		||||
   return GL_FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void GLAPIENTRY
 | 
			
		||||
_mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
 | 
			
		||||
{
 | 
			
		||||
   GLboolean need_update;
 | 
			
		||||
   struct gl_texture_object *texObj;
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END(ctx);
 | 
			
		||||
@@ -463,15 +484,15 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
 | 
			
		||||
      {
 | 
			
		||||
         /* convert float param to int */
 | 
			
		||||
         GLint p = (GLint) param;
 | 
			
		||||
         set_tex_parameteri(ctx, texObj, pname, &p);
 | 
			
		||||
         need_update = set_tex_parameteri(ctx, texObj, pname, &p);
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
      break;
 | 
			
		||||
   default:
 | 
			
		||||
      /* this will generate an error if pname is illegal */
 | 
			
		||||
      set_tex_parameterf(ctx, texObj, pname, ¶m);
 | 
			
		||||
      need_update = set_tex_parameterf(ctx, texObj, pname, ¶m);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
 | 
			
		||||
   if (ctx->Driver.TexParameter && need_update) {
 | 
			
		||||
      ctx->Driver.TexParameter(ctx, target, texObj, pname, ¶m);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
@@ -480,6 +501,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
 | 
			
		||||
void GLAPIENTRY
 | 
			
		||||
_mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 | 
			
		||||
{
 | 
			
		||||
   GLboolean need_update;
 | 
			
		||||
   struct gl_texture_object *texObj;
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END(ctx);
 | 
			
		||||
@@ -505,7 +527,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 | 
			
		||||
      {
 | 
			
		||||
         /* convert float param to int */
 | 
			
		||||
         GLint p = (GLint) params[0];
 | 
			
		||||
         set_tex_parameteri(ctx, texObj, pname, &p);
 | 
			
		||||
         need_update = set_tex_parameteri(ctx, texObj, pname, &p);
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
@@ -518,17 +540,17 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 | 
			
		||||
         iparams[1] = (GLint) params[1];
 | 
			
		||||
         iparams[2] = (GLint) params[2];
 | 
			
		||||
         iparams[3] = (GLint) params[3];
 | 
			
		||||
         set_tex_parameteri(ctx, target, iparams);
 | 
			
		||||
         need_update = set_tex_parameteri(ctx, target, iparams);
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   default:
 | 
			
		||||
      /* this will generate an error if pname is illegal */
 | 
			
		||||
      set_tex_parameterf(ctx, texObj, pname, params);
 | 
			
		||||
      need_update = set_tex_parameterf(ctx, texObj, pname, params);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
 | 
			
		||||
   if (ctx->Driver.TexParameter && need_update) {
 | 
			
		||||
      ctx->Driver.TexParameter(ctx, target, texObj, pname, params);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
@@ -537,6 +559,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 | 
			
		||||
void GLAPIENTRY
 | 
			
		||||
_mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
 | 
			
		||||
{
 | 
			
		||||
   GLboolean need_update;
 | 
			
		||||
   struct gl_texture_object *texObj;
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END(ctx);
 | 
			
		||||
@@ -555,15 +578,15 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
 | 
			
		||||
      {
 | 
			
		||||
         GLfloat fparam = (GLfloat) param;
 | 
			
		||||
         /* convert int param to float */
 | 
			
		||||
         set_tex_parameterf(ctx, texObj, pname, &fparam);
 | 
			
		||||
         need_update = set_tex_parameterf(ctx, texObj, pname, &fparam);
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   default:
 | 
			
		||||
      /* this will generate an error if pname is illegal */
 | 
			
		||||
      set_tex_parameteri(ctx, texObj, pname, ¶m);
 | 
			
		||||
      need_update = set_tex_parameteri(ctx, texObj, pname, ¶m);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
 | 
			
		||||
   if (ctx->Driver.TexParameter && need_update) {
 | 
			
		||||
      GLfloat fparam = (GLfloat) param;
 | 
			
		||||
      ctx->Driver.TexParameter(ctx, target, texObj, pname, &fparam);
 | 
			
		||||
   }
 | 
			
		||||
@@ -573,6 +596,7 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
 | 
			
		||||
void GLAPIENTRY
 | 
			
		||||
_mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
 | 
			
		||||
{
 | 
			
		||||
   GLboolean need_update;
 | 
			
		||||
   struct gl_texture_object *texObj;
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END(ctx);
 | 
			
		||||
@@ -590,7 +614,7 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
 | 
			
		||||
         fparams[1] = INT_TO_FLOAT(params[1]);
 | 
			
		||||
         fparams[2] = INT_TO_FLOAT(params[2]);
 | 
			
		||||
         fparams[3] = INT_TO_FLOAT(params[3]);
 | 
			
		||||
         set_tex_parameterf(ctx, texObj, pname, fparams);
 | 
			
		||||
         need_update = set_tex_parameterf(ctx, texObj, pname, fparams);
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   case GL_TEXTURE_MIN_LOD:
 | 
			
		||||
@@ -602,15 +626,15 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
 | 
			
		||||
      {
 | 
			
		||||
         /* convert int param to float */
 | 
			
		||||
         GLfloat fparam = (GLfloat) params[0];
 | 
			
		||||
         set_tex_parameterf(ctx, texObj, pname, &fparam);
 | 
			
		||||
         need_update = set_tex_parameterf(ctx, texObj, pname, &fparam);
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   default:
 | 
			
		||||
      /* this will generate an error if pname is illegal */
 | 
			
		||||
      set_tex_parameteri(ctx, texObj, pname, params);
 | 
			
		||||
      need_update = set_tex_parameteri(ctx, texObj, pname, params);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
 | 
			
		||||
   if (ctx->Driver.TexParameter && need_update) {
 | 
			
		||||
      GLfloat fparams[4];
 | 
			
		||||
      fparams[0] = INT_TO_FLOAT(params[0]);
 | 
			
		||||
      if (pname == GL_TEXTURE_BORDER_COLOR ||
 | 
			
		||||
 
 | 
			
		||||
@@ -802,6 +802,9 @@ _mesa_free_texture_data(GLcontext *ctx)
 | 
			
		||||
   /* unreference current textures */
 | 
			
		||||
   for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) {
 | 
			
		||||
      struct gl_texture_unit *unit = ctx->Texture.Unit + u;
 | 
			
		||||
      /* The _Current texture could account for another reference */
 | 
			
		||||
      _mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL);
 | 
			
		||||
 | 
			
		||||
      for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
 | 
			
		||||
         _mesa_reference_texobj(&unit->CurrentTex[tgt], NULL);
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,9 @@
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  7.4
 | 
			
		||||
 * Version:  7.4.2
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
@@ -30,8 +31,8 @@
 | 
			
		||||
/* Mesa version */
 | 
			
		||||
#define MESA_MAJOR 7
 | 
			
		||||
#define MESA_MINOR 4
 | 
			
		||||
#define MESA_PATCH 0
 | 
			
		||||
#define MESA_VERSION_STRING "7.4-rc1"
 | 
			
		||||
#define MESA_PATCH 2
 | 
			
		||||
#define MESA_VERSION_STRING "7.4.2"
 | 
			
		||||
 | 
			
		||||
/* To make version comparison easy */
 | 
			
		||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
 | 
			
		||||
 
 | 
			
		||||
@@ -1379,11 +1379,10 @@ _math_matrix_analyse( GLmatrix *mat )
 | 
			
		||||
 | 
			
		||||
   if (mat->inv && (mat->flags & MAT_DIRTY_INVERSE)) {
 | 
			
		||||
      matrix_invert( mat );
 | 
			
		||||
      mat->flags &= ~MAT_DIRTY_INVERSE;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   mat->flags &= ~(MAT_DIRTY_FLAGS|
 | 
			
		||||
		   MAT_DIRTY_TYPE|
 | 
			
		||||
		   MAT_DIRTY_INVERSE);
 | 
			
		||||
   mat->flags &= ~(MAT_DIRTY_FLAGS | MAT_DIRTY_TYPE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 
 | 
			
		||||
@@ -1496,10 +1496,16 @@ generic_attrib_check(struct var_cache *vc_head)
 | 
			
		||||
   curr = vc_head;
 | 
			
		||||
   while (curr) {
 | 
			
		||||
      if (curr->type == vt_attrib) {
 | 
			
		||||
         if (curr->attrib_is_generic)
 | 
			
		||||
            genericAttrib[ curr->attrib_binding ] = GL_TRUE;
 | 
			
		||||
         else
 | 
			
		||||
         if (curr->attrib_is_generic) {
 | 
			
		||||
            GLuint attr = (curr->attrib_binding == 0)
 | 
			
		||||
               ? 0 : (curr->attrib_binding - VERT_ATTRIB_GENERIC0);
 | 
			
		||||
            assert(attr < MAX_VERTEX_PROGRAM_ATTRIBS);
 | 
			
		||||
            genericAttrib[attr] = GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            assert(curr->attrib_binding < MAX_VERTEX_PROGRAM_ATTRIBS);
 | 
			
		||||
            explicitAttrib[ curr->attrib_binding ] = GL_TRUE;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      curr = curr->next;
 | 
			
		||||
@@ -1823,7 +1829,6 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
 | 
			
		||||
               if (param_var->param_binding_begin == ~0U)
 | 
			
		||||
                  param_var->param_binding_begin = idx;
 | 
			
		||||
               param_var->param_binding_length++;
 | 
			
		||||
               Program->Base.NumParameters++;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
@@ -1832,7 +1837,6 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
 | 
			
		||||
            if (param_var->param_binding_begin == ~0U)
 | 
			
		||||
               param_var->param_binding_begin = idx;
 | 
			
		||||
            param_var->param_binding_length++;
 | 
			
		||||
            Program->Base.NumParameters++;
 | 
			
		||||
         }
 | 
			
		||||
         break;
 | 
			
		||||
 | 
			
		||||
@@ -1843,7 +1847,6 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
 | 
			
		||||
         if (param_var->param_binding_begin == ~0U)
 | 
			
		||||
            param_var->param_binding_begin = idx;
 | 
			
		||||
         param_var->param_binding_length++;
 | 
			
		||||
         Program->Base.NumParameters++;
 | 
			
		||||
 | 
			
		||||
         /* Check if there is more: 0 -> we're done, else its an integer */
 | 
			
		||||
         if (**inst) {
 | 
			
		||||
@@ -1879,7 +1882,6 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
 | 
			
		||||
               idx = _mesa_add_state_reference(Program->Base.Parameters,
 | 
			
		||||
                                               state_tokens);
 | 
			
		||||
               param_var->param_binding_length++;
 | 
			
		||||
               Program->Base.NumParameters++;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
@@ -1897,7 +1899,6 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
 | 
			
		||||
            param_var->param_binding_begin = idx;
 | 
			
		||||
         param_var->param_binding_type = PROGRAM_CONSTANT;
 | 
			
		||||
         param_var->param_binding_length++;
 | 
			
		||||
         Program->Base.NumParameters++;
 | 
			
		||||
         break;
 | 
			
		||||
 | 
			
		||||
      default:
 | 
			
		||||
@@ -1906,12 +1907,14 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
 | 
			
		||||
         return 1;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   Program->Base.NumParameters = Program->Base.Parameters->NumParameters;
 | 
			
		||||
 | 
			
		||||
   /* Make sure we haven't blown past our parameter limits */
 | 
			
		||||
   if (((Program->Base.Target == GL_VERTEX_PROGRAM_ARB) &&
 | 
			
		||||
        (Program->Base.NumParameters >=
 | 
			
		||||
        (Program->Base.NumParameters >
 | 
			
		||||
         ctx->Const.VertexProgram.MaxLocalParams))
 | 
			
		||||
       || ((Program->Base.Target == GL_FRAGMENT_PROGRAM_ARB)
 | 
			
		||||
           && (Program->Base.NumParameters >=
 | 
			
		||||
           && (Program->Base.NumParameters >
 | 
			
		||||
               ctx->Const.FragmentProgram.MaxLocalParams))) {
 | 
			
		||||
      program_error(ctx, Program->Position, "Too many parameter variables");
 | 
			
		||||
      return 1;
 | 
			
		||||
 
 | 
			
		||||
@@ -873,7 +873,7 @@ _mesa_execute_program(GLcontext * ctx,
 | 
			
		||||
                * result.z = result.x * APPX(result.y)
 | 
			
		||||
                * We do what the ARB extension says.
 | 
			
		||||
                */
 | 
			
		||||
               q[2] = (GLfloat) pow(2.0, t[0]);
 | 
			
		||||
               q[2] = (GLfloat) _mesa_pow(2.0, t[0]);
 | 
			
		||||
            }
 | 
			
		||||
            q[1] = t[0] - floor_t0;
 | 
			
		||||
            q[3] = 1.0F;
 | 
			
		||||
@@ -986,7 +986,7 @@ _mesa_execute_program(GLcontext * ctx,
 | 
			
		||||
               if (a[1] == 0.0 && a[3] == 0.0)
 | 
			
		||||
                  result[2] = 1.0;
 | 
			
		||||
               else
 | 
			
		||||
                  result[2] = EXPF(a[3] * LOGF(a[1]));
 | 
			
		||||
                  result[2] = (GLfloat) _mesa_pow(a[1], a[3]);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               result[2] = 0.0;
 | 
			
		||||
@@ -1577,8 +1577,8 @@ _mesa_execute_program(GLcontext * ctx,
 | 
			
		||||
      case OPCODE_TXB:         /* GL_ARB_fragment_program only */
 | 
			
		||||
         /* Texel lookup with LOD bias */
 | 
			
		||||
         {
 | 
			
		||||
            const struct gl_texture_unit *texUnit
 | 
			
		||||
               = &ctx->Texture.Unit[inst->TexSrcUnit];
 | 
			
		||||
            const GLuint unit = machine->Samplers[inst->TexSrcUnit];
 | 
			
		||||
            const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
 | 
			
		||||
            GLfloat texcoord[4], color[4], lodBias;
 | 
			
		||||
 | 
			
		||||
            fetch_vector4(&inst->SrcReg[0], machine, texcoord);
 | 
			
		||||
 
 | 
			
		||||
@@ -178,15 +178,20 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList,
 | 
			
		||||
                         const char *name, const GLfloat values[4],
 | 
			
		||||
                         GLuint size)
 | 
			
		||||
{
 | 
			
		||||
#if 0 /* disable this for now -- we need to save the name! */
 | 
			
		||||
   /* first check if this is a duplicate constant */
 | 
			
		||||
   GLint pos;
 | 
			
		||||
   GLuint swizzle;
 | 
			
		||||
   ASSERT(size == 4); /* XXX future feature */
 | 
			
		||||
   /* check if we already have this constant */
 | 
			
		||||
   if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) {
 | 
			
		||||
      return pos;
 | 
			
		||||
   for (pos = 0; pos < paramList->NumParameters; pos++) {
 | 
			
		||||
      const GLfloat *pvals = paramList->ParameterValues[pos];
 | 
			
		||||
      if (pvals[0] == values[0] &&
 | 
			
		||||
          pvals[1] == values[1] &&
 | 
			
		||||
          pvals[2] == values[2] &&
 | 
			
		||||
          pvals[3] == values[3] &&
 | 
			
		||||
          _mesa_strcmp(paramList->Parameters[pos].Name, name) == 0) {
 | 
			
		||||
         /* Same name and value is already in the param list - reuse it */
 | 
			
		||||
         return pos;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
   /* not found, add new parameter */
 | 
			
		||||
   return _mesa_add_parameter(paramList, PROGRAM_CONSTANT, name,
 | 
			
		||||
                              size, GL_NONE, values, NULL, 0x0);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -296,6 +296,7 @@ _mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
 | 
			
		||||
   struct gl_program *prog;
 | 
			
		||||
   switch (target) {
 | 
			
		||||
   case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
 | 
			
		||||
   case GL_VERTEX_STATE_PROGRAM_NV:
 | 
			
		||||
      prog = _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),
 | 
			
		||||
                                       target, id );
 | 
			
		||||
      break;
 | 
			
		||||
 
 | 
			
		||||
@@ -457,28 +457,36 @@ emit_statevars(const char *name, int array_len,
 | 
			
		||||
         tokens[0] = STATE_TEXENV_COLOR;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_EyePlaneS") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_EYE_S;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_EYE_S;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_EyePlaneT") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_EYE_T;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_EYE_T;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_EyePlaneR") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_EYE_R;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_EYE_R;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_EyePlaneQ") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_EYE_Q;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_EYE_Q;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_ObjectPlaneS") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_OBJECT_S;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_OBJECT_S;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_ObjectPlaneT") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_OBJECT_T;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_OBJECT_T;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_ObjectPlaneR") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_OBJECT_R;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_OBJECT_R;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(name, "gl_ObjectPlaneQ") == 0) {
 | 
			
		||||
         tokens[0] = STATE_TEXGEN_OBJECT_Q;
 | 
			
		||||
         tokens[0] = STATE_TEXGEN;
 | 
			
		||||
         tokens[2] = STATE_TEXGEN_OBJECT_Q;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         return -1; /* invalid array name */
 | 
			
		||||
 
 | 
			
		||||
@@ -249,6 +249,11 @@ link_uniform_vars(GLcontext *ctx,
 | 
			
		||||
            _mesa_append_uniform(shProg->Uniforms, p->Name, prog->Target, i);
 | 
			
		||||
         if (uniform)
 | 
			
		||||
            uniform->Initialized = p->Initialized;
 | 
			
		||||
 | 
			
		||||
	 /* Add the flag indicating that the program is dependent on constant
 | 
			
		||||
	  * state.
 | 
			
		||||
	  */
 | 
			
		||||
	 prog->Parameters->StateFlags |= _NEW_PROGRAM;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /* The samplerMap[] table we build here is used to remap/re-index
 | 
			
		||||
 
 | 
			
		||||
@@ -570,6 +570,9 @@ void
 | 
			
		||||
_swrast_choose_point(GLcontext *ctx)
 | 
			
		||||
{
 | 
			
		||||
   SWcontext *swrast = SWRAST_CONTEXT(ctx);
 | 
			
		||||
   const GLfloat size = CLAMP(ctx->Point.Size,
 | 
			
		||||
                              ctx->Point.MinSize,
 | 
			
		||||
                              ctx->Point.MaxSize);
 | 
			
		||||
 | 
			
		||||
   if (ctx->RenderMode == GL_RENDER) {
 | 
			
		||||
      if (ctx->Point.PointSprite) {
 | 
			
		||||
@@ -578,7 +581,7 @@ _swrast_choose_point(GLcontext *ctx)
 | 
			
		||||
      else if (ctx->Point.SmoothFlag) {
 | 
			
		||||
         swrast->Point = smooth_point;
 | 
			
		||||
      }
 | 
			
		||||
      else if (ctx->Point.Size > 1.0 ||
 | 
			
		||||
      else if (size > 1.0 ||
 | 
			
		||||
               ctx->Point._Attenuated ||
 | 
			
		||||
               ctx->VertexProgram.PointSizeEnabled) {
 | 
			
		||||
         swrast->Point = large_point;
 | 
			
		||||
 
 | 
			
		||||
@@ -1399,11 +1399,17 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /*
 | 
			
		||||
    * Write to renderbuffers
 | 
			
		||||
    * Write to renderbuffers.
 | 
			
		||||
    * Depending on glDrawBuffer() state and the which color outputs are
 | 
			
		||||
    * written by the fragment shader, we may either replicate one color to
 | 
			
		||||
    * all renderbuffers or write a different color to each renderbuffer.
 | 
			
		||||
    * multiFragOutputs=TRUE for the later case.
 | 
			
		||||
    */
 | 
			
		||||
   {
 | 
			
		||||
      const GLuint numBuffers = fb->_NumColorDrawBuffers;
 | 
			
		||||
      const GLboolean multiFragOutputs = numBuffers > 1;
 | 
			
		||||
      const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
 | 
			
		||||
      const GLboolean multiFragOutputs = 
 | 
			
		||||
         (fp && fp->Base.OutputsWritten >= (1 << FRAG_RESULT_DATA0));
 | 
			
		||||
      GLuint buf;
 | 
			
		||||
 | 
			
		||||
      for (buf = 0; buf < numBuffers; buf++) {
 | 
			
		||||
 
 | 
			
		||||
@@ -2061,6 +2061,7 @@ clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max,
 | 
			
		||||
      fcol -= 0.5F;
 | 
			
		||||
      i0 = IFLOOR(fcol);
 | 
			
		||||
      i1 = i0 + 1;
 | 
			
		||||
      break;
 | 
			
		||||
   default:
 | 
			
		||||
      _mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_linear");
 | 
			
		||||
      i0 = i1 = 0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user