mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 19:20:12 +01:00
mesa: added checks for OpenBSD
This commit is contained in:
parent
0138435643
commit
f49d345a51
1 changed files with 18 additions and 0 deletions
|
|
@ -42,6 +42,11 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
#if defined(USE_SSE_ASM) && defined(__OpenBSD__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <machine/cpu.h>
|
||||
#endif
|
||||
|
||||
#include "common_x86_asm.h"
|
||||
#include "imports.h"
|
||||
|
|
@ -121,6 +126,19 @@ static void check_os_sse_support( void )
|
|||
if (ret || !enabled)
|
||||
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
|
||||
}
|
||||
#elif defined(__OpenBSD__)
|
||||
{
|
||||
int mib[2];
|
||||
int ret, enabled;
|
||||
size_t len = sizeof(enabled);
|
||||
|
||||
mib[0] = CTL_MACHDEP;
|
||||
mib[1] = CPU_SSE;
|
||||
|
||||
ret = sysctl(mib, 2, &enabled, &len, NULL, 0);
|
||||
if (ret || !enabled)
|
||||
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
|
||||
}
|
||||
#elif defined(WIN32)
|
||||
LPTOP_LEVEL_EXCEPTION_FILTER oldFilter;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue