diff options
author | Samuel Pitoiset <[email protected]> | 2017-12-21 17:53:14 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-12-22 10:38:44 +0100 |
commit | 03ef2641469286423e587d17b2952713ffe48585 (patch) | |
tree | 31dc0eed3371f1baa2ac45659df3a5611401efdc /src | |
parent | 79c495aa377c486b220da538558177208999283d (diff) |
amd/common: pass the family to ac_llvm_context_init()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/common/ac_llvm_build.c | 3 | ||||
-rw-r--r-- | src/amd/common/ac_llvm_build.h | 3 | ||||
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 3 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index b407678c3b0..c74a47a7998 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -47,11 +47,12 @@ */ void ac_llvm_context_init(struct ac_llvm_context *ctx, LLVMContextRef context, - enum chip_class chip_class) + enum chip_class chip_class, enum radeon_family family) { LLVMValueRef args[1]; ctx->chip_class = chip_class; + ctx->family = family; ctx->context = context; ctx->module = NULL; diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h index 4a570c41bc5..6427d5315ae 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -74,13 +74,14 @@ struct ac_llvm_context { LLVMValueRef empty_md; enum chip_class chip_class; + enum radeon_family family; LLVMValueRef lds; }; void ac_llvm_context_init(struct ac_llvm_context *ctx, LLVMContextRef context, - enum chip_class chip_class); + enum chip_class chip_class, enum radeon_family family); unsigned ac_get_type_size(LLVMTypeRef type); diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index cbc6d1b61b1..65865371058 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -6561,7 +6561,8 @@ LLVMModuleRef ac_translate_nir_to_llvm(LLVMTargetMachineRef tm, ctx.context = LLVMContextCreate(); ctx.module = LLVMModuleCreateWithNameInContext("shader", ctx.context); - ac_llvm_context_init(&ctx.ac, ctx.context, options->chip_class); + ac_llvm_context_init(&ctx.ac, ctx.context, options->chip_class, + options->family); ctx.ac.module = ctx.module; LLVMSetTarget(ctx.module, options->supports_spill ? "amdgcn-mesa-mesa3d" : "amdgcn--"); @@ -6943,7 +6944,8 @@ void ac_create_gs_copy_shader(LLVMTargetMachineRef tm, ctx.options = options; ctx.shader_info = shader_info; - ac_llvm_context_init(&ctx.ac, ctx.context, options->chip_class); + ac_llvm_context_init(&ctx.ac, ctx.context, options->chip_class, + options->family); ctx.ac.module = ctx.module; ctx.is_gs_copy_shader = true; diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index 0843b3c63c0..2ca036e67d3 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -1167,7 +1167,8 @@ void si_llvm_context_init(struct si_shader_context *ctx, ctx->gallivm.builder = lp_create_builder(ctx->gallivm.context, float_mode); - ac_llvm_context_init(&ctx->ac, ctx->gallivm.context, sscreen->info.chip_class); + ac_llvm_context_init(&ctx->ac, ctx->gallivm.context, + sscreen->info.chip_class, sscreen->info.family); ctx->ac.module = ctx->gallivm.module; ctx->ac.builder = ctx->gallivm.builder; |