From 5ba2dd52fe538a1d27edd7eb26896268d5632ea4 Mon Sep 17 00:00:00 2001 From: kwm Date: Tue, 20 Aug 2013 15:07:44 +0000 Subject: Merge Mesa 9.1.6 work to trunk for wider testing. This are rev 1050,1051,1071,1072,1073,1074 from branches/experimental. Leave out libEGL since that needs more work. git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@1075 058c260c-8361-11dd-a0ac-aa2bafec7d09 --- graphics/libGL/files-old/patch-configure | 43 +++++++++++++ graphics/libGL/files-old/patch-mach64_context.h | 20 ++++++ .../patch-src__mesa__x86-64__glapi_x86-64.S | 12 ++++ .../files-old/patch-src__mesa__x86-64__xform4.S | 74 ++++++++++++++++++++++ .../files-old/patch-src__mesa__x86__glapi_x86.S | 11 ++++ .../patch-src__mesa__x86__read_rgba_span_x86.S | 11 ++++ .../libGL/files-old/patch-src_glx_x11_XF86dri.c | 38 +++++++++++ graphics/libGL/files-old/patch-src_mesa_Makefile | 15 +++++ 8 files changed, 224 insertions(+) create mode 100644 graphics/libGL/files-old/patch-configure create mode 100644 graphics/libGL/files-old/patch-mach64_context.h create mode 100644 graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S create mode 100644 graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S create mode 100644 graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S create mode 100644 graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S create mode 100644 graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c create mode 100644 graphics/libGL/files-old/patch-src_mesa_Makefile (limited to 'graphics/libGL/files-old') diff --git a/graphics/libGL/files-old/patch-configure b/graphics/libGL/files-old/patch-configure new file mode 100644 index 0000000..b2e156d --- /dev/null +++ b/graphics/libGL/files-old/patch-configure @@ -0,0 +1,43 @@ +--- configure.orig 2009-12-22 03:31:30.000000000 +0100 ++++ configure 2012-06-27 19:49:26.000000000 +0200 +@@ -6946,12 +6946,35 @@ + CXXFLAGS="$CXXFLAGS -ansi -pedantic" + fi + +- # ffb and gamma are missing because they have not been converted +- # to use the new interface. +- if test "x$DRI_DIRS" = "xyes"; then +- DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ ++ case "$host_cpu" in ++ x86_64) ++ # i810 is missing because there is no x86-64 system where it ++ # could *ever* be used. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ + unichrome savage sis swrast" +- fi ++ fi ++ ;; ++ i*86) ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ ++ unichrome savage sis swrast" ++ fi ++ ;; ++ powerpc*) ++ # Build only the drivers for cards that exist on PowerPC. ++ # At some point MGA will be added, but not yet. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" ++ fi ++ ;; ++ sparc*) ++ # Build only the drivers for cards that exist on SPARC. ++ if test "x$DRI_DIRS" = "xyes"; then ++ DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" ++ fi ++ ;; ++ esac + ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" diff --git a/graphics/libGL/files-old/patch-mach64_context.h b/graphics/libGL/files-old/patch-mach64_context.h new file mode 100644 index 0000000..9e3b38e --- /dev/null +++ b/graphics/libGL/files-old/patch-mach64_context.h @@ -0,0 +1,20 @@ +--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2012-06-27 19:59:32.000000000 +0200 ++++ src/mesa/drivers/dri/mach64/mach64_context.h 2012-06-27 20:08:30.000000000 +0200 +@@ -294,11 +294,14 @@ + #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) + #define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0) + #else +-#ifndef __OpenBSD__ +-#include +-#else ++#if defined(__OpenBSD__) + #include + #define bswap_32 bswap32 ++#elif defined(__FreeBSD__) ++#include ++#define bswap_32 bswap32 ++#else ++#include + #endif + + #define LE32_IN( x ) bswap_32( *(GLuint *)(x) ) diff --git a/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S b/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S new file mode 100644 index 0000000..908a6fe --- /dev/null +++ b/graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S @@ -0,0 +1,12 @@ +--- ./src/mesa/x86-64/glapi_x86-64.S.orig 2009-03-13 04:28:49.000000000 +0100 ++++ ./src/mesa/x86-64/glapi_x86-64.S 2011-01-28 18:12:18.000000000 +0100 +@@ -73,7 +73,8 @@ _x86_64_get_dispatch: + + .p2align 4,,15 + _x86_64_get_dispatch: +- movq _gl_DispatchTSD(%rip), %rdi ++ movq _gl_DispatchTSD@GOTPCREL(%rip), %rax ++ movl (%rax), %edi + jmp pthread_getspecific@PLT + + #elif defined(THREADS) diff --git a/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S b/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S new file mode 100644 index 0000000..193e6cc --- /dev/null +++ b/graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S @@ -0,0 +1,74 @@ +--- src/mesa/x86-64/xform4.S.orig 2009-01-22 18:38:35.000000000 +0100 ++++ src/mesa/x86-64/xform4.S 2011-05-09 21:26:00.000000000 +0200 +@@ -53,7 +53,7 @@ _mesa_x86_64_transform_points4_general: + * rdx = source + */ + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -116,7 +116,7 @@ p4_constants: + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 +-.float 0f+1.0 ++.float 1.0 + + .text + .align 16 +@@ -135,7 +135,7 @@ _mesa_x86_64_transform_points4_3d: + movaps 16(%rax), %xmm10 + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -195,7 +195,7 @@ p4_3d_done: + _mesa_x86_64_transform_points4_identity: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -223,7 +223,7 @@ p4_identity_done: + _mesa_3dnow_transform_points4_3d_no_rot: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -287,7 +287,7 @@ p4_3d_no_rot_done: + _mesa_3dnow_transform_points4_perspective: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -353,7 +353,7 @@ p4_perspective_done: + _mesa_3dnow_transform_points4_2d_no_rot: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -408,7 +408,7 @@ p4_2d_no_rot_done: + _mesa_3dnow_transform_points4_2d: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ diff --git a/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S b/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S new file mode 100644 index 0000000..71da78c --- /dev/null +++ b/graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S @@ -0,0 +1,11 @@ +--- ./src/mesa/x86/glapi_x86.S.orig 2009-03-13 04:28:49.000000000 +0100 ++++ ./src/mesa/x86/glapi_x86.S 2011-01-28 18:11:56.000000000 +0100 +@@ -47,7 +47,7 @@ + #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX)) + + #if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) +-#define GLOBL_FN(x) GLOBL x ; .type x, function ++#define GLOBL_FN(x) GLOBL x ; .type x, @function + #else + #define GLOBL_FN(x) GLOBL x + #endif diff --git a/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S b/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S new file mode 100644 index 0000000..37b08d1 --- /dev/null +++ b/graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S @@ -0,0 +1,11 @@ +--- ./src/mesa/x86/read_rgba_span_x86.S.orig 2008-08-25 16:46:47.000000000 +0200 ++++ ./src/mesa/x86/read_rgba_span_x86.S 2011-01-28 18:10:06.000000000 +0100 +@@ -648,7 +648,7 @@ _generic_read_RGBA_span_RGB565_MMX: + testl $0x01, %ecx + je .L01 + +- movzxw (%eax), %ecx ++ movzwl (%eax), %ecx + movd %ecx, %mm4 + + pshufw $0x00, %mm4, %mm0 diff --git a/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c b/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c new file mode 100644 index 0000000..1d082b5 --- /dev/null +++ b/graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c @@ -0,0 +1,38 @@ +--- src/glx/x11/XF86dri.c.orig 2009-06-17 18:35:16.000000000 +0000 ++++ src/glx/x11/XF86dri.c 2013-05-29 10:09:37.000000000 +0000 +@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN + #include + #include + #include "xf86dristr.h" ++#include + + + #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +@@ -212,7 +213,11 @@ XF86DRIOpenConnection(Display * dpy, int + } + + if (rep.length) { +- if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) { ++ if (rep.busIdStringLength < INT_MAX) ++ *busIdString = Xcalloc(rep.busIdStringLength + 1, 1); ++ else ++ *busIdString = NULL; ++ if (*busIdString == NULL) { + _XEatData(dpy, ((rep.busIdStringLength + 3) & ~3)); + UnlockDisplay(dpy); + SyncHandle(); +@@ -311,9 +316,11 @@ XF86DRIGetClientDriverName(Display * dpy + *ddxDriverPatchVersion = rep.ddxDriverPatchVersion; + + if (rep.length) { +- if (! +- (*clientDriverName = +- (char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) { ++ if (rep.clientDriverNameLength < INT_MAX) ++ *clientDriverName = Xcalloc(rep.clientDriverNameLength + 1, 1); ++ else ++ *clientDriverName = NULL; ++ if (*clientDriverName == NULL) { + _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3)); + UnlockDisplay(dpy); + SyncHandle(); diff --git a/graphics/libGL/files-old/patch-src_mesa_Makefile b/graphics/libGL/files-old/patch-src_mesa_Makefile new file mode 100644 index 0000000..433f3fb --- /dev/null +++ b/graphics/libGL/files-old/patch-src_mesa_Makefile @@ -0,0 +1,15 @@ +--- src/mesa/Makefile.orig 2009-12-22 03:31:19.000000000 +0100 ++++ src/mesa/Makefile 2013-08-19 23:19:42.000000000 +0200 +@@ -127,10 +127,10 @@ + $(DESTDIR)$(INSTALL_INC_DIR)/GL + + install-libgl: default gl.pc install-headers +- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) ++ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \ +- $(DESTDIR)$(INSTALL_LIB_DIR) ++ $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL + $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + + install-osmesa: default osmesa.pc -- cgit v1.2.3