diff options
author | Brian Paul <[email protected]> | 2009-02-09 09:22:22 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-02-09 09:22:22 -0700 |
commit | e97681c7f551a2a2a6bd5eff0f4192a870c816c0 (patch) | |
tree | dff2bf0e6d22efb92af131f64be0621ed316977c /src/mesa/glapi | |
parent | 1a46c8a062aea59de5cf55881104489db5d609e5 (diff) | |
parent | b907d4cd8fafe719b4f87d877562829548937485 (diff) |
mesa: merge gallium-0.2 into gallium-master-merge
Merge commit 'origin/gallium-0.2' into gallium-master-merge
Conflicts:
Makefile
docs/relnotes-7.4.html
docs/relnotes.html
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/main/imports.c
src/mesa/main/mtypes.h
src/mesa/main/texcompress.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_save_draw.c
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r-- | src/mesa/glapi/descrip.mms | 39 | ||||
-rw-r--r-- | src/mesa/glapi/glapi.c | 4 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.c | 6 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.h | 48 |
4 files changed, 50 insertions, 47 deletions
diff --git a/src/mesa/glapi/descrip.mms b/src/mesa/glapi/descrip.mms deleted file mode 100644 index ee96baa6fcc..00000000000 --- a/src/mesa/glapi/descrip.mms +++ /dev/null @@ -1,39 +0,0 @@ -# Makefile for core library for VMS -# contributed by Jouk Jansen [email protected] -# Last revision : 29 September 2008 - -.first - define gl [---.include.gl] - define main [-.main] - -.include [---]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR = [---.include],[-.main] -LIBDIR = [---.lib] -CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm - -SOURCES = glapi.c glthread.c glapi_getproc.c - -OBJECTS = glapi.obj,glthread.obj,glapi_getproc.obj - -##### RULES ##### - -VERSION=Mesa V3.4 - -##### TARGETS ##### -# Make the library -$(LIBDIR)$(GL_LIB) : $(OBJECTS) - @ library $(LIBDIR)$(GL_LIB) $(OBJECTS) - -clean : - purge - delete *.obj;* - -glapi.obj : glapi.c - -glthread.obj : glthread.c -glapi_getproc.obj : glapi_getproc.c diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c index c3ebf60719f..9b5144a88b6 100644 --- a/src/mesa/glapi/glapi.c +++ b/src/mesa/glapi/glapi.c @@ -98,6 +98,7 @@ _glapi_set_warning_func( _glapi_warning_func func ) static GLboolean warn(void) { +#if !defined(_WIN32_WCE) if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) && warning_func) { return GL_TRUE; @@ -105,6 +106,9 @@ warn(void) else { return GL_FALSE; } +#else + return GL_FALSE; +#endif } diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c index b818f4e26eb..56ddf7c25ac 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mesa/glapi/glthread.c @@ -25,16 +25,14 @@ /* * XXX There's probably some work to do in order to make this file - * truly reusable outside of Mesa. + * truly reusable outside of Mesa. First, the glheader.h include must go. */ - #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <stdlib.h> -#include <stdio.h> +#include "main/glheader.h" #include "glthread.h" diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index 27ccd2e2e7b..ae2f79f37dd 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -116,9 +116,49 @@ typedef pthread_mutex_t _glthread_Mutex; #define _glthread_UNLOCK_MUTEX(name) \ (void) pthread_mutex_unlock(&(name)) -#endif /* PTHREADS */ +typedef pthread_cond_t _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ + static _glthread_Cond name = PTHREAD_COND_INITIALIZER +#define _glthread_INIT_COND(cond) \ + pthread_cond_init(&(cond), NULL) + +#define _glthread_DESTROY_COND(name) \ + pthread_cond_destroy(&(name)) + +#define _glthread_COND_WAIT(cond, mutex) \ + pthread_cond_wait(&(cond), &(mutex)) + +#define _glthread_COND_SIGNAL(cond) \ + pthread_cond_signal(&(cond)) + +#define _glthread_COND_BROADCAST(cond) \ + pthread_cond_broadcast(&(cond)) + + +#else /* PTHREADS */ + +typedef unsigned int _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ +// #warning Condition variables not implemented. + +#define _glthread_INIT_COND(cond) \ + ASSERT(0); + +#define _glthread_DESTROY_COND(name) \ + ASSERT(0); + +#define _glthread_COND_WAIT(cond, mutex) \ + ASSERT(0); + +#define _glthread_COND_SIGNAL(cond) \ + ASSERT(0); + +#define _glthread_COND_BROADCAST(cond) \ + ASSERT(0); + +#endif /* @@ -259,11 +299,11 @@ typedef benaphore _glthread_Mutex; * THREADS not defined */ -typedef int _glthread_TSD; +typedef GLuint _glthread_TSD; -typedef int _glthread_Thread; +typedef GLuint _glthread_Thread; -typedef int _glthread_Mutex; +typedef GLuint _glthread_Mutex; #define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 |