ac/radv: move llvm compiler info to struct and init in one place
authorDave Airlie <airlied@redhat.com>
Tue, 26 Jun 2018 23:27:03 +0000 (09:27 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Jul 2018 00:29:16 +0000 (10:29 +1000)
commit7398913a62a59282e742758a7e789ed3df27e49c
treee64e59eb906fccde70a2c19b72c6244a0f263dc2
parentd853d3a59bd5f8720a5b021bcd64a193d370b623
ac/radv: move llvm compiler info to struct and init in one place

This ports radv to the shared code, however due to a bug in LLVM
version prior to 7, radv cannot add target info at this stage,
as it would leak one for every shader compile, however I'd prefer
to keep this llvm damage in the shared code, since it isn't the
driver at fault here. We just add a flag to denote if the driver
can support leaking the target info or not, and the common code
does the right thing depending on the llvm version.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_llvm_util.c
src/amd/common/ac_llvm_util.h
src/amd/vulkan/radv_nir_to_llvm.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_shader.c
src/gallium/drivers/radeonsi/si_pipe.c