From c20b946b4abe2aeccfdb85e54f38e65041948741 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 20 Feb 2017 12:54:14 +0100 Subject: Mesa subtree: Adapt build process for building against Mesa that gets pulled in via git subtree. --- nx-X11/extras/Mesa.patches | 1 + .../4001_CreatePixmap-AllocationHints.patch | 13 ------ ..._define-USE_IEEE-macro-for-more-platforms.patch | 16 ------- nx-X11/extras/Mesa.patches/series | 2 - ...001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch | 54 ++++++++++++++++++++++ .../4002_no-special-glx-memfunctions.patch | 28 +++++++++++ .../4003_CreatePixmap-AllocationHints.patch | 13 ++++++ ..._define-USE_IEEE-macro-for-more-platforms.patch | 16 +++++++ nx-X11/extras/Mesa.patches_6.4.1/series | 4 ++ 9 files changed, 116 insertions(+), 31 deletions(-) create mode 120000 nx-X11/extras/Mesa.patches delete mode 100644 nx-X11/extras/Mesa.patches/4001_CreatePixmap-AllocationHints.patch delete mode 100644 nx-X11/extras/Mesa.patches/4002_define-USE_IEEE-macro-for-more-platforms.patch delete mode 100644 nx-X11/extras/Mesa.patches/series create mode 100644 nx-X11/extras/Mesa.patches_6.4.1/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch create mode 100644 nx-X11/extras/Mesa.patches_6.4.1/4002_no-special-glx-memfunctions.patch create mode 100644 nx-X11/extras/Mesa.patches_6.4.1/4003_CreatePixmap-AllocationHints.patch create mode 100644 nx-X11/extras/Mesa.patches_6.4.1/4004_define-USE_IEEE-macro-for-more-platforms.patch create mode 100644 nx-X11/extras/Mesa.patches_6.4.1/series (limited to 'nx-X11/extras') diff --git a/nx-X11/extras/Mesa.patches b/nx-X11/extras/Mesa.patches new file mode 120000 index 000000000..5807689b4 --- /dev/null +++ b/nx-X11/extras/Mesa.patches @@ -0,0 +1 @@ +Mesa.patches_6.4.1 \ No newline at end of file diff --git a/nx-X11/extras/Mesa.patches/4001_CreatePixmap-AllocationHints.patch b/nx-X11/extras/Mesa.patches/4001_CreatePixmap-AllocationHints.patch deleted file mode 100644 index f2caf2812..000000000 --- a/nx-X11/extras/Mesa.patches/4001_CreatePixmap-AllocationHints.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: Mesa/include/GL/xmesa_xf86.h -=================================================================== ---- Mesa.orig/include/GL/xmesa_xf86.h -+++ Mesa/include/GL/xmesa_xf86.h -@@ -130,7 +130,7 @@ do { \ - - /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ - #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ -- (*__d->CreatePixmap)(__d, __w, __h, __depth) -+ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) - - #define XMesaFreePixmap(__d,__b) \ - (*__d->DestroyPixmap)(__b) diff --git a/nx-X11/extras/Mesa.patches/4002_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches/4002_define-USE_IEEE-macro-for-more-platforms.patch deleted file mode 100644 index 7db909b91..000000000 --- a/nx-X11/extras/Mesa.patches/4002_define-USE_IEEE-macro-for-more-platforms.patch +++ /dev/null @@ -1,16 +0,0 @@ -Author: Mike Gabriel -Description: define USE_IEEE for __aarch64__ and __mc68000__, as well - -Index: Mesa/src/mesa/main/imports.h -=================================================================== ---- Mesa.orig/src/mesa/main/imports.h -+++ Mesa/src/mesa/main/imports.h -@@ -204,6 +204,8 @@ typedef union { GLfloat f; GLint i; } fi - defined(ia64) || defined(__ia64__) || \ - defined(__mips) || defined(_MIPS_ARCH) || \ - defined(__arm__) || \ -+ defined(__aarch64__) || \ -+ defined(__mc68000__) || \ - defined(__sh__) || \ - (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) - #define USE_IEEE diff --git a/nx-X11/extras/Mesa.patches/series b/nx-X11/extras/Mesa.patches/series deleted file mode 100644 index 8dd25b553..000000000 --- a/nx-X11/extras/Mesa.patches/series +++ /dev/null @@ -1,2 +0,0 @@ -4001_CreatePixmap-AllocationHints.patch -4002_define-USE_IEEE-macro-for-more-platforms.patch diff --git a/nx-X11/extras/Mesa.patches_6.4.1/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch b/nx-X11/extras/Mesa.patches_6.4.1/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch new file mode 100644 index 000000000..c73be3643 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.4.1/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch @@ -0,0 +1,54 @@ +From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller +Date: Wed, 16 Mar 2016 14:40:08 +0100 +Subject: [PATCH] Fix non-working GLX in 64bit Xorg 7.0 + +Found the needed patch in debian bugtracker at +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364233 +--- + src/glx/x11/indirect_vertex_array.c | 2 +- + src/mesa/drivers/dri/common/glcontextmodes.c | 3 +++ + src/mesa/main/glheader.h | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +Index: Mesa/src/glx/x11/indirect_vertex_array.c +=================================================================== +--- Mesa.orig/src/glx/x11/indirect_vertex_array.c ++++ Mesa/src/glx/x11/indirect_vertex_array.c +@@ -530,7 +530,7 @@ static GLubyte * + emit_DrawArrays_header_old( __GLXcontext * gc, + struct array_state_vector * arrays, + size_t * elements_per_request, +- size_t * total_requests, ++ unsigned int * total_requests, + GLenum mode, GLsizei count ) + { + size_t command_size; +Index: Mesa/src/mesa/main/glheader.h +=================================================================== +--- Mesa.orig/src/mesa/main/glheader.h ++++ Mesa/src/mesa/main/glheader.h +@@ -46,6 +46,9 @@ + #ifndef GLHEADER_H + #define GLHEADER_H + ++#ifdef HAVE_DIX_CONFIG_H ++#include "dix-config.h" ++#endif + + #if defined(XFree86LOADER) && defined(IN_MODULE) + #include "xf86_ansic.h" +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -39,6 +39,9 @@ + # include "imports.h" + # define __glXMemset memset + #else ++# if defined (HAVE_DIX_CONFIG_H) ++# include ++# endif + # include + # include + # include "GL/glxint.h" diff --git a/nx-X11/extras/Mesa.patches_6.4.1/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_6.4.1/4002_no-special-glx-memfunctions.patch new file mode 100644 index 000000000..4f6803730 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.4.1/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,28 @@ +Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly) +Author: Mike Gabriel + +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -48,15 +48,14 @@ + + # ifdef XFree86Server + # include "GL/glx_ansic.h" +-extern void * __glXMalloc( size_t size ); +-extern void __glXFree( void * ptr ); +-# define _mesa_malloc(b) __glXMalloc(b) +-# define _mesa_free(m) __glXFree(m) ++# define __glXMemset memset ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # else + # include + # define __glXMemset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + diff --git a/nx-X11/extras/Mesa.patches_6.4.1/4003_CreatePixmap-AllocationHints.patch b/nx-X11/extras/Mesa.patches_6.4.1/4003_CreatePixmap-AllocationHints.patch new file mode 100644 index 000000000..f2caf2812 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.4.1/4003_CreatePixmap-AllocationHints.patch @@ -0,0 +1,13 @@ +Index: Mesa/include/GL/xmesa_xf86.h +=================================================================== +--- Mesa.orig/include/GL/xmesa_xf86.h ++++ Mesa/include/GL/xmesa_xf86.h +@@ -130,7 +130,7 @@ do { \ + + /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ + #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ +- (*__d->CreatePixmap)(__d, __w, __h, __depth) ++ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) + + #define XMesaFreePixmap(__d,__b) \ + (*__d->DestroyPixmap)(__b) diff --git a/nx-X11/extras/Mesa.patches_6.4.1/4004_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches_6.4.1/4004_define-USE_IEEE-macro-for-more-platforms.patch new file mode 100644 index 000000000..7db909b91 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.4.1/4004_define-USE_IEEE-macro-for-more-platforms.patch @@ -0,0 +1,16 @@ +Author: Mike Gabriel +Description: define USE_IEEE for __aarch64__ and __mc68000__, as well + +Index: Mesa/src/mesa/main/imports.h +=================================================================== +--- Mesa.orig/src/mesa/main/imports.h ++++ Mesa/src/mesa/main/imports.h +@@ -204,6 +204,8 @@ typedef union { GLfloat f; GLint i; } fi + defined(ia64) || defined(__ia64__) || \ + defined(__mips) || defined(_MIPS_ARCH) || \ + defined(__arm__) || \ ++ defined(__aarch64__) || \ ++ defined(__mc68000__) || \ + defined(__sh__) || \ + (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) + #define USE_IEEE diff --git a/nx-X11/extras/Mesa.patches_6.4.1/series b/nx-X11/extras/Mesa.patches_6.4.1/series new file mode 100644 index 000000000..2d4d626b2 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.4.1/series @@ -0,0 +1,4 @@ +4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch +4002_no-special-glx-memfunctions.patch +4003_CreatePixmap-AllocationHints.patch +4004_define-USE_IEEE-macro-for-more-platforms.patch \ No newline at end of file -- cgit v1.2.3