Skip to content

Commit 6175f31

Browse files
committed
upgrade Mesa sources to 7.7
1 parent a580d66 commit 6175f31

File tree

2,470 files changed

+302
-1012983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,470 files changed

+302
-1012983
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001
2+
From: Ulrich Sibiller <[email protected]>
3+
Date: Wed, 16 Mar 2016 14:40:08 +0100
4+
Subject: [PATCH] Fix non-working GLX in 64bit Xorg 7.0
5+
6+
Found the needed patch in debian bugtracker at
7+
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364233
8+
---
9+
src/glx/x11/indirect_vertex_array.c | 2 +-
10+
src/mesa/drivers/dri/common/glcontextmodes.c | 3 +++
11+
src/mesa/main/glheader.h | 3 +++
12+
3 files changed, 7 insertions(+), 1 deletion(-)
13+
14+
Index: Mesa/src/glx/x11/indirect_vertex_array.c
15+
===================================================================
16+
--- Mesa.orig/src/glx/x11/indirect_vertex_array.c
17+
+++ Mesa/src/glx/x11/indirect_vertex_array.c
18+
@@ -530,7 +530,7 @@ static GLubyte *
19+
emit_DrawArrays_header_old( __GLXcontext * gc,
20+
struct array_state_vector * arrays,
21+
size_t * elements_per_request,
22+
- size_t * total_requests,
23+
+ unsigned int * total_requests,
24+
GLenum mode, GLsizei count )
25+
{
26+
size_t command_size;
27+
Index: Mesa/src/mesa/main/glheader.h
28+
===================================================================
29+
--- Mesa.orig/src/mesa/main/glheader.h
30+
+++ Mesa/src/mesa/main/glheader.h
31+
@@ -46,6 +46,9 @@
32+
#ifndef GLHEADER_H
33+
#define GLHEADER_H
34+
35+
+#ifdef HAVE_DIX_CONFIG_H
36+
+#include "dix-config.h"
37+
+#endif
38+
39+
#if defined(XFree86LOADER) && defined(IN_MODULE)
40+
#include "xf86_ansic.h"
41+
Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
42+
===================================================================
43+
--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c
44+
+++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
45+
@@ -39,6 +39,9 @@
46+
# include "imports.h"
47+
# define __glXMemset memset
48+
#else
49+
+# if defined (HAVE_DIX_CONFIG_H)
50+
+# include <dix-config.h>
51+
+# endif
52+
# include <X11/X.h>
53+
# include <GL/glx.h>
54+
# include "GL/glxint.h"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Index: Mesa/src/glx/x11/glcontextmodes.c
2+
===================================================================
3+
--- Mesa.orig/src/glx/x11/glcontextmodes.c
4+
+++ Mesa/src/glx/x11/glcontextmodes.c
5+
@@ -53,14 +53,14 @@
6+
# ifdef XFree86Server
7+
# include <os.h>
8+
# include <string.h>
9+
-# define _mesa_malloc(b) xalloc(b)
10+
-# define _mesa_free(m) xfree(m)
11+
+# define _mesa_malloc(b) malloc(b)
12+
+# define _mesa_free(m) free(m)
13+
# define _mesa_memset memset
14+
# else
15+
# include <X11/Xlibint.h>
16+
# define _mesa_memset memset
17+
-# define _mesa_malloc(b) Xmalloc(b)
18+
-# define _mesa_free(m) Xfree(m)
19+
+# define _mesa_malloc(b) malloc(b)
20+
+# define _mesa_free(m) free(m)
21+
# endif /* XFree86Server */
22+
#endif /* !defined(IN_MINI_GLX) */
23+
24+
Index: Mesa/src/mesa/drivers/x11/xm_image.c
25+
===================================================================
26+
--- Mesa.orig/src/mesa/drivers/x11/xm_image.c
27+
+++ Mesa/src/mesa/drivers/x11/xm_image.c
28+
@@ -49,7 +49,7 @@ XMesaImage *XMesaCreateImage(int bitsPer
29+
{
30+
XMesaImage *image;
31+
32+
- image = (XMesaImage *)xalloc(sizeof(XMesaImage));
33+
+ image = (XMesaImage *)malloc(sizeof(XMesaImage));
34+
35+
if (image) {
36+
image->width = width;
37+
@@ -67,7 +67,7 @@ void XMesaDestroyImage(XMesaImage *image
38+
{
39+
if (image->data)
40+
free(image->data);
41+
- xfree(image);
42+
+ free(image);
43+
}
44+
45+
unsigned long XMesaGetPixel(XMesaImage *image, int x, int y)
46+
Index: Mesa/src/mesa/drivers/x11/xmesa_xf86.h
47+
===================================================================
48+
--- Mesa.orig/src/mesa/drivers/x11/xmesa_xf86.h
49+
+++ Mesa/src/mesa/drivers/x11/xmesa_xf86.h
50+
@@ -133,7 +133,7 @@ static _X_INLINE XMesaImage *XMesaGetIma
51+
unsigned int height,
52+
unsigned long plane_mask, int format)
53+
{
54+
- XMesaImage *img = Xcalloc(sizeof(*img));
55+
+ XMesaImage *img = calloc(1, sizeof(*img));
56+
57+
img->width = p->drawable.width;
58+
img->height = p->drawable.height;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Author: Mike Gabriel <[email protected]>
2+
Description: define USE_IEEE for __aarch64__ and __mc68000__, as well
3+
4+
Index: Mesa/src/mesa/main/imports.h
5+
===================================================================
6+
--- Mesa.orig/src/mesa/main/imports.h
7+
+++ Mesa/src/mesa/main/imports.h
8+
@@ -205,6 +205,8 @@ typedef union { GLfloat f; GLint i; } fi
9+
defined(__hppa__) || defined(hpux) || \
10+
defined(__mips) || defined(_MIPS_ARCH) || \
11+
defined(__arm__) || \
12+
+ defined(__aarch64__) || \
13+
+ defined(__mc68000__) || \
14+
defined(__sh__) || \
15+
(defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS)))
16+
#define USE_IEEE
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Index: Mesa/src/glx/x11/glcontextmodes.c
2+
===================================================================
3+
--- Mesa.orig/src/glx/x11/glcontextmodes.c
4+
+++ Mesa/src/glx/x11/glcontextmodes.c
5+
@@ -37,7 +37,7 @@
6+
#if defined(HAVE_DIX_CONFIG_H)
7+
# include <dix-config.h>
8+
#endif
9+
-#include <X11/X.h>
10+
+#include <nx-X11/X.h>
11+
#include <GL/glx.h>
12+
#include "GL/glxint.h"
13+
#endif
14+
@@ -57,7 +57,7 @@
15+
# define _mesa_free(m) free(m)
16+
# define _mesa_memset memset
17+
# else
18+
-# include <X11/Xlibint.h>
19+
+# include <nx-X11/Xlibint.h>
20+
# define _mesa_memset memset
21+
# define _mesa_malloc(b) malloc(b)
22+
# define _mesa_free(m) free(m)
23+
Index: Mesa/src/mesa/drivers/x11/glxheader.h
24+
===================================================================
25+
--- Mesa.orig/src/mesa/drivers/x11/glxheader.h
26+
+++ Mesa/src/mesa/drivers/x11/glxheader.h
27+
@@ -40,9 +40,9 @@
28+
29+
#else
30+
31+
-# include <X11/Xlib.h>
32+
-# include <X11/Xlibint.h>
33+
-# include <X11/Xutil.h>
34+
+# include <nx-X11/Xlib.h>
35+
+# include <nx-X11/Xlibint.h>
36+
+# include <nx-X11/Xutil.h>
37+
# ifdef USE_XSHM /* was SHM */
38+
# include <sys/ipc.h>
39+
# include <sys/shm.h>
40+
Index: Mesa/src/mesa/drivers/x11/xm_image.c
41+
===================================================================
42+
--- Mesa.orig/src/mesa/drivers/x11/xm_image.c
43+
+++ Mesa/src/mesa/drivers/x11/xm_image.c
44+
@@ -32,7 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
45+
*/
46+
47+
#include <stdlib.h>
48+
-#include <X11/Xmd.h>
49+
+#include <nx-X11/Xmd.h>
50+
51+
#include "glxheader.h"
52+
#include "xmesaP.h"
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
Description: Some nasty typos fixed to silence lintian et al.
2+
Author: Mike Gabriel <[email protected]>
3+
4+
Index: Mesa/src/mesa/main/debug.c
5+
===================================================================
6+
--- Mesa.orig/src/mesa/main/debug.c
7+
+++ Mesa/src/mesa/main/debug.c
8+
@@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4
9+
"GL_QUAD_STRIP",
10+
"GL_POLYGON",
11+
"outside begin/end",
12+
- "inside unkown primitive",
13+
+ "inside unknown primitive",
14+
"unknown state"
15+
};
16+
17+
Index: Mesa/src/mesa/shader/arbprogparse.c
18+
===================================================================
19+
--- Mesa.orig/src/mesa/shader/arbprogparse.c
20+
+++ Mesa/src/mesa/shader/arbprogparse.c
21+
@@ -97,8 +97,8 @@
22+
*
23+
* Cosmetic Stuff
24+
* -----------------------------------------------------
25+
- * - remove any leftover unused grammer.c stuff (dict_ ?)
26+
- * - fix grammer.c error handling so its not static
27+
+ * - remove any leftover unused grammar.c stuff (dict_ ?)
28+
+ * - fix grammar.c error handling so its not static
29+
* - #ifdef around stuff pertaining to extentions
30+
*
31+
* Outstanding Questions:
32+
@@ -1703,7 +1703,7 @@ parse_attrib (GLcontext * ctx, GLubyte *
33+
if (found) {
34+
error_msg = (char *)
35+
_mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40);
36+
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
37+
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
38+
attrib_var->name);
39+
40+
_mesa_set_program_error (ctx, Program->Position, error_msg);
41+
@@ -1904,7 +1904,7 @@ parse_param (GLcontext * ctx, GLubyte **
42+
43+
if (found) {
44+
error_msg = (char *) _mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40);
45+
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
46+
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
47+
param_var->name);
48+
49+
_mesa_set_program_error (ctx, Program->Position, error_msg);
50+
@@ -2013,7 +2013,7 @@ parse_temp (GLcontext * ctx, GLubyte **
51+
if (found) {
52+
error_msg = (char *)
53+
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
54+
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
55+
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
56+
temp_var->name);
57+
58+
_mesa_set_program_error (ctx, Program->Position, error_msg);
59+
@@ -2064,7 +2064,7 @@ parse_output (GLcontext * ctx, GLubyte *
60+
char *error_msg;
61+
error_msg = (char *)
62+
_mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40);
63+
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
64+
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
65+
output_var->name);
66+
67+
_mesa_set_program_error (ctx, Program->Position, error_msg);
68+
@@ -2099,7 +2099,7 @@ parse_alias (GLcontext * ctx, GLubyte **
69+
if (found) {
70+
error_msg = (char *)
71+
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
72+
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
73+
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
74+
temp_var->name);
75+
76+
_mesa_set_program_error (ctx, Program->Position, error_msg);
77+
@@ -2149,7 +2149,7 @@ parse_address (GLcontext * ctx, GLubyte
78+
if (found) {
79+
error_msg = (char *)
80+
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
81+
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
82+
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
83+
temp_var->name);
84+
85+
_mesa_set_program_error (ctx, Program->Position, error_msg);
86+
@@ -3980,7 +3980,7 @@ _mesa_parse_arb_program (GLcontext * ctx
87+
grammar_get_last_error ((GLubyte *) error_msg, 300, &error_pos);
88+
_mesa_set_program_error (ctx, error_pos, error_msg);
89+
_mesa_error (ctx, GL_INVALID_OPERATION,
90+
- "Error loading grammer rule set");
91+
+ "Error loading grammar rule set");
92+
return GL_FALSE;
93+
}
94+
95+
@@ -4070,7 +4070,7 @@ _mesa_parse_arb_program (GLcontext * ctx
96+
}
97+
98+
#if DEBUG_PARSING
99+
- printf ("Destroying grammer dict [parse retval: %d]\n", err);
100+
+ printf ("Destroying grammar dict [parse retval: %d]\n", err);
101+
#endif
102+
grammar_destroy (arbprogram_syn_id);
103+
104+
@@ -4103,11 +4103,11 @@ _mesa_parse_arb_program (GLcontext * ctx
105+
/* Start examining the tokens in the array */
106+
inst = parsed;
107+
108+
- /* Check the grammer rev */
109+
+ /* Check the grammar rev */
110+
if (*inst++ != REVISION) {
111+
_mesa_set_program_error (ctx, 0, "Grammar version mismatch");
112+
_mesa_error(ctx, GL_INVALID_OPERATION,
113+
- "glProgramStringARB(Grammar verison mismatch)");
114+
+ "glProgramStringARB(Grammar version mismatch)");
115+
err = GL_TRUE;
116+
}
117+
else {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
4002_no-special-glx-memfunctions.patch
2+
4005_adapt-all-libX11-include-paths-to-libNX_X11.patch

0 commit comments

Comments
 (0)