summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-04-09 18:43:54 -0400
committerMarek Olšák <[email protected]>2018-04-27 17:56:04 -0400
commitc1823ff661b016defe93baa0038e5fd6ca8522c4 (patch)
treef660fa39f973f83f5ae2aa3d4110ed87b52e8879 /src/gallium/drivers/radeonsi/si_pipe.c
parent5a94f15aa769cc090817c5dce2b98fa91d7e2110 (diff)
radeonsi: move target_library_info into si_compiler
Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Benedikt Schemmer <ben at besd.de> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index dbfb9c8fdea..19b570e569e 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -29,6 +29,7 @@
#include "sid.h"
#include "radeon/radeon_uvd.h"
+#include "gallivm/lp_bld_misc.h"
#include "util/disk_cache.h"
#include "util/hash_table.h"
#include "util/u_log.h"
@@ -113,10 +114,19 @@ static void si_init_compiler(struct si_screen *sscreen,
compiler->tm = ac_create_target_machine(sscreen->info.family,
tm_options, &compiler->triple);
+ if (!compiler->tm)
+ return;
+
+ compiler->target_library_info =
+ gallivm_create_target_library_info(compiler->triple);
+ if (!compiler->target_library_info)
+ return;
}
static void si_destroy_compiler(struct si_compiler *compiler)
{
+ if (compiler->target_library_info)
+ gallivm_dispose_target_library_info(compiler->target_library_info);
if (compiler->tm)
LLVMDisposeTargetMachine(compiler->tm);
}