diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-06-08 20:05:09 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-07-05 12:33:52 +0200 |
commit | 2eeacbbb0860c34d5683dd958e33efff98f57b16 (patch) | |
tree | bf1d5d15c6e34ad7777ea22620241276c1d96334 | |
parent | ed57d03614d1b4a1702001800d4e2aa48907dc9b (diff) |
ac/nir,radeonsi: add ac_shader_abi::chip_class
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 1 | ||||
-rw-r--r-- | src/amd/common/ac_shader_abi.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 4f3ed24b8b..aab2f65447 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -6127,6 +6127,7 @@ LLVMModuleRef ac_translate_nir_to_llvm(LLVMTargetMachineRef tm, if (nir->stage == MESA_SHADER_FRAGMENT) handle_fs_inputs_pre(&ctx, nir); + ctx.abi.chip_class = options->chip_class; ctx.abi.inputs = &ctx.inputs[0]; ctx.abi.emit_outputs = handle_shader_outputs_post; diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index b0161d9f22..1b204e9f44 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -30,6 +30,8 @@ * radv to share a compiler backend. */ struct ac_shader_abi { + enum chip_class chip_class; + LLVMValueRef base_vertex; LLVMValueRef start_instance; LLVMValueRef draw_id; diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 2b030c02f9..8e16abfe0f 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5465,6 +5465,8 @@ static void si_init_shader_ctx(struct si_shader_context *ctx, { struct lp_build_tgsi_context *bld_base; + ctx->abi.chip_class = sscreen->b.chip_class; + si_llvm_context_init(ctx, sscreen, tm); bld_base = &ctx->bld_base; |