From 3dd4b6420f686b0147d5b8136268cc63196e253b Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 9 Mar 2014 21:32:55 +0100 Subject: fontconfig mesa xserver git update 9 Mar 2014 xserver commit 1c61d38528a573caadee2468ee59ea558c822e09 fontconfig commit f8ccf379eb1092592ae0b65deb563c5491f69de9 mesa commit 897f40f25d21af678b1b67c1a68c4a6722d19983 --- mesalib/include/GL/glxext.h | 32 +++++++++++++++++++++++++++++--- mesalib/include/c11/threads_win32.h | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 6 deletions(-) (limited to 'mesalib/include') diff --git a/mesalib/include/GL/glxext.h b/mesalib/include/GL/glxext.h index 8c642f354..826fda5b5 100644 --- a/mesalib/include/GL/glxext.h +++ b/mesalib/include/GL/glxext.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2013 The Khronos Group Inc. +** Copyright (c) 2013-2014 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -33,10 +33,10 @@ extern "C" { ** used to make the header, and the header can be found at ** http://www.opengl.org/registry/ ** -** Khronos $Revision: 24777 $ on $Date: 2014-01-14 14:02:32 -0800 (Tue, 14 Jan 2014) $ +** Khronos $Revision: 25407 $ on $Date: 2014-02-18 16:51:56 -0800 (Tue, 18 Feb 2014) $ */ -#define GLX_GLXEXT_VERSION 20140114 +#define GLX_GLXEXT_VERSION 20140218 /* Generated C header for: * API: glx @@ -407,6 +407,32 @@ GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixm #endif #endif /* GLX_MESA_pixmap_colormap */ +#ifndef GLX_MESA_query_renderer +#define GLX_MESA_query_renderer 1 +#define GLX_RENDERER_VENDOR_ID_MESA 0x8183 +#define GLX_RENDERER_DEVICE_ID_MESA 0x8184 +#define GLX_RENDERER_VERSION_MESA 0x8185 +#define GLX_RENDERER_ACCELERATED_MESA 0x8186 +#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187 +#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188 +#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189 +#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A +#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B +#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C +#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D +#define GLX_RENDERER_ID_MESA 0x818E +typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value); +typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute); +typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute); +#ifdef GLX_GLXEXT_PROTOTYPES +Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value); +const char *glXQueryCurrentRendererStringMESA (int attribute); +Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value); +const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute); +#endif +#endif /* GLX_MESA_query_renderer */ + #ifndef GLX_MESA_release_buffers #define GLX_MESA_release_buffers 1 typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); diff --git a/mesalib/include/c11/threads_win32.h b/mesalib/include/c11/threads_win32.h index be1a38957..d4c2a72d2 100644 --- a/mesalib/include/c11/threads_win32.h +++ b/mesalib/include/c11/threads_win32.h @@ -146,7 +146,7 @@ static unsigned __stdcall impl_thrd_routine(void *p) static DWORD impl_xtime2msec(const xtime *xt) { - return (DWORD)((xt->sec * 1000u) + (xt->nsec / 1000)); + return (DWORD)((xt->sec * 1000U) + (xt->nsec / 1000000L)); } #ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE @@ -492,12 +492,42 @@ thrd_create(thrd_t *thr, thrd_start_t func, void *arg) return thrd_success; } +#if 0 // 7.25.5.2 static inline thrd_t thrd_current(void) { - return GetCurrentThread(); + HANDLE hCurrentThread; + BOOL bRet; + + /* GetCurrentThread() returns a pseudo-handle, which is useless. We need + * to call DuplicateHandle to get a real handle. However the handle value + * will not match the one returned by thread_create. + * + * Other potential solutions would be: + * - define thrd_t as a thread Ids, but this would mean we'd need to OpenThread for many operations + * - use malloc'ed memory for thrd_t. This would imply using TLS for current thread. + * + * Neither is particularly nice. + * + * Life would be much easier if C11 threads had different abstractions for + * threads and thread IDs, just like C++11 threads does... + */ + + bRet = DuplicateHandle(GetCurrentProcess(), // source process (pseudo) handle + GetCurrentThread(), // source (pseudo) handle + GetCurrentProcess(), // target process + &hCurrentThread, // target handle + 0, + FALSE, + DUPLICATE_SAME_ACCESS); + assert(bRet); + if (!bRet) { + hCurrentThread = GetCurrentThread(); + } + return hCurrentThread; } +#endif // 7.25.5.3 static inline int @@ -511,7 +541,7 @@ thrd_detach(thrd_t thr) static inline int thrd_equal(thrd_t thr0, thrd_t thr1) { - return (thr0 == thr1); + return GetThreadId(thr0) == GetThreadId(thr1); } // 7.25.5.5 -- cgit v1.2.3