From ccec1e76674855ab1a1c5110ea7380e92acb3b27 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 19 Jan 2018 15:02:23 +0100 Subject: Cycles: Cleanup, stop using debug flags in system utilities Debug flags are to be controlling render behavior, nothing to do with low level system utilities. it was simple to hack, but logically is wrong. Lets do things where they are supposed to be done! --- intern/cycles/device/device_cpu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'intern/cycles/device/device_cpu.cpp') diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index e476c012de1..0783230ef14 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -86,35 +86,35 @@ public: (void)kernel_avx; (void)kernel_avx2; #ifdef WITH_CYCLES_OPTIMIZED_KERNEL_AVX2 - if(system_cpu_support_avx2()) { + if(DebugFlags().cpu.avx2 && system_cpu_support_avx2()) { architecture_name = "AVX2"; kernel = kernel_avx2; } else #endif #ifdef WITH_CYCLES_OPTIMIZED_KERNEL_AVX - if(system_cpu_support_avx()) { + if(DebugFlags().cpu.avx && system_cpu_support_avx()) { architecture_name = "AVX"; kernel = kernel_avx; } else #endif #ifdef WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 - if(system_cpu_support_sse41()) { + if(DebugFlags().cpu.sse41 && system_cpu_support_sse41()) { architecture_name = "SSE4.1"; kernel = kernel_sse41; } else #endif #ifdef WITH_CYCLES_OPTIMIZED_KERNEL_SSE3 - if(system_cpu_support_sse3()) { + if(DebugFlags().cpu.sse3 && system_cpu_support_sse3()) { architecture_name = "SSE3"; kernel = kernel_sse3; } else #endif #ifdef WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 - if(system_cpu_support_sse2()) { + if(DebugFlags().cpu.sse2 && system_cpu_support_sse2()) { architecture_name = "SSE2"; kernel = kernel_sse2; } -- cgit v1.2.3