ac/nir: remove nir_to_llvm_context::nir link
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
e9f0205ca2
commit
a541117ff4
|
@ -68,7 +68,6 @@ struct nir_to_llvm_context {
|
||||||
const struct ac_nir_compiler_options *options;
|
const struct ac_nir_compiler_options *options;
|
||||||
struct ac_shader_variant_info *shader_info;
|
struct ac_shader_variant_info *shader_info;
|
||||||
struct ac_shader_abi abi;
|
struct ac_shader_abi abi;
|
||||||
struct ac_nir_context *nir;
|
|
||||||
|
|
||||||
unsigned max_workgroup_size;
|
unsigned max_workgroup_size;
|
||||||
LLVMContextRef context;
|
LLVMContextRef context;
|
||||||
|
@ -6753,9 +6752,6 @@ void ac_nir_translate(struct ac_llvm_context *ac, struct ac_shader_abi *abi,
|
||||||
ctx.ac = *ac;
|
ctx.ac = *ac;
|
||||||
ctx.abi = abi;
|
ctx.abi = abi;
|
||||||
|
|
||||||
if (nctx)
|
|
||||||
nctx->nir = &ctx;
|
|
||||||
|
|
||||||
ctx.stage = nir->info.stage;
|
ctx.stage = nir->info.stage;
|
||||||
|
|
||||||
ctx.main_function = LLVMGetBasicBlockParent(LLVMGetInsertBlock(ctx.ac.builder));
|
ctx.main_function = LLVMGetBasicBlockParent(LLVMGetInsertBlock(ctx.ac.builder));
|
||||||
|
@ -6788,9 +6784,6 @@ void ac_nir_translate(struct ac_llvm_context *ac, struct ac_shader_abi *abi,
|
||||||
ralloc_free(ctx.defs);
|
ralloc_free(ctx.defs);
|
||||||
ralloc_free(ctx.phis);
|
ralloc_free(ctx.phis);
|
||||||
ralloc_free(ctx.vars);
|
ralloc_free(ctx.vars);
|
||||||
|
|
||||||
if (nctx)
|
|
||||||
nctx->nir = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -7251,8 +7244,6 @@ void ac_create_gs_copy_shader(LLVMTargetMachineRef tm,
|
||||||
nir_ctx.ac = ctx.ac;
|
nir_ctx.ac = ctx.ac;
|
||||||
nir_ctx.abi = &ctx.abi;
|
nir_ctx.abi = &ctx.abi;
|
||||||
|
|
||||||
ctx.nir = &nir_ctx;
|
|
||||||
|
|
||||||
nir_foreach_variable(variable, &geom_shader->outputs) {
|
nir_foreach_variable(variable, &geom_shader->outputs) {
|
||||||
scan_shader_output_decl(&ctx, variable, geom_shader, MESA_SHADER_VERTEX);
|
scan_shader_output_decl(&ctx, variable, geom_shader, MESA_SHADER_VERTEX);
|
||||||
handle_shader_output_decl(&nir_ctx, geom_shader, variable);
|
handle_shader_output_decl(&nir_ctx, geom_shader, variable);
|
||||||
|
@ -7260,8 +7251,6 @@ void ac_create_gs_copy_shader(LLVMTargetMachineRef tm,
|
||||||
|
|
||||||
ac_gs_copy_shader_emit(&ctx);
|
ac_gs_copy_shader_emit(&ctx);
|
||||||
|
|
||||||
ctx.nir = NULL;
|
|
||||||
|
|
||||||
LLVMBuildRetVoid(ctx.ac.builder);
|
LLVMBuildRetVoid(ctx.ac.builder);
|
||||||
|
|
||||||
ac_llvm_finalize_module(&ctx);
|
ac_llvm_finalize_module(&ctx);
|
||||||
|
|
Loading…
Reference in New Issue