mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-19 01:20:33 +01:00
util: Build util/cache_ops_x86.c with -msse2
__builtin_ia32_clflush() requires -msse2 so we need to set -msse2 at
least for building that file. Fortunately, there are no GPUs that
actually need userspace cache flushing that can ever be bolted onto a
pre-SSE2 x86 CPUs.
Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14134
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37958>
This commit is contained in:
parent
3739d7a90c
commit
efbecd93ba
1 changed files with 9 additions and 2 deletions
|
|
@ -188,7 +188,14 @@ libmesa_util_links = []
|
|||
if host_machine.cpu_family() == 'aarch64' and cc.get_id() != 'msvc'
|
||||
files_mesa_util += files('cache_ops_aarch64.c')
|
||||
elif host_machine.cpu_family() in ['x86', 'x86_64'] and cc.get_id() != 'msvc'
|
||||
files_mesa_util += files('cache_ops_x86.c')
|
||||
libmesa_util_clflush = static_library(
|
||||
'mesa_util_clflush',
|
||||
['cache_ops_x86.c'],
|
||||
include_directories : [inc_util],
|
||||
c_args : [no_override_init_args, sse2_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
libmesa_util_links += [libmesa_util_clflush]
|
||||
if with_clflushopt
|
||||
libmesa_util_clflushopt = static_library(
|
||||
'mesa_util_clflushopt',
|
||||
|
|
@ -197,7 +204,7 @@ elif host_machine.cpu_family() in ['x86', 'x86_64'] and cc.get_id() != 'msvc'
|
|||
c_args : [no_override_init_args] + clflushopt_args,
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
libmesa_util_links += libmesa_util_clflushopt
|
||||
libmesa_util_links += [libmesa_util_clflushopt]
|
||||
endif
|
||||
else
|
||||
files_mesa_util += files('cache_ops_null.c')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue