summaryrefslogtreecommitdiff
path: root/xc/extras
diff options
context:
space:
mode:
Diffstat (limited to 'xc/extras')
-rw-r--r--xc/extras/Mesa/src/X86/common_x86_asm.S6
-rw-r--r--xc/extras/Mesa/src/context.c2
-rw-r--r--xc/extras/Mesa/src/glthread.h10
-rw-r--r--xc/extras/Mesa/src/hash.c1
-rw-r--r--xc/extras/Mesa/src/texobj.c3
-rw-r--r--xc/extras/Mesa/src/texstate.c3
-rw-r--r--xc/extras/Mesa/src/tnl/t_imm_api.c9
-rw-r--r--xc/extras/Mesa/src/tnl_dd/t_dd_vbtmp.h6
8 files changed, 29 insertions, 11 deletions
diff --git a/xc/extras/Mesa/src/X86/common_x86_asm.S b/xc/extras/Mesa/src/X86/common_x86_asm.S
index 3b97dc15a..4dfac4157 100644
--- a/xc/extras/Mesa/src/X86/common_x86_asm.S
+++ b/xc/extras/Mesa/src/X86/common_x86_asm.S
@@ -1,9 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 4.0.3
+ * Version: 5.0.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul 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"),
@@ -225,8 +225,6 @@ GLNAME( _mesa_test_os_sse_exception_support ):
MOVUPS ( REGIND( ESP ), XMM1 )
- ADD_L ( CONST( 32 ), ESP )
-
DIVPS ( XMM0, XMM1 )
/* Restore the original MXCSR register value.
diff --git a/xc/extras/Mesa/src/context.c b/xc/extras/Mesa/src/context.c
index 3f3edf31d..82037a2f6 100644
--- a/xc/extras/Mesa/src/context.c
+++ b/xc/extras/Mesa/src/context.c
@@ -745,6 +745,8 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
_mesa_DeleteHashTable(ss->VertexPrograms);
#endif
+ _glthread_DESTROY_MUTEX(ss->Mutex);
+
FREE(ss);
}
diff --git a/xc/extras/Mesa/src/glthread.h b/xc/extras/Mesa/src/glthread.h
index 345bdd2ee..051965446 100644
--- a/xc/extras/Mesa/src/glthread.h
+++ b/xc/extras/Mesa/src/glthread.h
@@ -100,6 +100,9 @@ typedef pthread_mutex_t _glthread_Mutex;
#define _glthread_INIT_MUTEX(name) \
pthread_mutex_init(&(name), NULL)
+#define _glthread_DESTROY_MUTEX(name) \
+ pthread_mutex_destroy(&(name))
+
#define _glthread_LOCK_MUTEX(name) \
(void) pthread_mutex_lock(&(name))
@@ -133,6 +136,7 @@ typedef mutex_t _glthread_Mutex;
/* XXX need to really implement mutex-related macros */
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
+#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
@@ -161,6 +165,7 @@ typedef CRITICAL_SECTION _glthread_Mutex;
/* XXX need to really implement mutex-related macros */
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
+#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
@@ -196,6 +201,9 @@ typedef xmutex_rec _glthread_Mutex;
#define _glthread_INIT_MUTEX(name) \
xmutex_init(&(name))
+#define _glthread_DESTROY_MUTEX(name) \
+ xmutex_clear(&(name))
+
#define _glthread_LOCK_MUTEX(name) \
(void) xmutex_lock(&(name))
@@ -253,6 +261,8 @@ typedef GLuint _glthread_Mutex;
#define _glthread_INIT_MUTEX(name) (void) name
+#define _glthread_DESTROY_MUTEX(name) (void) name
+
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
diff --git a/xc/extras/Mesa/src/hash.c b/xc/extras/Mesa/src/hash.c
index d5d757ce8..32e37a268 100644
--- a/xc/extras/Mesa/src/hash.c
+++ b/xc/extras/Mesa/src/hash.c
@@ -93,6 +93,7 @@ void _mesa_DeleteHashTable(struct _mesa_HashTable *table)
entry = next;
}
}
+ _glthread_DESTROY_MUTEX(table->Mutex);
FREE(table);
}
diff --git a/xc/extras/Mesa/src/texobj.c b/xc/extras/Mesa/src/texobj.c
index 905918ff9..75c92be18 100644
--- a/xc/extras/Mesa/src/texobj.c
+++ b/xc/extras/Mesa/src/texobj.c
@@ -163,6 +163,9 @@ void _mesa_free_texture_object( struct gl_shared_state *shared,
}
}
+ /* destroy the mutex -- it may have allocated memory (eg on bsd) */
+ _glthread_DESTROY_MUTEX(t->Mutex);
+
/* free this object */
FREE( t );
}
diff --git a/xc/extras/Mesa/src/texstate.c b/xc/extras/Mesa/src/texstate.c
index 6802b7176..0d7388c1a 100644
--- a/xc/extras/Mesa/src/texstate.c
+++ b/xc/extras/Mesa/src/texstate.c
@@ -2397,7 +2397,8 @@ _mesa_ActiveTextureARB( GLenum target )
_mesa_debug(ctx, "glActiveTexture %s\n",
_mesa_lookup_enum_by_nr(target));
- if (texUnit > ctx->Const.MaxTextureUnits) {
+ /* Cater for texture unit 0 is first, therefore use >= */
+ if (texUnit >= ctx->Const.MaxTextureUnits) {
_mesa_error(ctx, GL_INVALID_ENUM, "glActiveTextureARB(target)");
return;
}
diff --git a/xc/extras/Mesa/src/tnl/t_imm_api.c b/xc/extras/Mesa/src/tnl/t_imm_api.c
index 32ea81135..9e073f162 100644
--- a/xc/extras/Mesa/src/tnl/t_imm_api.c
+++ b/xc/extras/Mesa/src/tnl/t_imm_api.c
@@ -204,8 +204,8 @@ _tnl_Begin( GLenum mode )
return;
}
- assert( IM->SavedBeginState == 0 );
- assert( IM->BeginState == 0 );
+ assert( (IM->SavedBeginState & (VERT_BEGIN_0|VERT_BEGIN_1)) == 0 );
+ assert( (IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1)) == 0 );
/* Not quite right. Need to use the fallback '_aa_ArrayElement'
* when not known to be inside begin/end and arrays are
@@ -331,7 +331,10 @@ _tnl_end( GLcontext *ctx )
GLuint state = IM->BeginState;
GLuint inflags = (~state) & (VERT_BEGIN_0|VERT_BEGIN_1);
- assert( ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES );
+ /* Not the case if vertices emitted without calling glBegin first:
+ */
+/* assert( ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES ); */
+
state |= inflags << 2; /* errors */
diff --git a/xc/extras/Mesa/src/tnl_dd/t_dd_vbtmp.h b/xc/extras/Mesa/src/tnl_dd/t_dd_vbtmp.h
index 35ac9fcfa..0fc1a64e2 100644
--- a/xc/extras/Mesa/src/tnl_dd/t_dd_vbtmp.h
+++ b/xc/extras/Mesa/src/tnl_dd/t_dd_vbtmp.h
@@ -215,7 +215,7 @@ static void TAG(emit)( GLcontext *ctx,
}
}
- if (VB->importable_data) {
+ if (VB->importable_data || (DO_SPEC && !spec_stride) || (DO_FOG && !fog_stride)) {
/* May have nonstandard strides:
*/
if (start) {
@@ -234,7 +234,7 @@ static void TAG(emit)( GLcontext *ctx,
STRIDE_4UB(spec, start * spec_stride);
if (DO_FOG)
/*STRIDE_F(fog, start * fog_stride);*/
- fog = (GLfloat (*)[4])((GLfloat *)fog + start * fog_stride);
+ fog = (GLfloat (*)[4])((GLubyte *)fog + start * fog_stride);
}
for (i=start; i < end; i++, v = (VERTEX *)((GLubyte *)v + stride)) {
@@ -270,7 +270,7 @@ static void TAG(emit)( GLcontext *ctx,
if (DO_FOG) {
v->v.specular.alpha = fog[0][0] * 255.0;
/*STRIDE_F(fog, fog_stride);*/
- fog = (GLfloat (*)[4])((GLfloat *)fog + fog_stride);
+ fog = (GLfloat (*)[4])((GLubyte *)fog + fog_stride);
}
if (DO_TEX0) {
v->v.u0 = tc0[0][0];