Mesa: Update Mesa 7.8.2 patch

* Utilize mmap vs malloc due to the new NX support
* GL applications no longer crash
* Fixes #9685 gcc2
This commit is contained in:
Alexander von Gluck IV
2013-04-24 21:23:46 +00:00
parent 1e2de4b85d
commit a66ef90360

View File

@@ -1,6 +1,6 @@
diff -Naur Mesa-7.8.2/bin/mklib Mesa-7.8.2-haiku/bin/mklib
--- Mesa-7.8.2/bin/mklib 2010-06-15 17:43:41.034865152 +0000
+++ Mesa-7.8.2-haiku/bin/mklib 2013-02-17 22:26:13.017301504 +0000
--- Mesa-7.8.2/bin/mklib 2010-06-15 17:43:41.036438016 +0000
+++ Mesa-7.8.2-haiku/bin/mklib 2013-04-24 20:34:52.664010752 +0000
@@ -260,7 +260,7 @@
NEWOBJECTS=""
for OBJ in $OBJECTS ; do
@@ -236,7 +236,7 @@ diff -Naur Mesa-7.8.2/bin/mklib Mesa-7.8.2-haiku/bin/mklib
fi
diff -Naur Mesa-7.8.2/configs/current Mesa-7.8.2-haiku/configs/current
--- Mesa-7.8.2/configs/current 1970-01-01 00:00:00.000000000 +0000
+++ Mesa-7.8.2-haiku/configs/current 2013-02-17 22:26:13.021495808 +0000
+++ Mesa-7.8.2-haiku/configs/current 2013-04-24 20:34:52.673972224 +0000
@@ -0,0 +1,63 @@
+# Configuration for Haiku
+# Written by Alexander von Gluck IV
@@ -303,7 +303,7 @@ diff -Naur Mesa-7.8.2/configs/current Mesa-7.8.2-haiku/configs/current
+APP_LIB_DEPS = -lbe -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
diff -Naur Mesa-7.8.2/configs/haiku Mesa-7.8.2-haiku/configs/haiku
--- Mesa-7.8.2/configs/haiku 1970-01-01 00:00:00.000000000 +0000
+++ Mesa-7.8.2-haiku/configs/haiku 2013-02-17 22:26:13.031195136 +0000
+++ Mesa-7.8.2-haiku/configs/haiku 2013-04-24 20:34:52.675282944 +0000
@@ -0,0 +1,63 @@
+# Configuration for Haiku
+# Written by Alexander von Gluck IV
@@ -369,8 +369,8 @@ diff -Naur Mesa-7.8.2/configs/haiku Mesa-7.8.2-haiku/configs/haiku
+GLU_LIB_DEPS =
+APP_LIB_DEPS = -lbe -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
diff -Naur Mesa-7.8.2/include/GL/gl.h Mesa-7.8.2-haiku/include/GL/gl.h
--- Mesa-7.8.2/include/GL/gl.h 2010-04-27 21:41:21.060555264 +0000
+++ Mesa-7.8.2-haiku/include/GL/gl.h 2013-02-17 22:30:31.274989056 +0000
--- Mesa-7.8.2/include/GL/gl.h 2010-04-27 21:41:21.061865984 +0000
+++ Mesa-7.8.2-haiku/include/GL/gl.h 2013-04-24 20:34:52.693895168 +0000
@@ -67,7 +67,8 @@
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern
@@ -382,8 +382,8 @@ diff -Naur Mesa-7.8.2/include/GL/gl.h Mesa-7.8.2-haiku/include/GL/gl.h
# define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */
diff -Naur Mesa-7.8.2/Makefile Mesa-7.8.2-haiku/Makefile
--- Mesa-7.8.2/Makefile 2010-06-16 21:22:57.033292288 +0000
+++ Mesa-7.8.2-haiku/Makefile 2013-02-17 22:26:13.034340864 +0000
--- Mesa-7.8.2/Makefile 2010-06-16 21:22:57.034865152 +0000
+++ Mesa-7.8.2-haiku/Makefile 2013-04-24 20:34:52.695468032 +0000
@@ -84,6 +84,7 @@
freebsd-dri \
freebsd-dri-amd64 \
@@ -393,8 +393,8 @@ diff -Naur Mesa-7.8.2/Makefile Mesa-7.8.2-haiku/Makefile
hpux10-gcc \
hpux10-static \
diff -Naur Mesa-7.8.2/src/gallium/auxiliary/draw/draw_private.h Mesa-7.8.2-haiku/src/gallium/auxiliary/draw/draw_private.h
--- Mesa-7.8.2/src/gallium/auxiliary/draw/draw_private.h 2010-06-15 17:43:42.046661632 +0000
+++ Mesa-7.8.2-haiku/src/gallium/auxiliary/draw/draw_private.h 2013-02-17 22:26:13.037486592 +0000
--- Mesa-7.8.2/src/gallium/auxiliary/draw/draw_private.h 2010-06-15 17:43:42.048234496 +0000
+++ Mesa-7.8.2-haiku/src/gallium/auxiliary/draw/draw_private.h 2013-04-24 20:34:52.704380928 +0000
@@ -70,7 +70,7 @@
/* This will probably become float (*data)[4] soon:
@@ -405,8 +405,8 @@ diff -Naur Mesa-7.8.2/src/gallium/auxiliary/draw/draw_private.h Mesa-7.8.2-haiku
/* NOTE: It should match vertex_id size above */
diff -Naur Mesa-7.8.2/src/gallium/auxiliary/os/os_thread.h Mesa-7.8.2-haiku/src/gallium/auxiliary/os/os_thread.h
--- Mesa-7.8.2/src/gallium/auxiliary/os/os_thread.h 2010-06-15 17:43:42.056623104 +0000
+++ Mesa-7.8.2-haiku/src/gallium/auxiliary/os/os_thread.h 2013-02-17 22:26:13.040370176 +0000
--- Mesa-7.8.2/src/gallium/auxiliary/os/os_thread.h 2010-06-15 17:43:42.058195968 +0000
+++ Mesa-7.8.2-haiku/src/gallium/auxiliary/os/os_thread.h 2013-04-24 20:34:52.705953792 +0000
@@ -257,7 +257,7 @@
* pipe_barrier
*/
@@ -417,8 +417,8 @@ diff -Naur Mesa-7.8.2/src/gallium/auxiliary/os/os_thread.h Mesa-7.8.2-haiku/src/
typedef pthread_barrier_t pipe_barrier;
diff -Naur Mesa-7.8.2/src/gallium/auxiliary/util/u_debug.h Mesa-7.8.2-haiku/src/gallium/auxiliary/util/u_debug.h
--- Mesa-7.8.2/src/gallium/auxiliary/util/u_debug.h 2010-06-15 17:43:42.000000000 +0000
+++ Mesa-7.8.2-haiku/src/gallium/auxiliary/util/u_debug.h 2013-02-17 22:26:13.046923776 +0000
--- Mesa-7.8.2/src/gallium/auxiliary/util/u_debug.h 2010-06-15 17:43:42.001572864 +0000
+++ Mesa-7.8.2-haiku/src/gallium/auxiliary/util/u_debug.h 2013-04-24 20:34:52.728498176 +0000
@@ -91,8 +91,10 @@
(void) format; /* silence warning */
#endif
@@ -433,8 +433,8 @@ diff -Naur Mesa-7.8.2/src/gallium/auxiliary/util/u_debug.h Mesa-7.8.2-haiku/src/
/*
* ... isn't portable so we need to pass arguments in parentheses.
diff -Naur Mesa-7.8.2/src/glu/sgi/Makefile Mesa-7.8.2-haiku/src/glu/sgi/Makefile
--- Mesa-7.8.2/src/glu/sgi/Makefile 2010-02-05 00:10:40.064487424 +0000
+++ Mesa-7.8.2-haiku/src/glu/sgi/Makefile 2013-02-17 22:26:13.049545216 +0000
--- Mesa-7.8.2/src/glu/sgi/Makefile 2010-02-05 00:10:40.066060288 +0000
+++ Mesa-7.8.2-haiku/src/glu/sgi/Makefile 2013-04-24 20:34:52.730071040 +0000
@@ -135,13 +135,19 @@
-mkdir $(TOP)/$(LIB_DIR)
@@ -457,8 +457,8 @@ diff -Naur Mesa-7.8.2/src/glu/sgi/Makefile Mesa-7.8.2-haiku/src/glu/sgi/Makefile
clean:
-rm -f *.o */*.o */*/*.o
diff -Naur Mesa-7.8.2/src/mesa/glapi/glapi.h Mesa-7.8.2-haiku/src/mesa/glapi/glapi.h
--- Mesa-7.8.2/src/mesa/glapi/glapi.h 2010-06-15 17:43:43.026476544 +0000
+++ Mesa-7.8.2-haiku/src/mesa/glapi/glapi.h 2013-02-17 22:26:13.052428800 +0000
--- Mesa-7.8.2/src/mesa/glapi/glapi.h 2010-06-15 17:43:43.028049408 +0000
+++ Mesa-7.8.2-haiku/src/mesa/glapi/glapi.h 2013-04-24 20:34:52.747634688 +0000
@@ -62,7 +62,7 @@
#endif
@@ -468,3 +468,15 @@ diff -Naur Mesa-7.8.2/src/mesa/glapi/glapi.h Mesa-7.8.2-haiku/src/mesa/glapi/gla
# define likely(x) __builtin_expect(!!(x), 1)
# define unlikely(x) __builtin_expect(!!(x), 0)
#else
diff -Naur Mesa-7.8.2/src/mesa/main/execmem.c Mesa-7.8.2-haiku/src/mesa/main/execmem.c
--- Mesa-7.8.2/src/mesa/main/execmem.c 2010-04-27 21:41:21.011272192 +0000
+++ Mesa-7.8.2-haiku/src/mesa/main/execmem.c 2013-04-24 20:35:32.244056064 +0000
@@ -36,7 +36,7 @@
-#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun)
+#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun) || defined(__HAIKU__)
/*
* Allocate a large block of memory which can hold code then dole it out