aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-18 13:53:02 +0200
committermarha <marha@users.sourceforge.net>2013-10-18 13:53:02 +0200
commit91e353434f0a6859f404be05581f44d009ca5d6c (patch)
tree740bb78eb78b89055a218b4217a17f86f44faaa2
parent72483d25d0f41d48a8e6bdc83ab57c971cfb47b4 (diff)
downloadvcxsrv-91e353434f0a6859f404be05581f44d009ca5d6c.tar.gz
vcxsrv-91e353434f0a6859f404be05581f44d009ca5d6c.tar.bz2
vcxsrv-91e353434f0a6859f404be05581f44d009ca5d6c.zip
Solved mesa compilation errors
-rw-r--r--mesalib/src/mesa/drivers/dri/common/dri_util.c67
-rw-r--r--mesalib/src/mesa/drivers/dri/common/xmlconfig.c16
-rw-r--r--mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj14
-rw-r--r--mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj.filters18
4 files changed, 69 insertions, 46 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c
index db44eede6..74f3a5d99 100644
--- a/mesalib/src/mesa/drivers/dri/common/dri_util.c
+++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c
@@ -95,6 +95,7 @@ dri2CreateNewScreen(int scrn, int fd,
{
static const __DRIextension *emptyExtensionList[] = { NULL };
__DRIscreen *psp;
+ int gl_version_override;
psp = calloc(1, sizeof(*psp));
if (!psp)
@@ -128,7 +129,7 @@ dri2CreateNewScreen(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);
@@ -256,6 +257,8 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
unsigned major_version = 1;
unsigned minor_version = 0;
uint32_t flags = 0;
+ unsigned i;
+ struct gl_context *ctx;
assert((num_attribs == 0) || (attribs != NULL));
@@ -283,7 +286,7 @@ dri2CreateContextAttribs(__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];
@@ -379,7 +382,7 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
return NULL;
}
- struct gl_context *ctx = context->driverPrivate;
+ ctx = context->driverPrivate;
if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0)
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) {
@@ -669,35 +672,35 @@ driSwapBuffers(__DRIdrawable *pdp)
/** Core interface */
const __DRIcoreExtension driCoreExtension = {
- .base = { __DRI_CORE, __DRI_CORE_VERSION },
-
- .createNewScreen = NULL,
- .destroyScreen = driDestroyScreen,
- .getExtensions = driGetExtensions,
- .getConfigAttrib = driGetConfigAttrib,
- .indexConfigAttrib = driIndexConfigAttrib,
- .createNewDrawable = NULL,
- .destroyDrawable = driDestroyDrawable,
- .swapBuffers = driSwapBuffers, /* swrast */
- .createNewContext = dri2CreateNewContext, /* swrast */
- .copyContext = driCopyContext,
- .destroyContext = driDestroyContext,
- .bindContext = driBindContext,
- .unbindContext = driUnbindContext
+ /*.base =*/ { __DRI_CORE, __DRI_CORE_VERSION },
+
+ /*.createNewScreen =*/ NULL,
+ /*.destroyScreen =*/ driDestroyScreen,
+ /*.getExtensions =*/ driGetExtensions,
+ /*.getConfigAttrib =*/ driGetConfigAttrib,
+ /*.indexConfigAttrib =*/ driIndexConfigAttrib,
+ /*.createNewDrawable =*/ NULL,
+ /*.destroyDrawable =*/ driDestroyDrawable,
+ /*.swapBuffers =*/ driSwapBuffers, /* swrast */
+ /*.createNewContext =*/ dri2CreateNewContext, /* swrast */
+ /*.copyContext =*/ driCopyContext,
+ /*.destroyContext =*/ driDestroyContext,
+ /*.bindContext =*/ driBindContext,
+ /*.unbindContext =*/ driUnbindContext
};
/** DRI2 interface */
const __DRIdri2Extension driDRI2Extension = {
- .base = { __DRI_DRI2, 3 },
-
- .createNewScreen = dri2CreateNewScreen,
- .createNewDrawable = dri2CreateNewDrawable,
- .createNewContext = dri2CreateNewContext,
- .getAPIMask = dri2GetAPIMask,
- .createNewContextForAPI = dri2CreateNewContextForAPI,
- .allocateBuffer = dri2AllocateBuffer,
- .releaseBuffer = dri2ReleaseBuffer,
- .createContextAttribs = dri2CreateContextAttribs
+ /*.base =*/ { __DRI_DRI2, 3 },
+
+ /*.createNewScreen =*/ dri2CreateNewScreen,
+ /*.createNewDrawable =*/ dri2CreateNewDrawable,
+ /*.createNewContext =*/ dri2CreateNewContext,
+ /*.getAPIMask =*/ dri2GetAPIMask,
+ /*.createNewContextForAPI =*/ dri2CreateNewContextForAPI,
+ /*.allocateBuffer =*/ dri2AllocateBuffer,
+ /*.releaseBuffer =*/ dri2ReleaseBuffer,
+ /*.createContextAttribs =*/ dri2CreateContextAttribs
};
const __DRIswrastExtension driSWRastExtension = {
@@ -709,11 +712,11 @@ const __DRIswrastExtension driSWRastExtension = {
};
const __DRI2configQueryExtension dri2ConfigQueryExtension = {
- .base = { __DRI2_CONFIG_QUERY, __DRI2_CONFIG_QUERY_VERSION },
+ /*.base =*/ { __DRI2_CONFIG_QUERY, __DRI2_CONFIG_QUERY_VERSION },
- .configQueryb = dri2ConfigQueryb,
- .configQueryi = dri2ConfigQueryi,
- .configQueryf = dri2ConfigQueryf,
+ /*.configQueryb =*/ dri2ConfigQueryb,
+ /*.configQueryi =*/ dri2ConfigQueryi,
+ /*.configQueryf =*/ dri2ConfigQueryf,
};
void
diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c
index b95e452f1..cce47c753 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
@@ -438,11 +442,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 { \
@@ -450,11 +454,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 { \
@@ -464,12 +468,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/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj b/mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj
index 016777d62..e71fb9864 100644
--- a/mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj
+++ b/mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj
@@ -127,8 +127,8 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../../include;../../../../src/mesa;../../../../src/glsl;../../../../src/mapi;../../../../src/mesa/main;../../../../src/mesa/shader;../../../../src/mesa/shader/slang;../../../../../include;../../../../src/mesa/drivers/dri/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;DEBUG;WIN32;_DLL;SWRAST_DRI_EXPORTS;_GDI32_;BUILD_GL32;WIN32_THREADS;MESA_MINWARN;_CRT_SECURE_NO_DEPRECATE;INSERVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../../include;../../../../src/mesa;../../../../src/glsl;../../../../src/mapi;../../../../src/mesa/main;../../../../src/mesa/shader;../../../../src/mesa/shader/slang;../../../../../include;../../../../src/mesa/drivers/dri/common;../../../../../expat/lib;../../../../..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;DEBUG;WIN32;_DLL;SWRAST_DRI_EXPORTS;_GDI32_;BUILD_GL32;WIN32_THREADS;MESA_MINWARN;_CRT_SECURE_NO_DEPRECATE;INSERVER;__NOT_HAVE_DRM_H;XML_STATIC;COMPILED_FROM_DSP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BrowseInformation>true</BrowseInformation>
@@ -206,8 +206,8 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../../../include;../../../../src/mesa;../../../../src/glsl;../../../../src/mapi;../../../../src/mesa/main;../../../../src/mesa/shader;../../../../src/mesa/shader/slang;../../../../../include;../../../../src/mesa/drivers/dri/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_DLL;SWRAST_DRI_EXPORTS;_GDI32_;BUILD_GL32;WIN32_THREADS;MESA_MINWARN;_CRT_SECURE_NO_DEPRECATE;INSERVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../../include;../../../../src/mesa;../../../../src/glsl;../../../../src/mapi;../../../../src/mesa/main;../../../../src/mesa/shader;../../../../src/mesa/shader/slang;../../../../../include;../../../../src/mesa/drivers/dri/common;../../../../../expat/lib;../../../../..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_DLL;SWRAST_DRI_EXPORTS;_GDI32_;BUILD_GL32;WIN32_THREADS;MESA_MINWARN;_CRT_SECURE_NO_DEPRECATE;INSERVER;__NOT_HAVE_DRM_H;XML_STATIC;COMPILED_FROM_DSP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
@@ -237,9 +237,13 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\..\..\expat\lib\xmlparse.c" />
+ <ClCompile Include="..\..\..\..\..\expat\lib\xmlrole.c" />
+ <ClCompile Include="..\..\..\..\..\expat\lib\xmltok.c" />
<ClCompile Include="..\..\..\..\src\mesa\drivers\common\driverfuncs.c" />
<ClCompile Include="..\..\..\..\src\mesa\drivers\common\meta.c" />
- <ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\drisw_util.c" />
+ <ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\dri_util.c" />
+ <ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\xmlconfig.c" />
<ClCompile Include="..\..\..\..\src\mesa\drivers\dri\swrast\swrast.c" />
<ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\utils.c" />
<ClCompile Include="..\..\..\..\src\mesa\swrast\s_aaline.c" />
diff --git a/mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj.filters b/mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj.filters
index f3c012ac1..6329b2867 100644
--- a/mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj.filters
+++ b/mesalib/windows/VC8/mesa/swrast_dri/swrast_dri.vcxproj.filters
@@ -27,9 +27,6 @@
<ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\utils.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\drisw_util.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\..\src\mesa\swrast_setup\ss_context.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -123,6 +120,21 @@
<ClCompile Include="..\..\..\..\src\mesa\swrast\s_renderbuffer.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\dri_util.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\src\mesa\drivers\dri\common\xmlconfig.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\expat\lib\xmlparse.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\expat\lib\xmltok.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\expat\lib\xmlrole.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\src\mesa\drivers\dri\swrast\swrast_priv.h">