Author: jgardou Date: Mon Oct 7 14:57:57 2013 New Revision: 60580
URL: http://svn.reactos.org/svn/reactos?rev=60580&view=rev Log: [MESA] - leaner build part 14 of X - Flatten source tree CORE-7499
Added: trunk/reactos/dll/opengl/mesa/drivers/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/drivers/ trunk/reactos/dll/opengl/mesa/main/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/main/ trunk/reactos/dll/opengl/mesa/math/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/math/ trunk/reactos/dll/opengl/mesa/swrast/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/swrast/ trunk/reactos/dll/opengl/mesa/swrast_setup/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/swrast_setup/ trunk/reactos/dll/opengl/mesa/tnl/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/tnl/ trunk/reactos/dll/opengl/mesa/vbo/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/vbo/ trunk/reactos/dll/opengl/mesa/x86/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/x86/ trunk/reactos/dll/opengl/mesa/x86-64/ - copied from r60579, trunk/reactos/dll/opengl/mesa/src/mesa/x86-64/ Removed: trunk/reactos/dll/opengl/mesa/generated/ trunk/reactos/dll/opengl/mesa/include/ trunk/reactos/dll/opengl/mesa/main/querymatrix.c trunk/reactos/dll/opengl/mesa/src/ Modified: trunk/reactos/dll/opengl/CMakeLists.txt trunk/reactos/dll/opengl/mesa/CMakeLists.txt trunk/reactos/dll/opengl/mesa/main/CMakeLists.txt trunk/reactos/dll/opengl/mesa/main/api_loopback.c trunk/reactos/dll/opengl/mesa/main/attrib.c trunk/reactos/dll/opengl/mesa/main/context.c trunk/reactos/dll/opengl/mesa/main/dispatch.h trunk/reactos/dll/opengl/mesa/main/dlist.c trunk/reactos/dll/opengl/mesa/main/execmem.c trunk/reactos/dll/opengl/mesa/main/glheader.h trunk/reactos/dll/opengl/mesa/main/hash.c trunk/reactos/dll/opengl/mesa/main/mtypes.h trunk/reactos/dll/opengl/mesa/swrast/s_span.c trunk/reactos/dll/opengl/mesa/vbo/vbo_save_loopback.c trunk/reactos/dll/opengl/opengl32/CMakeLists.txt trunk/reactos/dll/opengl/opengl32/swimpl.c
Modified: trunk/reactos/dll/opengl/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/CMakeLists.txt?r... ============================================================================== --- trunk/reactos/dll/opengl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/CMakeLists.txt [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -1,3 +1,6 @@ + +#unset this if you want to use the current TEB instead of TLS +set(OPENGL32_USE_TLS TRUE)
add_subdirectory(glu32) add_subdirectory(mesa)
Modified: trunk/reactos/dll/opengl/mesa/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/CMakeLists.... ============================================================================== --- trunk/reactos/dll/opengl/mesa/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/CMakeLists.txt [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -1,36 +1,37 @@
-set(CMAKE_INCLUDE_CURRENT_DIR OFF) +include_directories(.)
-# From Sconstruct -include_directories(BEFORE - include) - -include_directories( - src/gallium/include - src/gallium/auxiliary - src/gallium/drivers - src/gallium/winsys) - -if(NOT MSVC) - add_compile_flags_language("-std=gnu99" "C") - add_compile_flags("-Wno-deprecated-declarations -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable") - add_compile_flags_language("-Wno-delete-non-virtual-dtor -Wno-narrowing" "CXX") - # optimizations (builtin memcmp is slow on some gcc versions) used in SConsript files - add_compile_flags("-ffast-math -fno-builtin-memcmp") -else() - include_directories(include/c99) - add_compile_flags("/wd4996") -endif() +# our DBG definitions conflict with mesa source code +remove_definitions(-DDBG=1 -DDBG=0)
add_definitions( -DWIN32 -D_WINDOWS - -DPIPE_SUBSYSTEM_WINDOWS_USER -D_DLL -# -DDEBUG + -DFEATURE_GL=1 + -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers + -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers + -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport) )
-# our DBG definitions conflict with mesa source code -remove_definitions(-DDBG=1 -DDBG=0) +if(OPENGL32_USE_TLS) + add_definitions(-DOPENGL32_USE_TLS) +endif()
-add_subdirectory(src) +if((ARCH STREQUAL "i386") AND (NOT MSVC)) + add_definitions( + -DUSE_X86_ASM + -DUSE_MMX_ASM + -DUSE_3DNOW_ASM + -DUSE_SSE_ASM + ) + add_subdirectory(x86) +endif() + +add_subdirectory(drivers/common) +add_subdirectory(main) +add_subdirectory(math) +add_subdirectory(swrast) +add_subdirectory(swrast_setup) +add_subdirectory(tnl) +add_subdirectory(vbo)
Modified: trunk/reactos/dll/opengl/mesa/main/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/CMakeL... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/CMakeLists.txt [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -50,7 +50,6 @@ pixeltransfer.c points.c polygon.c - querymatrix.c rastpos.c readpix.c renderbuffer.c
Modified: trunk/reactos/dll/opengl/mesa/main/api_loopback.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/api_lo... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/api_loopback.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/api_loopback.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -33,8 +33,6 @@ #include "macros.h" #include "api_loopback.h" #include "mtypes.h" -#include "glapi/glapi.h" -#include "glapi/glthread.h" #include "main/dispatch.h" #include "mfeatures.h"
Modified: trunk/reactos/dll/opengl/mesa/main/attrib.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/attrib... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/attrib.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/attrib.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -60,7 +60,6 @@ #include "mtypes.h" #include "main/dispatch.h" #include "hash.h" -#include <stdbool.h>
/** @@ -1152,7 +1151,7 @@ copy_array_attrib(struct gl_context *ctx, struct gl_array_attrib *dest, struct gl_array_attrib *src, - bool vbo_deleted) + GLboolean vbo_deleted) { /* skip ArrayObj */ /* skip DefaultArrayObj, Objects */ @@ -1180,7 +1179,7 @@ * Needs to match value in the object hash. */ dest->ArrayObj->Name = src->ArrayObj->Name; /* And copy all of the rest. */ - copy_array_attrib(ctx, dest, src, false); + copy_array_attrib(ctx, dest, src, GL_FALSE);
/* Just reference them here */ _mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj, @@ -1209,7 +1208,7 @@ * The semantics of objects created using APPLE_vertex_array_objects behave * differently. These objects expect to be recreated by pop. Alas. */ - const bool arb_vao = (src->ArrayObj->Name != 0 + const GLboolean arb_vao = (src->ArrayObj->Name != 0 && src->ArrayObj->ARBsemantics);
if (arb_vao && !_mesa_IsVertexArrayAPPLE(src->ArrayObj->Name)) @@ -1222,12 +1221,12 @@ || src->ArrayBufferObj->Name == 0 || _mesa_IsBufferARB(src->ArrayBufferObj->Name)) { /* ... and restore its content */ - copy_array_attrib(ctx, dest, src, false); + copy_array_attrib(ctx, dest, src, GL_FALSE);
_mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, src->ArrayBufferObj->Name); } else { - copy_array_attrib(ctx, dest, src, true); + copy_array_attrib(ctx, dest, src, GL_TRUE); }
if (!arb_vao
Modified: trunk/reactos/dll/opengl/mesa/main/context.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/contex... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/context.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/context.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -128,8 +128,6 @@ #include "sparc/sparc.h" #endif
-#include <stdbool.h> -
#ifndef MESA_VERBOSE int MESA_VERBOSE = 0;
Modified: trunk/reactos/dll/opengl/mesa/main/dispatch.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/dispat... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/dispatch.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/dispatch.h [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -27,6 +27,8 @@
#if !defined( _DISPATCH_H_ ) # define _DISPATCH_H_ + +typedef PROC _glapi_proc;
/**
Modified: trunk/reactos/dll/opengl/mesa/main/dlist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/dlist.... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/dlist.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/dlist.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -44,7 +44,6 @@ #include "enums.h" #include "eval.h" #include "framebuffer.h" -#include "glapi/glapi.h" #include "hash.h" #include "image.h" #include "light.h"
Modified: trunk/reactos/dll/opengl/mesa/main/execmem.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/execme... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/execmem.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/execmem.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -32,7 +32,6 @@
#include "imports.h" -#include "glapi/glthread.h"
Modified: trunk/reactos/dll/opengl/mesa/main/glheader.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/glhead... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/glheader.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/glheader.h [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -52,6 +52,25 @@ #define GL_GLEXT_PROTOTYPES #include <GL/gl.h> #include <GL/glext.h> + +/* Threading glue for WINAPI */ +#include <stdarg.h> +#include <winbase.h> +typedef CRITICAL_SECTION _glthread_Mutex; +#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0} +#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name) +#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name) +#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name) +#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name) + +/* Context glue with opengl32 */ +#include "../opengl32/opengl32.h" +#define GET_CURRENT_CONTEXT(__ctx__) struct gl_context* __ctx__ = (struct gl_context*)IntGetCurrentICDPrivate() +#define GET_DISPATCH() ((struct _glapi_table*)IntGetCurrentDispatchTable()) +#define _glapi_set_dispatch(table) IntSetCurrentDispatchTable((const GLDISPATCHTABLE*)(table)) +#define _glapi_get_dispatch_table_size() (OPENGL_VERSION_110_ENTRIES) +#define _glapi_get_context() ((void*)IntGetCurrentICDPrivate()) +#define _glapi_set_context(__ctx__) IntSetCurrentICDPrivate((void*)(__ctx__))
#ifdef __cplusplus
Modified: trunk/reactos/dll/opengl/mesa/main/hash.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/hash.c... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/hash.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/hash.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -37,7 +37,6 @@
#include "glheader.h" #include "imports.h" -#include "glapi/glthread.h" #include "hash.h"
Modified: trunk/reactos/dll/opengl/mesa/main/mtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/main/mtypes... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/mtypes.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/mtypes.h [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -37,7 +37,6 @@ #include "main/glheader.h" #include "main/config.h" #include "main/mfeatures.h" -#include "glapi/glapi.h" #include "math/m_matrix.h" /* GLmatrix */ #include "main/simple_list.h" /* struct simple_node */ #include "main/formats.h" /* MESA_FORMAT_COUNT */
Removed: trunk/reactos/dll/opengl/mesa/main/querymatrix.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/main/querymatrix.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/main/querymatrix.c (removed) @@ -1,212 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - **************************************************************************/ - - -/** - * Code to implement GL_OES_query_matrix. See the spec at: - * http://www.khronos.org/registry/gles/extensions/OES/OES_query_matrix.txt - */ - - -#include <stdlib.h> -#include <math.h> -#include "GLES/gl.h" -#include "GLES/glext.h" - - -/** - * This is from the GL_OES_query_matrix extension specification: - * - * GLbitfield glQueryMatrixxOES( GLfixed mantissa[16], - * GLint exponent[16] ) - * mantissa[16] contains the contents of the current matrix in GLfixed - * format. exponent[16] contains the unbiased exponents applied to the - * matrix components, so that the internal representation of component i - * is close to mantissa[i] * 2^exponent[i]. The function returns a status - * word which is zero if all the components are valid. If - * status & (1<<i) != 0, the component i is invalid (e.g., NaN, Inf). - * The implementations are not required to keep track of overflows. In - * that case, the invalid bits are never set. - */ - -#define INT_TO_FIXED(x) ((GLfixed) ((x) << 16)) -#define FLOAT_TO_FIXED(x) ((GLfixed) ((x) * 65536.0)) - -#if defined(_MSC_VER) -/* Oddly, the fpclassify() function doesn't exist in such a form - * on MSVC. This is an implementation using slightly different - * lower-level Windows functions. - */ -#include <float.h> - -enum {FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL} -fpclassify(double x) -{ - switch(_fpclass(x)) { - case _FPCLASS_SNAN: /* signaling NaN */ - case _FPCLASS_QNAN: /* quiet NaN */ - return FP_NAN; - case _FPCLASS_NINF: /* negative infinity */ - case _FPCLASS_PINF: /* positive infinity */ - return FP_INFINITE; - case _FPCLASS_NN: /* negative normal */ - case _FPCLASS_PN: /* positive normal */ - return FP_NORMAL; - case _FPCLASS_ND: /* negative denormalized */ - case _FPCLASS_PD: /* positive denormalized */ - return FP_SUBNORMAL; - case _FPCLASS_NZ: /* negative zero */ - case _FPCLASS_PZ: /* positive zero */ - return FP_ZERO; - default: - /* Should never get here; but if we do, this will guarantee - * that the pattern is not treated like a number. - */ - return FP_NAN; - } -} - -#elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \ - defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \ - (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \ - (defined(__sun) && defined(__GNUC__)) || defined(ANDROID) || defined(__HAIKU__) - -/* fpclassify is available. */ - -#elif !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600 - -enum {FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL} -fpclassify(double x) -{ - /* XXX do something better someday */ - return FP_NORMAL; -} - -#endif - -extern GLbitfield GL_APIENTRY _es_QueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]); - -/* The Mesa functions we'll need */ -extern void GL_APIENTRY _mesa_GetIntegerv(GLenum pname, GLint *params); -extern void GL_APIENTRY _mesa_GetFloatv(GLenum pname, GLfloat *params); - -GLbitfield GL_APIENTRY _es_QueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) -{ - GLfloat matrix[16]; - GLint tmp; - GLenum currentMode = GL_FALSE; - GLenum desiredMatrix = GL_FALSE; - /* The bitfield returns 1 for each component that is invalid (i.e. - * NaN or Inf). In case of error, everything is invalid. - */ - GLbitfield rv; - register unsigned int i; - unsigned int bit; - - /* This data structure defines the mapping between the current matrix - * mode and the desired matrix identifier. - */ - static struct { - GLenum currentMode; - GLenum desiredMatrix; - } modes[] = { - {GL_MODELVIEW, GL_MODELVIEW_MATRIX}, - {GL_PROJECTION, GL_PROJECTION_MATRIX}, - {GL_TEXTURE, GL_TEXTURE_MATRIX}, - }; - - /* Call Mesa to get the current matrix in floating-point form. First, - * we have to figure out what the current matrix mode is. - */ - _mesa_GetIntegerv(GL_MATRIX_MODE, &tmp); - currentMode = (GLenum) tmp; - - /* The mode is either GL_FALSE, if for some reason we failed to query - * the mode, or a given mode from the above table. Search for the - * returned mode to get the desired matrix; if we don't find it, - * we can return immediately, as _mesa_GetInteger() will have - * logged the necessary error already. - */ - for (i = 0; i < sizeof(modes)/sizeof(modes[0]); i++) { - if (modes[i].currentMode == currentMode) { - desiredMatrix = modes[i].desiredMatrix; - break; - } - } - if (desiredMatrix == GL_FALSE) { - /* Early error means all values are invalid. */ - return 0xffff; - } - - /* Now pull the matrix itself. */ - _mesa_GetFloatv(desiredMatrix, matrix); - - rv = 0; - for (i = 0, bit = 1; i < 16; i++, bit<<=1) { - float normalizedFraction; - int exp; - - switch (fpclassify(matrix[i])) { - /* A "subnormal" or denormalized number is too small to be - * represented in normal format; but despite that it's a - * valid floating point number. FP_ZERO and FP_NORMAL - * are both valid as well. We should be fine treating - * these three cases as legitimate floating-point numbers. - */ - case FP_SUBNORMAL: - case FP_NORMAL: - case FP_ZERO: - normalizedFraction = (GLfloat)frexp(matrix[i], &exp); - mantissa[i] = FLOAT_TO_FIXED(normalizedFraction); - exponent[i] = (GLint) exp; - break; - - /* If the entry is not-a-number or an infinity, then the - * matrix component is invalid. The invalid flag for - * the component is already set; might as well set the - * other return values to known values. We'll set - * distinct values so that a savvy end user could determine - * whether the matrix component was a NaN or an infinity, - * but this is more useful for debugging than anything else - * since the standard doesn't specify any such magic - * values to return. - */ - case FP_NAN: - mantissa[i] = INT_TO_FIXED(0); - exponent[i] = (GLint) 0; - rv |= bit; - break; - - case FP_INFINITE: - /* Return +/- 1 based on whether it's a positive or - * negative infinity. - */ - if (matrix[i] > 0) { - mantissa[i] = INT_TO_FIXED(1); - } - else { - mantissa[i] = -INT_TO_FIXED(1); - } - exponent[i] = (GLint) 0; - rv |= bit; - break; - - /* We should never get here; but here's a catching case - * in case fpclassify() is returnings something unexpected. - */ - default: - mantissa[i] = INT_TO_FIXED(2); - exponent[i] = (GLint) 0; - rv |= bit; - break; - } - - } /* for each component */ - - /* All done */ - return rv; -}
Modified: trunk/reactos/dll/opengl/mesa/swrast/s_span.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/swrast/s_sp... ============================================================================== --- trunk/reactos/dll/opengl/mesa/swrast/s_span.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/swrast/s_span.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -49,8 +49,6 @@ #include "s_span.h" #include "s_stencil.h" #include "s_texcombine.h" - -#include <stdbool.h>
/** * Set default fragment attributes for the span using the
Modified: trunk/reactos/dll/opengl/mesa/vbo/vbo_save_loopback.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/vbo/vbo_sav... ============================================================================== --- trunk/reactos/dll/opengl/mesa/vbo/vbo_save_loopback.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/vbo/vbo_save_loopback.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -32,7 +32,6 @@ #include "main/mfeatures.h" #include "main/mtypes.h" #include "main/dispatch.h" -#include "glapi/glapi.h"
#include "vbo_context.h"
Modified: trunk/reactos/dll/opengl/opengl32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/opengl32/CMakeLi... ============================================================================== --- trunk/reactos/dll/opengl/opengl32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/opengl32/CMakeLists.txt [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -1,18 +1,13 @@
spec2def(opengl32.dll opengl32.spec ADD_IMPORTLIB)
-include_directories( - ../mesa/src/mesa - ../mesa/src/mapi) +include_directories(../mesa)
add_definitions( -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport) ) - -# useful to test under windows <> w2k3 -set(OPENGL32_USE_TLS TRUE)
if(OPENGL32_USE_TLS) add_definitions(-DOPENGL32_USE_TLS)
Modified: trunk/reactos/dll/opengl/opengl32/swimpl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/opengl32/swimpl.... ============================================================================== --- trunk/reactos/dll/opengl/opengl32/swimpl.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/opengl32/swimpl.c [iso-8859-1] Mon Oct 7 14:57:57 2013 @@ -22,7 +22,6 @@ #include <tnl/tnl.h> #include <drivers/common/driverfuncs.h> #include <drivers/common/meta.h> -#include <glapi/glapitable.h>
#include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(opengl32); @@ -815,39 +814,3 @@ &fb->bmi, DIB_RGB_COLORS) != 0); } - -/* mesa threading glue */ -void* _glapi_Context = NULL; -struct _glapi_table *_glapi_Dispatch = NULL; - -void* _glapi_get_context() -{ - return IntGetCurrentICDPrivate(); -} - -struct _glapi_table * -_glapi_get_dispatch(void) -{ - return (struct _glapi_table *)IntGetCurrentDispatchTable(); -} - -void _glapi_set_dispatch(struct _glapi_table * table) -{ - IntSetCurrentDispatchTable((const GLDISPATCHTABLE*)table); -} - -unsigned int -_glapi_get_dispatch_table_size(void) -{ - return OPENGL_VERSION_110_ENTRIES; -} - -void -_glapi_set_context(void *context) -{ - /* - * It happens that mesa changes the context, most notably on context deletion. - * Use the space reserved to the ICD for this. - */ - IntSetCurrentICDPrivate(context); -}