-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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."
- Loading branch information
tnn
committed
Jun 7, 2015
1 parent
4625651
commit b35c13d
Showing
5 changed files
with
63 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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= [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 20 additions & 18 deletions
38
graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <sys/param.h> | ||
+#include <sys/sysctl.h> | ||
+#ifdef HAVE_SYS_SYSCTL_H | ||
+# include <sys/sysctl.h> | ||
+#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)); |
38 changes: 20 additions & 18 deletions
38
graphics/MesaLib/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <sys/param.h> | ||
+#include <sys/sysctl.h> | ||
+#ifdef HAVE_SYS_SYSCTL_H | ||
+# include <sys/sysctl.h> | ||
+#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)); |
44 changes: 13 additions & 31 deletions
44
graphics/MesaLib/patches/patch-src_mesa_drivers_dri_swrast_swrast.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <sys/param.h> | ||
+#include <sys/sysctl.h> | ||
+#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) |