diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-05-19 19:22:09 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-07-05 12:33:50 +0200 |
commit | d094fb42cd17bcb314978d52bbf8ae3c9354773f (patch) | |
tree | bf5ae1158ed4bac804f1f69743f986c3f803a4d7 | |
parent | 02ab9e2860438ccbcf88d3fbc38252bac1216862 (diff) |
ac/nir: add ac_nir_context::main_function
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 5f7a938814..86ba27ea48 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -65,6 +65,7 @@ struct ac_nir_context { struct hash_table *defs; struct hash_table *phis; + LLVMValueRef main_function; LLVMBasicBlockRef continue_block; LLVMBasicBlockRef break_block; @@ -6010,6 +6011,8 @@ void ac_nir_translate(struct ac_llvm_context *ac, struct ac_shader_abi *abi, ctx.stage = nir->stage; + ctx.main_function = LLVMGetBasicBlockParent(LLVMGetInsertBlock(ctx.ac.builder)); + nir_foreach_variable(variable, &nir->outputs) handle_shader_output_decl(&ctx, nir, variable); |