Skip to content

Mesa 7 7 branch #534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: 3.6.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion nx-X11/extras/Mesa
2 changes: 1 addition & 1 deletion nx-X11/extras/Mesa.patches
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly)
Author: Mike Gabriel <[email protected]>

Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
Index: Mesa/src/glx/glcontextmodes.c
===================================================================
--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c
+++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -48,15 +48,14 @@

--- Mesa.orig/src/glx/x11/glcontextmodes.c
+++ Mesa/src/glx/x11/glcontextmodes.c
@@ -53,14 +53,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
# include <os.h>
# include <string.h>
-# define _mesa_malloc(b) xalloc(b)
-# define _mesa_free(m) xfree(m)
+# define _mesa_malloc(b) malloc(b)
+# define _mesa_free(m) free(m)
# define _mesa_memset memset
# else
# include <X11/Xlibint.h>
# define __glXMemset memset
# define _mesa_memset 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) */

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ 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 { \
@@ -142,7 +142,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)
+ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0)

#define XMesaFreePixmap(__d,__b) \
(*__d->DestroyPixmap)(__b)
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,60 @@ Index: Mesa/include/GL/xmesa.h
#include "xmesa_x.h"
#endif
#include "GL/gl.h"
Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
Index: Mesa/src/glx/x11/glcontextmodes.c
===================================================================
--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c
+++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -39,7 +39,7 @@
# include "imports.h"
# define __glXMemset memset
#else
-# include <X11/X.h>
+# include <nx-X11/X.h>
# include <GL/glx.h>
# include "GL/glxint.h"

@@ -49,7 +49,7 @@
# define _mesa_malloc(b) malloc(b)
--- Mesa.orig/src/glx/x11/glcontextmodes.c
+++ Mesa/src/glx/x11/glcontextmodes.c
@@ -37,7 +37,7 @@
#if defined(HAVE_DIX_CONFIG_H)
# include <dix-config.h>
#endif
-#include <X11/X.h>
+#include <nx-X11/X.h>
#include <GL/glx.h>
#include "GL/glxint.h"
#endif
@@ -57,7 +57,7 @@
# define _mesa_free(m) free(m)
# define _mesa_memset memset
# else
-# include <X11/Xlibint.h>
+# include <nx-X11/Xlibint.h>
# define __glXMemset memset
# define _mesa_memset memset
# define _mesa_malloc(b) malloc(b)
# define _mesa_free(m) free(m)
Index: Mesa/src/mesa/drivers/x11/glxheader.h
===================================================================
--- Mesa.orig/src/mesa/drivers/x11/glxheader.h
+++ Mesa/src/mesa/drivers/x11/glxheader.h
@@ -43,8 +43,8 @@
@@ -39,13 +39,13 @@

#else

-# include <X11/Xlib.h>
-# include <X11/Xlibint.h>
-# include <X11/Xutil.h>
+# include <nx-X11/Xlib.h>
+# include <nx-X11/Xlibint.h>
+# include <nx-X11/Xutil.h>
# ifdef USE_XSHM /* was SHM */
# include <sys/ipc.h>
# include <sys/shm.h>
-# include <X11/extensions/XShm.h>
+# include <nx-X11/extensions/XShm.h>
# endif
# include <GL/glx.h>
# include <sys/time.h>
Index: Mesa/src/mesa/glapi/glthread.h
===================================================================
--- Mesa.orig/src/mesa/glapi/glthread.h
+++ Mesa/src/mesa/glapi/glthread.h
@@ -180,7 +180,7 @@ typedef CRITICAL_SECTION _glthread_Mutex
@@ -185,7 +185,7 @@ typedef CRITICAL_SECTION _glthread_Mutex;
* We wrap it again for GL.
*/
#ifdef USE_XTHREADS
-#include <X11/Xthreads.h>
+#include <nx-X11/Xthreads.h>

typedef struct {
xthread_key_t key;
94 changes: 94 additions & 0 deletions nx-X11/extras/Mesa.patches_7.0.4/5001_nasty-typo-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Description: Some nasty typos fixed to silence lintian et al.
Author: Mike Gabriel <[email protected]>

Index: Mesa/src/mesa/main/debug.c
===================================================================
--- Mesa.orig/src/mesa/main/debug.c
+++ Mesa/src/mesa/main/debug.c
@@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4
"GL_QUAD_STRIP",
"GL_POLYGON",
"outside begin/end",
- "inside unkown primitive",
+ "inside unknown primitive",
"unknown state"
};

Index: Mesa/src/mesa/shader/arbprogparse.c
===================================================================
--- Mesa.orig/src/mesa/shader/arbprogparse.c
+++ Mesa/src/mesa/shader/arbprogparse.c
@@ -127,8 +127,8 @@
*
* Cosmetic Stuff
* -----------------------------------------------------
- * - remove any leftover unused grammer.c stuff (dict_ ?)
- * - fix grammer.c error handling so its not static
+ * - remove any leftover unused grammar.c stuff (dict_ ?)
+ * - fix grammar.c error handling so its not static
* - #ifdef around stuff pertaining to extentions
*
* Outstanding Questions:
@@ -1673,7 +1673,7 @@
if (found) {
error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
attrib_var->name);

_mesa_set_program_error (ctx, Program->Position, error_msg);
@@ -1864,7 +1864,7 @@
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
param_var->name);

_mesa_set_program_error (ctx, Program->Position, error_msg);
@@ -1972,7 +1972,7 @@
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
temp_var->name);

_mesa_set_program_error (ctx, Program->Position, error_msg);
@@ -2023,7 +2023,7 @@
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
output_var->name);

_mesa_set_program_error (ctx, Program->Position, error_msg);
@@ -2057,7 +2057,7 @@
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
temp_var->name);

_mesa_set_program_error (ctx, Program->Position, error_msg);
@@ -2106,7 +2106,7 @@
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
temp_var->name);

_mesa_set_program_error (ctx, Program->Position, error_msg);
@@ -3904,7 +3904,7 @@
grammar_get_last_error ((GLubyte *) error_msg, 300, &error_pos);
_mesa_set_program_error (ctx, error_pos, error_msg);
_mesa_error (ctx, GL_INVALID_OPERATION,
- "glProgramString(Error loading grammer rule set)");
+ "glProgramString(Error loading grammar rule set)");
return GL_FALSE;
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#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
5001_nasty-typo-fixes.patch
#4004_define-USE_IEEE-macro-for-more-platforms.patch
#5001_nasty-typo-fixes.patch
4005_adapt-all-libX11-include-paths-to-libNX_X11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller <[email protected]>
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 <dix-config.h>
+# endif
# include <X11/X.h>
# include <GL/glx.h>
# include "GL/glxint.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly)
Author: Mike Gabriel <[email protected]>

Index: Mesa/src/glx/glcontextmodes.c
===================================================================
--- Mesa.orig/src/glx/x11/glcontextmodes.c
+++ Mesa/src/glx/x11/glcontextmodes.c
@@ -53,14 +53,14 @@
# ifdef XFree86Server
# include <os.h>
# include <string.h>
-# define _mesa_malloc(b) xalloc(b)
-# define _mesa_free(m) xfree(m)
+# define _mesa_malloc(b) malloc(b)
+# define _mesa_free(m) free(m)
# define _mesa_memset memset
# else
# include <X11/Xlibint.h>
# define _mesa_memset 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) */

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: Mesa/include/GL/xmesa_xf86.h
===================================================================
--- Mesa.orig/include/GL/xmesa_xf86.h
+++ Mesa/include/GL/xmesa_xf86.h
@@ -142,7 +142,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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Author: Mike Gabriel <[email protected]>
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
@@ -205,6 +205,8 @@ typedef union { GLfloat f; GLint i; } fi
defined(__hppa__) || defined(hpux) || \
defined(__mips) || defined(_MIPS_ARCH) || \
defined(__arm__) || \
+ defined(__aarch64__) || \
+ defined(__mc68000__) || \
defined(__sh__) || \
(defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS)))
#define USE_IEEE
Loading