aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa')
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/drivers/common/meta_blit.c0
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/drivers/dri/common/dri_util.c84
-rw-r--r--mesalib/src/mesa/drivers/dri/common/megadriver_stub.c2
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlconfig.c39
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/drivers/dri/common/xmlconfig.h0
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast.c51
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h7
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/main/.gitignore23
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/main/bufferobj.c12
-rw-r--r--mesalib/src/mesa/main/config.h4
-rw-r--r--mesalib/src/mesa/main/dlopen.h6
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/main/imports.h1
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/main/macros.h12
-rw-r--r--mesalib/src/mesa/main/queryobj.c10
-rw-r--r--mesalib/src/mesa/main/remap.c4
-rw-r--r--mesalib/src/mesa/main/remap.h2
-rw-r--r--mesalib/src/mesa/main/syncobj.c10
-rw-r--r--mesalib/src/mesa/main/syncobj.h10
-rw-r--r--mesalib/src/mesa/main/version.c2
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/program/.gitignore8
-rw-r--r--mesalib/src/mesa/program/doflexbison.bat18
-rw-r--r--mesalib/src/mesa/program/hash_table.h1
22 files changed, 189 insertions, 117 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta_blit.c b/mesalib/src/mesa/drivers/common/meta_blit.c
index 01cb532fe..01cb532fe 100644..100755
--- a/mesalib/src/mesa/drivers/common/meta_blit.c
+++ b/mesalib/src/mesa/drivers/common/meta_blit.c
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c
index d6e875fcf..28923319d 100644..100755
--- a/mesalib/src/mesa/drivers/dri/common/dri_util.c
+++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c
@@ -116,6 +116,8 @@ driCreateNewScreen2(int scrn, int fd,
{
static const __DRIextension *emptyExtensionList[] = { NULL };
__DRIscreen *psp;
+ int gl_version_override;
+ int i;
psp = calloc(1, sizeof(*psp));
if (!psp)
@@ -128,7 +130,7 @@ driCreateNewScreen2(int scrn, int fd,
* (megadrivers), use that instead.
*/
if (driver_extensions) {
- for (int i = 0; driver_extensions[i]; i++) {
+ for (i = 0; driver_extensions[i]; i++) {
if (strcmp(driver_extensions[i]->name, __DRI_DRIVER_VTABLE) == 0) {
psp->driver =
((__DRIDriverVtableExtension *)driver_extensions[i])->vtable;
@@ -162,7 +164,7 @@ driCreateNewScreen2(int scrn, int fd,
return NULL;
}
- int gl_version_override = _mesa_get_gl_version_override();
+ gl_version_override = _mesa_get_gl_version_override();
if (gl_version_override >= 31) {
psp->max_gl_core_version = MAX2(psp->max_gl_core_version,
gl_version_override);
@@ -310,6 +312,8 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
unsigned minor_version = 0;
uint32_t flags = 0;
bool notify_reset = false;
+ unsigned i;
+ struct gl_context *ctx;
assert((num_attribs == 0) || (attribs != NULL));
@@ -337,7 +341,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];
@@ -734,36 +738,36 @@ driSwapBuffers(__DRIdrawable *pdp)
/** Core interface */
const __DRIcoreExtension driCoreExtension = {
- .base = { __DRI_CORE, 1 },
-
- .createNewScreen = NULL,
- .destroyScreen = driDestroyScreen,
- .getExtensions = driGetExtensions,
- .getConfigAttrib = driGetConfigAttrib,
- .indexConfigAttrib = driIndexConfigAttrib,
- .createNewDrawable = NULL,
- .destroyDrawable = driDestroyDrawable,
- .swapBuffers = driSwapBuffers, /* swrast */
- .createNewContext = driCreateNewContext, /* swrast */
- .copyContext = driCopyContext,
- .destroyContext = driDestroyContext,
- .bindContext = driBindContext,
- .unbindContext = driUnbindContext
+ /*.base =*/ { __DRI_CORE, 1 },
+
+ /*.createNewScreen =*/ NULL,
+ /*.destroyScreen =*/ driDestroyScreen,
+ /*.getExtensions =*/ driGetExtensions,
+ /*.getConfigAttrib =*/ driGetConfigAttrib,
+ /*.indexConfigAttrib =*/ driIndexConfigAttrib,
+ /*.createNewDrawable =*/ NULL,
+ /*.destroyDrawable =*/ driDestroyDrawable,
+ /*.swapBuffers =*/ driSwapBuffers, /* swrast */
+ /*.createNewContext =*/ driCreateNewContext, /* swrast */
+ /*.copyContext =*/ driCopyContext,
+ /*.destroyContext =*/ driDestroyContext,
+ /*.bindContext =*/ driBindContext,
+ /*.unbindContext =*/ driUnbindContext
};
/** DRI2 interface */
const __DRIdri2Extension driDRI2Extension = {
- .base = { __DRI_DRI2, 4 },
-
- .createNewScreen = dri2CreateNewScreen,
- .createNewDrawable = driCreateNewDrawable,
- .createNewContext = driCreateNewContext,
- .getAPIMask = driGetAPIMask,
- .createNewContextForAPI = driCreateNewContextForAPI,
- .allocateBuffer = dri2AllocateBuffer,
- .releaseBuffer = dri2ReleaseBuffer,
- .createContextAttribs = driCreateContextAttribs,
- .createNewScreen2 = driCreateNewScreen2,
+ /*.base =*/ { __DRI_DRI2, 4 },
+
+ /*.createNewScreen =*/ dri2CreateNewScreen,
+ /*.createNewDrawable =*/ driCreateNewDrawable,
+ /*.createNewContext =*/ driCreateNewContext,
+ /*.getAPIMask =*/ driGetAPIMask,
+ /*.createNewContextForAPI =*/ driCreateNewContextForAPI,
+ /*.allocateBuffer =*/ dri2AllocateBuffer,
+ /*.releaseBuffer =*/ dri2ReleaseBuffer,
+ /*.createContextAttribs =*/ driCreateContextAttribs,
+ /*.createNewScreen2 =*/ driCreateNewScreen2,
};
const __DRIswrastExtension driSWRastExtension = {
@@ -777,11 +781,11 @@ const __DRIswrastExtension driSWRastExtension = {
};
const __DRI2configQueryExtension dri2ConfigQueryExtension = {
- .base = { __DRI2_CONFIG_QUERY, 1 },
+ /*.base =*/ { __DRI2_CONFIG_QUERY, 1 },
- .configQueryb = dri2ConfigQueryb,
- .configQueryi = dri2ConfigQueryi,
- .configQueryf = dri2ConfigQueryf,
+ /*.configQueryb =*/ dri2ConfigQueryb,
+ /*.configQueryi =*/ dri2ConfigQueryi,
+ /*.configQueryf =*/ dri2ConfigQueryf,
};
void
@@ -873,12 +877,12 @@ driImageFormatToGLFormat(uint32_t image_format)
/** Image driver interface */
const __DRIimageDriverExtension driImageDriverExtension = {
- .base = { __DRI_IMAGE_DRIVER, 1 },
+ /*.base =*/ { __DRI_IMAGE_DRIVER, 1 },
- .createNewScreen2 = driCreateNewScreen2,
- .createNewDrawable = driCreateNewDrawable,
- .getAPIMask = driGetAPIMask,
- .createContextAttribs = driCreateContextAttribs,
+ /*.createNewScreen2 =*/ driCreateNewScreen2,
+ /*.createNewDrawable =*/ driCreateNewDrawable,
+ /*.createContextAttribs =*/ driCreateContextAttribs,
+ /*.getAPIMask =*/ driGetAPIMask,
};
/* swrast copy sub buffer entrypoint. */
@@ -892,7 +896,7 @@ static void driCopySubBuffer(__DRIdrawable *pdp, int x, int y,
/* for swrast only */
const __DRIcopySubBufferExtension driCopySubBufferExtension = {
- .base = { __DRI_COPY_SUB_BUFFER, 1 },
+ /*.base =*/ { __DRI_COPY_SUB_BUFFER, 1 },
- .copySubBuffer = driCopySubBuffer,
+ /*.copySubBuffer =*/ driCopySubBuffer,
};
diff --git a/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c b/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c
index d085080a1..f0c8878a8 100644
--- a/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c
+++ b/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c
@@ -162,5 +162,5 @@ __DRIconfig **stub_error_init_screen(__DRIscreen *psp)
* never be used.
*/
const struct __DriverAPIRec driDriverAPI = {
- .InitScreen = stub_error_init_screen,
+ /*.InitScreen = */stub_error_init_screen,
};
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
index 8e48522e2..ffef73e8a 100644
--- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
@@ -101,7 +101,11 @@ static const char *__getProgramName () {
# define GET_PROGRAM_NAME() __getProgramName()
# else
# define GET_PROGRAM_NAME() ""
+# ifdef _MSC_VER
+# pragma message("Per application configuration won't work with your OS version.")
+# else
# warning "Per application configuration won't work with your OS version."
+# endif
# endif
#endif
@@ -286,6 +290,29 @@ static float strToF (const XML_Char *string, const XML_Char **tail) {
return result;
}
+#if !defined(HAVE_STRNDUP)
+
+/* Emulates glibc's strndup() */
+char *
+strndup(const char *str, size_t size)
+{
+ size_t len;
+ char *result = (char *)NULL;
+
+ if ((char *)NULL == str) return (char *)NULL;
+
+ len = strlen(str);
+ if (!len) return strdup("");
+ if (size > len) size = len;
+
+ result = (char *)malloc((size + 1) * sizeof (char));
+ memcpy(result, str, size);
+ result[size] = 0x0;
+ return result;
+}
+
+#endif /* _WIN32 should be !HAVE_STRNDUP */
+
/** \brief Parse a value of a given type. */
static unsigned char parseValue (driOptionValue *v, driOptionType type,
const XML_Char *string) {
@@ -447,11 +474,11 @@ __driUtilMessage(const char *f, ...)
(int) XML_GetCurrentLineNumber(data->parser), \
(int) XML_GetCurrentColumnNumber(data->parser)); \
} while (0)
-#define XML_WARNING(msg,args...) do { \
+#define XML_WARNING(msg, ...) do { \
__driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \
(int) XML_GetCurrentLineNumber(data->parser), \
(int) XML_GetCurrentColumnNumber(data->parser), \
- args); \
+ __VA_ARGS__); \
} while (0)
/** \brief Output an error message. */
#define XML_ERROR1(msg) do { \
@@ -459,11 +486,11 @@ __driUtilMessage(const char *f, ...)
(int) XML_GetCurrentLineNumber(data->parser), \
(int) XML_GetCurrentColumnNumber(data->parser)); \
} while (0)
-#define XML_ERROR(msg,args...) do { \
+#define XML_ERROR(msg, ...) do { \
__driUtilMessage ("Error in %s line %d, column %d: "msg, data->name, \
(int) XML_GetCurrentLineNumber(data->parser), \
(int) XML_GetCurrentColumnNumber(data->parser), \
- args); \
+ __VA_ARGS__); \
} while (0)
/** \brief Output a fatal error message and abort. */
#define XML_FATAL1(msg) do { \
@@ -473,12 +500,12 @@ __driUtilMessage(const char *f, ...)
(int) XML_GetCurrentColumnNumber(data->parser)); \
abort();\
} while (0)
-#define XML_FATAL(msg,args...) do { \
+#define XML_FATAL(msg, ...) do { \
fprintf (stderr, "Fatal error in %s line %d, column %d: "msg"\n", \
data->name, \
(int) XML_GetCurrentLineNumber(data->parser), \
(int) XML_GetCurrentColumnNumber(data->parser), \
- args); \
+ __VA_ARGS__); \
abort();\
} while (0)
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.h b/mesalib/src/mesa/drivers/dri/common/xmlconfig.h
index 8969843bd..8969843bd 100644..100755
--- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.h
+++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.h
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index e8a2c12d7..396eaecbd 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -32,6 +32,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"
@@ -59,7 +64,7 @@
#include "swrast_priv.h"
#include "swrast/s_context.h"
-const __DRIextension **__driDriverGetExtensions_swrast(void);
+PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void);
const char const *swrast_vendor_string = "Mesa Project";
const char const *swrast_renderer_string = "Software Rasterizer";
@@ -80,7 +85,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
uint32_t internalFormat;
mesa_format texFormat;
- dri_ctx = pDRICtx->driverPrivate;
+ dri_ctx = (struct dri_context *)pDRICtx->driverPrivate;
internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4);
@@ -136,6 +141,7 @@ swrast_query_renderer_integer(__DRIscreen *psp, int param,
return 0;
case __DRI2_RENDERER_VIDEO_MEMORY: {
/* XXX: Do we want to return the full amount of system memory ? */
+#ifndef _MSC_VER
const long system_memory_pages = sysconf(_SC_PHYS_PAGES);
const long system_page_size = sysconf(_SC_PAGE_SIZE);
@@ -150,6 +156,9 @@ swrast_query_renderer_integer(__DRIscreen *psp, int param,
value[0] = system_memory_megabytes;
return 0;
+#else
+ return -1;
+#endif
}
case __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE:
/**
@@ -244,7 +253,7 @@ swrastFillInModes(__DRIscreen *psp,
format = MESA_FORMAT_B8G8R8A8_UNORM;
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;
}
@@ -255,7 +264,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;
}
@@ -379,7 +388,7 @@ swrast_alloc_back_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
swrast_alloc_front_storage(ctx, rb, internalFormat, width, height);
- xrb->Base.Buffer = malloc(height * xrb->pitch);
+ xrb->Base.Buffer = (GLubyte*)malloc(height * xrb->pitch);
return GL_TRUE;
}
@@ -388,7 +397,7 @@ static struct dri_swrast_renderbuffer *
swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv,
GLboolean front)
{
- struct dri_swrast_renderbuffer *xrb = calloc(1, sizeof *xrb);
+ struct dri_swrast_renderbuffer *xrb = (struct dri_swrast_renderbuffer *)calloc(1, sizeof *xrb);
struct gl_renderbuffer *rb;
GLuint pixel_format;
@@ -469,7 +478,7 @@ swrast_map_renderbuffer(struct gl_context *ctx,
xrb->map_h = h;
stride = w * cpp;
- xrb->Base.Buffer = malloc(h * stride);
+ xrb->Base.Buffer = (GLubyte*)malloc(h * stride);
sPriv->swrast_loader->getImage(dPriv, x, rb->Height - y - h, w, h,
(char *) xrb->Base.Buffer,
@@ -538,7 +547,7 @@ dri_create_buffer(__DRIscreen * sPriv,
dPriv->driverPrivate = drawable;
drawable->dPriv = dPriv;
- drawable->row = malloc(SWRAST_MAX_WIDTH * 4);
+ drawable->row = (char*)malloc(SWRAST_MAX_WIDTH * 4);
if (drawable->row == NULL)
goto drawable_fail;
@@ -919,21 +928,23 @@ dri_copy_sub_buffer(__DRIdrawable *dPriv, int x, int y,
static const struct __DriverAPIRec swrast_driver_api = {
- .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,
- .CopySubBuffer = dri_copy_sub_buffer,
+ /*.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,
+ /*.CopySubBuffer = */dri_copy_sub_buffer,
+ /*.AllocateBuffer = */NULL,
+ /*.ReleaseBuffer = */NULL
};
static const struct __DRIDriverVtableExtensionRec swrast_vtable = {
- .base = { __DRI_DRIVER_VTABLE, 1 },
- .vtable = &swrast_driver_api,
+ /*.base = */{ __DRI_DRIVER_VTABLE, 1 },
+ /*.vtable = */&swrast_driver_api,
};
static const __DRIextension *swrast_driver_extensions[] = {
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h
index 535f6fe59..339e4502f 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 fec06291a..328aaf570 100644..100755
--- a/mesalib/src/mesa/main/.gitignore
+++ b/mesalib/src/mesa/main/.gitignore
@@ -1,11 +1,12 @@
-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
-format_info.c
+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
+format_info.c
+glapitable.h
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index 2bae1bc72..011e7be3f 100644..100755
--- a/mesalib/src/mesa/main/bufferobj.c
+++ b/mesalib/src/mesa/main/bufferobj.c
@@ -388,7 +388,7 @@ convert_clear_buffer_data(struct gl_context *ctx,
*
* 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)
{
struct gl_buffer_object *obj;
@@ -406,7 +406,7 @@ _mesa_new_buffer_object(struct gl_context *ctx, GLuint name)
*
* 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)
{
@@ -555,7 +555,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, GLenum storageFlags,
struct gl_buffer_object * bufObj )
@@ -601,7 +601,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 )
@@ -634,7 +634,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 )
@@ -747,7 +747,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,
gl_map_buffer_index index)
{
diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h
index 4ec4b7502..a6d44f9fe 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 1e7784914..93d1258cf 100644
--- a/mesalib/src/mesa/main/dlopen.h
+++ b/mesalib/src/mesa/main/dlopen.h
@@ -50,7 +50,7 @@ _mesa_dlopen(const char *libname, int flags)
#if 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;
@@ -71,7 +71,7 @@ _mesa_dlsym(void *handle, const char *fname)
} u;
#if 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;
@@ -87,7 +87,7 @@ _mesa_dlclose(void *handle)
{
#if 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/imports.h b/mesalib/src/mesa/main/imports.h
index 0fcba4fb9..e984cfbea 100644..100755
--- a/mesalib/src/mesa/main/imports.h
+++ b/mesalib/src/mesa/main/imports.h
@@ -137,7 +137,6 @@ static inline float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) /
static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; }
#define strtoll(p, e, b) _strtoi64(p, e, b)
#endif /* _MSC_VER < 1800 */
-#define strcasecmp(s1, s2) _stricmp(s1, s2)
#endif
/*@}*/
diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h
index cd5f2d6f2..5fc8f6b08 100644..100755
--- a/mesalib/src/mesa/main/macros.h
+++ b/mesalib/src/mesa/main/macros.h
@@ -153,21 +153,21 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
else if (__tmp.i >= IEEE_ONE) \
UB = (GLubyte) 255; \
else { \
- __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; \
+ __tmp.f = __tmp.f * (255.0f/256.0f) + 32768.0f; \
UB = (GLubyte) __tmp.i; \
} \
} while (0)
#define CLAMPED_FLOAT_TO_UBYTE(UB, FLT) \
do { \
fi_type __tmp; \
- __tmp.f = (FLT) * (255.0F/256.0F) + 32768.0F; \
+ __tmp.f = (FLT) * (255.0f/256.0f) + 32768.0f; \
UB = (GLubyte) __tmp.i; \
} while (0)
#else
-#define UNCLAMPED_FLOAT_TO_UBYTE(ub, f) \
- ub = ((GLubyte) F_TO_I(CLAMP((f), 0.0F, 1.0F) * 255.0F))
-#define CLAMPED_FLOAT_TO_UBYTE(ub, f) \
- ub = ((GLubyte) F_TO_I((f) * 255.0F))
+#define UNCLAMPED_FLOAT_TO_UBYTE(ub, FLT) \
+ ub = ((GLubyte) F_TO_I(CLAMP((FLT), 0.0f, 1.0f) * 255.0f))
+#define CLAMPED_FLOAT_TO_UBYTE(ub, FLT) \
+ ub = ((GLubyte) F_TO_I((FLT) * 255.0f))
#endif
static inline GLfloat INT_AS_FLT(GLint i)
diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c
index 932359c4e..a9d067bbf 100644
--- a/mesalib/src/mesa/main/queryobj.c
+++ b/mesalib/src/mesa/main/queryobj.c
@@ -40,7 +40,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 = CALLOC_STRUCT(gl_query_object);
@@ -72,7 +72,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)
{
ctx->NewState |= _NEW_DEPTH; /* for swrast */
@@ -83,7 +83,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)
{
ctx->NewState |= _NEW_DEPTH; /* for swrast */
@@ -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->Label);
diff --git a/mesalib/src/mesa/main/remap.c b/mesalib/src/mesa/main/remap.c
index 4a881865a..02365f76e 100644
--- a/mesalib/src/mesa/main/remap.c
+++ b/mesalib/src/mesa/main/remap.c
@@ -35,9 +35,9 @@
* a dynamic entry, or the corresponding static entry, in glapi.
*/
+#include "glapi/glapi.h"
#include "remap.h"
#include "imports.h"
-#include "glapi/glapi.h"
#define MAX_ENTRY_POINTS 16
@@ -46,7 +46,7 @@
/* this is global for quick access */
-int driDispatchRemapTable[driDispatchRemapTable_size];
+SERVEXTERN int driDispatchRemapTable[driDispatchRemapTable_size];
/**
diff --git a/mesalib/src/mesa/main/remap.h b/mesalib/src/mesa/main/remap.h
index 7199169d3..f6e856c64 100644
--- a/mesalib/src/mesa/main/remap.h
+++ b/mesalib/src/mesa/main/remap.h
@@ -40,7 +40,7 @@ struct gl_function_remap {
};
-extern int
+SERVEXTERN int
driDispatchRemapTable[];
extern const char *
diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c
index 225399eda..9a9c572c5 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;
@@ -181,7 +181,7 @@ _mesa_validate_sync(struct gl_context *ctx,
}
-void
+void GLAPIENTRY
_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
mtx_lock(&ctx->Shared->Mutex);
@@ -190,7 +190,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 5d510e873..1dbb7b14a 100644
--- a/mesalib/src/mesa/main/syncobj.h
+++ b/mesalib/src/mesa/main/syncobj.h
@@ -38,19 +38,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 bool
diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c
index 4951891cb..a813c88ad 100644
--- a/mesalib/src/mesa/main/version.c
+++ b/mesalib/src/mesa/main/version.c
@@ -26,7 +26,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;