diff options
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r-- | mesalib/src/mesa/drivers/dri/common/drisw_util.c | 3 | ||||
-rw-r--r-- | mesalib/src/mesa/drivers/dri/swrast/swrast.c | 27 | ||||
-rw-r--r-- | mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h | 7 | ||||
-rw-r--r-- | mesalib/src/mesa/main/.gitignore | 21 | ||||
-rw-r--r-- | mesalib/src/mesa/main/bufferobj.c | 12 | ||||
-rw-r--r-- | mesalib/src/mesa/main/config.h | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/main/dlopen.h | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/main/queryobj.c | 10 | ||||
-rw-r--r-- | mesalib/src/mesa/main/syncobj.c | 10 | ||||
-rw-r--r-- | mesalib/src/mesa/main/syncobj.h | 10 | ||||
-rw-r--r-- | mesalib/src/mesa/main/version.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | mesalib/src/mesa/program/.gitignore | 8 | ||||
-rw-r--r-- | mesalib/src/mesa/program/doflexbison.bat | 18 | ||||
-rw-r--r-- | mesalib/src/mesa/program/hash_table.h | 1 |
14 files changed, 88 insertions, 51 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/drisw_util.c b/mesalib/src/mesa/drivers/dri/common/drisw_util.c index 6af101c31..62bdd88d1 100644 --- a/mesalib/src/mesa/drivers/dri/common/drisw_util.c +++ b/mesalib/src/mesa/drivers/dri/common/drisw_util.c @@ -109,6 +109,7 @@ driCreateContextAttribs(__DRIscreen *screen, int api, unsigned major_version = 1; unsigned minor_version = 0; uint32_t flags = 0; + unsigned i; /* Either num_attribs is zero and attribs is NULL, or num_attribs is not * zero and attribs is not NULL. @@ -134,7 +135,7 @@ driCreateContextAttribs(__DRIscreen *screen, int api, return NULL; } - for (unsigned i = 0; i < num_attribs; i++) { + for (i = 0; i < num_attribs; i++) { switch (attribs[i * 2]) { case __DRI_CTX_ATTRIB_MAJOR_VERSION: major_version = attribs[i * 2 + 1]; diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c index b380de307..e6e001cf5 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/api_exec.h" #include "main/context.h" #include "main/extensions.h" @@ -173,7 +178,7 @@ swrastFillInModes(__DRIscreen *psp, format = MESA_FORMAT_ARGB8888; 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; } @@ -184,7 +189,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; } @@ -888,15 +893,15 @@ dri_unbind_context(__DRIcontext * cPriv) const struct __DriverAPIRec driDriverAPI = { - .InitScreen = dri_init_screen, - .DestroyScreen = dri_destroy_screen, - .CreateContext = dri_create_context, - .DestroyContext = dri_destroy_context, - .CreateBuffer = dri_create_buffer, - .DestroyBuffer = dri_destroy_buffer, - .SwapBuffers = dri_swap_buffers, - .MakeCurrent = dri_make_current, - .UnbindContext = dri_unbind_context, + /*.InitScreen = */dri_init_screen, + /*.DestroyScreen = */dri_destroy_screen, + /*.CreateContext = */dri_create_context, + /*.DestroyContext = */dri_destroy_context, + /*.CreateBuffer = */dri_create_buffer, + /*.DestroyBuffer = */dri_destroy_buffer, + /*.SwapBuffers = */dri_swap_buffers, + /*.MakeCurrent = */dri_make_current, + /*.UnbindContext = */dri_unbind_context, }; /* This is the table of extensions that the loader will dlsym() for. */ diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h index b25de931a..36ab02053 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -33,6 +33,13 @@ #include "dri_util.h" #include "swrast/s_context.h" +#ifdef _MSC_VER +#ifdef PUBLIC +#undef PUBLIC +#endif +#define PUBLIC __declspec(dllexport) +#endif + /** * Debugging diff --git a/mesalib/src/mesa/main/.gitignore b/mesalib/src/mesa/main/.gitignore index 837f49036..b1b83f102 100644 --- a/mesalib/src/mesa/main/.gitignore +++ b/mesalib/src/mesa/main/.gitignore @@ -1,10 +1,11 @@ -api_exec.c -dispatch.h -enums.c -get_es1.c -get_es2.c -git_sha1.h -git_sha1.h.tmp -remap_helper.h -get_hash.h -get_hash.h.tmp +api_exec.c
+dispatch.h
+enums.c
+get_es1.c
+get_es2.c
+git_sha1.h
+git_sha1.h.tmp
+remap_helper.h
+get_hash.h
+get_hash.h.tmp
+glapitable.h
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index b82ba7b4c..ba464fe9f 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -235,7 +235,7 @@ buffer_object_subdata_range_good( struct gl_context * 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( struct gl_context *ctx, GLuint name, GLenum target ) { struct gl_buffer_object *obj; @@ -253,7 +253,7 @@ _mesa_new_buffer_object( struct gl_context *ctx, GLuint name, GLenum target ) * * Default callback for the \c dd_function_table::DeleteBuffer() hook. */ -static void +void _mesa_delete_buffer_object(struct gl_context *ctx, struct gl_buffer_object *bufObj) { @@ -404,7 +404,7 @@ _mesa_total_buffer_object_memory(struct gl_context *ctx) * \return GL_TRUE for success, GL_FALSE for failure * \sa glBufferDataARB, dd_function_table::BufferData. */ -static GLboolean +GLboolean _mesa_buffer_data( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage, struct gl_buffer_object * bufObj ) @@ -448,7 +448,7 @@ _mesa_buffer_data( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, * * \sa glBufferSubDataARB, dd_function_table::BufferSubData. */ -static void +void _mesa_buffer_subdata( struct gl_context *ctx, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data, struct gl_buffer_object * bufObj ) @@ -481,7 +481,7 @@ _mesa_buffer_subdata( struct gl_context *ctx, GLintptrARB offset, * * \sa glBufferGetSubDataARB, dd_function_table::GetBufferSubData. */ -static void +void _mesa_buffer_get_subdata( struct gl_context *ctx, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data, struct gl_buffer_object * bufObj ) @@ -538,7 +538,7 @@ _mesa_buffer_flush_mapped_range( struct gl_context *ctx, * * \sa glUnmapBufferARB, dd_function_table::UnmapBuffer */ -static GLboolean +GLboolean _mesa_buffer_unmap( struct gl_context *ctx, struct gl_buffer_object *bufObj ) { (void) ctx; diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h index 99910d7f3..8e83c3eab 100644 --- a/mesalib/src/mesa/main/config.h +++ b/mesalib/src/mesa/main/config.h @@ -32,6 +32,10 @@ #define MESA_CONFIG_H_INCLUDED +#define PACKAGE_VERSION "9.2-devel" +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa" + + /** * \name OpenGL implementation limits */ diff --git a/mesalib/src/mesa/main/dlopen.h b/mesalib/src/mesa/main/dlopen.h index a5366a14e..26422b695 100644 --- a/mesalib/src/mesa/main/dlopen.h +++ b/mesalib/src/mesa/main/dlopen.h @@ -51,7 +51,7 @@ _mesa_dlopen(const char *libname, int flags) #elif defined(HAVE_DLOPEN) flags = RTLD_LAZY | RTLD_GLOBAL; /* Overriding flags at this time */ return dlopen(libname, flags); -#elif defined(__MINGW32__) +#elif defined(__MINGW32__) || defined(_WIN32) return LoadLibraryA(libname); #else return NULL; @@ -81,7 +81,7 @@ _mesa_dlsym(void *handle, const char *fname) u.v = dlsym(handle, fname2); #elif defined(HAVE_DLOPEN) u.v = dlsym(handle, fname); -#elif defined(__MINGW32__) +#elif defined(__MINGW32__) || defined(_WIN32) u.v = (void *) GetProcAddress(handle, fname); #else u.v = NULL; @@ -99,7 +99,7 @@ _mesa_dlclose(void *handle) (void) handle; #elif defined(HAVE_DLOPEN) dlclose(handle); -#elif defined(__MINGW32__) +#elif defined(__MINGW32__) || defined(_WIN32) FreeLibrary(handle); #else (void) handle; diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c index f0db740fd..3de736828 100644 --- a/mesalib/src/mesa/main/queryobj.c +++ b/mesalib/src/mesa/main/queryobj.c @@ -41,7 +41,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(struct gl_context *ctx, GLuint id) { struct gl_query_object *q = MALLOC_STRUCT(gl_query_object); @@ -73,7 +73,7 @@ _mesa_new_query_object(struct gl_context *ctx, GLuint id) * Begin a query. Software driver fallback. * Called via ctx->Driver.BeginQuery(). */ -static void +void _mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q) { /* no-op */ @@ -84,7 +84,7 @@ _mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q) * End a query. Software driver fallback. * Called via ctx->Driver.EndQuery(). */ -static void +void _mesa_end_query(struct gl_context *ctx, struct gl_query_object *q) { q->Ready = GL_TRUE; @@ -95,7 +95,7 @@ _mesa_end_query(struct gl_context *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(struct gl_context *ctx, struct gl_query_object *q) { /* For software drivers, _mesa_end_query() should have completed the query. @@ -123,7 +123,7 @@ _mesa_check_query(struct gl_context *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(struct gl_context *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 020fa1d7a..67eb2d357 100644 --- a/mesalib/src/mesa/main/syncobj.c +++ b/mesalib/src/mesa/main/syncobj.c @@ -127,7 +127,7 @@ _mesa_wait_sync(struct gl_context *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; @@ -144,7 +144,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(struct gl_context *ctx) { (void) ctx; @@ -154,7 +154,7 @@ _mesa_init_sync(struct gl_context *ctx) /** * Free the context state related to sync objects. */ -void +void GLAPIENTRY _mesa_free_sync_data(struct gl_context *ctx) { (void) ctx; @@ -173,7 +173,7 @@ _mesa_validate_sync(struct gl_context *ctx, struct gl_sync_object *syncObj) } -void +void GLAPIENTRY _mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { _glthread_LOCK_MUTEX(ctx->Shared->Mutex); @@ -182,7 +182,7 @@ _mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) } -void +void GLAPIENTRY _mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { struct set_entry *entry; diff --git a/mesalib/src/mesa/main/syncobj.h b/mesalib/src/mesa/main/syncobj.h index 6b4367466..5be2ba10d 100644 --- a/mesalib/src/mesa/main/syncobj.h +++ b/mesalib/src/mesa/main/syncobj.h @@ -39,19 +39,19 @@ struct dd_function_table; struct gl_context; struct gl_sync_object; -extern void +extern void GLAPIENTRY _mesa_init_sync_object_functions(struct dd_function_table *driver); -extern void +extern void GLAPIENTRY _mesa_init_sync(struct gl_context *); -extern void +extern void GLAPIENTRY _mesa_free_sync_data(struct gl_context *); -extern void +extern void GLAPIENTRY _mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj); -extern void +extern void GLAPIENTRY _mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj); extern GLboolean GLAPIENTRY diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c index ecca446c1..c4ae2a6ce 100644 --- a/mesalib/src/mesa/main/version.c +++ b/mesalib/src/mesa/main/version.c @@ -25,7 +25,7 @@ #include "imports.h" #include "mtypes.h" #include "version.h" -#include "git_sha1.h" +/*#include "git_sha1.h"*/ /** * Scans 'string' to see if it ends with 'ending'. diff --git a/mesalib/src/mesa/program/.gitignore b/mesalib/src/mesa/program/.gitignore index 4c20872e1..2f1601fcc 100644..100755 --- a/mesalib/src/mesa/program/.gitignore +++ b/mesalib/src/mesa/program/.gitignore @@ -1,4 +1,4 @@ -program_parse.output -lex.yy.c -program_parse.tab.c -program_parse.tab.h +lex.yy.c
+program_parse.output
+program_parse.tab.c
+program_parse.tab.h
\ No newline at end of file diff --git a/mesalib/src/mesa/program/doflexbison.bat b/mesalib/src/mesa/program/doflexbison.bat new file mode 100644 index 000000000..b39b53cf8 --- /dev/null +++ b/mesalib/src/mesa/program/doflexbison.bat @@ -0,0 +1,18 @@ +@echo off
+setlocal
+
+cd "%~dp0"
+
+set M4=..\..\..\..\tools\mhmake\m4.exe
+set BISON_PKGDATADIR=../../../../tools/mhmake/src/bisondata
+
+set path=..\..\..\..\tools\mhmake;%path%
+
+..\..\..\..\tools\mhmake\bison.exe -v -d -p "_mesa_program_" --output=program_parse.tab.c program_parse.y
+
+copy "..\..\..\..\tools\mhmake\flex++.exe" flex.exe
+flex.exe --never-interactive --outfile=lex.yy.c program_lexer.l
+del flex.exe
+
+endlocal
+
diff --git a/mesalib/src/mesa/program/hash_table.h b/mesalib/src/mesa/program/hash_table.h index e95fc4982..b814497a6 100644 --- a/mesalib/src/mesa/program/hash_table.h +++ b/mesalib/src/mesa/program/hash_table.h @@ -37,6 +37,7 @@ #include <stdint.h> #include <limits.h> #include <assert.h> +#include <unistd.h> struct string_to_uint_map; |