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-31 14:55:35 +0200 |
commit | 48737e1890e1fa99e157bf4d055e85e91c66cf89 (patch) | |
tree | e5dec2f4a467a5ed515d34269feba7977ecdb696 /src/amd | |
parent | 2be774b19609f31ead5f63ee235e82853a957f9e (diff) |
ac/nir: add ac_nir_context::main_function
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/amd')
-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 e2dd7cabc6..72c1cdc493 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -66,6 +66,7 @@ struct ac_nir_context { struct hash_table *phis; struct hash_table *vars; + LLVMValueRef main_function; LLVMBasicBlockRef continue_block; LLVMBasicBlockRef break_block; @@ -6102,6 +6103,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); |