aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-07 07:40:39 +0000
committermarha <marha@users.sourceforge.net>2011-03-07 07:40:39 +0000
commit4f70194d203322cf1ec38767098976797c116f0c (patch)
treecaf54322d821e7ef7b596cf62e0e45826ec3fbbc /mesalib
parentb6bc795c211112d5365ce3622a8aa0d1b0344dcf (diff)
parentd550ff64af08efb189450fa7b7104b3e049b5779 (diff)
downloadvcxsrv-4f70194d203322cf1ec38767098976797c116f0c.tar.gz
vcxsrv-4f70194d203322cf1ec38767098976797c116f0c.tar.bz2
vcxsrv-4f70194d203322cf1ec38767098976797c116f0c.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/src/mapi/mapi/u_current.c12
-rw-r--r--mesalib/src/mapi/mapi/u_thread.c9
-rw-r--r--mesalib/src/mapi/mapi/u_thread.h2
-rw-r--r--mesalib/src/mesa/drivers/dri/common/utils.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c4
5 files changed, 11 insertions, 19 deletions
diff --git a/mesalib/src/mapi/mapi/u_current.c b/mesalib/src/mapi/mapi/u_current.c
index 6e2958eb4..8fc7096a3 100644
--- a/mesalib/src/mapi/mapi/u_current.c
+++ b/mesalib/src/mapi/mapi/u_current.c
@@ -144,15 +144,7 @@ u_current_init_tsd(void)
/**
* Mutex for multithread check.
*/
-#ifdef WIN32
-/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
-#define CHECK_MULTITHREAD_LOCK()
-#define CHECK_MULTITHREAD_UNLOCK()
-#else
u_mutex_declare_static(ThreadCheckMutex);
-#define CHECK_MULTITHREAD_LOCK() u_mutex_lock(ThreadCheckMutex)
-#define CHECK_MULTITHREAD_UNLOCK() u_mutex_unlock(ThreadCheckMutex)
-#endif
/**
* We should call this periodically from a function such as glXMakeCurrent
@@ -167,7 +159,7 @@ u_current_init(void)
if (ThreadSafe)
return;
- CHECK_MULTITHREAD_LOCK();
+ u_mutex_lock(ThreadCheckMutex);
if (firstCall) {
u_current_init_tsd();
@@ -179,7 +171,7 @@ u_current_init(void)
u_current_set(NULL);
u_current_set_user(NULL);
}
- CHECK_MULTITHREAD_UNLOCK();
+ u_mutex_unlock(ThreadCheckMutex);
}
#else
diff --git a/mesalib/src/mapi/mapi/u_thread.c b/mesalib/src/mapi/mapi/u_thread.c
index c15093a7c..3154b89de 100644
--- a/mesalib/src/mapi/mapi/u_thread.c
+++ b/mesalib/src/mapi/mapi/u_thread.c
@@ -113,11 +113,6 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
*/
#ifdef WIN32
-static void InsteadOf_exit(int nCode)
-{
- DWORD dwErr = GetLastError();
-}
-
unsigned long
u_thread_self(void)
{
@@ -131,7 +126,7 @@ u_tsd_init(struct u_tsd *tsd)
tsd->key = TlsAlloc();
if (tsd->key == TLS_OUT_OF_INDEXES) {
perror(INIT_TSD_ERROR);
- InsteadOf_exit(-1);
+ exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
@@ -168,7 +163,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
}
if (TlsSetValue(tsd->key, ptr) == 0) {
perror(SET_TSD_ERROR);
- InsteadOf_exit(-1);
+ exit(-1);
}
}
diff --git a/mesalib/src/mapi/mapi/u_thread.h b/mesalib/src/mapi/mapi/u_thread.h
index 7f98c871f..290066d16 100644
--- a/mesalib/src/mapi/mapi/u_thread.h
+++ b/mesalib/src/mapi/mapi/u_thread.h
@@ -97,7 +97,7 @@ typedef CRITICAL_SECTION u_mutex;
/* http://locklessinc.com/articles/pthreads_on_windows/ */
#define u_mutex_declare_static(name) \
- /* static */ u_mutex name = {(void*)-1, -1, 0, 0, 0, 0}
+ static u_mutex name = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}
#define u_mutex_init(name) InitializeCriticalSection(&name)
#define u_mutex_destroy(name) DeleteCriticalSection(&name)
diff --git a/mesalib/src/mesa/drivers/dri/common/utils.c b/mesalib/src/mesa/drivers/dri/common/utils.c
index 02c8cc6f5..a36f65da4 100644
--- a/mesalib/src/mesa/drivers/dri/common/utils.c
+++ b/mesalib/src/mesa/drivers/dri/common/utils.c
@@ -650,6 +650,8 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
__DRI_ATTRIB_TEXTURE_1D_BIT |
__DRI_ATTRIB_TEXTURE_2D_BIT |
__DRI_ATTRIB_TEXTURE_RECTANGLE_BIT;
+
+ modes->sRGBCapable = GL_FALSE;
}
}
}
@@ -729,6 +731,7 @@ static const struct { unsigned int attrib, offset; } attribMap[] = {
__ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture),
__ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS, bindToTextureTargets),
__ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
+ __ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable),
/* The struct field doesn't matter here, these are handled by the
* switch in driGetConfigAttribIndex. We need them in the array
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 71c6c9252..511a252f0 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -491,8 +491,10 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_shader_stencil_export = GL_TRUE;
}
- if (screen->get_param(screen, PIPE_CAP_INSTANCED_DRAWING)) {
+ if (screen->get_param(screen, PIPE_CAP_TGSI_INSTANCEID)) {
ctx->Extensions.ARB_draw_instanced = GL_TRUE;
+ }
+ if (screen->get_param(screen, PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR)) {
ctx->Extensions.ARB_instanced_arrays = GL_TRUE;
}
}