From 6bb88613c74e3606f38734e815f90e4ef508204f Mon Sep 17 00:00:00 2001
From: Dave Airlie
Date: Thu, 18 Oct 2007 00:10:50 +0000
Subject: [PATCH] - mesa-7.0.1-stable-branch.patch - Updated with more fixes
from stable - mesa-7.0.1-r300-fix-writemask.patch - fix r300 fragprog
writemask - mesa-7.0.1-r200-settexoffset.patch - add zero-copy TFP support
for r200
---
mesa-7.0.1-r200-settexoffset.patch | 243 ++++++
mesa-7.0.1-r300-fix-writemask.patch | 36 +
mesa-7.0.1-stable-branch.patch | 1064 +++++++++++++++++++++++++--
mesa.spec | 11 +-
4 files changed, 1278 insertions(+), 76 deletions(-)
create mode 100644 mesa-7.0.1-r200-settexoffset.patch
create mode 100644 mesa-7.0.1-r300-fix-writemask.patch
diff --git a/mesa-7.0.1-r200-settexoffset.patch b/mesa-7.0.1-r200-settexoffset.patch
new file mode 100644
index 0000000..edf33e6
--- /dev/null
+++ b/mesa-7.0.1-r200-settexoffset.patch
@@ -0,0 +1,243 @@
+4f96000e294fa0d6ba6f5915ff508017d9c26d50
+diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h
+index bec09e8..c80180b 100644
+--- a/src/mesa/drivers/dri/r200/r200_context.h
++++ b/src/mesa/drivers/dri/r200/r200_context.h
+@@ -179,6 +179,7 @@ struct r200_tex_obj {
+
+ drm_radeon_tex_image_t image[6][RADEON_MAX_TEXTURE_LEVELS];
+ /* Six, for the cube faces */
++ GLboolean image_override; /* Image overridden by GLX_EXT_tfp */
+
+ GLuint pp_txfilter; /* hardware register values */
+ GLuint pp_txformat;
+diff --git a/src/mesa/drivers/dri/r200/r200_tex.h b/src/mesa/drivers/dri/r200/r200_tex.h
+index e6c0e00..10ff8e8 100644
+--- a/src/mesa/drivers/dri/r200/r200_tex.h
++++ b/src/mesa/drivers/dri/r200/r200_tex.h
+@@ -35,6 +35,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #ifndef __R200_TEX_H__
+ #define __R200_TEX_H__
+
++extern void r200SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
++ unsigned long long offset, GLint depth,
++ GLuint pitch);
++
+ extern void r200UpdateTextureState( GLcontext *ctx );
+
+ extern int r200UploadTexImages( r200ContextPtr rmesa, r200TexObjPtr t, GLuint face );
+diff --git a/src/mesa/drivers/dri/r200/r200_texmem.c b/src/mesa/drivers/dri/r200/r200_texmem.c
+index d926313..183c4ca 100644
+--- a/src/mesa/drivers/dri/r200/r200_texmem.c
++++ b/src/mesa/drivers/dri/r200/r200_texmem.c
+@@ -181,7 +181,8 @@ static void r200UploadRectSubImage( r200ContextPtr rmesa,
+ /* In this case, could also use GART texturing. This is
+ * currently disabled, but has been tested & works.
+ */
+- t->pp_txoffset = r200GartOffsetFromVirtual( rmesa, texImage->Data );
++ if ( !t->image_override )
++ t->pp_txoffset = r200GartOffsetFromVirtual( rmesa, texImage->Data );
+ t->pp_txpitch = texImage->RowStride * texFormat->TexelBytes - 32;
+
+ if (R200_DEBUG & DEBUG_TEXTURE)
+@@ -467,7 +468,7 @@ int r200UploadTexImages( r200ContextPtr rmesa, r200TexObjPtr t, GLuint face )
+ t->base.firstLevel, t->base.lastLevel );
+ }
+
+- if ( !t || t->base.totalSize == 0 )
++ if ( !t || t->base.totalSize == 0 || t->image_override )
+ return 0;
+
+ if (R200_DEBUG & DEBUG_SYNC) {
+diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
+index ae02ec4..93c0fb7 100644
+--- a/src/mesa/drivers/dri/r200/r200_texstate.c
++++ b/src/mesa/drivers/dri/r200/r200_texstate.c
+@@ -37,6 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include "context.h"
+ #include "macros.h"
+ #include "texformat.h"
++#include "texobj.h"
+ #include "enums.h"
+
+ #include "r200_context.h"
+@@ -72,10 +73,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #define VALID_FORMAT(f) ( ((f) <= MESA_FORMAT_RGBA_DXT5) \
+ && (tx_table_le[f].format != 0xffffffff) )
+
+-static const struct {
++struct tx_table {
+ GLuint format, filter;
+-}
+-tx_table_be[] =
++};
++
++static const struct tx_table tx_table_be[] =
+ {
+ [ MESA_FORMAT_RGBA8888 ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ _ALPHA_REV(RGBA8888),
+@@ -104,16 +106,13 @@ tx_table_be[] =
+ _ALPHA(RGBA_DXT5),
+ };
+
+-static const struct {
+- GLuint format, filter;
+-}
+-tx_table_le[] =
++static const struct tx_table tx_table_le[] =
+ {
+ _ALPHA(RGBA8888),
+ [ MESA_FORMAT_RGBA8888_REV ] = { R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP, 0 },
+ _ALPHA(ARGB8888),
+ _ALPHA_REV(ARGB8888),
+- _INVALID(RGB888),
++ [ MESA_FORMAT_RGB888 ] = { R200_TXFORMAT_ARGB8888, 0 },
+ _COLOR(RGB565),
+ _COLOR_REV(RGB565),
+ _ALPHA(ARGB4444),
+@@ -160,30 +159,23 @@ static void r200SetTexImages( r200ContextPtr rmesa,
+ GLint i, texelBytes;
+ GLint numLevels;
+ GLint log2Width, log2Height, log2Depth;
+- const GLuint ui = 1;
+- const GLubyte littleEndian = *((const GLubyte *) &ui);
+
+ /* Set the hardware texture format
+ */
++ if ( !t->image_override ) {
++ if ( VALID_FORMAT( baseImage->TexFormat->MesaFormat ) ) {
++ t->pp_txformat &= ~(R200_TXFORMAT_FORMAT_MASK |
++ R200_TXFORMAT_ALPHA_IN_MAP);
++ t->pp_txfilter &= ~R200_YUV_TO_RGB;
+
+- t->pp_txformat &= ~(R200_TXFORMAT_FORMAT_MASK |
+- R200_TXFORMAT_ALPHA_IN_MAP);
+- t->pp_txfilter &= ~R200_YUV_TO_RGB;
+-
+- if ( VALID_FORMAT( baseImage->TexFormat->MesaFormat ) ) {
+- if (littleEndian) {
+ t->pp_txformat |= tx_table_le[ baseImage->TexFormat->MesaFormat ].format;
+ t->pp_txfilter |= tx_table_le[ baseImage->TexFormat->MesaFormat ].filter;
+ }
+ else {
+- t->pp_txformat |= tx_table_be[ baseImage->TexFormat->MesaFormat ].format;
+- t->pp_txfilter |= tx_table_be[ baseImage->TexFormat->MesaFormat ].filter;
++ _mesa_problem(NULL, "unexpected texture format in %s", __FUNCTION__);
++ return;
+ }
+ }
+- else {
+- _mesa_problem(NULL, "unexpected texture format in %s", __FUNCTION__);
+- return;
+- }
+
+ texelBytes = baseImage->TexFormat->TexelBytes;
+
+@@ -380,11 +372,13 @@ static void r200SetTexImages( r200ContextPtr rmesa,
+ * requires 64-byte aligned pitches, and we may/may not need the
+ * blitter. NPOT only!
+ */
+- if (baseImage->IsCompressed)
+- t->pp_txpitch = (tObj->Image[0][t->base.firstLevel]->Width + 63) & ~(63);
+- else
+- t->pp_txpitch = ((tObj->Image[0][t->base.firstLevel]->Width * texelBytes) + 63) & ~(63);
+- t->pp_txpitch -= 32;
++ if ( !t->image_override ) {
++ if (baseImage->IsCompressed)
++ t->pp_txpitch = (tObj->Image[0][t->base.firstLevel]->Width + 63) & ~(63);
++ else
++ t->pp_txpitch = ((tObj->Image[0][t->base.firstLevel]->Width * texelBytes) + 63) & ~(63);
++ t->pp_txpitch -= 32;
++ }
+
+ t->dirty_state = TEX_ALL;
+
+@@ -979,6 +973,46 @@ static GLboolean r200UpdateTextureEnv( GLcontext *ctx, int unit, int slot, GLuin
+ return GL_TRUE;
+ }
+
++void r200SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
++ unsigned long long offset, GLint depth, GLuint pitch)
++{
++ r200ContextPtr rmesa =
++ (r200ContextPtr) ((__DRIcontextPrivate *) pDRICtx->private)->
++ driverPrivate;
++ struct gl_texture_object *tObj =
++ _mesa_lookup_texture(rmesa->glCtx, texname);
++ r200TexObjPtr t;
++
++ if (!tObj)
++ return;
++
++ t = (r200TexObjPtr) tObj->DriverData;
++
++ t->image_override = GL_TRUE;
++
++ if (!offset)
++ return;
++
++ t->pp_txoffset = offset;
++ t->pp_txpitch = pitch - 32;
++
++ switch (depth) {
++ case 32:
++ t->pp_txformat = tx_table_le[2].format;
++ t->pp_txfilter |= tx_table_le[2].filter;
++ break;
++ case 24:
++ default:
++ t->pp_txformat = tx_table_le[4].format;
++ t->pp_txfilter |= tx_table_le[4].filter;
++ break;
++ case 16:
++ t->pp_txformat = tx_table_le[5].format;
++ t->pp_txfilter |= tx_table_le[5].filter;
++ break;
++ }
++}
++
+ #define REF_COLOR 1
+ #define REF_ALPHA 2
+
+@@ -1560,7 +1594,7 @@ static GLboolean enable_tex_2d( GLcontext *ctx, int unit )
+ R200_FIREVERTICES( rmesa );
+ r200SetTexImages( rmesa, tObj );
+ r200UploadTexImages( rmesa, (r200TexObjPtr) tObj->DriverData, 0 );
+- if ( !t->base.memBlock )
++ if ( !t->base.memBlock && !t->image_override )
+ return GL_FALSE;
+ }
+
+@@ -1668,7 +1702,9 @@ static GLboolean enable_tex_rect( GLcontext *ctx, int unit )
+ R200_FIREVERTICES( rmesa );
+ r200SetTexImages( rmesa, tObj );
+ r200UploadTexImages( rmesa, (r200TexObjPtr) tObj->DriverData, 0 );
+- if ( !t->base.memBlock && !rmesa->prefer_gart_client_texturing )
++ if ( !t->base.memBlock &&
++ !t->image_override &&
++ !rmesa->prefer_gart_client_texturing )
+ return GL_FALSE;
+ }
+
+diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
+index aa7fb63..682cf3a 100644
+--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
++++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
+@@ -53,6 +53,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include "r200_context.h"
+ #include "r200_ioctl.h"
+ #include "r200_span.h"
++#include "r200_tex.h"
+ #elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
+ #include "r300_context.h"
+ #include "r300_fragprog.h"
+@@ -973,7 +974,8 @@ static const struct __DriverAPIRec r200API = {
+ .WaitForMSC = driWaitForMSC32,
+ .WaitForSBC = NULL,
+ .SwapBuffersMSC = NULL,
+- .CopySubBuffer = r200CopySubBuffer
++ .CopySubBuffer = r200CopySubBuffer,
++ .setTexOffset = r200SetTexOffset
+ };
+ #endif
+
diff --git a/mesa-7.0.1-r300-fix-writemask.patch b/mesa-7.0.1-r300-fix-writemask.patch
new file mode 100644
index 0000000..931a077
--- /dev/null
+++ b/mesa-7.0.1-r300-fix-writemask.patch
@@ -0,0 +1,36 @@
+From 32699696e31234c8d4e4b08f255ba2134ec12db5 Mon Sep 17 00:00:00 2001
+From: Jerome Glisse
+Date: Sun, 7 Oct 2007 22:49:56 +0200
+Subject: [PATCH] r300: fragprog tex instruction now take writemask into acount.
+
+---
+ src/mesa/drivers/dri/r300/r300_fragprog.c | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
+index cce8e68..78ed44b 100644
+--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
++++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
+@@ -951,6 +951,10 @@ static void emit_tex(struct r300_fragment_program *fp,
+ if (REG_GET_TYPE(dest) == REG_TYPE_OUTPUT) {
+ rdest = dest;
+ dest = get_temp_reg_tex(fp);
++ } else if (fpi->DstReg.WriteMask != WRITEMASK_XYZW) {
++ /* in case write mask isn't XYZW */
++ rdest = dest;
++ dest = get_temp_reg_tex(fp);
+ }
+ hwdest =
+ t_hw_dst(fp, dest, GL_TRUE,
+@@ -1016,7 +1020,7 @@ static void emit_tex(struct r300_fragment_program *fp,
+
+ /* Copy from temp to output if needed */
+ if (REG_GET_VALID(rdest)) {
+- emit_arith(fp, PFS_OP_MAD, rdest, WRITEMASK_XYZW, dest,
++ emit_arith(fp, PFS_OP_MAD, rdest, fpi->DstReg.WriteMask, dest,
+ pfs_one, pfs_zero, 0);
+ free_temp(fp, dest);
+ }
+--
+1.5.2.4
+
diff --git a/mesa-7.0.1-stable-branch.patch b/mesa-7.0.1-stable-branch.patch
index 5c8ef35..63f46ca 100644
--- a/mesa-7.0.1-stable-branch.patch
+++ b/mesa-7.0.1-stable-branch.patch
@@ -1,7 +1,10 @@
Adam Jackson (1):
Unbreak Linux builds with -fvisibility=hidden.
-Brian (64):
+Andreas Micheler (1):
+ faster write_rgba_span_front()
+
+Brian (69):
added md5 sums
fix even-sized point positioning (bug 11874)
Merge branch 'mesa_7_0_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into mesa_7_0_branch
@@ -66,6 +69,11 @@ Brian (64):
bump versions to 7.0.2
for Miniglx, use git sources
prep for 7.0.2 release
+ update the DRM/DRI instructions
+ fix VBO-split infinite loop (bug 12164)
+ updated glext.h license info (Khronos), plus other clean-ups
+ replace 'brick' with correct program name in printfs
+ fix fog, rescale_normals bugs (from gallium branch)
Christoph Kubisch (1):
updated VC7 project files
@@ -73,9 +81,11 @@ Christoph Kubisch (1):
Colin McDonald (1):
fixed problem with big glDrawArrays (see bug 12141)
-Dan Nicholson (2):
+Dan Nicholson (4):
DESTDIR support.
pkg-config support
+ add support for LDFLAGS env var
+ Ignore more generated files in progs/
Dan Torop (1):
fix spantmp2 READ_RGBA inline asm (#11931)
@@ -83,21 +93,29 @@ Dan Torop (1):
Dave Airlie (1):
i965: fix vblank on 965gm laptops by bringing in code from i915
-Michel Dänzer (2):
+Michel Dänzer (3):
i915tex: Make sure pitch is aligned properly for render-to-texture.
i915tex: Unreference texture buffers on context destruction.
+ i915tex: Work around texture pitch related performance drops on i915 at least.
+
+Mrc Gran (1):
+ fix force_s3tc_enable option
Roland Bär (1):
[i965] Bug #11812: Fix fwrite return value checks in AUB file code.
-Roland Scheidegger (2):
+Roland Scheidegger (6):
suppress warning about ncon visuals (bug #6689)
fix another occurence of movaps which might not be aligned
+ unbreak 3d textures (typo when setting tex layout)
+ make sure optimized fog params get updated
+ fog: fix issues with negative fog coords (may fix #10529)
+ minor fog calc cleanup
Wang Zhenyu (1):
i915tex: Add support for 945GME
-Xiang, Haihao (13):
+Xiang, Haihao (14):
i965: flush batch buffer when getting the maximum. This makes
i965: samplers group in fours in WM_STATE. fix bug#9415
i965: check NULL pointer. fix bug#12193
@@ -111,6 +129,7 @@ Xiang, Haihao (13):
i965: The cube map texture coordinates must be devided by the
i965: handle all unfilled mode in clip stage. fix bug #12453
mesa: make sure the gotten value isn't greater than the
+ Brian's fix for bug9829
Zou Nan hai (2):
fix a bug in 965 ARB_occlusion_query,
@@ -192,6 +211,134 @@ index 3cab262..e05e0e6 100644
$(TOP)/src/glut/glx/depend \
$(TOP)/src/glu/sgi/depend
+diff --git a/bin/mklib b/bin/mklib
+index 8334595..499e789 100755
+--- a/bin/mklib
++++ b/bin/mklib
+@@ -34,6 +34,7 @@ MINOR=0
+ PATCH=""
+ DEPS=""
+ LINK=""
++LDFLAGS=""
+ CPLUSPLUS=0
+ STATIC=0
+ DLOPEN=0
+@@ -63,6 +64,7 @@ do
+ echo ' -LDIR search in DIR for library dependencies'
+ echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
+ echo ' Not observed on all systems at this time.'
++ echo ' -ldflags OPT specify any additional linker flags in OPT'
+ echo ' -cplusplus link with C++ runtime'
+ echo ' -static make a static library (default is dynamic/shared)'
+ echo ' -dlopen make a shared library suitable for dynamic loading'
+@@ -94,6 +96,10 @@ do
+ shift 1;
+ LINK=$1
+ ;;
++ '-ldflags')
++ shift 1;
++ LDFLAGS=$1
++ ;;
+ -l*)
+ DEPS="$DEPS $1"
+ ;;
+@@ -216,7 +222,7 @@ case $ARCH in
+
+ rm -f ${LIBNAME}
+ # make lib
+- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ # finish up
+ FINAL_LIBS="${LIBNAME}"
+ elif [ $STATIC = 1 ] ; then
+@@ -274,7 +280,7 @@ case $ARCH in
+ rm -f ${LIBNAME}.so
+
+ # make lib
+- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+ # make usual symlinks
+ ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
+ ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
+@@ -346,10 +352,10 @@ case $ARCH in
+ #echo "mklib: linker is" ${LINK} ${OPTS}
+ if [ $NOPREFIX = 1 ] ; then
+ rm -f ${LIBNAME}
+- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ else
+ rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
+- ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
+ ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
+ fi
+ FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
+@@ -373,7 +379,7 @@ case $ARCH in
+ echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
+ OPTS="-shared"
+ rm -f ${LIBNAME}
+- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ FINAL_LIBS=${LIBNAME}
+ elif [ $STATIC = 1 ] ; then
+ STLIB="lib${LIBNAME}.a"
+@@ -387,7 +393,7 @@ case $ARCH in
+ OPTS="-shared -Wl,-soname,${SHLIB}"
+ echo "mklib: Making FreeBSD shared library: " ${SHLIB}
+ rm -f ${SHLIB}
+- ${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
+ ln -sf ${SHLIB} "lib${LIBNAME}.so"
+ FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
+ fi
+@@ -445,7 +451,7 @@ case $ARCH in
+ fi
+
+ echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
+- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ FINAL_LIBS=${LIBNAME}
+ fi
+ ;;
+@@ -521,9 +527,9 @@ case $ARCH in
+ # On AIX a shared library is linked differently when
+ # you want to dlopen the file
+ if [ $DLOPEN = "1" ] ; then
+- cc -G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
++ cc -G ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ else
+- cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
++ cc ${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS}
+ ar ${X64} -r ${LIBNAME} ${OFILE}
+ fi
+
+@@ -605,7 +611,7 @@ case $ARCH in
+ fi
+
+ echo "mklib: Making Darwin shared library: " ${LIBNAME}
+- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ ln -s ${LIBNAME} ${LINKNAME}
+ FINAL_LIBS="${LIBNAME} ${LINKNAME}"
+ fi
+@@ -682,7 +688,7 @@ case $ARCH in
+ rm -f ${LIBNAME}.so.${MAJOR}
+ rm -f ${LIBNAME}.so
+ # make lib
+- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+ # make usual symlinks
+ ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
+ ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
+@@ -754,7 +760,7 @@ case $ARCH in
+ rm -f ${LIBNAME}.a
+
+ # make lib
+- ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
++ ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
+ # make usual symlinks
+ ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
+ # finish up
diff --git a/configs/bluegene-xlc-osmesa b/configs/bluegene-xlc-osmesa
new file mode 100644
index 0000000..b0c762d
@@ -228,7 +375,7 @@ index 0000000..b0c762d
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
+APP_LIB_DEPS = -lOSMesa -lGLU -lm
diff --git a/configs/default b/configs/default
-index 81f0338..275b060 100644
+index 81f0338..2a08c16 100644
--- a/configs/default
+++ b/configs/default
@@ -10,7 +10,7 @@ CONFIG_NAME = default
@@ -240,6 +387,14 @@ index 81f0338..275b060 100644
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
+@@ -20,6 +20,7 @@ CC = cc
+ CXX = CC
+ CFLAGS = -O
+ CXXFLAGS = -O
++LDFLAGS =
+ GLU_CFLAGS =
+
+ # Misc tools and flags
diff --git a/docs/download.html b/docs/download.html
index 5c3989e..84451b8 100644
--- a/docs/download.html
@@ -271,10 +426,78 @@ index c7f59bb..0d9e52c 100644
2. Compilation
diff --git a/docs/install.html b/docs/install.html
-index 804dee5..041e27b 100644
+index 804dee5..4cd0d4c 100644
--- a/docs/install.html
+++ b/docs/install.html
-@@ -287,7 +287,15 @@ already installed, you'll have to choose different directories, like
+@@ -57,50 +57,31 @@ the DRI hardware drivers.
+
+
+
+-DRM kernel modules and header files from the
+-DRI project.
++For Mesa 7.0.2
++DRM version 2.3 is required.
+
+-
+
+-If you don't already have the DRM file, you can get the sources from
+-CVS by doing:
+-
+-cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri co drm
+-
+-
+-See the
+-DRI Building Instructions for the steps to build the DRM modules. Mesa
+-6.5 requires at least libdrm 2.0.1 or greater.
+-
+-
+-You can verify that the DRM files have been properly installed by
+-running pkg-config --modversion libdrm
+-
+-
+-
+-
+-Recent /usr/include/GL/glxproto.h file.
+-You'll need this if you get any errors about _GLXvop_BindTexImageEXT
+-being undefined.
++To check if you already have it, run:
++
++pkg-config --modversion libdrm
+
+
+-Download/install the
+-glproto
+-module from X.org git, or grab the
+-glxproto.h file and put it in the
+-Mesa/include/GL/ directory.
++You can download and install a
++tarball release or get the code from git with:
++
++git clone git://anongit.freedesktop.org/git/mesa/drm
++
++Then revert to the drm-2.3.0 tag with:
++
++git-reset --hard drm-2.3.0
+
+-
+
+
+-DRI-enabled X server.
+-Visit
+-XFree86
+-or
++
++Relatively recent
+
+-X.org
+-for more information.
+-
++X.org release.
++Mesa depends on a number of X header and library files.
+
+
+
+@@ -287,7 +268,15 @@ already installed, you'll have to choose different directories, like
To install Mesa's headers and libraries, run make install
.
But first, check the Mesa/configs/default file and examine the values
of the INSTALL_DIR and DRI_DRIVER_INSTALL_DIR variables.
@@ -291,7 +514,7 @@ index 804dee5..041e27b 100644
-@@ -298,6 +306,26 @@ This is a handy way to compare multiple OpenGL implementations.
+@@ -298,6 +287,26 @@ This is a handy way to compare multiple OpenGL implementations.
@@ -318,6 +541,56 @@ index 804dee5..041e27b 100644
2. Windows Compilation and Installation
+diff --git a/docs/license.html b/docs/license.html
+index 944a5dd..44b980d 100644
+--- a/docs/license.html
++++ b/docs/license.html
+@@ -86,29 +86,32 @@ and their respective licenses.
+ Mesa Component Licenses
+
+
+-Component Location Primary Author License
+-----------------------------------------------------------------------------
+-Main Mesa code src/mesa/ Brian Paul Mesa (MIT)
++Component Location License
++------------------------------------------------------------------
++Main Mesa code src/mesa/ Mesa (MIT)
+
+-Device drivers src/mesa/drivers/* See drivers See drivers
++Device drivers src/mesa/drivers/* MIT, generally
+
+-Ext headers include/GL/glext.h SGI SGI Free B
++Ext headers include/GL/glext.h Khronos
+ include/GL/glxext.h
+
+-GLUT src/glut/ Mark Kilgard Mark's copyright
++GLUT src/glut/ Mark Kilgard's copyright
+
+-Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL
++SGI GLU library src/glu/sgi/ SGI Free B
+
+-SGI GLU library src/glu/sgi/ SGI SGI Free B
++demo programs progs/demos/ see source files
+
+-demo programs progs/demos/ various see source files
++X demos progs/xdemos/ see source files
+
+-X demos progs/xdemos/ Brian Paul see source files
++SGI demos progs/samples/ SGI license
+
+-SGI demos progs/samples/ SGI SGI copyright
+-
+-RedBook demos progs/redbook/ SGI SGI copyright
++RedBook demos progs/redbook/ SGI license
+
+
++
++In general, consult the source files for license terms.
++
++
++
+