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.
This commit is contained in:
Stefan Werner
2019-08-27 14:03:49 +02:00
parent e39528b351
commit d547f9d3d2
4 changed files with 69 additions and 48 deletions

View File

@@ -24,6 +24,7 @@
*/
int BLI_cpu_support_sse2(void);
int BLI_cpu_support_sse41(void);
void BLI_system_backtrace(FILE *fp);
/* Get CPU brand, result is to be MEM_freeN()-ed. */

View File

@@ -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