aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast.c9
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h7
-rw-r--r--mesalib/src/mesa/glapi/glapi.c7
-rw-r--r--mesalib/src/mesa/glapi/glapi.h13
-rw-r--r--mesalib/src/mesa/glapi/glapi_getproc.c3
-rw-r--r--mesalib/src/mesa/main/bufferobj.c14
-rw-r--r--mesalib/src/mesa/main/queryobj.c10
-rw-r--r--mesalib/src/mesa/main/syncobj.c10
-rw-r--r--mesalib/src/mesa/main/syncobj.h10
-rw-r--r--mesalib/src/mesa/shader/program_parse.tab.c4
10 files changed, 54 insertions, 33 deletions
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index 03c672ecf..e968ce4ba 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -31,6 +31,11 @@
* The back-buffer is allocated by the driver and is private.
*/
+#ifdef _MSC_VER
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
#include "main/context.h"
#include "main/extensions.h"
#include "main/formats.h"
@@ -124,7 +129,7 @@ swrastFillInModes(__DRIscreen *psp,
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
break;
default:
- fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__,
+ fprintf(stderr, "[%s:%u] bad depth %d\n", __FUNCTION__, __LINE__,
pixel_bits);
return NULL;
}
@@ -135,7 +140,7 @@ swrastFillInModes(__DRIscreen *psp,
back_buffer_factor, msaa_samples_array, 1,
GL_TRUE);
if (configs == NULL) {
- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __FUNCTION__,
__LINE__);
return NULL;
}
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h
index 4722007f9..17212be83 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h
@@ -35,6 +35,13 @@
#include <GL/internal/dri_interface.h>
#include "main/mtypes.h"
+#ifdef _MSC_VER
+#ifdef PUBLIC
+#undef PUBLIC
+#endif
+#define PUBLIC __declspec(dllexport)
+#endif
+
/**
* Debugging
diff --git a/mesalib/src/mesa/glapi/glapi.c b/mesalib/src/mesa/glapi/glapi.c
index 13de594aa..b913dc254 100644
--- a/mesalib/src/mesa/glapi/glapi.c
+++ b/mesalib/src/mesa/glapi/glapi.c
@@ -120,15 +120,18 @@ static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
#endif /* defined(THREADS) */
+#ifndef INSERVER
PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
PUBLIC void *_glapi_Context = NULL;
+#endif
#endif /* defined(GLX_USE_TLS) */
/*@}*/
+#ifndef INSERVER
#if defined(THREADS) && !defined(GLX_USE_TLS)
void
@@ -159,7 +162,6 @@ _glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
#endif
-
/**
* We should call this periodically from a function such as glXMakeCurrent
* in order to test if multiple threads are being used.
@@ -187,7 +189,6 @@ _glapi_check_multithread(void)
}
CHECK_MULTITHREAD_UNLOCK();
}
-
#else
void
@@ -201,6 +202,8 @@ _glapi_check_multithread(void) { }
#endif
+#endif /* INSERVER */
+
/**
diff --git a/mesalib/src/mesa/glapi/glapi.h b/mesalib/src/mesa/glapi/glapi.h
index 1ca2e4bef..8603317da 100644
--- a/mesalib/src/mesa/glapi/glapi.h
+++ b/mesalib/src/mesa/glapi/glapi.h
@@ -94,9 +94,14 @@ extern __thread void * _glapi_tls_Context
#else
-extern struct _glapi_table *_glapi_Dispatch;
+#ifdef INSERVER
+#define EXTERN _declspec(dllimport)
+#else
+#define EXTERN _declspec(dllexport)
+#endif
-extern void *_glapi_Context;
+EXTERN struct _glapi_table *_glapi_Dispatch;
+EXTERN void *_glapi_Context;
# ifdef THREADS
@@ -129,7 +134,7 @@ extern void
_glapi_destroy_multithread(void);
-extern void
+EXTERN void
_glapi_check_multithread(void);
@@ -153,7 +158,7 @@ extern unsigned int
_glapi_get_dispatch_table_size(void);
-extern int
+EXTERN int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature );
diff --git a/mesalib/src/mesa/glapi/glapi_getproc.c b/mesalib/src/mesa/glapi/glapi_getproc.c
index a6dbf173e..e0920f9a3 100644
--- a/mesalib/src/mesa/glapi/glapi_getproc.c
+++ b/mesalib/src/mesa/glapi/glapi_getproc.c
@@ -583,6 +583,7 @@ add_function_name( const char * funcName )
* the parameter signature of a static function.
*/
+#ifndef INSERVER
PUBLIC int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature )
@@ -677,7 +678,7 @@ _glapi_add_dispatch( const char * const * function_names,
return offset;
}
-
+#endif
/**
* Return offset of entrypoint for named function within dispatch table.
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index 71d1514fe..56dfdae3d 100644
--- a/mesalib/src/mesa/main/bufferobj.c
+++ b/mesalib/src/mesa/main/bufferobj.c
@@ -186,7 +186,7 @@ buffer_object_subdata_range_good( GLcontext * ctx, GLenum target,
*
* Default callback for the \c dd_function_table::NewBufferObject() hook.
*/
-static struct gl_buffer_object *
+struct gl_buffer_object *
_mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
{
struct gl_buffer_object *obj;
@@ -204,7 +204,7 @@ _mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
*
* Default callback for the \c dd_function_table::DeleteBuffer() hook.
*/
-static void
+void
_mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
{
(void) ctx;
@@ -325,7 +325,7 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj,
* \return GL_TRUE for success, GL_FALSE for failure
* \sa glBufferDataARB, dd_function_table::BufferData.
*/
-static GLboolean
+GLboolean
_mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
const GLvoid * data, GLenum usage,
struct gl_buffer_object * bufObj )
@@ -369,7 +369,7 @@ _mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
*
* \sa glBufferSubDataARB, dd_function_table::BufferSubData.
*/
-static void
+void
_mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, const GLvoid * data,
struct gl_buffer_object * bufObj )
@@ -402,7 +402,7 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
*
* \sa glBufferGetSubDataARB, dd_function_table::GetBufferSubData.
*/
-static void
+void
_mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, GLvoid * data,
struct gl_buffer_object * bufObj )
@@ -429,7 +429,7 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
*
* \sa glMapBufferARB, dd_function_table::MapBuffer
*/
-static void *
+void *
_mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access,
struct gl_buffer_object *bufObj )
{
@@ -494,7 +494,7 @@ _mesa_buffer_flush_mapped_range( GLcontext *ctx, GLenum target,
*
* \sa glUnmapBufferARB, dd_function_table::UnmapBuffer
*/
-static GLboolean
+GLboolean
_mesa_buffer_unmap( GLcontext *ctx, GLenum target,
struct gl_buffer_object *bufObj )
{
diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c
index e14511a38..ba7cfc30f 100644
--- a/mesalib/src/mesa/main/queryobj.c
+++ b/mesalib/src/mesa/main/queryobj.c
@@ -42,7 +42,7 @@
* \param id - the new object's ID
* \return pointer to new query_object object or NULL if out of memory.
*/
-static struct gl_query_object *
+struct gl_query_object *
_mesa_new_query_object(GLcontext *ctx, GLuint id)
{
struct gl_query_object *q = MALLOC_STRUCT(gl_query_object);
@@ -61,7 +61,7 @@ _mesa_new_query_object(GLcontext *ctx, GLuint id)
* Begin a query. Software driver fallback.
* Called via ctx->Driver.BeginQuery().
*/
-static void
+void
_mesa_begin_query(GLcontext *ctx, struct gl_query_object *q)
{
/* no-op */
@@ -72,7 +72,7 @@ _mesa_begin_query(GLcontext *ctx, struct gl_query_object *q)
* End a query. Software driver fallback.
* Called via ctx->Driver.EndQuery().
*/
-static void
+void
_mesa_end_query(GLcontext *ctx, struct gl_query_object *q)
{
q->Ready = GL_TRUE;
@@ -83,7 +83,7 @@ _mesa_end_query(GLcontext *ctx, struct gl_query_object *q)
* Wait for query to complete. Software driver fallback.
* Called via ctx->Driver.WaitQuery().
*/
-static void
+void
_mesa_wait_query(GLcontext *ctx, struct gl_query_object *q)
{
/* For software drivers, _mesa_end_query() should have completed the query.
@@ -111,7 +111,7 @@ _mesa_check_query(GLcontext *ctx, struct gl_query_object *q)
* Delete a query object. Called via ctx->Driver.DeleteQuery().
* Not removed from hash table here.
*/
-static void
+void
_mesa_delete_query(GLcontext *ctx, struct gl_query_object *q)
{
free(q);
diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c
index 1bff30817..5b7aaa1d0 100644
--- a/mesalib/src/mesa/main/syncobj.c
+++ b/mesalib/src/mesa/main/syncobj.c
@@ -121,7 +121,7 @@ _mesa_wait_sync(GLcontext *ctx, struct gl_sync_object *syncObj,
}
-void
+void GLAPIENTRY
_mesa_init_sync_object_functions(struct dd_function_table *driver)
{
driver->NewSyncObject = _mesa_new_sync_object;
@@ -139,7 +139,7 @@ _mesa_init_sync_object_functions(struct dd_function_table *driver)
/**
* Allocate/init the context state related to sync objects.
*/
-void
+void GLAPIENTRY
_mesa_init_sync(GLcontext *ctx)
{
(void) ctx;
@@ -149,7 +149,7 @@ _mesa_init_sync(GLcontext *ctx)
/**
* Free the context state related to sync objects.
*/
-void
+void GLAPIENTRY
_mesa_free_sync_data(GLcontext *ctx)
{
(void) ctx;
@@ -165,7 +165,7 @@ _mesa_validate_sync(struct gl_sync_object *syncObj)
}
-void
+void GLAPIENTRY
_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
{
_glthread_LOCK_MUTEX(ctx->Shared->Mutex);
@@ -174,7 +174,7 @@ _mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
}
-void
+void GLAPIENTRY
_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
{
_glthread_LOCK_MUTEX(ctx->Shared->Mutex);
diff --git a/mesalib/src/mesa/main/syncobj.h b/mesalib/src/mesa/main/syncobj.h
index f23fa281e..161ea4411 100644
--- a/mesalib/src/mesa/main/syncobj.h
+++ b/mesalib/src/mesa/main/syncobj.h
@@ -33,19 +33,19 @@
#include "context.h"
-extern void
+extern void GLAPIENTRY
_mesa_init_sync_object_functions(struct dd_function_table *driver);
-extern void
+extern void GLAPIENTRY
_mesa_init_sync(GLcontext *);
-extern void
+extern void GLAPIENTRY
_mesa_free_sync_data(GLcontext *);
-extern void
+extern void GLAPIENTRY
_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj);
-extern void
+extern void GLAPIENTRY
_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj);
extern GLboolean GLAPIENTRY
diff --git a/mesalib/src/mesa/shader/program_parse.tab.c b/mesalib/src/mesa/shader/program_parse.tab.c
index 5679b6497..64a987e16 100644
--- a/mesalib/src/mesa/shader/program_parse.tab.c
+++ b/mesalib/src/mesa/shader/program_parse.tab.c
@@ -532,14 +532,14 @@ YYID (yyi)
# ifndef YYMALLOC
# define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+ || defined __cplusplus )
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+ || defined __cplusplus )
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif