From 27417288acf8ed2c9d8c94f242f7e2c09305cac4 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 14 Aug 2007 05:33:46 +0000 Subject: [PATCH] - Rebase to upstream 7.0.1 release - ajax provided patches: for updated selinux awareness, build config - gl visibility and picify were fixed upstream - OS mesa library version are 6.5.3 not 7.0.1 - spec fix --- .cvsignore | 10 +- i965-interleaved-arrays-fix.patch | 21 - mesa-6.5.1-selinux-awareness.patch | 251 ---- mesa-6.5.2-fix-glut-demos.patch | 77 -- mesa-6.5.2-libgl-visibility.patch | 48 - mesa-6.5.2-picify-dri-drivers.patch | 136 --- mesa-6.5.2-r300-parallel-build.patch | 16 - mesa-6.5.2-radeon-backports-231787.patch | 150 --- mesa-6.5.2-via-respect-my-cliplist.patch | 218 ---- ...onfig.patch => mesa-7.0-build-config.patch | 353 +++--- ...7.0-i-already-defined-glapi-you-twit.patch | 23 + mesa-7.0-selinux-awareness.patch | 134 +++ mesa-7.0-symlinks-before-depend.patch | 12 + mesa.spec | 36 +- post-6.5.1-i965-fixes.patch | 1061 ----------------- redhat-mesa-source-filelist-generator | 50 - sources | 8 +- 17 files changed, 371 insertions(+), 2233 deletions(-) delete mode 100644 i965-interleaved-arrays-fix.patch delete mode 100644 mesa-6.5.1-selinux-awareness.patch delete mode 100644 mesa-6.5.2-fix-glut-demos.patch delete mode 100644 mesa-6.5.2-libgl-visibility.patch delete mode 100644 mesa-6.5.2-picify-dri-drivers.patch delete mode 100644 mesa-6.5.2-r300-parallel-build.patch delete mode 100644 mesa-6.5.2-radeon-backports-231787.patch delete mode 100644 mesa-6.5.2-via-respect-my-cliplist.patch rename mesa-6.5.1-build-config.patch => mesa-7.0-build-config.patch (63%) create mode 100644 mesa-7.0-i-already-defined-glapi-you-twit.patch create mode 100644 mesa-7.0-selinux-awareness.patch create mode 100644 mesa-7.0-symlinks-before-depend.patch delete mode 100644 post-6.5.1-i965-fixes.patch delete mode 100755 redhat-mesa-source-filelist-generator diff --git a/.cvsignore b/.cvsignore index 5333495..5bf1add 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,9 +1,3 @@ -MesaDemos-6.5.1.tar.bz2 -MesaLib-6.5.1.tar.bz2 -gl-man-pages.tar.bz2 -glu-man-pages.tar.bz2 -glx-man-pages.tar.bz2 -gl-manpages-1.0.tar.bz2 +MesaLib-7.0.1.tar.bz2 +MesaDemos-7.0.1.tar.bz2 gl-manpages-1.0.1.tar.bz2 -MesaDemos-6.5.2.tar.bz2 -MesaLib-6.5.2.tar.bz2 diff --git a/i965-interleaved-arrays-fix.patch b/i965-interleaved-arrays-fix.patch deleted file mode 100644 index f65b3d6..0000000 --- a/i965-interleaved-arrays-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Keith Whitwell -Date: Fri, 13 Oct 2006 11:21:55 +0000 (+0000) -Subject: Upload of interleaved arrays currently assumes that position is the -X-Git-Url: http://gitweb.freedesktop.org/?p=users/krh/mesa.git;a=commitdiff;h=a8a86ce53490bedb43ea414ead7e9d4cf30fc1de - -Upload of interleaved arrays currently assumes that position is the -first element in the interleaved group. Add a test to catch cases -where this isn't true and use per-array uploads instead. Fixes compiz -glitches on x64. ---- - ---- a/src/mesa/drivers/dri/i965/brw_draw_upload.c -+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c -@@ -435,6 +435,7 @@ GLboolean brw_upload_vertices( struct br - ptr = input->glarray->Ptr; - } - else if (interleave != input->glarray->StrideB || -+ (const char *)input->glarray->Ptr - (const char *)ptr < 0 || - (const char *)input->glarray->Ptr - (const char *)ptr > interleave) { - interleave = 0; - } diff --git a/mesa-6.5.1-selinux-awareness.patch b/mesa-6.5.1-selinux-awareness.patch deleted file mode 100644 index 1ea97e2..0000000 --- a/mesa-6.5.1-selinux-awareness.patch +++ /dev/null @@ -1,251 +0,0 @@ ---- ./src/mesa/x86/rtasm/x86sse.h.selinux-awareness 2006-08-09 16:05:26.000000000 -0400 -+++ ./src/mesa/x86/rtasm/x86sse.h 2006-08-22 21:14:45.000000000 -0400 -@@ -80,8 +80,8 @@ - */ - - --void x86_init_func( struct x86_function *p ); --void x86_init_func_size( struct x86_function *p, GLuint code_size ); -+int x86_init_func( struct x86_function *p ); -+int x86_init_func_size( struct x86_function *p, GLuint code_size ); - void x86_release_func( struct x86_function *p ); - void (*x86_get_func( struct x86_function *p ))( void ); - ---- ./src/mesa/x86/rtasm/x86sse.c.selinux-awareness 2006-08-09 16:05:26.000000000 -0400 -+++ ./src/mesa/x86/rtasm/x86sse.c 2006-08-22 21:14:45.000000000 -0400 -@@ -1063,15 +1063,17 @@ - } - - --void x86_init_func( struct x86_function *p ) -+int x86_init_func( struct x86_function *p ) - { -- x86_init_func_size(p, 1024); -+ return x86_init_func_size(p, 1024); - } - --void x86_init_func_size( struct x86_function *p, GLuint code_size ) -+int x86_init_func_size( struct x86_function *p, GLuint code_size ) - { - p->store = _mesa_exec_malloc(code_size); - p->csr = p->store; -+ -+ return (p->store != NULL); - } - - void x86_release_func( struct x86_function *p ) ---- ./src/mesa/main/execmem.c.selinux-awareness 2006-05-10 05:00:16.000000000 -0400 -+++ ./src/mesa/main/execmem.c 2006-08-22 21:14:45.000000000 -0400 -@@ -36,7 +36,7 @@ - - - --#if defined(__linux__) && !defined(XFree86Server) -+#if defined(__linux__) - - /* - * Allocate a large block of memory which can hold code then dole it out -@@ -46,6 +46,7 @@ - #include - #include - #include "mm.h" -+#include - - #define EXEC_HEAP_SIZE (10*1024*1024) - -@@ -55,9 +56,16 @@ - static unsigned char *exec_mem = NULL; - - --static void -+static int - init_heap(void) - { -+ -+ if (is_selinux_enabled()) { -+ if (!security_get_boolean_active("allow_execmem") || -+ !security_get_boolean_pending("allow_execmem")) -+ return 0; -+ } -+ - if (!exec_heap) - exec_heap = mmInit( 0, EXEC_HEAP_SIZE ); - -@@ -65,6 +73,8 @@ - exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE, - PROT_EXEC | PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -+ -+ return (exec_mem != NULL); - } - - -@@ -76,7 +86,8 @@ - - _glthread_LOCK_MUTEX(exec_mutex); - -- init_heap(); -+ if (!init_heap()) -+ goto bail; - - if (exec_heap) { - size = (size + 31) & ~31; -@@ -87,7 +98,8 @@ - addr = exec_mem + block->ofs; - else - _mesa_printf("_mesa_exec_malloc failed\n"); -- -+ -+ bail: - _glthread_UNLOCK_MUTEX(exec_mutex); - - return addr; ---- ./src/mesa/tnl/t_vb_arbprogram_sse.c.selinux-awareness 2006-06-01 18:56:40.000000000 -0400 -+++ ./src/mesa/tnl/t_vb_arbprogram_sse.c 2006-08-22 21:14:45.000000000 -0400 -@@ -1298,7 +1298,8 @@ - p->compiled_func = NULL; - } - -- x86_init_func(&cp.func); -+ if (!x86_init_func(&cp.func)) -+ return GL_FALSE; - - cp.fpucntl = RESTORE_FPU; - ---- ./src/mesa/tnl/t_vertex_sse.c.selinux-awareness 2005-09-16 14:14:25.000000000 -0400 -+++ ./src/mesa/tnl/t_vertex_sse.c 2006-08-22 21:14:45.000000000 -0400 -@@ -348,7 +348,8 @@ - struct x86_reg vp1 = x86_make_reg(file_XMM, 2); - GLubyte *fixup, *label; - -- x86_init_func(&p->func); -+ if (!x86_init_func(&p->func)) -+ return GL_FALSE; - - /* Push a few regs? - */ -@@ -646,7 +647,10 @@ - p.identity = x86_make_reg(file_XMM, 6); - p.chan0 = x86_make_reg(file_XMM, 7); - -- x86_init_func(&p.func); -+ if (!x86_init_func(&p.func)) { -+ vtx->codegen_emit = NULL; -+ return; -+ } - - if (build_vertex_emit(&p)) { - _tnl_register_fastpath( vtx, GL_TRUE ); ---- ./src/mesa/drivers/dri/radeon/radeon_context.h.selinux-awareness 2006-04-11 07:41:11.000000000 -0400 -+++ ./src/mesa/drivers/dri/radeon/radeon_context.h 2006-08-23 10:23:20.000000000 -0400 -@@ -778,6 +778,7 @@ - GLuint TexMatColSwap; - GLmatrix tmpmat[RADEON_MAX_TEXTURE_UNITS]; - GLuint last_ReallyEnabled; -+ GLint tcl_mode; - - /* VBI - */ ---- ./src/mesa/drivers/dri/radeon/radeon_context.c.selinux-awareness 2006-04-09 13:48:28.000000000 -0400 -+++ ./src/mesa/drivers/dri/radeon/radeon_context.c 2006-08-22 21:14:45.000000000 -0400 -@@ -471,11 +471,20 @@ - } - - if (rmesa->radeonScreen->chip_flags & RADEON_CHIPSET_TCL) { -- if (tcl_mode >= DRI_CONF_TCL_VTXFMT) -- radeonVtxfmtInit( ctx, tcl_mode >= DRI_CONF_TCL_CODEGEN ); -+ void *test = NULL; -+ if ((test = _mesa_exec_malloc(64))) { -+ if (tcl_mode >= DRI_CONF_TCL_VTXFMT) -+ radeonVtxfmtInit( ctx, tcl_mode >= DRI_CONF_TCL_CODEGEN ); -+ } else { -+ tcl_mode = DRI_CONF_TCL_PIPELINED; -+ } -+ if (test) -+ _mesa_exec_free(test); - - _tnl_need_dlist_norm_lengths( ctx, GL_FALSE ); - } -+ -+ rmesa->tcl_mode = tcl_mode; - return GL_TRUE; - } - -@@ -516,8 +525,7 @@ - } - - if (!(rmesa->TclFallback & RADEON_TCL_FALLBACK_TCL_DISABLE)) { -- int tcl_mode = driQueryOptioni(&rmesa->optionCache, "tcl_mode"); -- if (tcl_mode >= DRI_CONF_TCL_VTXFMT) -+ if (rmesa->tcl_mode >= DRI_CONF_TCL_VTXFMT) - radeonVtxfmtDestroy( rmesa->glCtx ); - } - ---- ./src/mesa/drivers/dri/r200/r200_context.c.selinux-awareness 2006-06-09 20:51:54.000000000 -0400 -+++ ./src/mesa/drivers/dri/r200/r200_context.c 2006-08-22 21:14:45.000000000 -0400 -@@ -546,11 +546,19 @@ - } - - if (rmesa->r200Screen->chip_flags & RADEON_CHIPSET_TCL) { -- if (tcl_mode >= DRI_CONF_TCL_VTXFMT) -- r200VtxfmtInit( ctx, tcl_mode >= DRI_CONF_TCL_CODEGEN ); -+ void *test = NULL; -+ if ((test = _mesa_exec_malloc(64))) { -+ if (tcl_mode >= DRI_CONF_TCL_VTXFMT) -+ r200VtxfmtInit( ctx, tcl_mode >= DRI_CONF_TCL_CODEGEN ); -+ } else { -+ tcl_mode = DRI_CONF_TCL_PIPELINED; -+ } -+ if (test) -+ _mesa_exec_free(test); - - _tnl_need_dlist_norm_lengths( ctx, GL_FALSE ); - } -+ rmesa->tcl_mode = tcl_mode; - return GL_TRUE; - } - -@@ -592,8 +600,7 @@ - } - - if (!(rmesa->TclFallback & R200_TCL_FALLBACK_TCL_DISABLE)) { -- int tcl_mode = driQueryOptioni(&rmesa->optionCache, "tcl_mode"); -- if (tcl_mode >= DRI_CONF_TCL_VTXFMT) -+ if (rmesa->tcl_mode >= DRI_CONF_TCL_VTXFMT) - r200VtxfmtDestroy( rmesa->glCtx ); - } - ---- ./src/mesa/drivers/dri/r200/r200_context.h.selinux-awareness 2006-07-20 12:49:57.000000000 -0400 -+++ ./src/mesa/drivers/dri/r200/r200_context.h 2006-08-22 21:14:45.000000000 -0400 -@@ -990,6 +990,7 @@ - GLuint TexGenEnabled; - GLuint TexGenCompSel; - GLmatrix tmpmat; -+ GLint tcl_mode; - - /* VBI / buffer swap - */ ---- ./src/mesa/shader/slang/slang_execute_x86.c.selinux-awareness 2006-08-09 16:05:26.000000000 -0400 -+++ ./src/mesa/shader/slang/slang_execute_x86.c 2006-08-22 21:14:45.000000000 -0400 -@@ -674,7 +674,8 @@ - * The built-in library occupies 450K, so we can be safe for now. - * It is going to change in the future, when we get assembly analysis running. - */ -- x86_init_func_size(&G.f, 1048576); -+ if (!x86_init_func_size (&G.f, 1048576)) -+ return 0; - G.r_eax = x86_make_reg(file_REG32, reg_AX); - G.r_ecx = x86_make_reg(file_REG32, reg_CX); - G.r_edx = x86_make_reg(file_REG32, reg_DX); ---- ./configs/linux-dri.selinux-awareness 2006-08-22 21:14:45.000000000 -0400 -+++ ./configs/linux-dri 2006-08-22 21:14:45.000000000 -0400 -@@ -38,7 +38,8 @@ - - LIBDRM_CFLAGS = `pkg-config --cflags libdrm` - LIBDRM_LIB = `pkg-config --libs libdrm` --DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) -+DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) \ -+ -lselinux - GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ - $(LIBDRM_LIB) - diff --git a/mesa-6.5.2-fix-glut-demos.patch b/mesa-6.5.2-fix-glut-demos.patch deleted file mode 100644 index 1ee70d7..0000000 --- a/mesa-6.5.2-fix-glut-demos.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Xavier Bachelot -Date: Fri, 6 Jul 2007 18:56:21 +0000 (-0600) -Subject: call glutInit(), bug 11486 -X-Git-Url: http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commitdiff;h=f98bdfca574478837b33c97d131dad4833e3ee12 - -call glutInit(), bug 11486 ---- - ---- a/progs/demos/geartrain.c -+++ b/progs/demos/geartrain.c -@@ -1053,6 +1053,7 @@ main (int argc, char *argv[]) - else - file = argv[1]; - -+ glutInit(&argc, argv); - glutInitWindowPosition (0, 0); - glutInitWindowSize(640,480); - glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); ---- a/progs/demos/gltestperf.c -+++ b/progs/demos/gltestperf.c -@@ -569,6 +569,7 @@ main(int ac, char **av) - if (ac == 2) - frontbuffer = 0; - -+ glutInit(&ac, av); - glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); - glutInitWindowPosition(0, 0); - glutInitWindowSize(640, 480); ---- a/progs/demos/isosurf.c -+++ b/progs/demos/isosurf.c -@@ -1042,6 +1042,7 @@ int main(int argc, char **argv) - - read_surface( "isosurf.dat" ); - -+ glutInit( &argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(400, 400); - ---- a/progs/demos/morph3d.c -+++ b/progs/demos/morph3d.c -@@ -826,7 +826,7 @@ static void pinit(void) - - } - --static void INIT(void) -+int main(int argc, char **argv) - { - printf("Morph 3D - Shows morphing platonic polyhedra\n"); - printf("Author: Marcelo Fernandes Vianna (vianna@cat.cbpf.br)\n\n"); -@@ -841,6 +841,7 @@ static void INIT(void) - - object=1; - -+ glutInit(&argc, argv); - glutInitWindowPosition(0,0); - glutInitWindowSize(640,480); - -@@ -888,9 +889,3 @@ static void INIT(void) - glutMainLoop(); - - } -- --int main(int argc, char **argv) --{ -- INIT(); -- return(0); --} ---- a/progs/demos/winpos.c -+++ b/progs/demos/winpos.c -@@ -100,6 +100,7 @@ static void init( void ) - - int main( int argc, char *argv[] ) - { -+ glutInit(&argc, argv); - glutInitWindowPosition(0, 0); - glutInitWindowSize(500, 500); - glutInitDisplayMode( GLUT_RGB ); diff --git a/mesa-6.5.2-libgl-visibility.patch b/mesa-6.5.2-libgl-visibility.patch deleted file mode 100644 index 38f691b..0000000 --- a/mesa-6.5.2-libgl-visibility.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- Mesa-6.5.2/src/glx/x11/dri_glx.c.libgl-visibility 2006-08-17 10:09:03.000000000 -0400 -+++ Mesa-6.5.2/src/glx/x11/dri_glx.c 2007-02-26 11:21:01.000000000 -0500 -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include "glheader.h" - #include "glxclient.h" - #include "xf86dri.h" - #include "sarea.h" -@@ -338,7 +339,7 @@ - * The returned char pointer points to a static array that will be - * overwritten by subsequent calls. - */ --const char *glXGetScreenDriver (Display *dpy, int scrNum) { -+PUBLIC const char *glXGetScreenDriver (Display *dpy, int scrNum) { - static char ret[32]; - char *driverName; - if (GetDriverName(dpy, scrNum, &driverName)) { -@@ -367,7 +368,7 @@ - * - * Note: The driver remains opened after this function returns. - */ --const char *glXGetDriverConfig (const char *driverName) { -+PUBLIC const char *glXGetDriverConfig (const char *driverName) { - __DRIdriver *driver = OpenDriver (driverName); - if (driver) - return dlsym (driver->handle, "__driConfigOptions"); ---- Mesa-6.5.2/src/glx/x11/glxext.c.libgl-visibility 2006-11-15 09:55:47.000000000 -0500 -+++ Mesa-6.5.2/src/glx/x11/glxext.c 2007-02-26 11:11:57.000000000 -0500 -@@ -1417,7 +1417,7 @@ - - /************************************************************************/ - --GLXContext glXGetCurrentContext(void) -+PUBLIC GLXContext glXGetCurrentContext(void) - { - GLXContext cx = __glXGetCurrentContext(); - -@@ -1428,7 +1428,7 @@ - } - } - --GLXDrawable glXGetCurrentDrawable(void) -+PUBLIC GLXDrawable glXGetCurrentDrawable(void) - { - GLXContext gc = __glXGetCurrentContext(); - return gc->currentDrawable; diff --git a/mesa-6.5.2-picify-dri-drivers.patch b/mesa-6.5.2-picify-dri-drivers.patch deleted file mode 100644 index 5eee783..0000000 --- a/mesa-6.5.2-picify-dri-drivers.patch +++ /dev/null @@ -1,136 +0,0 @@ ---- Mesa-6.5.2/src/mesa/x86/mmx_blend.S.picify 2006-04-17 14:58:24.000000000 -0400 -+++ Mesa-6.5.2/src/mesa/x86/mmx_blend.S 2007-03-02 15:50:07.000000000 -0500 -@@ -303,7 +303,7 @@ - #define LLTAG(x) LLBL2(x,_min) - - #define INIT \ -- MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ -+ MOVQ ( CONTENT(const_80@GOTOFF(%ebx)), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ - - #define MAIN( rgba, dest ) \ - GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ -@@ -327,7 +327,7 @@ - #define LLTAG(x) LLBL2(x,_max) - - #define INIT \ -- MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ -+ MOVQ ( CONTENT(const_80@GOTOFF(%ebx)), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ - - #define MAIN( rgba, dest ) \ - GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ -@@ -352,7 +352,7 @@ - - #define INIT \ - PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */ ;\ -- MOVQ ( CONTENT(const_0080), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */ -+ MOVQ ( CONTENT(const_0080@GOTOFF(%ebx)), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */ - - #define MAIN( rgba, dest ) \ - GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ ---- Mesa-6.5.2/src/mesa/x86/mmx_blendtmp.h.picify 2005-01-04 09:33:47.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/x86/mmx_blendtmp.h 2007-03-02 16:03:46.000000000 -0500 -@@ -26,12 +26,12 @@ - CMP_L ( CONST(0), ECX) - JE ( LLTAG(GMB_return) ) - -+ INIT -+ - MOV_L ( REGOFF(16, EBP), EBX ) /* mask */ - MOV_L ( REGOFF(20, EBP), EDI ) /* rgba */ - MOV_L ( REGOFF(24, EBP), ESI ) /* dest */ - -- INIT -- - TEST_L ( CONST(4), EDI ) /* align rgba on an 8-byte boundary */ - JZ ( LLTAG(GMB_align_end) ) - ---- Mesa-6.5.2/src/mesa/x86/read_rgba_span_x86.S.picify 2006-04-17 14:58:24.000000000 -0400 -+++ Mesa-6.5.2/src/mesa/x86/read_rgba_span_x86.S 2007-03-02 15:50:07.000000000 -0500 -@@ -84,8 +84,8 @@ - #ifdef USE_INNER_EMMS - emms - #endif -- movq mask, %mm1 -- movq mask+16, %mm2 -+ movq mask@GOTOFF(%ebx), %mm1 -+ movq mask+16@GOTOFF(%ebx), %mm2 - - movl 8(%esp), %ebx /* source pointer */ - movl 16(%esp), %edx /* number of pixels to copy */ -@@ -182,8 +182,8 @@ - #ifdef USE_INNER_EMMS - emms - #endif -- movq mask, %mm1 -- movq mask+16, %mm2 -+ movq mask@GOTOFF(%ebx), %mm1 -+ movq mask+16@GOTOFF(%ebx), %mm2 - - movl 16(%esp), %ebx /* source pointer */ - movl 24(%esp), %edx /* number of pixels to copy */ -@@ -341,8 +341,8 @@ - pushl %esi - pushl %ebx - -- movdqa mask, %xmm1 -- movdqa mask+16, %xmm2 -+ movdqa mask@GOTOFF(%ebx), %xmm1 -+ movdqa mask+16@GOTOFF(%ebx), %xmm2 - - movl 12(%esp), %ebx /* source pointer */ - movl 20(%esp), %edx /* number of pixels to copy */ -@@ -530,9 +530,9 @@ - movl 8(%esp), %edx /* destination pointer */ - movl 12(%esp), %ecx /* number of pixels to copy */ - -- movq mask_565, %mm5 -- movq prescale, %mm6 -- movq scale, %mm7 -+ movq mask_565@GOTOFF(%ebx), %mm5 -+ movq prescale@GOTOFF(%ebx), %mm6 -+ movq scale@GOTOFF(%ebx), %mm7 - - sarl $2, %ecx - jle .L01 /* Bail early if the count is negative. */ -@@ -581,8 +581,8 @@ - /* Always set the alpha value to 0xff. - */ - -- por alpha, %mm0 -- por alpha, %mm2 -+ por alpha@GOTOFF(%ebx), %mm0 -+ por alpha@GOTOFF(%ebx), %mm2 - - - /* Pack the 16-bit values to 8-bit values and store the converted -@@ -609,8 +609,8 @@ - pmulhuw %mm7, %mm0 - pmulhuw %mm7, %mm2 - -- por alpha, %mm0 -- por alpha, %mm2 -+ por alpha@GOTOFF(%ebx), %mm0 -+ por alpha@GOTOFF(%ebx), %mm2 - - packuswb %mm2, %mm0 - -@@ -647,8 +647,8 @@ - pmulhuw %mm7, %mm0 - pmulhuw %mm7, %mm2 - -- por alpha, %mm0 -- por alpha, %mm2 -+ por alpha@GOTOFF(%ebx), %mm0 -+ por alpha@GOTOFF(%ebx), %mm2 - - packuswb %mm2, %mm0 - -@@ -675,7 +675,7 @@ - #endif - pmulhuw %mm7, %mm0 - -- por alpha, %mm0 -+ por alpha@GOTOFF(%ebx), %mm0 - - packuswb %mm0, %mm0 - diff --git a/mesa-6.5.2-r300-parallel-build.patch b/mesa-6.5.2-r300-parallel-build.patch deleted file mode 100644 index dd5d4d0..0000000 --- a/mesa-6.5.2-r300-parallel-build.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- Mesa-6.5.2/src/mesa/drivers/dri/r300/Makefile.jx 2006-04-06 12:48:36.000000000 -0400 -+++ Mesa-6.5.2/src/mesa/drivers/dri/r300/Makefile 2007-02-20 12:23:12.000000000 -0500 -@@ -90,9 +90,11 @@ - - include ../Makefile.template - --$(SYMLINKS): -+server: - mkdir -p server -- for i in $(SYMLINKS) ; do rm -f $$i && test -f ../radeon/$$i && ln -s ../../radeon/$$i $$i ; done -+ -+$(SYMLINKS): server -+ @[ -e $@ ] || ln -sf ../../radeon/$@ server/ - - $(COMMON_SYMLINKS): - @[ -e $@ ] || ln -sf ../radeon/$@ ./ diff --git a/mesa-6.5.2-radeon-backports-231787.patch b/mesa-6.5.2-radeon-backports-231787.patch deleted file mode 100644 index 87d22b8..0000000 --- a/mesa-6.5.2-radeon-backports-231787.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff -up Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_state.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_state.c ---- Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_state.c.radeon-231787 2006-11-15 09:55:48.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_state.c 2007-07-09 14:35:28.000000000 -0400 -@@ -185,6 +185,8 @@ void radeonSetCliprects(radeonContextPtr - - if (radeon->state.scissor.enabled) - radeonRecalcScissorRects(radeon); -+ -+ radeon->lastStamp = drawable->lastStamp; - } - - -diff -up Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_context.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_context.c ---- Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_context.c.radeon-231787 2006-11-15 09:55:48.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_context.c 2007-07-09 14:37:08.000000000 -0400 -@@ -51,6 +51,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE - #include "radeon_macros.h" - #include "radeon_reg.h" - -+#include "radeon_state.h" - #include "r300_state.h" - - #include "utils.h" -@@ -272,11 +273,13 @@ GLboolean radeonMakeCurrent(__DRIcontext - &radeon->vbl_seq); - } - -+ radeon->dri.readable = driReadPriv; -+ - if (radeon->dri.drawable != driDrawPriv || -- radeon->dri.readable != driReadPriv) { -+ radeon->lastStamp != driDrawPriv->lastStamp) { - radeon->dri.drawable = driDrawPriv; -- radeon->dri.readable = driReadPriv; - -+ radeonSetCliprects(radeon); - r300UpdateWindow(radeon->glCtx); - r300UpdateViewportOffset(radeon->glCtx); - } -diff -up Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_lock.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_lock.c ---- Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_lock.c.radeon-231787 2006-11-01 13:52:11.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/drivers/dri/r300/radeon_lock.c 2007-07-09 14:35:28.000000000 -0400 -@@ -90,7 +90,6 @@ static void r300RegainedLock(radeonConte - #else - radeonUpdateScissor(radeon->glCtx); - #endif -- radeon->lastStamp = drawable->lastStamp; - } - - if (sarea->ctx_owner != radeon->dri.hwContext) { -diff -up Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_state.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_state.c ---- Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_state.c.radeon-231787 2006-11-01 13:52:11.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_state.c 2007-07-09 14:35:28.000000000 -0400 -@@ -1676,6 +1676,8 @@ void radeonSetCliprects( radeonContextPt - - if (rmesa->state.scissor.enabled) - radeonRecalcScissorRects( rmesa ); -+ -+ rmesa->lastStamp = drawable->lastStamp; - } - - -diff -up Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_context.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_context.c ---- Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_context.c.radeon-231787 2007-07-09 14:35:28.000000000 -0400 -+++ Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_context.c 2007-07-09 14:35:28.000000000 -0400 -@@ -615,12 +615,14 @@ radeonMakeCurrent( __DRIcontextPrivate * - driDrawableInitVBlank( driDrawPriv, newCtx->vblank_flags, - &newCtx->vbl_seq ); - } -- -- if ( (newCtx->dri.drawable != driDrawPriv) -- || (newCtx->dri.readable != driReadPriv) ) { -+ -+ newCtx->dri.readable = driReadPriv; -+ -+ if ( (newCtx->dri.drawable != driDrawPriv) || -+ newCtx->lastStamp != driDrawPriv->lastStamp ) { - newCtx->dri.drawable = driDrawPriv; -- newCtx->dri.readable = driReadPriv; - -+ radeonSetCliprects(newCtx); - radeonUpdateWindow( newCtx->glCtx ); - radeonUpdateViewportOffset( newCtx->glCtx ); - } -diff -up Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_lock.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_lock.c ---- Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_lock.c.radeon-231787 2006-10-19 10:32:06.000000000 -0400 -+++ Mesa-6.5.2/src/mesa/drivers/dri/radeon/radeon_lock.c 2007-07-09 14:35:28.000000000 -0400 -@@ -96,7 +96,6 @@ void radeonGetLock( radeonContextPtr rme - radeonSetCliprects( rmesa ); - radeonUpdateViewportOffset( rmesa->glCtx ); - driUpdateFramebufferSize(rmesa->glCtx, drawable); -- rmesa->lastStamp = drawable->lastStamp; - } - - RADEON_STATECHANGE( rmesa, ctx ); -diff -up Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_state.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_state.c ---- Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_state.c.radeon-231787 2006-11-15 14:54:40.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_state.c 2007-07-09 14:35:28.000000000 -0400 -@@ -1890,6 +1890,8 @@ void r200SetCliprects( r200ContextPtr rm - - if (rmesa->state.scissor.enabled) - r200RecalcScissorRects( rmesa ); -+ -+ rmesa->lastStamp = drawable->lastStamp; - } - - -diff -up Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_context.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_context.c ---- Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_context.c.radeon-231787 2007-07-09 14:35:28.000000000 -0400 -+++ Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_context.c 2007-07-09 14:35:28.000000000 -0400 -@@ -694,11 +694,13 @@ r200MakeCurrent( __DRIcontextPrivate *dr - &newCtx->vbl_seq ); - } - -+ newCtx->dri.readable = driReadPriv; -+ - if ( newCtx->dri.drawable != driDrawPriv || -- newCtx->dri.readable != driReadPriv ) { -+ newCtx->lastStamp != driDrawPriv->lastStamp ) { - newCtx->dri.drawable = driDrawPriv; -- newCtx->dri.readable = driReadPriv; - -+ r200SetCliprects(newCtx, GL_BACK_LEFT); - r200UpdateWindow( newCtx->glCtx ); - r200UpdateViewportOffset( newCtx->glCtx ); - } -diff -up Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_lock.c.radeon-231787 Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_lock.c ---- Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_lock.c.radeon-231787 2006-11-15 14:54:40.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/drivers/dri/r200/r200_lock.c 2007-07-09 14:35:28.000000000 -0400 -@@ -98,7 +98,6 @@ void r200GetLock( r200ContextPtr rmesa, - r200SetCliprects( rmesa, GL_FRONT_LEFT ); - r200UpdateViewportOffset( rmesa->glCtx ); - driUpdateFramebufferSize(rmesa->glCtx, drawable); -- rmesa->lastStamp = drawable->lastStamp; - } - - R200_STATECHANGE( rmesa, ctx ); -diff -up Mesa-6.5.2/src/mesa/main/texstore.c.radeon-231787 Mesa-6.5.2/src/mesa/main/texstore.c ---- Mesa-6.5.2/src/mesa/main/texstore.c.radeon-231787 2006-11-02 17:57:11.000000000 -0500 -+++ Mesa-6.5.2/src/mesa/main/texstore.c 2007-07-09 14:35:28.000000000 -0400 -@@ -808,7 +808,8 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx - - /* _mesa_printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */ - -- if (srcRowStride == srcWidth * srcComponents && -+ if (srcRowStride == dstRowStride && -+ srcRowStride == srcWidth * srcComponents && - dimensions < 3) { - /* 1 and 2D images only */ - GLubyte *dstImage = (GLubyte *) dstAddr diff --git a/mesa-6.5.2-via-respect-my-cliplist.patch b/mesa-6.5.2-via-respect-my-cliplist.patch deleted file mode 100644 index 02f3b91..0000000 --- a/mesa-6.5.2-via-respect-my-cliplist.patch +++ /dev/null @@ -1,218 +0,0 @@ -From: Miguel Marte -Date: Sun, 18 Mar 2007 17:08:29 +0000 (-0600) -Subject: screen offset changes, bug 9965 -X-Git-Tag: pre-merge-glsl-compiler-1 -X-Git-Url: http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commitdiff;h=c41d6ab6f062ebce1076ca79f9ad0c7368a0e2d0 - -screen offset changes, bug 9965 ---- - ---- a/src/mesa/drivers/dri/unichrome/via_context.c -+++ b/src/mesa/drivers/dri/unichrome/via_context.c -@@ -768,9 +768,7 @@ void viaXMesaWindowMoved(struct via_cont - drawable); - } - -- draw_buffer->drawXoff = (GLuint)(((drawable->x * bytePerPixel) & 0x1f) / -- bytePerPixel); -- draw_buffer->drawX = drawable->x - draw_buffer->drawXoff; -+ draw_buffer->drawX = drawable->x; - draw_buffer->drawY = drawable->y; - draw_buffer->drawW = drawable->w; - draw_buffer->drawH = drawable->h; -@@ -782,9 +780,7 @@ void viaXMesaWindowMoved(struct via_cont - readable); - } - -- read_buffer->drawXoff = (GLuint)(((readable->x * bytePerPixel) & 0x1f) / -- bytePerPixel); -- read_buffer->drawX = readable->x - read_buffer->drawXoff; -+ read_buffer->drawX = readable->x; - read_buffer->drawY = readable->y; - read_buffer->drawW = readable->w; - read_buffer->drawH = readable->h; -@@ -795,13 +791,24 @@ void viaXMesaWindowMoved(struct via_cont - draw_buffer->drawX * bytePerPixel); - - vmesa->front.origMap = (vmesa->front.map + -- draw_buffer->drawY * vmesa->front.pitch + -- draw_buffer->drawX * bytePerPixel); -+ draw_buffer->drawY * vmesa->front.pitch + -+ draw_buffer->drawX * bytePerPixel); -+ -+ vmesa->back.orig = (vmesa->back.offset + -+ draw_buffer->drawY * vmesa->back.pitch + -+ draw_buffer->drawX * bytePerPixel); - -- vmesa->back.orig = vmesa->back.offset; -- vmesa->depth.orig = vmesa->depth.offset; -- vmesa->back.origMap = vmesa->back.map; -- vmesa->depth.origMap = vmesa->depth.map; -+ vmesa->back.origMap = (vmesa->back.map + -+ draw_buffer->drawY * vmesa->back.pitch + -+ draw_buffer->drawX * bytePerPixel); -+ -+ vmesa->depth.orig = (vmesa->depth.offset + -+ draw_buffer->drawY * vmesa->depth.pitch + -+ draw_buffer->drawX * bytePerPixel); -+ -+ vmesa->depth.origMap = (vmesa->depth.map + -+ draw_buffer->drawY * vmesa->depth.pitch + -+ draw_buffer->drawX * bytePerPixel); - - viaCalcViewport(vmesa->glCtx); - } ---- a/src/mesa/drivers/dri/unichrome/via_context.h -+++ b/src/mesa/drivers/dri/unichrome/via_context.h -@@ -104,11 +104,6 @@ struct via_renderbuffer { - int drawW; - int drawH; - -- int drawXoff; /* drawX is 32byte aligned - this is -- * the delta to the real origin, in -- * pixel units. -- */ -- - __DRIdrawablePrivate *dPriv; - }; - ---- a/src/mesa/drivers/dri/unichrome/via_ioctl.c -+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c -@@ -187,7 +187,7 @@ static void viaFillBuffer(struct via_con - int w = pbox[i].x2 - pbox[i].x1; - int h = pbox[i].y2 - pbox[i].y1; - -- int offset = (buffer->orig + -+ int offset = (buffer->offset + - y * buffer->pitch + - x * bytePerPixel); - -@@ -276,7 +276,7 @@ static void viaClear(GLcontext *ctx, GLb - - /* flip top to bottom */ - cy = dPriv->h - cy - ch; -- cx += vrb->drawX + vrb->drawXoff; -+ cx += vrb->drawX; - cy += vrb->drawY; - - if (!all) { -@@ -359,8 +359,8 @@ static void viaDoSwapBuffers(struct via_ - GLint w = b->x2 - b->x1; - GLint h = b->y2 - b->y1; - -- GLuint src = back->orig + y * back->pitch + x * bytePerPixel; -- GLuint dest = front->orig + y * front->pitch + x * bytePerPixel; -+ GLuint src = back->offset + y * back->pitch + x * bytePerPixel; -+ GLuint dest = front->offset + y * front->pitch + x * bytePerPixel; - - viaBlit(vmesa, - bytePerPixel << 3, -@@ -747,7 +747,7 @@ static void via_emit_cliprect(struct via - : HC_HDBFM_RGB565); - - GLuint pitch = buffer->pitch; -- GLuint offset = buffer->orig; -+ GLuint offset = buffer->offset; - - if (0) - fprintf(stderr, "emit cliprect for box %d,%d %d,%d\n", -@@ -768,7 +768,7 @@ static void via_emit_cliprect(struct via - vb[4] = (HC_SubA_HDBBasL << 24) | (offset & 0xFFFFFF); - vb[5] = (HC_SubA_HDBBasH << 24) | ((offset & 0xFF000000) >> 24); - -- vb[6] = (HC_SubA_HSPXYOS << 24) | ((31 - buffer->drawXoff) << HC_HSPXOS_SHIFT); -+ vb[6] = (HC_SubA_HSPXYOS << 24); - vb[7] = (HC_SubA_HDBFM << 24) | HC_HDBLoc_Local | format | pitch; - } - -@@ -887,22 +887,18 @@ void viaFlushDmaLocked(struct via_contex - struct via_renderbuffer *const vrb = - (struct via_renderbuffer *) dPriv->driverPrivate; - -- - for (i = 0; i < vmesa->numClipRects; i++) { - drm_clip_rect_t b; - -- b.x1 = pbox[i].x1 - (vrb->drawX + vrb->drawXoff); -- b.x2 = pbox[i].x2 - (vrb->drawX + vrb->drawXoff); -- b.y1 = pbox[i].y1 - vrb->drawY; -- b.y2 = pbox[i].y2 - vrb->drawY; -+ b.x1 = pbox[i].x1; -+ b.x2 = pbox[i].x2; -+ b.y1 = pbox[i].y1; -+ b.y2 = pbox[i].y2; - - if (vmesa->scissor && - !intersect_rect(&b, &b, &vmesa->scissorRect)) - continue; - -- b.x1 += vrb->drawXoff; -- b.x2 += vrb->drawXoff; -- - via_emit_cliprect(vmesa, &b); - - if (fire_buffer(vmesa) != 0) { ---- a/src/mesa/drivers/dri/unichrome/via_span.c -+++ b/src/mesa/drivers/dri/unichrome/via_span.c -@@ -46,7 +46,7 @@ - GLuint pitch = vrb->pitch; \ - GLuint height = dPriv->h; \ - GLint p = 0; \ -- char *buf = (char *)(vrb->origMap + vrb->drawXoff * vrb->bpp); \ -+ char *buf = (char *)(vrb->origMap); \ - (void) p; - - /* ================================================================ -@@ -82,7 +82,7 @@ - __DRIdrawablePrivate *dPriv = vrb->dPriv; \ - GLuint depth_pitch = vrb->pitch; \ - GLuint height = dPriv->h; \ -- char *buf = (char *)(vrb->map + (vrb->drawXoff * vrb->bpp/8)) -+ char *buf = (char *)(vrb->map) - - #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS - ---- a/src/mesa/drivers/dri/unichrome/via_state.c -+++ b/src/mesa/drivers/dri/unichrome/via_state.c -@@ -500,10 +500,8 @@ void viaEmitState(struct via_context *vm - - OUT_RING( HC_HEADER2 ); - OUT_RING( (HC_ParaType_NotTex << 16) ); -- OUT_RING( (HC_SubA_HSPXYOS << 24) | -- (((32- vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT)); -- OUT_RING( (HC_SubA_HSPXYOS << 24) | -- (((32 - vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT)); -+ OUT_RING( (HC_SubA_HSPXYOS << 24) ); -+ OUT_RING( (HC_SubA_HSPXYOS << 24) ); - - ADVANCE_RING(); - } -@@ -712,12 +710,8 @@ static void viaColorMask(GLcontext *ctx, - } - - --/* ============================================================= -- */ - -- --/* Using drawXoff like this is incorrect outside of locked regions. -- * This hardware just isn't capable of private back buffers without -+/* This hardware just isn't capable of private back buffers without - * glitches and/or a hefty locking scheme. - */ - void viaCalcViewport(GLcontext *ctx) -@@ -729,12 +723,10 @@ void viaCalcViewport(GLcontext *ctx) - const GLfloat *v = ctx->Viewport._WindowMap.m; - GLfloat *m = vmesa->ViewportMatrix.m; - -- /* See also via_translate_vertex. -- */ - m[MAT_SX] = v[MAT_SX]; -- m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X + vrb->drawXoff; -+ m[MAT_TX] = v[MAT_TX] + vrb->drawX + SUBPIXEL_X; - m[MAT_SY] = - v[MAT_SY]; -- m[MAT_TY] = - v[MAT_TY] + dPriv->h + SUBPIXEL_Y; -+ m[MAT_TY] = - v[MAT_TY] + vrb->drawY + SUBPIXEL_Y + vrb->drawH; - m[MAT_SZ] = v[MAT_SZ] * (1.0 / vmesa->depth_max); - m[MAT_TZ] = v[MAT_TZ] * (1.0 / vmesa->depth_max); - } diff --git a/mesa-6.5.1-build-config.patch b/mesa-7.0-build-config.patch similarity index 63% rename from mesa-6.5.1-build-config.patch rename to mesa-7.0-build-config.patch index a29982d..0dc466e 100644 --- a/mesa-6.5.1-build-config.patch +++ b/mesa-7.0-build-config.patch @@ -1,6 +1,179 @@ ---- Mesa-6.5.2/configs/linux-osmesa32.build-config 2006-07-12 22:43:20.000000000 -0400 -+++ Mesa-6.5.2/configs/linux-osmesa32 2007-03-02 10:22:16.000000000 -0500 -@@ -7,8 +7,10 @@ +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++ @@ -13,7 +186,7 @@ # Library names -@@ -17,12 +19,12 @@ +@@ -17,12 +19,12 @@ OSMESA_LIB_NAME = libOSMesa32.so # Directories @@ -28,9 +201,10 @@ +OSMESA_LIB_DEPS = -lm -lpthread -lselinux GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) APP_LIB_DEPS = -lOSMesa32 ---- Mesa-6.5.2/configs/linux-osmesa.build-config 2006-07-12 22:43:20.000000000 -0400 -+++ Mesa-6.5.2/configs/linux-osmesa 2007-03-02 10:22:16.000000000 -0500 -@@ -9,17 +9,18 @@ +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++ @@ -55,168 +229,3 @@ +OSMESA_LIB_DEPS = -lm -lpthread -lselinux GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) APP_LIB_DEPS = -lOSMesa -lGLU ---- Mesa-6.5.2/configs/default.build-config 2006-10-22 13:20:22.000000000 -0400 -+++ Mesa-6.5.2/configs/default 2007-03-02 10:17:24.000000000 -0500 -@@ -58,8 +58,8 @@ - - - # Directories to build --LIB_DIR = lib --SRC_DIRS = mesa glu glut/glx glw -+LIB_DIR ?= lib -+SRC_DIRS = mesa glu glut/glx - GLU_DIRS = sgi - DRIVER_DIRS = x11 osmesa - # Which subdirs under $(TOP)/progs/ to enter: -@@ -72,14 +72,14 @@ - 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) ---- Mesa-6.5.2/configs/linux-dri-x86.build-config 2005-09-12 11:03:11.000000000 -0400 -+++ Mesa-6.5.2/configs/linux-dri-x86 2007-03-02 10:17:24.000000000 -0500 -@@ -6,7 +6,7 @@ - CONFIG_NAME = linux-dri-x86 - - # Unnecessary on x86, generally. --PIC_FLAGS = -+# PIC_FLAGS = - - # Add -m32 to CFLAGS: - ARCH_FLAGS = -m32 ---- Mesa-6.5.2/configs/linux-dri.build-config 2006-11-01 19:44:25.000000000 -0500 -+++ Mesa-6.5.2/configs/linux-dri 2007-03-02 10:17:24.000000000 -0500 -@@ -12,8 +12,9 @@ - #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 @@ - -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 @@ - 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` -@@ -53,10 +52,10 @@ - - # 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 glut/glx - PROGRAM_DIRS = - endif - -@@ -66,4 +65,4 @@ - # 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 ---- Mesa-6.5.2/configs/linux-indirect.build-config 2006-10-13 09:37:09.000000000 -0400 -+++ Mesa-6.5.2/configs/linux-indirect 2007-03-02 10:22:44.000000000 -0500 -@@ -15,7 +15,7 @@ - #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 @@ - - - # Directories --SRC_DIRS = glx/x11 glu glut/glx glw -+SRC_DIRS = glx/x11 glu glut/glx - DRIVER_DIRS = - PROGRAM_DIRS = - WINDOW_SYSTEM=dri ---- Mesa-6.5.2/configs/linux.build-config 2006-09-28 21:23:11.000000000 -0400 -+++ Mesa-6.5.2/configs/linux 2007-03-02 10:17:24.000000000 -0500 -@@ -8,7 +8,9 @@ - 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 ---- Mesa-6.5.2/configs/linux-dri-ppc.build-config 2005-08-19 18:03:05.000000000 -0400 -+++ Mesa-6.5.2/configs/linux-dri-ppc 2007-03-02 10:17:24.000000000 -0500 -@@ -5,7 +5,7 @@ - - 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 ---- Mesa-6.5.2/configs/linux-osmesa16.build-config 2006-07-12 22:43:20.000000000 -0400 -+++ Mesa-6.5.2/configs/linux-osmesa16 2007-03-02 10:22:16.000000000 -0500 -@@ -7,8 +7,10 @@ - # 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 @@ - - - # 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 --git a/mesa-7.0-i-already-defined-glapi-you-twit.patch b/mesa-7.0-i-already-defined-glapi-you-twit.patch new file mode 100644 index 0000000..62321fc --- /dev/null +++ b/mesa-7.0-i-already-defined-glapi-you-twit.patch @@ -0,0 +1,23 @@ +diff -up mesa-20070725/include/GL/glu.h.jx mesa-20070725/include/GL/glu.h +--- mesa-20070725/include/GL/glu.h.jx 2007-07-25 09:36:03.000000000 -0400 ++++ mesa-20070725/include/GL/glu.h 2007-07-25 10:27:49.000000000 -0400 +@@ -44,19 +44,6 @@ + #define GLAPIENTRYP GLAPIENTRY * + #endif + +-#ifdef GLAPI +-#undef GLAPI +-#endif +- +-# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32) +-# define GLAPI __declspec(dllexport) +-# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ +-# define GLAPI __declspec(dllimport) +-# else /* for use with static link lib build of Win32 edition only */ +-# define GLAPI extern +-# endif /* _STATIC_MESA support */ +- +- + #ifndef GLAPI + #define GLAPI + #endif diff --git a/mesa-7.0-selinux-awareness.patch b/mesa-7.0-selinux-awareness.patch new file mode 100644 index 0000000..dcce752 --- /dev/null +++ b/mesa-7.0-selinux-awareness.patch @@ -0,0 +1,134 @@ +diff -up Mesa-7.0/src/mesa/tnl/t_vertex_sse.c.jx Mesa-7.0/src/mesa/tnl/t_vertex_sse.c +--- Mesa-7.0/src/mesa/tnl/t_vertex_sse.c.jx 2007-06-21 18:10:54.000000000 -0400 ++++ Mesa-7.0/src/mesa/tnl/t_vertex_sse.c 2007-07-23 15:59:26.000000000 -0400 +@@ -348,7 +348,8 @@ static GLboolean build_vertex_emit( stru + struct x86_reg vp1 = x86_make_reg(file_XMM, 2); + GLubyte *fixup, *label; + +- x86_init_func(&p->func); ++ if (!x86_init_func(&p->func)) ++ return GL_FALSE; + + /* Push a few regs? + */ +@@ -646,7 +647,10 @@ void _tnl_generate_sse_emit( GLcontext * + p.identity = x86_make_reg(file_XMM, 6); + p.chan0 = x86_make_reg(file_XMM, 7); + +- x86_init_func(&p.func); ++ if (!x86_init_func(&p.func)) { ++ vtx->codegen_emit = NULL; ++ return; ++ } + + if (build_vertex_emit(&p)) { + _tnl_register_fastpath( vtx, GL_TRUE ); +diff -up Mesa-7.0/src/mesa/x86/rtasm/x86sse.h.jx Mesa-7.0/src/mesa/x86/rtasm/x86sse.h +--- Mesa-7.0/src/mesa/x86/rtasm/x86sse.h.jx 2007-06-21 18:10:55.000000000 -0400 ++++ Mesa-7.0/src/mesa/x86/rtasm/x86sse.h 2007-07-23 15:59:23.000000000 -0400 +@@ -80,8 +80,8 @@ enum sse_cc { + */ + + +-void x86_init_func( struct x86_function *p ); +-void x86_init_func_size( struct x86_function *p, GLuint code_size ); ++int x86_init_func( struct x86_function *p ); ++int x86_init_func_size( struct x86_function *p, GLuint code_size ); + void x86_release_func( struct x86_function *p ); + void (*x86_get_func( struct x86_function *p ))( void ); + +diff -up Mesa-7.0/src/mesa/x86/rtasm/x86sse.c.jx Mesa-7.0/src/mesa/x86/rtasm/x86sse.c +--- Mesa-7.0/src/mesa/x86/rtasm/x86sse.c.jx 2007-06-21 18:10:55.000000000 -0400 ++++ Mesa-7.0/src/mesa/x86/rtasm/x86sse.c 2007-07-23 15:59:23.000000000 -0400 +@@ -1063,15 +1063,17 @@ struct x86_reg x86_fn_arg( struct x86_fu + } + + +-void x86_init_func( struct x86_function *p ) ++int x86_init_func( struct x86_function *p ) + { +- x86_init_func_size(p, 1024); ++ return x86_init_func_size(p, 1024); + } + +-void x86_init_func_size( struct x86_function *p, GLuint code_size ) ++int x86_init_func_size( struct x86_function *p, GLuint code_size ) + { + p->store = _mesa_exec_malloc(code_size); + p->csr = p->store; ++ ++ return (p->store != NULL); + } + + void x86_release_func( struct x86_function *p ) +diff -up Mesa-7.0/src/mesa/main/execmem.c.jx Mesa-7.0/src/mesa/main/execmem.c +--- Mesa-7.0/src/mesa/main/execmem.c.jx 2007-06-21 18:10:54.000000000 -0400 ++++ Mesa-7.0/src/mesa/main/execmem.c 2007-07-23 16:02:30.000000000 -0400 +@@ -46,6 +46,7 @@ + #include + #include + #include "mm.h" ++#include + + #define EXEC_HEAP_SIZE (10*1024*1024) + +@@ -55,9 +56,16 @@ static struct mem_block *exec_heap = NUL + static unsigned char *exec_mem = NULL; + + +-static void ++static int + init_heap(void) + { ++ ++ if (is_selinux_enabled()) { ++ if (!security_get_boolean_active("allow_execmem") || ++ !security_get_boolean_pending("allow_execmem")) ++ return 0; ++ } ++ + if (!exec_heap) + exec_heap = mmInit( 0, EXEC_HEAP_SIZE ); + +@@ -65,6 +73,8 @@ init_heap(void) + exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE, + PROT_EXEC | PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); ++ ++ return (exec_mem != NULL); + } + + +@@ -76,7 +86,8 @@ _mesa_exec_malloc(GLuint size) + + _glthread_LOCK_MUTEX(exec_mutex); + +- init_heap(); ++ if (!init_heap()) ++ goto bail; + + if (exec_heap) { + size = (size + 31) & ~31; +@@ -87,7 +98,8 @@ _mesa_exec_malloc(GLuint size) + addr = exec_mem + block->ofs; + else + _mesa_printf("_mesa_exec_malloc failed\n"); +- ++ ++bail: + _glthread_UNLOCK_MUTEX(exec_mutex); + + return addr; +diff -up Mesa-7.0/configs/linux-dri.jx Mesa-7.0/configs/linux-dri +--- Mesa-7.0/configs/linux-dri.jx 2007-07-23 15:59:07.000000000 -0400 ++++ Mesa-7.0/configs/linux-dri 2007-07-23 17:37:36.000000000 -0400 +@@ -39,7 +39,8 @@ EXTRA_LIB_PATH = + + LIBDRM_CFLAGS = `pkg-config --cflags libdrm` + LIBDRM_LIB = `pkg-config --libs libdrm` +-DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) ++DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) \ ++ -lselinux + GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ + -lm -lpthread -ldl \ + $(LIBDRM_LIB) diff --git a/mesa-7.0-symlinks-before-depend.patch b/mesa-7.0-symlinks-before-depend.patch new file mode 100644 index 0000000..0ea37db --- /dev/null +++ b/mesa-7.0-symlinks-before-depend.patch @@ -0,0 +1,12 @@ +diff -up mesa-20070725/src/mesa/drivers/dri/Makefile.template.jx mesa-20070725/src/mesa/drivers/dri/Makefile.template +--- mesa-20070725/src/mesa/drivers/dri/Makefile.template.jx 2007-07-25 09:36:04.000000000 -0400 ++++ mesa-20070725/src/mesa/drivers/dri/Makefile.template 2007-07-26 10:09:54.000000000 -0400 +@@ -70,7 +70,7 @@ SHARED_INCLUDES = \ + + ##### TARGETS ##### + +-default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME) ++default: symlinks depend $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME) + + + $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template diff --git a/mesa.spec b/mesa.spec index fb1c040..635550f 100644 --- a/mesa.spec +++ b/mesa.spec @@ -31,8 +31,8 @@ Summary: Mesa graphics libraries Name: mesa -Version: 6.5.2 -Release: 16%{?dist} +Version: 7.0.1 +Release: 1%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -42,18 +42,14 @@ Source0: http://internap.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-%{version Source1: http://internap.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-%{version}.tar.bz2 Source2: %{manpages}.tar.bz2 -Patch0: mesa-6.5.1-build-config.patch +Patch0: mesa-7.0-build-config.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-6.5.1-selinux-awareness.patch -Patch19: mesa-6.5.2-r300-parallel-build.patch -Patch20: mesa-6.5.2-libgl-visibility.patch -Patch21: mesa-6.5.2-picify-dri-drivers.patch +Patch18: mesa-7.0-selinux-awareness.patch Patch22: mesa-6.5.2-hush-synthetic-visual-warning.patch Patch23: mesa-6.5.2-bindcontext-paranoia.patch -Patch24: mesa-6.5.2-radeon-backports-231787.patch -Patch25: mesa-6.5.2-via-respect-my-cliplist.patch -Patch26: mesa-6.5.2-fix-glut-demos.patch +Patch24: mesa-7.0-i-already-defined-glapi-you-twit.patch +Patch25: mesa-7.0-symlinks-before-depend.patch BuildRequires: pkgconfig %if %{with_dri} @@ -177,14 +173,10 @@ chmod a-x progs/demos/glslnoise.c %patch4 -p0 -b .dont-libglut-me-harder-ok-thx-bye %patch5 -p1 -b .xserver-1.1-compat %patch18 -p1 -b .selinux-awareness -%patch19 -p1 -b .r300-make-j -%patch20 -p1 -b .libgl-visibility -%patch21 -p1 -b .picify %patch22 -p1 -b .visual-warning %patch23 -p1 -b .bindcontext -%patch24 -p1 -b .radeon-231787 -%patch25 -p1 -b .via-cliplist -%patch26 -p1 -b .glutinit +%patch24 -p1 -b .glapi +%patch25 -p1 -b .makej # WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT # license and are not open source/free software, so we remove them. @@ -336,11 +328,11 @@ rm -rf $RPM_BUILD_ROOT %files libOSMesa %defattr(-,root,root,-) %{_libdir}/libOSMesa.so.6 -%{_libdir}/libOSMesa.so.%{version} +%{_libdir}/libOSMesa.so.6.5.3 %{_libdir}/libOSMesa16.so.6 -%{_libdir}/libOSMesa16.so.%{version} +%{_libdir}/libOSMesa16.so.6.5.3 %{_libdir}/libOSMesa32.so.6 -%{_libdir}/libOSMesa32.so.%{version} +%{_libdir}/libOSMesa32.so.6.5.3 %files libOSMesa-devel %defattr(-,root,root,-) @@ -414,6 +406,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/mesa-demos-data %changelog +* Mon Aug 13 2007 Dave Airlie - 7.0.1-1 +- Rebase to upstream 7.0.1 release +- ajax provided patches: for updated selinux awareness, build config +- gl visibility and picify were fixed upstream +- OS mesa library version are 6.5.3 not 7.0.1 - spec fix + * Wed Jul 25 2007 Jesse Keating - 6.5.2-16 - Rebuild for RH #249435 diff --git a/post-6.5.1-i965-fixes.patch b/post-6.5.1-i965-fixes.patch deleted file mode 100644 index a3d68fc..0000000 --- a/post-6.5.1-i965-fixes.patch +++ /dev/null @@ -1,1061 +0,0 @@ -diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile -index e4fb451..dfa9318 100644 ---- a/src/mesa/drivers/dri/i965/Makefile -+++ b/src/mesa/drivers/dri/i965/Makefile -@@ -16,6 +16,7 @@ DRIVER_SOURCES = \ - intel_regions.c \ - intel_screen.c \ - intel_span.c \ -+ intel_pixel_copy.c \ - intel_state.c \ - intel_tex.c \ - intel_tex_validate.c \ -diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c -index f12fb4c..e476b18 100644 ---- a/src/mesa/drivers/dri/i965/brw_draw.c -+++ b/src/mesa/drivers/dri/i965/brw_draw.c -@@ -328,6 +328,7 @@ static GLboolean brw_try_draw_prims( GLc - brw_emit_prim(brw, &prim[i]); - } - -+ intel->need_flush = GL_TRUE; - retval = GL_TRUE; - } - -@@ -400,7 +401,7 @@ GLboolean brw_draw_prims( GLcontext *ctx - retval = brw_try_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index, flags); - } - -- if (intel->aub_file) { -+ if (intel->aub_file && (INTEL_DEBUG & DEBUG_SYNC)) { - intelFinish( &intel->ctx ); - intel->aub_wrap = 1; - } -diff --git a/src/mesa/drivers/dri/i965/brw_exec_api.c b/src/mesa/drivers/dri/i965/brw_exec_api.c -index ca012db..470fa6f 100644 ---- a/src/mesa/drivers/dri/i965/brw_exec_api.c -+++ b/src/mesa/drivers/dri/i965/brw_exec_api.c -@@ -394,7 +394,7 @@ static void GLAPIENTRY brw_exec_EvalCoor - - for (i = 0 ; i <= BRW_ATTRIB_INDEX ; i++) { - if (exec->eval.map1[i].map) -- if (exec->vtx.attrsz[i] != exec->eval.map1[i].sz) -+ if (exec->vtx.active_sz[i] != exec->eval.map1[i].sz) - brw_exec_fixup_vertex( ctx, i, exec->eval.map1[i].sz ); - } - } -diff --git a/src/mesa/drivers/dri/i965/brw_tex.c b/src/mesa/drivers/dri/i965/brw_tex.c -index d70b2ea..8332d86 100644 ---- a/src/mesa/drivers/dri/i965/brw_tex.c -+++ b/src/mesa/drivers/dri/i965/brw_tex.c -@@ -49,34 +49,57 @@ #include "brw_defines.h" - - static const struct gl_texture_format * - brwChooseTextureFormat( GLcontext *ctx, GLint internalFormat, -- GLenum format, GLenum type ) -+ GLenum srcFormat, GLenum srcType ) - { - switch ( internalFormat ) { - case 4: - case GL_RGBA: - case GL_COMPRESSED_RGBA: -+ if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV) -+ return &_mesa_texformat_argb4444; -+ else if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV) -+ return &_mesa_texformat_argb1555; -+ else if ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || -+ (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE) || -+ (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8)) -+ return &_mesa_texformat_rgba8888_rev; -+ else -+ return &_mesa_texformat_argb8888; -+ - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: -- case GL_RGBA4: -- case GL_RGBA2: -- case GL_RGB5_A1: - return &_mesa_texformat_argb8888; --/* return &_mesa_texformat_rgba8888_rev; */ - -- case 3: -- case GL_RGB: -- case GL_COMPRESSED_RGB: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: -+ /* Broadwater doesn't support RGB888 textures, so these must be -+ * stored as ARGB. -+ */ -+ return &_mesa_texformat_argb8888; -+ -+ case 3: -+ case GL_COMPRESSED_RGB: -+ case GL_RGB: -+ if (srcFormat == GL_RGB && -+ srcType == GL_UNSIGNED_SHORT_5_6_5) -+ return &_mesa_texformat_rgb565; -+ else -+ return &_mesa_texformat_argb8888; -+ -+ - case GL_RGB5: -- case GL_RGB4: -+ case GL_RGB5_A1: -+ return &_mesa_texformat_argb1555; -+ - case GL_R3_G3_B2: --/* return &_mesa_texformat_rgb888; */ -- return &_mesa_texformat_argb8888; -+ case GL_RGBA2: -+ case GL_RGBA4: -+ case GL_RGB4: -+ return &_mesa_texformat_argb4444; - - case GL_ALPHA: - case GL_ALPHA4: -@@ -115,8 +138,8 @@ brwChooseTextureFormat( GLcontext *ctx, - return &_mesa_texformat_i8; - - case GL_YCBCR_MESA: -- if (type == GL_UNSIGNED_SHORT_8_8_MESA || -- type == GL_UNSIGNED_BYTE) -+ if (srcType == GL_UNSIGNED_SHORT_8_8_MESA || -+ srcType == GL_UNSIGNED_BYTE) - return &_mesa_texformat_ycbcr; - else - return &_mesa_texformat_ycbcr_rev; -diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c -index f8aa068..1353325 100644 ---- a/src/mesa/drivers/dri/i965/brw_tex_layout.c -+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c -@@ -138,13 +138,16 @@ GLboolean brw_miptree_layout( struct int - - /* Layout_below: step right after second mipmap. - */ -- if (level == mt->first_level + 1) -+ if (level == mt->first_level + 1) { - x += mt->pitch / 2; -+ x = (x + 3) & ~ 3; -+ } - else { - y += img_height; -+ y += align_h - 1; -+ y &= ~(align_h - 1); - } - -- - width = minify(width); - height = minify(height); - } -diff --git a/src/mesa/drivers/dri/i965/brw_util.c b/src/mesa/drivers/dri/i965/brw_util.c -index 5957b71..9d12c26 100644 ---- a/src/mesa/drivers/dri/i965/brw_util.c -+++ b/src/mesa/drivers/dri/i965/brw_util.c -@@ -98,6 +98,8 @@ static GLuint brw_parameter_state_flags( - switch (state[1]) { - case STATE_NORMAL_SCALE: - return _NEW_MODELVIEW; -+ case STATE_TEXRECT_SCALE: -+ return _NEW_TEXTURE; - default: - assert(0); - return 0; -diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h -index 74c3bbe..ec6ad61 100644 ---- a/src/mesa/drivers/dri/i965/brw_wm.h -+++ b/src/mesa/drivers/dri/i965/brw_wm.h -@@ -167,6 +167,7 @@ #define WM_PINTERP (MAX_OPCODE + - #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 PROGRAM_PAYLOAD (PROGRAM_FILE_MAX) - #define PAYLOAD_DEPTH (FRAG_ATTRIB_MAX) -diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c -index 203eeea..8bf5579 100644 ---- a/src/mesa/drivers/dri/i965/brw_wm_fp.c -+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c -@@ -520,6 +520,35 @@ static void precalc_lit( struct brw_wm_c - static void precalc_tex( struct brw_wm_compile *c, - const struct prog_instruction *inst ) - { -+ struct prog_src_register coord; -+ struct prog_dst_register tmpcoord; -+ -+ if (inst->TexSrcTarget == TEXTURE_RECT_INDEX) { -+ struct prog_src_register scale = -+ search_or_add_param6( c, -+ STATE_INTERNAL, -+ STATE_TEXRECT_SCALE, -+ inst->TexSrcUnit, -+ 0,0,0 ); -+ -+ tmpcoord = get_temp(c); -+ -+ /* coord.xy = MUL inst->SrcReg[0], { 1/width, 1/height } -+ */ -+ emit_op(c, -+ OPCODE_MUL, -+ tmpcoord, -+ 0, 0, 0, -+ inst->SrcReg[0], -+ scale, -+ src_undef()); -+ -+ coord = src_reg_from_dst(tmpcoord); -+ } -+ else { -+ coord = inst->SrcReg[0]; -+ } -+ - /* Need to emit YUV texture conversions by hand. Probably need to - * do this here - the alternative is in brw_wm_emit.c, but the - * conversion requires allocating a temporary variable which we -@@ -532,7 +561,7 @@ static void precalc_tex( struct brw_wm_c - inst->SaturateMode, - inst->TexSrcUnit, - inst->TexSrcTarget, -- inst->SrcReg[0], -+ coord, - src_undef(), - src_undef()); - } -@@ -604,7 +633,12 @@ static void precalc_tex( struct brw_wm_c - src_swizzle1(tmpsrc, Z), - src_swizzle1(C1, W), - src_swizzle1(src_reg_from_dst(dst), Y)); -+ -+ release_temp(c, tmp); - } -+ -+ if (inst->TexSrcTarget == GL_TEXTURE_RECTANGLE_NV) -+ release_temp(c, tmpcoord); - } - - -@@ -769,6 +803,27 @@ static void validate_src_regs( struct br - - - -+static void print_insns( const struct prog_instruction *insn, -+ GLuint nr ) -+{ -+ GLuint i; -+ for (i = 0; i < nr; i++, insn++) { -+ _mesa_printf("%3d: ", i); -+ if (insn->Opcode < MAX_OPCODE) -+ _mesa_print_instruction(insn); -+ else if (insn->Opcode < MAX_WM_OPCODE) { -+ GLuint idx = insn->Opcode - MAX_OPCODE; -+ -+ _mesa_print_alu_instruction(insn, -+ wm_opcode_strings[idx], -+ 3); -+ } -+ else -+ _mesa_printf("UNKNOWN\n"); -+ -+ } -+} -+ - void brw_wm_pass_fp( struct brw_wm_compile *c ) - { - struct brw_fragment_program *fp = c->fp; -@@ -867,7 +922,7 @@ void brw_wm_pass_fp( struct brw_wm_compi - - if (INTEL_DEBUG & DEBUG_WM) { - _mesa_printf("\n\n\npass_fp:\n"); --/* _mesa_debug_fp_inst(c->nr_fp_insns, c->prog_instructions, wm_opcode_strings, wm_file_strings); */ -+ print_insns( c->prog_instructions, c->nr_fp_insns ); - _mesa_printf("\n"); - } - } -diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c -index 6ccf56e..5c7dc50 100644 ---- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c -+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c -@@ -85,7 +85,8 @@ static GLuint translate_tex_format( GLui - return BRW_SURFACEFORMAT_L8A8_UNORM; - - case MESA_FORMAT_RGB888: -- return BRW_SURFACEFORMAT_R8G8B8_UNORM; -+ assert(0); /* not supported for sampling */ -+ return BRW_SURFACEFORMAT_R8G8B8_UNORM; - - case MESA_FORMAT_ARGB8888: - return BRW_SURFACEFORMAT_B8G8R8A8_UNORM; -@@ -93,6 +94,15 @@ static GLuint translate_tex_format( GLui - case MESA_FORMAT_RGBA8888_REV: - return BRW_SURFACEFORMAT_R8G8B8A8_UNORM; - -+ case MESA_FORMAT_RGB565: -+ return BRW_SURFACEFORMAT_B5G6R5_UNORM; -+ -+ case MESA_FORMAT_ARGB1555: -+ return BRW_SURFACEFORMAT_B5G5R5A1_UNORM; -+ -+ case MESA_FORMAT_ARGB4444: -+ return BRW_SURFACEFORMAT_B4G4R4A4_UNORM; -+ - case MESA_FORMAT_YCBCR_REV: - return BRW_SURFACEFORMAT_YCRCB_NORMAL; - -diff --git a/src/mesa/drivers/dri/i965/bufmgr.h b/src/mesa/drivers/dri/i965/bufmgr.h -index 83a810c..6932522 100644 ---- a/src/mesa/drivers/dri/i965/bufmgr.h -+++ b/src/mesa/drivers/dri/i965/bufmgr.h -@@ -182,6 +182,8 @@ void bmUnmapBufferAUB( struct intel_cont - int bmValidateBuffers( struct intel_context * ); - void bmReleaseBuffers( struct intel_context * ); - -+GLuint bmCtxId( struct intel_context *intel ); -+ - - GLboolean bmError( struct intel_context * ); - void bmEvictAll( struct intel_context * ); -diff --git a/src/mesa/drivers/dri/i965/bufmgr_fake.c b/src/mesa/drivers/dri/i965/bufmgr_fake.c -index 8f182f3..30a235a 100644 ---- a/src/mesa/drivers/dri/i965/bufmgr_fake.c -+++ b/src/mesa/drivers/dri/i965/bufmgr_fake.c -@@ -117,6 +117,7 @@ struct bufmgr { - struct block fenced; /* after bmFenceBuffers (mi_flush, emit irq, write dword) */ - /* then to pool->lru or free() */ - -+ unsigned ctxId; - unsigned last_fence; - unsigned free_on_hardware; - -@@ -578,6 +579,12 @@ struct bufmgr *bm_fake_intel_Attach( str - make_empty_list(&bm.referenced); - make_empty_list(&bm.fenced); - make_empty_list(&bm.on_hardware); -+ -+ /* The context id of any of the share group. This won't be used -+ * in communication with the kernel, so it doesn't matter if -+ * this context is eventually deleted. -+ */ -+ bm.ctxId = intel->hHWContext; - } - - nr_attach++; -@@ -1242,7 +1249,6 @@ void bmReleaseBuffers( struct intel_cont - LOCK(bm); - { - struct block *block, *tmp; -- assert(intel->locked); - - foreach_s (block, tmp, &bm->referenced) { - -@@ -1432,3 +1438,9 @@ GLboolean bmError( struct intel_context - - return retval; - } -+ -+ -+GLuint bmCtxId( struct intel_context *intel ) -+{ -+ return intel->bm->ctxId; -+} -diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c -index 2191dd5..b09b0a9 100644 ---- a/src/mesa/drivers/dri/i965/intel_blit.c -+++ b/src/mesa/drivers/dri/i965/intel_blit.c -@@ -74,9 +74,6 @@ void intelCopyBuffer( const __DRIdrawabl - - if (!rect) - { -- /* This is a really crappy way to do wait-for-vblank. I guess -- * it sortof works in the single-application case. -- */ - UNLOCK_HARDWARE( intel ); - driWaitForVBlank( dPriv, &intel->vbl_seq, intel->vblank_flags, & missed_target ); - LOCK_HARDWARE( intel ); -@@ -291,8 +288,12 @@ void intelEmitCopyBlit( struct intel_con - - /* Initial y values don't seem to work with negative pitches. If - * we adjust the offsets manually (below), it seems to work fine. -+ * -+ * On the other hand, if we always adjust, the hardware doesn't -+ * know which blit directions to use, so overlapping copypixels get -+ * the wrong result. - */ -- if (0) { -+ if (dst_pitch > 0 && src_pitch > 0) { - BEGIN_BATCH(8, INTEL_BATCH_NO_CLIPRECTS); - OUT_BATCH( CMD ); - OUT_BATCH( dst_pitch | BR13 ); -diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c -index 59fc807..5f19137 100644 ---- a/src/mesa/drivers/dri/i965/intel_context.c -+++ b/src/mesa/drivers/dri/i965/intel_context.c -@@ -149,6 +149,10 @@ const struct dri_extension card_extensio - { "GL_ARB_texture_env_combine", NULL }, - { "GL_ARB_texture_env_dot3", NULL }, - { "GL_ARB_texture_mirrored_repeat", NULL }, -+ { "GL_ARB_texture_non_power_of_two", NULL }, -+ { "GL_ARB_texture_rectangle", NULL }, -+ { "GL_NV_texture_rectangle", NULL }, -+ { "GL_EXT_texture_rectangle", NULL }, - { "GL_ARB_texture_rectangle", NULL }, - { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, - { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, -@@ -255,10 +259,14 @@ void intelInitDriverFunctions( struct dd - */ - functions->Accum = _swrast_Accum; - functions->Bitmap = _swrast_Bitmap; -- functions->CopyPixels = _swrast_CopyPixels; - functions->ReadPixels = _swrast_ReadPixels; - functions->DrawPixels = _swrast_DrawPixels; - -+ /* CopyPixels can be accelerated even with the current memory -+ * manager: -+ */ -+ functions->CopyPixels = intelCopyPixels; -+ - intelInitTextureFuncs( functions ); - intelInitStateFuncs( functions ); - intelInitBufferFuncs( functions ); -@@ -370,8 +378,6 @@ GLboolean intelInitContext( struct intel - exit(1); - } - -- _math_matrix_ctr (&intel->ViewportMatrix); -- - driInitExtensions( ctx, card_extensions, - GL_TRUE ); - -@@ -446,8 +452,6 @@ GLboolean intelInitContext( struct intel - /* DRI_TEXMGR_DO_TEXTURE_RECT ); */ - - -- intel->prim.primitive = ~0; -- - if (getenv("INTEL_NO_RAST")) { - fprintf(stderr, "disabling 3D rasterization\n"); - intel->no_rast = 1; -@@ -537,18 +541,13 @@ GLboolean intelMakeCurrent(__DRIcontextP - } - - --static void lost_hardware( struct intel_context *intel ) --{ -- bm_fake_NotifyContendedLockTake( intel ); -- intel->vtbl.lost_hardware( intel ); --} -- - static void intelContendedLock( struct intel_context *intel, GLuint flags ) - { - __DRIdrawablePrivate *dPriv = intel->driDrawable; - __DRIscreenPrivate *sPriv = intel->driScreen; - volatile drmI830Sarea * sarea = intel->sarea; - int me = intel->hHWContext; -+ int my_bufmgr = bmCtxId(intel); - - drmGetLock(intel->driFd, intel->hHWContext, flags); - -@@ -562,12 +561,23 @@ static void intelContendedLock( struct i - - - intel->locked = 1; -+ intel->need_flush = 1; - - /* Lost context? - */ - if (sarea->ctxOwner != me) { -+ DBG("Lost Context: sarea->ctxOwner %x me %x\n", sarea->ctxOwner, me); - sarea->ctxOwner = me; -- lost_hardware(intel); -+ intel->vtbl.lost_hardware( intel ); -+ } -+ -+ /* As above, but don't evict the texture data on transitions -+ * between contexts which all share a local buffer manager. -+ */ -+ if (sarea->texAge != my_bufmgr) { -+ DBG("Lost Textures: sarea->texAge %x my_bufmgr %x\n", sarea->ctxOwner, my_bufmgr); -+ sarea->texAge = my_bufmgr; -+ bm_fake_NotifyContendedLockTake( intel ); - } - - /* Drawable changed? -diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h -index 0328cb9..d0354cf 100644 ---- a/src/mesa/drivers/dri/i965/intel_context.h -+++ b/src/mesa/drivers/dri/i965/intel_context.h -@@ -176,16 +176,6 @@ struct intel_context - - struct intel_batchbuffer *batch; - -- struct { -- GLuint id; -- GLuint primitive; -- GLubyte *start_ptr; -- void (*flush)( struct intel_context * ); -- } prim; -- -- GLboolean locked; -- GLboolean strict_conformance; -- - GLubyte clear_chan[4]; - GLuint ClearColor; - GLuint ClearDepth; -@@ -201,6 +191,10 @@ struct intel_context - GLboolean no_hw; - GLboolean no_rast; - GLboolean thrashing; -+ GLboolean locked; -+ GLboolean strict_conformance; -+ GLboolean need_flush; -+ - - - /* AGP memory buffer manager: -@@ -210,26 +204,14 @@ struct intel_context - - /* State for intelvb.c and inteltris.c. - */ -- GLuint RenderIndex; -- GLmatrix ViewportMatrix; - GLenum render_primitive; - GLenum reduced_primitive; -- GLuint vertex_size; -- GLubyte *verts; /* points to tnl->clipspace.vertex_buf */ -- - - struct intel_region *front_region; - struct intel_region *back_region; - struct intel_region *draw_region; - struct intel_region *depth_region; - -- -- /* Fallback rasterization functions -- */ -- intel_point_func draw_point; -- intel_line_func draw_line; -- intel_tri_func draw_tri; -- - /* These refer to the current draw (front vs. back) buffer: - */ - int drawX; /* origin of drawable in draw buffer */ -@@ -496,6 +478,13 @@ extern GLboolean intel_intersect_cliprec - const drm_clip_rect_t *b ); - - -+/* ================================================================ -+ * intel_pixel_copy.c: -+ */ -+void intelCopyPixels(GLcontext * ctx, -+ GLint srcx, GLint srcy, -+ GLsizei width, GLsizei height, -+ GLint destx, GLint desty, GLenum type); - - #define _NEW_WINDOW_POS 0x40000000 - -diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c -new file mode 100644 -index 0000000..ad27867 ---- /dev/null -+++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c -@@ -0,0 +1,239 @@ -+/************************************************************************** -+ * -+ * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. -+ * 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"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sub license, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the -+ * next paragraph) shall be included in all copies or substantial portions -+ * of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR -+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ * -+ **************************************************************************/ -+ -+#include "glheader.h" -+#include "enums.h" -+#include "image.h" -+#include "mtypes.h" -+#include "macros.h" -+#include "state.h" -+#include "swrast/swrast.h" -+ -+#include "intel_screen.h" -+#include "intel_context.h" -+#include "intel_ioctl.h" -+#include "intel_batchbuffer.h" -+#include "intel_blit.h" -+#include "intel_regions.h" -+ -+ -+static struct intel_region * -+copypix_src_region(struct intel_context *intel, GLenum type) -+{ -+ switch (type) { -+ case GL_COLOR: -+ return intel_readbuf_region(intel); -+ case GL_DEPTH: -+ /* Don't think this is really possible execpt at 16bpp, when we have no stencil. -+ */ -+ if (intel->depth_region && intel->depth_region->cpp == 2) -+ return intel->depth_region; -+ case GL_STENCIL: -+ /* Don't think this is really possible. -+ */ -+ break; -+ case GL_DEPTH_STENCIL_EXT: -+ /* Does it matter whether it is stencil/depth or depth/stencil? -+ */ -+ return intel->depth_region; -+ default: -+ break; -+ } -+ -+ return NULL; -+} -+ -+ -+ -+ -+/** -+ * Check if any fragment operations are in effect which might effect -+ * glDraw/CopyPixels. -+ */ -+static GLboolean -+intel_check_blit_fragment_ops(GLcontext * ctx) -+{ -+ if (ctx->NewState) -+ _mesa_update_state(ctx); -+ -+ /* Could do logicop with the blitter: -+ */ -+ return !(ctx->_ImageTransferState || -+ ctx->Color.AlphaEnabled || -+ ctx->Depth.Test || -+ ctx->Fog.Enabled || -+ ctx->Stencil.Enabled || -+ !ctx->Color.ColorMask[0] || -+ !ctx->Color.ColorMask[1] || -+ !ctx->Color.ColorMask[2] || -+ !ctx->Color.ColorMask[3] || -+ ctx->Color.ColorLogicOpEnabled || -+ ctx->Texture._EnabledUnits || -+ ctx->FragmentProgram._Enabled); -+} -+ -+ -+ -+/** -+ * CopyPixels with the blitter. Don't support zooming, pixel transfer, etc. -+ */ -+static GLboolean -+do_blit_copypixels(GLcontext * ctx, -+ GLint srcx, GLint srcy, -+ GLsizei width, GLsizei height, -+ GLint dstx, GLint dsty, GLenum type) -+{ -+ struct intel_context *intel = intel_context(ctx); -+ struct intel_region *dst = intel_drawbuf_region(intel); -+ struct intel_region *src = copypix_src_region(intel, type); -+ -+ /* Copypixels can be more than a straight copy. Ensure all the -+ * extra operations are disabled: -+ */ -+ if (!intel_check_blit_fragment_ops(ctx) || -+ ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F) -+ return GL_FALSE; -+ -+ if (!src || !dst) -+ return GL_FALSE; -+ -+ -+ -+ intelFlush(&intel->ctx); -+ -+/* intel->vtbl.render_start(intel); */ -+/* intel->vtbl.emit_state(intel); */ -+ -+ LOCK_HARDWARE(intel); -+ -+ if (intel->driDrawable->numClipRects) { -+ __DRIdrawablePrivate *dPriv = intel->driDrawable; -+ drm_clip_rect_t *box = dPriv->pClipRects; -+ drm_clip_rect_t dest_rect; -+ GLint nbox = dPriv->numClipRects; -+ GLint delta_x = 0; -+ GLint delta_y = 0; -+ GLuint i; -+ -+ /* Do scissoring in GL coordinates: -+ */ -+ if (ctx->Scissor.Enabled) -+ { -+ GLint x = ctx->Scissor.X; -+ GLint y = ctx->Scissor.Y; -+ GLuint w = ctx->Scissor.Width; -+ GLuint h = ctx->Scissor.Height; -+ GLint dx = dstx - srcx; -+ GLint dy = dsty - srcy; -+ -+ if (!_mesa_clip_to_region(x, y, x+w, y+h, &dstx, &dsty, &width, &height)) -+ goto out; -+ -+ srcx = dstx - dx; -+ srcy = dsty - dy; -+ } -+ -+ /* Convert from GL to hardware coordinates: -+ */ -+ dsty = dPriv->h - dsty - height; -+ srcy = dPriv->h - srcy - height; -+ dstx += dPriv->x; -+ dsty += dPriv->y; -+ srcx += dPriv->x; -+ srcy += dPriv->y; -+ -+ /* Clip against the source region. This is the only source -+ * clipping we do. Dst is clipped with cliprects below. -+ */ -+ { -+ delta_x = srcx - dstx; -+ delta_y = srcy - dsty; -+ -+ if (!_mesa_clip_to_region(0, 0, src->pitch, src->height, -+ &srcx, &srcy, &width, &height)) -+ goto out; -+ -+ dstx = srcx - delta_x; -+ dsty = srcy - delta_y; -+ } -+ -+ dest_rect.x1 = dstx; -+ dest_rect.y1 = dsty; -+ dest_rect.x2 = dstx + width; -+ dest_rect.y2 = dsty + height; -+ -+/* intel->vtbl.emit_flush(intel, 0); */ -+ -+ /* Could do slightly more clipping: Eg, take the intersection of -+ * the existing set of cliprects and those cliprects translated -+ * by delta_x, delta_y: -+ * -+ * This code will not overwrite other windows, but will -+ * introduce garbage when copying from obscured window regions. -+ */ -+ for (i = 0; i < nbox; i++) { -+ drm_clip_rect_t rect; -+ -+ if (!intel_intersect_cliprects(&rect, &dest_rect, &box[i])) -+ continue; -+ -+ -+ intelEmitCopyBlit(intel, -+ dst->cpp, -+ src->pitch, src->buffer, 0, src->tiled, -+ dst->pitch, dst->buffer, 0, dst->tiled, -+ rect.x1 + delta_x, -+ rect.y1 + delta_y, /* srcx, srcy */ -+ rect.x1, rect.y1, /* dstx, dsty */ -+ rect.x2 - rect.x1, rect.y2 - rect.y1); -+ } -+ -+ intel->need_flush = GL_TRUE; -+ out: -+ intel_batchbuffer_flush(intel->batch); -+ } -+ UNLOCK_HARDWARE(intel); -+ return GL_TRUE; -+} -+ -+void -+intelCopyPixels(GLcontext * ctx, -+ GLint srcx, GLint srcy, -+ GLsizei width, GLsizei height, -+ GLint destx, GLint desty, GLenum type) -+{ -+ if (INTEL_DEBUG & DEBUG_PIXEL) -+ fprintf(stderr, "%s\n", __FUNCTION__); -+ -+ if (do_blit_copypixels(ctx, srcx, srcy, width, height, destx, desty, type)) -+ return; -+ -+ if (INTEL_DEBUG & DEBUG_PIXEL) -+ _mesa_printf("fallback to _swrast_CopyPixels\n"); -+ -+ _swrast_CopyPixels(ctx, srcx, srcy, width, height, destx, desty, type); -+} -diff --git a/src/mesa/drivers/dri/i965/intel_span.c b/src/mesa/drivers/dri/i965/intel_span.c -index c68def5..60fbecc 100644 ---- a/src/mesa/drivers/dri/i965/intel_span.c -+++ b/src/mesa/drivers/dri/i965/intel_span.c -@@ -35,6 +35,7 @@ #include "intel_regions.h" - #include "intel_span.h" - #include "intel_ioctl.h" - #include "intel_tex.h" -+#include "intel_batchbuffer.h" - #include "swrast/swrast.h" - - #undef DBG -@@ -207,6 +208,16 @@ void intelSpanRenderStart( GLcontext *ct - { - struct intel_context *intel = intel_context(ctx); - -+ if (intel->need_flush) { -+ LOCK_HARDWARE(intel); -+ intel->vtbl.emit_flush(intel, 0); -+ intel_batchbuffer_flush(intel->batch); -+ intel->need_flush = 0; -+ UNLOCK_HARDWARE(intel); -+ intelFinish(&intel->ctx); -+ } -+ -+ - LOCK_HARDWARE(intel); - - /* Just map the framebuffer and all textures. Bufmgr code will -diff --git a/src/mesa/drivers/dri/i965/intel_state.c b/src/mesa/drivers/dri/i965/intel_state.c -index a471f67..ec6e046 100644 ---- a/src/mesa/drivers/dri/i965/intel_state.c -+++ b/src/mesa/drivers/dri/i965/intel_state.c -@@ -182,39 +182,6 @@ static void intelClearColor(GLcontext *c - } - - --static void intelCalcViewport( GLcontext *ctx ) --{ -- struct intel_context *intel = intel_context(ctx); -- const GLfloat *v = ctx->Viewport._WindowMap.m; -- GLfloat *m = intel->ViewportMatrix.m; -- GLint h = 0; -- -- if (intel->driDrawable) -- h = intel->driDrawable->h + SUBPIXEL_Y; -- -- /* See also intel_translate_vertex. SUBPIXEL adjustments can be done -- * via state vars, too. -- */ -- m[MAT_SX] = v[MAT_SX]; -- m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X; -- m[MAT_SY] = - v[MAT_SY]; -- m[MAT_TY] = - v[MAT_TY] + h; -- m[MAT_SZ] = v[MAT_SZ] * intel->depth_scale; -- m[MAT_TZ] = v[MAT_TZ] * intel->depth_scale; --} -- --static void intelViewport( GLcontext *ctx, -- GLint x, GLint y, -- GLsizei width, GLsizei height ) --{ -- intelCalcViewport( ctx ); --} -- --static void intelDepthRange( GLcontext *ctx, -- GLclampd nearval, GLclampd farval ) --{ -- intelCalcViewport( ctx ); --} - - /* Fallback to swrast for select and feedback. - */ -@@ -228,8 +195,6 @@ static void intelRenderMode( GLcontext * - void intelInitStateFuncs( struct dd_function_table *functions ) - { - functions->RenderMode = intelRenderMode; -- functions->Viewport = intelViewport; -- functions->DepthRange = intelDepthRange; - functions->ClearColor = intelClearColor; - } - -diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c -index 5f65242..91ae097 100644 ---- a/src/mesa/drivers/dri/i965/intel_tex_validate.c -+++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c -@@ -166,12 +166,15 @@ GLuint intel_finalize_mipmap_tree( struc - * target, imageFormat, etc. - */ - if (intelObj->mt && -- (intelObj->mt->first_level != intelObj->firstLevel || -- intelObj->mt->last_level != intelObj->lastLevel || -+ (intelObj->mt->target != intelObj->base.Target || - intelObj->mt->internal_format != firstImage->InternalFormat || -+ intelObj->mt->first_level != intelObj->firstLevel || -+ intelObj->mt->last_level != intelObj->lastLevel || - intelObj->mt->width0 != firstImage->Width || - intelObj->mt->height0 != firstImage->Height || -- intelObj->mt->depth0 != firstImage->Depth)) -+ intelObj->mt->depth0 != firstImage->Depth || -+ intelObj->mt->cpp != firstImage->TexFormat->TexelBytes || -+ intelObj->mt->compressed != firstImage->IsCompressed)) - { - intel_miptree_destroy(intel, intelObj->mt); - intelObj->mt = NULL; -diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c -index 590f357..f999e06 100644 ---- a/src/mesa/shader/program.c -+++ b/src/mesa/shader/program.c -@@ -917,6 +917,15 @@ _mesa_fetch_state(GLcontext *ctx, const - case STATE_NORMAL_SCALE: - ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1); - break; -+ case STATE_TEXRECT_SCALE: { -+ const int unit = (int) state[2]; -+ const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; -+ if (texObj) { -+ struct gl_texture_image *texImage = texObj->Image[0][0]; -+ ASSIGN_4V(value, 1.0 / texImage->Width, 1.0 / texImage->Height, 0, 1); -+ } -+ break; -+ } - default: - _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()"); - return; -@@ -988,6 +997,8 @@ static GLuint make_state_flags(const GLi - switch (state[1]) { - case STATE_NORMAL_SCALE: - return _NEW_MODELVIEW; -+ case STATE_TEXRECT_SCALE: -+ return _NEW_TEXTURE; - default: - _mesa_problem(NULL, "unexpected int. state in make_state_flags()"); - return 0; -@@ -1450,19 +1461,8 @@ static const struct instruction_info Ins - GLuint - _mesa_num_inst_src_regs(enum prog_opcode opcode) - { -- GLuint i; --#ifdef DEBUG -- for (i = 0; i < MAX_OPCODE; i++) { -- ASSERT(i == InstInfo[i].Opcode); -- } --#endif -- for (i = 0; i < MAX_OPCODE; i++) { -- if (InstInfo[i].Opcode == opcode) { -- return InstInfo[i].NumSrcRegs; -- } -- } -- _mesa_problem(NULL, "invalid opcode in _mesa_num_inst_src_regs"); -- return 0; -+ ASSERT(opcode == InstInfo[opcode].Opcode); -+ return InstInfo[opcode].NumSrcRegs; - } - - -@@ -1601,6 +1601,38 @@ print_src_reg(const struct prog_src_regi - srcReg->NegateBase, GL_FALSE)); - } - -+void -+_mesa_print_alu_instruction(const struct prog_instruction *inst, -+ const char *opcode_string, -+ GLuint numRegs) -+{ -+ GLuint j; -+ -+ _mesa_printf("%s", opcode_string); -+ -+ /* frag prog only */ -+ if (inst->SaturateMode == SATURATE_ZERO_ONE) -+ _mesa_printf("_SAT"); -+ -+ if (inst->DstReg.File != PROGRAM_UNDEFINED) { -+ _mesa_printf(" %s[%d]%s", -+ program_file_string((enum register_file) inst->DstReg.File), -+ inst->DstReg.Index, -+ writemask_string(inst->DstReg.WriteMask)); -+ } -+ -+ if (numRegs > 0) -+ _mesa_printf(", "); -+ -+ for (j = 0; j < numRegs; j++) { -+ print_src_reg(inst->SrcReg + j); -+ if (j + 1 < numRegs) -+ _mesa_printf(", "); -+ } -+ -+ _mesa_printf(";\n"); -+} -+ - - /** - * Print a single vertex/fragment program instruction. -@@ -1662,34 +1694,10 @@ _mesa_print_instruction(const struct pro - /* XXX may need for other special-case instructions */ - default: - /* typical alu instruction */ -- { -- const GLuint numRegs = _mesa_num_inst_src_regs(inst->Opcode); -- GLuint j; -- -- _mesa_printf("%s", _mesa_opcode_string(inst->Opcode)); -- -- /* frag prog only */ -- if (inst->SaturateMode == SATURATE_ZERO_ONE) -- _mesa_printf("_SAT"); -- -- if (inst->DstReg.File != PROGRAM_UNDEFINED) { -- _mesa_printf(" %s[%d]%s", -- program_file_string((enum register_file) inst->DstReg.File), -- inst->DstReg.Index, -- writemask_string(inst->DstReg.WriteMask)); -- } -- -- if (numRegs > 0) -- _mesa_printf(", "); -- -- for (j = 0; j < numRegs; j++) { -- print_src_reg(inst->SrcReg + j); -- if (j + 1 < numRegs) -- _mesa_printf(", "); -- } -- -- _mesa_printf(";\n"); -- } -+ _mesa_print_alu_instruction(inst, -+ _mesa_opcode_string(inst->Opcode), -+ _mesa_num_inst_src_regs(inst->Opcode)); -+ break; - } - } - -diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h -index 6a34533..cf3b1cc 100644 ---- a/src/mesa/shader/program.h -+++ b/src/mesa/shader/program.h -@@ -188,6 +188,7 @@ enum state_index { - - STATE_INTERNAL, /* Mesa additions */ - STATE_NORMAL_SCALE, -+ STATE_TEXRECT_SCALE, - STATE_POSITION_NORMALIZED /* normalized light position */ - }; - -@@ -264,6 +265,11 @@ _mesa_load_state_parameters(GLcontext *c - extern void - _mesa_print_instruction(const struct prog_instruction *inst); - -+void -+_mesa_print_alu_instruction(const struct prog_instruction *inst, -+ const char *opcode_string, -+ GLuint numRegs); -+ - extern void - _mesa_print_program(const struct gl_program *prog); - diff --git a/redhat-mesa-source-filelist-generator b/redhat-mesa-source-filelist-generator deleted file mode 100755 index 540d840..0000000 --- a/redhat-mesa-source-filelist-generator +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright 2005 by Red Hat, Inc. -# Author: Mike A. Harris -# -# License: MIT/X11 -# - -set -vx -DESTDIR=$1 -MESA_SOURCE_SUBDIR=$2 -MESA_SOURCE_FILES=mesa-source-files.lst -OUTPUT_FILE=mesa-source-rpm-filelist.lst - -function create_source_file_list { - ## Generate mesa-source file list manifest, massaging with grep to filter - ## out some things we know aren't needed/wanted. - find . -type f -regex '.*\.[ch]$' | \ - sed -e 's#^\./##g' | \ - egrep -v '^progs' | \ - egrep -v '^src/(glu|glw)' | \ - egrep -v '^src/drivers/(dri|dos|windows|glide|svga|ggi)' \ - > $MESA_SOURCE_FILES -} - - -function install_mesa_source_files { - mkdir -p $DESTDIR/$MESA_SOURCE_SUBDIR - touch $OUTPUT_FILE - for file in $(sort < $MESA_SOURCE_FILES | uniq) ; do - DIR=$DESTDIR/${MESA_SOURCE_SUBDIR}/${file%/*} - echo "DSTDIR=$DIR" - [ ! -d $DIR ] && mkdir -p $DIR - install -m 444 $file $DIR/ - # Write file to rpm file list manifest - echo "%{mesasourcedir}/${file}" >> $OUTPUT_FILE - done -} - -function find_source_dirs { - # Search mesa source dir for directories the package should own - find $DESTDIR/$MESA_SOURCE_SUBDIR -type d | \ - sed -e "s#^$DESTDIR/$MESA_SOURCE_SUBDIR#%dir %{mesasourcedir}#g" >> $OUTPUT_FILE - # Ugly hack to cause the 'mesa' dir to be owned by the package too. -# echo "%dir ${MESA_SOURCE_SUBDIR}%/*" >> $OUTPUT_FILE -} - -create_source_file_list -install_mesa_source_files -find_source_dirs -set - \ No newline at end of file diff --git a/sources b/sources index e3fe5e1..e5f1a90 100644 --- a/sources +++ b/sources @@ -1,7 +1,3 @@ -92e3fd47f3a8a50fdf51b454867271e3 gl-man-pages.tar.bz2 -73a8d5bc5fe2f336549b56ac3bf06911 glu-man-pages.tar.bz2 -f97e46b9f29dd64996c4408fbac5f8a3 glx-man-pages.tar.bz2 -841dd9ef3dec2f67a7faeb65bc5c78b8 gl-manpages-1.0.tar.bz2 +c056abd763e899114bf745c9eedbf9ad MesaLib-7.0.1.tar.bz2 +3b66b3268df12ca8a6c4e0c4c457912c MesaDemos-7.0.1.tar.bz2 6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2 -e870efe98d3a50be01ab211b9b2e25d9 MesaDemos-6.5.2.tar.bz2 -e4d894181f1859651658b3704633e10d MesaLib-6.5.2.tar.bz2