swr: Fix crashes on non-AVX hardware
authorjzielins <jan.zielinski@intel.com>
Wed, 2 Sep 2020 17:55:29 +0000 (19:55 +0200)
committerVivek Pandya <vivekvpandya@gmail.com>
Mon, 7 Sep 2020 15:55:16 +0000 (21:25 +0530)
commit389ff8ef47ba3fc8c586af14454b91c2afd4506d
tree37a144d2cd588951b88f2201488dee601d8f542b
parenta829896ea83797eebb2d8af9230ab6ab50ab39f9
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