mirror of https://github.com/GNOME/gimp.git
Add SSE3, 4, and AVX gimp_cpu_accel checks
This commit is contained in:
parent
b52beecc87
commit
8e262c871a
|
@ -123,7 +123,11 @@ enum
|
|||
|
||||
enum
|
||||
{
|
||||
ARCH_X86_INTEL_FEATURE_PNI = 1 << 0
|
||||
ARCH_X86_INTEL_FEATURE_PNI = 1 << 0,
|
||||
ARCH_X86_INTEL_FEATURE_SSSE3 = 1 << 9,
|
||||
ARCH_X86_INTEL_FEATURE_SSE4_1 = 1 << 19,
|
||||
ARCH_X86_INTEL_FEATURE_SSE4_2 = 1 << 20,
|
||||
ARCH_X86_INTEL_FEATURE_AVX = 1 << 28
|
||||
};
|
||||
|
||||
#if !defined(ARCH_X86_64) && (defined(PIC) || defined(__PIC__))
|
||||
|
@ -245,6 +249,18 @@ arch_accel_intel (void)
|
|||
|
||||
if (ecx & ARCH_X86_INTEL_FEATURE_PNI)
|
||||
caps |= GIMP_CPU_ACCEL_X86_SSE3;
|
||||
|
||||
if (ecx & ARCH_X86_INTEL_FEATURE_SSSE3)
|
||||
caps |= GIMP_CPU_ACCEL_X86_SSSE3;
|
||||
|
||||
if (ecx & ARCH_X86_INTEL_FEATURE_SSE4_1)
|
||||
caps |= GIMP_CPU_ACCEL_X86_SSE4_1;
|
||||
|
||||
if (ecx & ARCH_X86_INTEL_FEATURE_SSE4_2)
|
||||
caps |= GIMP_CPU_ACCEL_X86_SSE4_2;
|
||||
|
||||
if (ecx & ARCH_X86_INTEL_FEATURE_AVX)
|
||||
caps |= GIMP_CPU_ACCEL_X86_AVX;
|
||||
#endif /* USE_SSE */
|
||||
}
|
||||
#endif /* USE_MMX */
|
||||
|
|
|
@ -37,6 +37,10 @@ typedef enum
|
|||
GIMP_CPU_ACCEL_X86_SSE = 0x10000000,
|
||||
GIMP_CPU_ACCEL_X86_SSE2 = 0x08000000,
|
||||
GIMP_CPU_ACCEL_X86_SSE3 = 0x02000000,
|
||||
GIMP_CPU_ACCEL_X86_SSSE3 = 0x01000000,
|
||||
GIMP_CPU_ACCEL_X86_SSE4_1 = 0x00800000,
|
||||
GIMP_CPU_ACCEL_X86_SSE4_2 = 0x00400000,
|
||||
GIMP_CPU_ACCEL_X86_AVX = 0x00200000,
|
||||
|
||||
/* powerpc accelerations */
|
||||
GIMP_CPU_ACCEL_PPC_ALTIVEC = 0x04000000
|
||||
|
|
Loading…
Reference in New Issue