diff options
Diffstat (limited to 'mesalib/src/mesa/drivers/dri')
-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 |
3 files changed, 25 insertions, 12 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/drisw_util.c b/mesalib/src/mesa/drivers/dri/common/drisw_util.c index 89f03c310..e8bac6414 100644 --- a/mesalib/src/mesa/drivers/dri/common/drisw_util.c +++ b/mesalib/src/mesa/drivers/dri/common/drisw_util.c @@ -110,6 +110,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. @@ -135,7 +136,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 332c7b72f..945f8f5e1 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" @@ -174,7 +179,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; } @@ -185,7 +190,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; } @@ -832,15 +837,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 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 |