mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
util: Don't advertise cache ops on x86 without SSE2
Fixes:555881e574("util/cache_ops: Add some cache flush helpers") Reviewed-by: Mel Henning <mhenning@darkrefraction.com> (cherry picked from commit3739d7a90c) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38010>
This commit is contained in:
parent
4202ea6c7f
commit
94ec7c686d
2 changed files with 9 additions and 2 deletions
|
|
@ -154,7 +154,7 @@
|
|||
"description": "util: Don't advertise cache ops on x86 without SSE2",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "555881e57499bc38f098dd5859edecdf6bdad2a2",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include "detect_arch.h"
|
||||
#include "u_cpu_detect.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -44,7 +45,13 @@ util_has_cache_ops(void)
|
|||
return false;
|
||||
#endif
|
||||
|
||||
return DETECT_ARCH_X86 || DETECT_ARCH_X86_64 || DETECT_ARCH_AARCH64;
|
||||
#if DETECT_ARCH_X86
|
||||
return util_get_cpu_caps()->has_sse2;
|
||||
#elif DETECT_ARCH_X86_64 || DETECT_ARCH_AARCH64
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Returns the cache granularity
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue