ac/nir: Use context-specific LLVM types
authorAlex Smith <asmith@feralinteractive.com>
Mon, 15 Oct 2018 14:50:20 +0000 (15:50 +0100)
committerAlex Smith <asmith@feralinteractive.com>
Tue, 16 Oct 2018 07:18:24 +0000 (08:18 +0100)
commitca83d51cfb154af12ee6e17a533df6cbbc890e22
treeca654c9637c125952b88727958dcb63afb5bf53f
parentad558408ff1ea5ad0743e68b9487472d7b020034
ac/nir: Use context-specific LLVM types

LLVMInt*Type() return types from the global context and therefore are
not safe for use in other contexts. Use types from our own context
instead.

Fixes frequent crashes seen when doing multithreaded pipeline creation.

Fixes: 4d0b02bb5a "ac: add support for 16bit load_push_constant"
Fixes: 7e7ee82698 "ac: add support for 16bit buffer loads"
Cc: "18.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_nir_to_llvm.c