From: Blair Sadewitz Date: Tue, 15 Jul 2008 23:12:23 +0000 (-0600) Subject: mesa: added test for __NetBSD__ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4adb9e1de6728febbb758d6633edf765868153e;p=mesa.git mesa: added test for __NetBSD__ --- diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index 0b2af0a3706..d93241a977a 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -113,6 +113,14 @@ static void check_os_sse_support( void ) if (ret || !enabled) _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); } +#elif defined (__NetBSD__) + { + int ret, enabled; + size_t len = sizeof(enabled); + ret = sysctlbyname("machdep.sse", &enabled, &len, (void *)NULL, 0); + if (ret || !enabled) + _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); + } #elif defined(WIN32) LPTOP_LEVEL_EXCEPTION_FILTER oldFilter;