Fix OSX build errors. patches from FDO bug 66346 and 90249.

Reported on IRC by Youri Mouton.
This commit is contained in:
tnn 2015-05-16 16:39:52 +00:00
parent 12c5b42cc0
commit c11fd333d4
3 changed files with 84 additions and 1 deletions

View file

@ -1,9 +1,10 @@
$NetBSD: distinfo,v 1.94 2015/05/16 00:15:52 wiz Exp $
$NetBSD: distinfo,v 1.95 2015/05/16 16:39:52 tnn Exp $
SHA1 (mesa-10.5.5.tar.xz) = 367f78c244a34eeb5e8fc4531228166ea1118165
RMD160 (mesa-10.5.5.tar.xz) = 3d73894defb5badf8bde0d026c7802f55aa24484
Size (mesa-10.5.5.tar.xz) = 6989964 bytes
SHA1 (patch-configure) = 3fc150370e36fc49382b491d907608f00cf99a72
SHA1 (patch-include_EGL_eglplatform.h) = c34bac7386fd93ee8d0b83a748ae14dc4742d776
SHA1 (patch-include_GL_glxext.h) = 830902f2d38a8395cda682c059fc5223e1b0e89e
SHA1 (patch-src_gallium_auxiliary_util_u__format__tests.c) = 4d5e4677c2825778c43440ab131b8807f6840975
SHA1 (patch-src_gallium_auxiliary_util_u__math.h) = b126390d4a8ee495edfb4c3b1dfdab981445969e
@ -30,5 +31,6 @@ SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 632d9a95e514d0b63fb54f3
SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = abca30898144b7014cdddcc7c7e808087704b596
SHA1 (patch-src_mesa_main_compiler.h) = fc0e2b6be8afa9e21ddca1d1a14608a1687bddd8
SHA1 (patch-src_mesa_main_context.c) = 30c3796865372aa16297c2aaa647ddb49958fa64
SHA1 (patch-src_mesa_main_shader__query.cpp) = 6273c74161f045363c58f38adeb672287f6a0898
SHA1 (patch-src_mesa_x86_common__x86.c) = f8b36603f7495b7712943c4a86459bcdd733d6a2
SHA1 (patch-src_util_u__atomic.h) = 4a567b6fe5bf67fb7f386fa5f37bedb66d593085

View file

@ -0,0 +1,33 @@
$NetBSD: patch-include_EGL_eglplatform.h,v 1.1 2015/05/16 16:39:52 tnn Exp $
https://bugs.freedesktop.org/show_bug.cgi?id=90249
From 5b31c5cdcdb09d12e3dc5180ab5c80250e8dd2bd Mon Sep 17 00:00:00 2001
From: Julien Isorce <j.isorce@samsung.com>
Date: Thu, 30 Apr 2015 08:36:50 +0100
Subject: [PATCH] egl: use unix defines on osx with clang
CC egl_dri2.lo
include/EGL/eglplatform.h:135:2:
error: "Platform not recognized"
include/EGL/eglplatform.h:140:9:
error: unknown type name 'EGLNativeDisplayType'
typedef EGLNativeDisplayType NativeDisplayType;
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
---
include/EGL/eglplatform.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
index 2eb6865..672119e 100644
--- include/EGL/eglplatform.h
+++ include/EGL/eglplatform.h
@@ -104,7 +104,7 @@ typedef struct ANativeWindow *EGLNativeWindowType;
typedef struct egl_native_pixmap_t *EGLNativePixmapType;
typedef void *EGLNativeDisplayType;
-#elif defined(__unix__)
+#elif defined(__unix__) || defined(__APPLE__)
#if defined(MESA_EGL_NO_X11_HEADERS)

View file

@ -0,0 +1,48 @@
$NetBSD: patch-src_mesa_main_shader__query.cpp,v 1.1 2015/05/16 16:39:52 tnn Exp $
https://bugs.freedesktop.org/show_bug.cgi?id=66346
From c4a1fec68d2508ff0c4fc2831465aca8c4ca783a Mon Sep 17 00:00:00 2001
From: Julien Isorce <j.isorce@samsung.com>
Date: Wed, 22 Apr 2015 23:04:42 +0100
Subject: [PATCH 1/2] shader_query: convert GLhandleARB to uintptr_t before
troncating to GLuint
Fixes compiler error on OSX as GLhandleARB is defined as void* if __APPLE__.
https://bugs.freedesktop.org/show_bug.cgi?id=66346
---
src/mesa/main/shader_query.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index bc6fec5..22d9e0f 100644
--- src/mesa/main/shader_query.cpp
+++ src/mesa/main/shader_query.cpp
@@ -68,7 +68,7 @@ _mesa_BindAttribLocation(GLhandleARB program, GLuint index,
GET_CURRENT_CONTEXT(ctx);
struct gl_shader_program *const shProg =
- _mesa_lookup_shader_program_err(ctx, program, "glBindAttribLocation");
+ _mesa_lookup_shader_program_err(ctx, (GLuint)(uintptr_t)program, "glBindAttribLocation");
if (!shProg)
return;
@@ -136,7 +136,7 @@ _mesa_GetActiveAttrib(GLhandleARB program, GLuint desired_index,
return;
}
- shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib");
+ shProg = _mesa_lookup_shader_program_err(ctx, (GLuint)(uintptr_t)program, "glGetActiveAttrib");
if (!shProg)
return;
@@ -250,7 +250,7 @@ _mesa_GetAttribLocation(GLhandleARB program, const GLcharARB * name)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_shader_program *const shProg =
- _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation");
+ _mesa_lookup_shader_program_err(ctx, (GLuint)(uintptr_t)program, "glGetAttribLocation");
if (!shProg) {
return -1;