mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
util: bring back fix to avoid strict aliasing bugs in xxhash
This is commitb9e163fa67that got lost in xxhash upgrade070bf8986c. Fixes graphics artifacts seen in multiple workloads with Intel driver when using clang compiler. Fixes also CTS tests: dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_cubemap dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_3d dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_array dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_multisample_array v2: pass arguments from meson.build instead of hardcoding (Eric Engestrom) Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14684 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14107 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13895 Fixes:070bf8986c("util: Upgrade xxhash.h to v0.8.3") Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (cherry picked from commitd2351b3d04) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
This commit is contained in:
parent
a457021d67
commit
befb9af14b
2 changed files with 7 additions and 1 deletions
|
|
@ -794,7 +794,7 @@
|
|||
"description": "util: bring back fix to avoid strict aliasing bugs in xxhash",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "070bf8986ce08bc58d1263fefb9e2e33de9e6bf4",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -349,9 +349,15 @@ _libmesa_util = static_library(
|
|||
build_by_default : false
|
||||
)
|
||||
|
||||
# Mesa leaves strict aliasing on in the compiler, and xxhash code likes to
|
||||
# dereference the passed in data as u32*, which means that the compiler is
|
||||
# free to move the u32 read before the write of the struct members being
|
||||
# hashed, and in practice it did in Freedreno and Intel drivers.
|
||||
# Forcing 2 flags below prevents it.
|
||||
idep_mesautil = declare_dependency(
|
||||
sources : [shader_stats_h],
|
||||
link_with : _libmesa_util,
|
||||
compile_args : [ '-DXXH_FORCE_ALIGN_CHECK=0', '-DXXH_FORCE_MEMORY_ACCESS=0' ],
|
||||
include_directories : [inc_util],
|
||||
dependencies : deps_for_libmesa_util,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue