swr: Fix crashes on non-AVX hardware
authorjzielins <jan.zielinski@intel.com>
Wed, 2 Sep 2020 17:55:29 +0000 (19:55 +0200)
committerJan Zielinski <jan.zielinski@intel.com>
Mon, 7 Sep 2020 09:24:39 +0000 (09:24 +0000)
commit927a395f040143175535f613ee50d53a73455a52
tree1f2b0c42434c9a8a26a8339d1ef52791bb010a84
parente5fb9dca2a15c57d8216e0fc2260a200df3049e9
swr: Fix crashes on non-AVX hardware

Compilers may use vector instructions in calculating
hash values of std::string. This happens usualy when
high optimalization level is enabled. SWR had two
static std::map<std::string, T> variables which
lead to crashes on non-AVX systems during the initialization
of those variables. This commit makes those variables
dynamically allocated and fixes this AVX instruction
leak.

Closes: #3077
Closes: #198
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6565>
src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp