- 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
This commit is contained in:
parent
3def463294
commit
27417288ac
10
.cvsignore
10
.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
|
||||
|
@ -1,21 +0,0 @@
|
||||
From: Keith Whitwell <keith@tungstengraphics.com>
|
||||
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;
|
||||
}
|
@ -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 <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include "mm.h"
|
||||
+#include <selinux/selinux.h>
|
||||
|
||||
#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)
|
||||
|
@ -1,77 +0,0 @@
|
||||
From: Xavier Bachelot <xavier@bachelot.org>
|
||||
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 );
|
@ -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 <X11/Xlibint.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
+#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;
|
@ -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
|
||||
|
@ -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/$@ ./
|
@ -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
|
@ -1,218 +0,0 @@
|
||||
From: Miguel Marte <miguelmarte@gmail.com>
|
||||
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);
|
||||
}
|
@ -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
|
23
mesa-7.0-i-already-defined-glapi-you-twit.patch
Normal file
23
mesa-7.0-i-already-defined-glapi-you-twit.patch
Normal file
@ -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
|
134
mesa-7.0-selinux-awareness.patch
Normal file
134
mesa-7.0-selinux-awareness.patch
Normal file
@ -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 <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include "mm.h"
|
||||
+#include <selinux/selinux.h>
|
||||
|
||||
#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)
|
12
mesa-7.0-symlinks-before-depend.patch
Normal file
12
mesa-7.0-symlinks-before-depend.patch
Normal file
@ -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
|
36
mesa.spec
36
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 <airlied@redhat.com> - 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 <jkeating@redhat.com> - 6.5.2-16
|
||||
- Rebuild for RH #249435
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2005 by Red Hat, Inc.
|
||||
# Author: Mike A. Harris <mharris@redhat.com>
|
||||
#
|
||||
# License: MIT/X11
|
||||
# <FIXME: Insert legal terms here>
|
||||
|
||||
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 -
|
8
sources
8
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
|
||||
|
Loading…
Reference in New Issue
Block a user