Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
devel:hw
:
pine
:
dontbeevil
>
mesa
> _service:tar_git:disable-avx-support.diff
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:disable-avx-support.diff of Package mesa
commit d87399ae231c2dab749f49fa97ea030ecd504386 Author: Juha Kallioinen <juha.kallioinen@jolla.com> Date: Fri Apr 18 09:10:24 2014 +0000 [mesa] disable avx support - JB#18552 AVX/SSE4 cpuid information can leak through to the system in some circumstances and mesa/llvm tries to use it for llvmpipe and VirtualBox will SIGILL as it doesn't support it. Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com> diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index b118fc8..b94591b 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -460,6 +460,7 @@ util_cpu_detect(void) util_cpu_caps.has_sse2 = (regs2[3] >> 26) & 1; /* 0x4000000 */ util_cpu_caps.has_sse3 = (regs2[2] >> 0) & 1; /* 0x0000001 */ util_cpu_caps.has_ssse3 = (regs2[2] >> 9) & 1; /* 0x0000020 */ +#if 0 util_cpu_caps.has_sse4_1 = (regs2[2] >> 19) & 1; util_cpu_caps.has_sse4_2 = (regs2[2] >> 20) & 1; util_cpu_caps.has_popcnt = (regs2[2] >> 23) & 1; @@ -469,6 +470,15 @@ util_cpu_detect(void) util_cpu_caps.has_f16c = ((regs2[2] >> 29) & 1) && util_cpu_caps.has_avx; util_cpu_caps.has_fma = ((regs2[2] >> 12) & 1) && util_cpu_caps.has_avx; util_cpu_caps.has_mmx2 = util_cpu_caps.has_sse; /* SSE cpus supports mmxext too */ +#else + util_cpu_caps.has_sse4_1 = 0; + util_cpu_caps.has_sse4_2 = 0; + util_cpu_caps.has_popcnt = 0; + util_cpu_caps.has_avx = 0; + util_cpu_caps.has_f16c = 0; + util_cpu_caps.has_fma = 0; + util_cpu_caps.has_mmx2 = 0; +#endif #if defined(PIPE_ARCH_X86_64) util_cpu_caps.has_daz = 1; #else