From d547f9d3d291b495a022e1e3bfbb5f4af25c02b1 Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Tue, 27 Aug 2019 14:03:49 +0200 Subject: Fix T68944: Added check for SSE4.1 to denoising node. Since OpenImageDenoise requires a CPU with SSE 4.1 or newer, let the node act as passthrough on unsupported CPUs and display a message in the node itself. --- source/blender/blenlib/intern/system.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/blender/blenlib/intern/system.c') diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c index 88f2e2625e8..941c2b608e6 100644 --- a/source/blender/blenlib/intern/system.c +++ b/source/blender/blenlib/intern/system.c @@ -179,6 +179,19 @@ char *BLI_cpu_brand_string(void) return NULL; } +int BLI_cpu_support_sse41(void) +{ + int result[4], num; + __cpuid(result, 0); + num = result[0]; + + if (num >= 1) { + __cpuid(result, 0x00000001); + return (result[2] & ((int)1 << 19)) != 0; + } + return 0; +} + void BLI_hostname_get(char *buffer, size_t bufsize) { #ifndef WIN32 -- cgit v1.2.3