- rebase Mesa to 7.1pre 74ced1e67f286a5e71e9877bc6844b2af5b9ab8d

This commit is contained in:
Dave Airlie 2007-11-01 06:55:38 +00:00
parent 6bb88613c7
commit dbb9f179ce
12 changed files with 108 additions and 11465 deletions

View File

@ -1,3 +1,3 @@
MesaLib-7.0.1.tar.bz2
MesaDemos-7.0.1.tar.bz2
MesaLib-7.1pre.tar.bz2
MesaDemos-7.1pre.tar.bz2
gl-manpages-1.0.1.tar.bz2

View File

@ -1,11 +0,0 @@
--- Mesa-6.5.2/src/mesa/drivers/dri/common/dri_util.c.jx 2006-12-02 13:14:16.000000000 -0500
+++ Mesa-6.5.2/src/mesa/drivers/dri/common/dri_util.c 2007-04-04 12:41:08.000000000 -0400
@@ -271,6 +271,8 @@
__DRIdrawablePrivate *prp;
__DRIcontextPrivate * const pcp = ctx->private;
+ if (!pcp)
+ return GL_FALSE;
/* Find the _DRIdrawable which corresponds to the writing drawable. */
pdraw = __driFindDrawable(psp->drawHash, draw);

View File

@ -1,231 +0,0 @@
diff -up mesa-20070725/configs/linux.build-config mesa-20070725/configs/linux
--- mesa-20070725/configs/linux.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux 2007-07-25 10:33:03.000000000 -0400
@@ -8,7 +8,9 @@ CONFIG_NAME = linux
CC = gcc
CXX = g++
-OPT_FLAGS = -O3 -g
+MKDEP = true
+
+OPT_FLAGS ?= -O3 -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32
diff -up mesa-20070725/configs/linux-indirect.build-config mesa-20070725/configs/linux-indirect
--- mesa-20070725/configs/linux-indirect.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux-indirect 2007-07-25 10:34:40.000000000 -0400
@@ -15,7 +15,7 @@ CXX = g++
#MKDEP_OPTIONS = -MF depend
WARN_FLAGS = -Wall
-OPT_FLAGS = -O -g
+OPT_FLAGS ?= -O -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
@@ -44,7 +44,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11
# Directories
-SRC_DIRS = glx/x11 glu glut/glx glw
+SRC_DIRS = glx/x11 glu
DRIVER_DIRS =
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
diff -up mesa-20070725/configs/linux-dri.build-config mesa-20070725/configs/linux-dri
--- mesa-20070725/configs/linux-dri.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux-dri 2007-07-25 10:34:31.000000000 -0400
@@ -12,8 +12,9 @@ CXX = g++
#MKDEP = /usr/X11R6/bin/makedepend
#MKDEP = gcc -M
#MKDEP_OPTIONS = -MF depend
+MKDEP = true
-OPT_FLAGS = -O -g
+OPT_FLAGS ?= -O -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
@@ -25,8 +26,6 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOU
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
-X11_INCLUDES = -I/usr/X11R6/include
-
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
@@ -36,7 +35,7 @@ CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAG
ASM_SOURCES =
# Library/program dependencies
-EXTRA_LIB_PATH=-L/usr/X11R6/lib
+EXTRA_LIB_PATH =
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
@@ -54,10 +53,10 @@ USING_EGL=0
# Directories
ifeq ($(USING_EGL), 1)
-SRC_DIRS = egl glx/x11 mesa glu glut/glx glw
+SRC_DIRS = egl glx/x11 mesa glu glut/glx
PROGRAM_DIRS = egl
else
-SRC_DIRS = glx/x11 mesa glu glut/glx glw
+SRC_DIRS = glx/x11 mesa glu
PROGRAM_DIRS =
endif
@@ -67,4 +66,4 @@ WINDOW_SYSTEM=dri
# gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = i810 i915tex i915 i965 mach64 mga r128 r200 r300 radeon s3v \
- savage sis tdfx trident unichrome ffb
+ savage tdfx trident unichrome ffb # sis
diff -up mesa-20070725/configs/linux-dri-x86.build-config mesa-20070725/configs/linux-dri-x86
--- mesa-20070725/configs/linux-dri-x86.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux-dri-x86 2007-07-25 10:33:03.000000000 -0400
@@ -6,7 +6,7 @@ include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-x86
# Unnecessary on x86, generally.
-PIC_FLAGS =
+# PIC_FLAGS =
# Add -m32 to CFLAGS:
ARCH_FLAGS = -m32
diff -up mesa-20070725/configs/default.build-config mesa-20070725/configs/default
--- mesa-20070725/configs/default.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/default 2007-07-25 10:34:20.000000000 -0400
@@ -58,8 +58,8 @@ GLW_SOURCES = GLwDrawA.c
# Directories to build
-LIB_DIR = lib
-SRC_DIRS = mesa glu glut/glx glw
+LIB_DIR ?= lib
+SRC_DIRS = mesa glu
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter:
@@ -72,14 +72,14 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -l
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
-GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXm $(EXTRA_LIB_PATH) -lXt -lX11
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
# Installation directories (for make install)
INSTALL_DIR = /usr/local
-DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri
+DRI_DRIVER_INSTALL_DIR = $(DRI_DRIVER_DIR)
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
diff -up mesa-20070725/configs/linux-dri-ppc.build-config mesa-20070725/configs/linux-dri-ppc
--- mesa-20070725/configs/linux-dri-ppc.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux-dri-ppc 2007-07-25 10:33:03.000000000 -0400
@@ -5,7 +5,7 @@ include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-ppc
-OPT_FLAGS = -Os -mcpu=603
+OPT_FLAGS ?= -Os -mcpu=603
PIC_FLAGS = -fPIC
ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM
diff -up mesa-20070725/configs/linux-osmesa16.build-config mesa-20070725/configs/linux-osmesa16
--- mesa-20070725/configs/linux-osmesa16.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux-osmesa16 2007-07-25 10:33:03.000000000 -0400
@@ -7,8 +7,10 @@ CONFIG_NAME = linux-osmesa16
# Compiler and flags
CC = gcc
CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+OPT_FLAGS ?= -O3 -ansi -pendantic -fPIC -ffast-math
+CFLAGS = $(OPT_FLAGS) $(DEFINES) -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
+CXXFLAGS = $(OPT_FLAGS) $(DEFINES)
# Library names
@@ -17,12 +19,12 @@ OSMESA_LIB_NAME = libOSMesa16.so
# Directories
-SRC_DIRS = mesa glu
+SRC_DIRS = mesa
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
+OSMESA_LIB_DEPS = -lm -lpthread -lselinux
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa16
diff -up mesa-20070725/configs/linux-osmesa32.build-config mesa-20070725/configs/linux-osmesa32
--- mesa-20070725/configs/linux-osmesa32.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux-osmesa32 2007-07-25 10:33:03.000000000 -0400
@@ -7,8 +7,10 @@ CONFIG_NAME = linux-osmesa32
# Compiler and flags
CC = gcc
CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+OPT_FLAGS ?= -O3 -ansi -pendantic -fPIC -ffast-math
+CFLAGS = $(OPT_FLAGS) $(DEFINES) -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
+CXXFLAGS = $(OPT_FLAGS) $(DEFINES)
# Library names
@@ -17,12 +19,12 @@ OSMESA_LIB_NAME = libOSMesa32.so
# Directories
-SRC_DIRS = mesa glu
+SRC_DIRS = mesa
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
+OSMESA_LIB_DEPS = -lm -lpthread -lselinux
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa32
diff -up mesa-20070725/configs/linux-osmesa.build-config mesa-20070725/configs/linux-osmesa
--- mesa-20070725/configs/linux-osmesa.build-config 2007-07-25 09:36:03.000000000 -0400
+++ mesa-20070725/configs/linux-osmesa 2007-07-25 10:33:03.000000000 -0400
@@ -9,17 +9,18 @@ CONFIG_NAME = linux-osmesa
# Compiler and flags
CC = gcc
CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
-
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+OPT_FLAGS ?= -O3 -ansi -pendantic -fPIC -ffast-math
+CFLAGS = $(OPT_FLAGS) $(DEFINES)
+CXXFLAGS = $(OPT_FLAGS) $(DEFINES)
# Directories
-SRC_DIRS = mesa glu
+SRC_DIRS = mesa
DRIVER_DIRS = osmesa
-PROGRAM_DIRS = osdemos
+PROGRAM_DIRS =
# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
+OSMESA_LIB_DEPS = -lm -lpthread -lselinux
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU

View File

@ -132,3 +132,15 @@ diff -up Mesa-7.0/configs/linux-dri.jx Mesa-7.0/configs/linux-dri
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl \
$(LIBDRM_LIB)
diff -up Mesa-7.1pre/progs/osdemos/Makefile.da Mesa-7.1pre/progs/osdemos/Makefile
--- Mesa-7.1pre/progs/osdemos/Makefile.da 2007-11-01 15:59:52.000000000 +1000
+++ Mesa-7.1pre/progs/osdemos/Makefile 2007-11-01 15:59:57.000000000 +1000
@@ -5,7 +5,7 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
-OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lOSMesa $(APP_LIB_DEPS)
+OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lOSMesa $(APP_LIB_DEPS) -l selinux
OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)

File diff suppressed because it is too large Load Diff

View File

@ -1,243 +0,0 @@
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

View File

@ -1,36 +0,0 @@
From 32699696e31234c8d4e4b08f255ba2134ec12db5 Mon Sep 17 00:00:00 2001
From: Jerome Glisse <glisse@freedesktop.org>
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

File diff suppressed because it is too large Load Diff

40
mesa-7.1-kill-glw.patch Normal file
View File

@ -0,0 +1,40 @@
diff -up Mesa-7.1pre/configs/default.da Mesa-7.1pre/configs/default
--- Mesa-7.1pre/configs/default.da 2007-11-01 16:24:30.000000000 +1000
+++ Mesa-7.1pre/configs/default 2007-11-01 16:24:37.000000000 +1000
@@ -60,7 +60,7 @@ GLW_SOURCES = GLwDrawA.c
# Directories to build
LIB_DIR = lib
-SRC_DIRS = mesa glu glut/glx glw
+SRC_DIRS = mesa glu glut/glx
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter:
diff -up Mesa-7.1pre/configs/linux-indirect.da Mesa-7.1pre/configs/linux-indirect
--- Mesa-7.1pre/configs/linux-indirect.da 2007-11-01 16:23:32.000000000 +1000
+++ Mesa-7.1pre/configs/linux-indirect 2007-11-01 16:23:39.000000000 +1000
@@ -47,7 +47,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11
# Directories
-SRC_DIRS = glx/x11 glu glut/glx glw
+SRC_DIRS = glx/x11 glu
DRIVER_DIRS =
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
diff -up Mesa-7.1pre/configs/linux-dri.da Mesa-7.1pre/configs/linux-dri
--- Mesa-7.1pre/configs/linux-dri.da 2007-11-01 16:24:00.000000000 +1000
+++ Mesa-7.1pre/configs/linux-dri 2007-11-01 16:24:12.000000000 +1000
@@ -60,10 +60,10 @@ USING_EGL=0
# Directories
ifeq ($(USING_EGL), 1)
-SRC_DIRS = egl glx/x11 mesa glu glut/glx glw
+SRC_DIRS = egl glx/x11 mesa glu glut/glx
PROGRAM_DIRS = egl xdemos
else
-SRC_DIRS = glx/x11 mesa glu glut/glx glw
+SRC_DIRS = glx/x11 mesa glu glut/glx
PROGRAM_DIRS = xdemos
endif

View File

@ -0,0 +1,39 @@
From 8a156f47fc6547d5ed0fb8031f332cbf9e16948d Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Thu, 1 Nov 2007 16:16:52 +1000
Subject: [PATCH] mesa: keep OSMESA version at 6.5.3
---
src/mesa/Makefile | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 77bb7be..e2a09ed 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -117,17 +117,18 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
# Make the OSMesa library
+# Note: version is kept at 6.5.3 to simplify app/linking issues
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
- -ldflags '$(LDFLAGS)' -major $(MESA_MAJOR) \
- -minor $(MESA_MINOR) -patch $(MESA_TINY) \
+ -ldflags '$(LDFLAGS)' -major 6 \
+ -minor 5 -patch 3 \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
else \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
- -ldflags '$(LDFLAGS)' -major $(MESA_MAJOR) \
- -minor $(MESA_MINOR) -patch $(GL_TINY) \
+ -ldflags '$(LDFLAGS)' -major 6 \
+ -minor 5 -patch 3 \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
fi
--
1.5.3.4

View File

@ -31,31 +31,27 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 7.0.1
Release: 7%{?dist}
Version: 7.1pre
Release: 0%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://internap.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-%{version}.tar.bz2
Source1: http://internap.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-%{version}.tar.bz2
Source0: http://internap.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-7.1pre.tar.bz2
Source1: http://internap.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-7.1pre.tar.bz2
Source2: %{manpages}.tar.bz2
Patch0: mesa-7.0-build-config.patch
Patch1: mesa-7.1-kill-glw.patch
Patch2: mesa-7.1pre-osmesa-version.patch
Patch4: mesa-6.5-dont-libglut-me-harder-ok-thx-bye.patch
Patch5: mesa-6.5.2-xserver-1.1-source-compat.patch
Patch18: mesa-7.0-selinux-awareness.patch
Patch23: mesa-6.5.2-bindcontext-paranoia.patch
Patch25: mesa-7.0-symlinks-before-depend.patch
Patch26: mesa-7.0.1-stable-branch.patch
Patch27: mesa-7.0-use_master-r300.patch
Patch28: mesa-7.0.1-r300-fix-writemask.patch
Patch29: mesa-7.0.1-r200-settexoffset.patch
BuildRequires: pkgconfig
%if %{with_dri}
BuildRequires: libdrm-devel >= 2.3.0-1
BuildRequires: libdrm-devel >= 2.4.0-0
%endif
BuildRequires: libXxf86vm-devel
BuildRequires: expat-devel >= 2.0
@ -173,16 +169,12 @@ This package provides some demo applications for testing Mesa.
%setup -q -n Mesa-%{version} -b1 -b2
chmod a-x progs/demos/glslnoise.c
%patch0 -p1 -b .build-config
%patch1 -p1 -b .kill-glw
%patch2 -p1 -b .osmesa-version
%patch4 -p0 -b .dont-libglut-me-harder-ok-thx-bye
%patch5 -p1 -b .xserver-1.1-compat
%patch18 -p1 -b .selinux-awareness
%patch23 -p1 -b .bindcontext
%patch25 -p1 -b .makej
%patch26 -p1 -b .stable
%patch27 -p1 -b .r300
%patch28 -p1 -b .r300-writemask
%patch29 -p1 -b .r200-settexoffset
# WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT
# license and are not open source/free software, so we remove them.
@ -364,6 +356,7 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/arbocclude
%{_bindir}/bounce
%{_bindir}/clearspd
%{_bindir}/copypix
%{_bindir}/cubemap
%{_bindir}/drawpix
%{_bindir}/engine
@ -412,6 +405,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/mesa-demos-data
%changelog
* Thu Nov 01 2007 Dave Airlie <airlied@redhat.com> 7.1pre-0
- rebase Mesa to 7.1pre 74ced1e67f286a5e71e9877bc6844b2af5b9ab8d
* Thu Oct 18 2007 Dave Airlie <airlied@redhat.com> 7.0.1-7
- 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

View File

@ -1,3 +1,3 @@
c056abd763e899114bf745c9eedbf9ad MesaLib-7.0.1.tar.bz2
3b66b3268df12ca8a6c4e0c4c457912c MesaDemos-7.0.1.tar.bz2
715651003893bfd3f48d78dde6d45e55 MesaLib-7.1pre.tar.bz2
68942584edd6f3160129fd341c28a123 MesaDemos-7.1pre.tar.bz2
6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2