From b35c13d8b4c507589ec2d95c72eefdbbc132bdc2 Mon Sep 17 00:00:00 2001 From: tnn Date: Sun, 7 Jun 2015 15:48:12 +0000 Subject: [PATCH] Update to MesaLib-10.5.7. MesaLib-10.5.7 2015-06-07 "The current release includes over a dozen nouveau fixes (mostly targeting nv30/nv40 era hardware), i965 patches and a crash fix common to all the gallium dri modules." MesaLib-10.5.6 2015-05-24 "This time around we have fixes from all over mesa - core mesa, driver specific patches (i965, nouveau, freedreno), reentrancy improvements in Clover (OpenCL), GLX and EGL loader patches, and Darwin build fixes." --- graphics/MesaLib/Makefile | 6 +-- graphics/MesaLib/distinfo | 14 +++--- ...-src_mesa_drivers_dri_i915_intel__screen.c | 38 ++++++++-------- ...-src_mesa_drivers_dri_i965_intel__screen.c | 38 ++++++++-------- ...patch-src_mesa_drivers_dri_swrast_swrast.c | 44 ++++++------------- 5 files changed, 63 insertions(+), 77 deletions(-) diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile index 4eb03737d0e74..2ed23930b6678 100644 --- a/graphics/MesaLib/Makefile +++ b/graphics/MesaLib/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.103 2015/05/15 14:27:42 nros Exp $ +# $NetBSD: Makefile,v 1.104 2015/06/07 15:48:12 tnn Exp $ -DISTNAME= mesa-10.5.5 +DISTNAME= mesa-10.5.7 PKGNAME= ${DISTNAME:S/mesa/MesaLib/} CATEGORIES= graphics x11 -MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/10.5.5/ +MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/ EXTRACT_SUFX= .tar.xz MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/graphics/MesaLib/distinfo b/graphics/MesaLib/distinfo index 6d7e8e6185bfc..22769703ff542 100644 --- a/graphics/MesaLib/distinfo +++ b/graphics/MesaLib/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.95 2015/05/16 16:39:52 tnn Exp $ +$NetBSD: distinfo,v 1.96 2015/06/07 15:48:12 tnn Exp $ -SHA1 (mesa-10.5.5.tar.xz) = 367f78c244a34eeb5e8fc4531228166ea1118165 -RMD160 (mesa-10.5.5.tar.xz) = 3d73894defb5badf8bde0d026c7802f55aa24484 -Size (mesa-10.5.5.tar.xz) = 6989964 bytes +SHA1 (mesa-10.5.7.tar.xz) = b600f09ccaeab9f6bb5b98091cf01732bab854a2 +RMD160 (mesa-10.5.7.tar.xz) = 0e15cf97678ecdc95996b598169130dcfd239533 +Size (mesa-10.5.7.tar.xz) = 6992848 bytes SHA1 (patch-configure) = 3fc150370e36fc49382b491d907608f00cf99a72 SHA1 (patch-include_EGL_eglplatform.h) = c34bac7386fd93ee8d0b83a748ae14dc4742d776 SHA1 (patch-include_GL_glxext.h) = 830902f2d38a8395cda682c059fc5223e1b0e89e @@ -26,9 +26,9 @@ SHA1 (patch-src_mapi_entry__x86__tsd.h) = 62501b6e609fa81e33fd826a694e9d9752a7ba SHA1 (patch-src_mesa_drivers_dri_Makefile.in) = b016b3f9324b05e4206e1c23150bd1cde9b9e100 SHA1 (patch-src_mesa_drivers_dri_common_Makefile.in) = 5e160f7d92c2e9f3fa36e52a082a496af67e634e SHA1 (patch-src_mesa_drivers_dri_common_xmlconfig.c) = 8c8e748397bcdc9b9abbd14604af5d79de08dfbf -SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = 616cec356fb098e9fd349489a577aeacf6f412e4 -SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 632d9a95e514d0b63fb54f31827c0aacc28ace94 -SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = abca30898144b7014cdddcc7c7e808087704b596 +SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = fd8436e4e3a69250256c2cddf8138effb16bd7b3 +SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 7c1a1e5c549f64d4c390e0c87984c44a88d4abfe +SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = b8a6cca517e1cccbdb2c59cf67a6d2481cdfebd4 SHA1 (patch-src_mesa_main_compiler.h) = fc0e2b6be8afa9e21ddca1d1a14608a1687bddd8 SHA1 (patch-src_mesa_main_context.c) = 30c3796865372aa16297c2aaa647ddb49958fa64 SHA1 (patch-src_mesa_main_shader__query.cpp) = 6273c74161f045363c58f38adeb672287f6a0898 diff --git a/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c b/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c index b8cf512c468ea..3b8aa7d268752 100644 --- a/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c +++ b/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c @@ -1,37 +1,39 @@ -$NetBSD: patch-src_mesa_drivers_dri_i915_intel__screen.c,v 1.1 2015/04/25 11:19:18 tnn Exp $ +$NetBSD: patch-src_mesa_drivers_dri_i915_intel__screen.c,v 1.2 2015/06/07 15:48:12 tnn Exp $ Fix build on older NetBSD w/o _SC_PHYS_PAGES. ---- src/mesa/drivers/dri/i915/intel_screen.c.orig 2015-03-28 18:20:39.000000000 +0000 +--- src/mesa/drivers/dri/i915/intel_screen.c.orig 2015-06-07 10:06:53.000000000 +0000 +++ src/mesa/drivers/dri/i915/intel_screen.c -@@ -41,6 +41,11 @@ +@@ -41,6 +41,10 @@ #include "utils.h" #include "xmlpool.h" -+#if defined(__NetBSD__) -+#include -+#include ++#ifdef HAVE_SYS_SYSCTL_H ++# include +#endif + static const __DRIconfigOptionsExtension i915_config_options = { .base = { __DRI_CONFIG_OPTIONS, 1 }, .xml = -@@ -732,7 +737,18 @@ i915_query_renderer_integer(__DRIscreen +@@ -732,6 +736,13 @@ i915_query_renderer_integer(__DRIscreen const unsigned gpu_mappable_megabytes = (aper_size / (1024 * 1024)) * 3 / 4; -+#if !defined(_SC_PHYS_PAGES) && defined(__NetBSD__) -+ uint64_t physmem64; -+ uint32_t pagesize; -+ size_t len; -+ int ret1 = sysctlbyname("hw.physmem64", &physmem64, &len, (void*)NULL, 0); -+ int ret2 = sysctlbyname("hw.pagesize", &pagesize, &len, (void*)NULL, 0); -+ const long system_memory_pages = \ -+ (ret1 == 0 && ret2 == 0 && physmem64 > 0 && pagesize > 0) ? -+ (physmem64 / pagesize) : -1; ++#if defined(HW_PHYSMEM64) ++ int mib[2] = { CTL_HW, HW_PHYSMEM64 }; ++ uint64_t system_memory_bytes; ++ size_t len = sizeof(system_memory_bytes); ++ if (sysctl(mib, 2, &system_memory_bytes, &len, NULL, 0) != 0) ++ return -1; +#else const long system_memory_pages = sysconf(_SC_PHYS_PAGES); -+#endif const long system_page_size = sysconf(_SC_PAGE_SIZE); - if (system_memory_pages <= 0 || system_page_size <= 0) +@@ -740,6 +751,7 @@ i915_query_renderer_integer(__DRIscreen + + const uint64_t system_memory_bytes = (uint64_t) system_memory_pages + * (uint64_t) system_page_size; ++#endif + + const unsigned system_memory_megabytes = + (unsigned) (system_memory_bytes / (1024 * 1024)); diff --git a/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c b/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c index ba50fe7ac38d8..b3012113ef402 100644 --- a/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c +++ b/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c @@ -1,37 +1,39 @@ -$NetBSD: patch-src_mesa_drivers_dri_i965_intel__screen.c,v 1.1 2015/04/25 11:19:18 tnn Exp $ +$NetBSD: patch-src_mesa_drivers_dri_i965_intel__screen.c,v 1.2 2015/06/07 15:48:12 tnn Exp $ Fix build on older NetBSD w/o _SC_PHYS_PAGES. ---- src/mesa/drivers/dri/i965/intel_screen.c.orig 2015-03-28 18:20:39.000000000 +0000 +--- src/mesa/drivers/dri/i965/intel_screen.c.orig 2015-06-07 10:06:53.000000000 +0000 +++ src/mesa/drivers/dri/i965/intel_screen.c -@@ -42,6 +42,11 @@ +@@ -42,6 +42,10 @@ #include "utils.h" #include "xmlpool.h" -+#if defined(__NetBSD__) -+#include -+#include ++#ifdef HAVE_SYS_SYSCTL_H ++# include +#endif + static const __DRIconfigOptionsExtension brw_config_options = { .base = { __DRI_CONFIG_OPTIONS, 1 }, .xml = -@@ -829,7 +834,18 @@ brw_query_renderer_integer(__DRIscreen * +@@ -829,6 +833,13 @@ brw_query_renderer_integer(__DRIscreen * const unsigned gpu_mappable_megabytes = (aper_size / (1024 * 1024)) * 3 / 4; -+#if !defined(_SC_PHYS_PAGES) && defined(__NetBSD__) -+ uint64_t physmem64; -+ uint32_t pagesize; -+ size_t len; -+ int ret1 = sysctlbyname("hw.physmem64", &physmem64, &len, (void*)NULL, 0); -+ int ret2 = sysctlbyname("hw.pagesize", &pagesize, &len, (void*)NULL, 0); -+ const long system_memory_pages = \ -+ (ret1 == 0 && ret2 == 0 && physmem64 > 0 && pagesize > 0) ? -+ (physmem64 / pagesize) : -1; ++#if defined(HW_PHYSMEM64) ++ int mib[2] = { CTL_HW, HW_PHYSMEM64 }; ++ const uint64_t system_memory_bytes; ++ size_t len = sizeof(system_memory_bytes); ++ if (sysctl(mib, 2, &system_memory_bytes, &len, NULL, 0) != 0) ++ return -1; +#else const long system_memory_pages = sysconf(_SC_PHYS_PAGES); -+#endif const long system_page_size = sysconf(_SC_PAGE_SIZE); - if (system_memory_pages <= 0 || system_page_size <= 0) +@@ -837,6 +848,7 @@ brw_query_renderer_integer(__DRIscreen * + + const uint64_t system_memory_bytes = (uint64_t) system_memory_pages + * (uint64_t) system_page_size; ++#endif + + const unsigned system_memory_megabytes = + (unsigned) (system_memory_bytes / (1024 * 1024)); diff --git a/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_swrast_swrast.c b/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_swrast_swrast.c index 3efa114b8b1df..6d7a514d4260a 100644 --- a/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_swrast_swrast.c +++ b/graphics/MesaLib/patches/patch-src_mesa_drivers_dri_swrast_swrast.c @@ -1,37 +1,19 @@ -$NetBSD: patch-src_mesa_drivers_dri_swrast_swrast.c,v 1.1 2015/04/25 11:19:18 tnn Exp $ +$NetBSD: patch-src_mesa_drivers_dri_swrast_swrast.c,v 1.2 2015/06/07 15:48:12 tnn Exp $ Fix build on older NetBSD w/o _SC_PHYS_PAGES. ---- src/mesa/drivers/dri/swrast/swrast.c.orig 2015-03-28 18:20:39.000000000 +0000 +--- src/mesa/drivers/dri/swrast/swrast.c.orig 2015-06-07 10:06:53.000000000 +0000 +++ src/mesa/drivers/dri/swrast/swrast.c -@@ -60,6 +60,11 @@ - #include "swrast_priv.h" - #include "swrast/s_context.h" - -+#if defined(__NetBSD__) -+#include -+#include -+#endif -+ - const __DRIextension **__driDriverGetExtensions_swrast(void); - - const char * const swrast_vendor_string = "Mesa Project"; -@@ -137,7 +142,18 @@ swrast_query_renderer_integer(__DRIscree - return 0; - case __DRI2_RENDERER_VIDEO_MEMORY: { +@@ -150,6 +150,12 @@ swrast_query_renderer_integer(__DRIscree + size_t len = sizeof(system_memory_bytes); + if (sysctl(mib, 2, &system_memory_bytes, &len, NULL, 0) != 0) + return -1; ++#elif defined(HW_PHYSMEM64) ++ int mib[2] = { CTL_HW, HW_PHYSMEM64 }; ++ uint64_t system_memory_bytes; ++ size_t len = sizeof(system_memory_bytes); ++ if (sysctl(mib, 2, &system_memory_bytes, &len, NULL, 0) != 0) ++ return -1; + #elif defined(_SC_PHYS_PAGES) && defined(_SC_PAGE_SIZE) /* XXX: Do we want to return the full amount of system memory ? */ -+#if !defined(_SC_PHYS_PAGES) && defined(__NetBSD__) -+ uint64_t physmem64; -+ uint32_t pagesize; -+ size_t len; -+ int ret1 = sysctlbyname("hw.physmem64", &physmem64, &len, (void*)NULL, 0); -+ int ret2 = sysctlbyname("hw.pagesize", &pagesize, &len, (void*)NULL, 0); -+ const long system_memory_pages = \ -+ (ret1 == 0 && ret2 == 0 && physmem64 > 0 && pagesize > 0) ? -+ (physmem64 / pagesize) : -1; -+#else const long system_memory_pages = sysconf(_SC_PHYS_PAGES); -+#endif - const long system_page_size = sysconf(_SC_PAGE_SIZE); - - if (system_memory_pages <= 0 || system_page_size <= 0)