From ffe62e1b6c5bf8ed6fcf9a0624403e0d219d46ff Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 13 Jun 2020 09:23:57 -0700 Subject: [PATCH] freedreno/ir3: pass variant to postsched Prep for the next patch. Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3.h | 2 +- src/freedreno/ir3/ir3_compiler_nir.c | 2 +- src/freedreno/ir3/ir3_postsched.c | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index bdfce559aab..c0d46eea8f5 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -1312,7 +1312,7 @@ bool ir3_sched_add_deps(struct ir3 *ir); int ir3_sched(struct ir3 *ir); struct ir3_context; -bool ir3_postsched(struct ir3 *ir); +bool ir3_postsched(struct ir3 *ir, struct ir3_shader_variant *v); bool ir3_a6xx_fixup_atomic_dests(struct ir3 *ir, struct ir3_shader_variant *so); diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 1ad4149d451..91ef00b9c92 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -3710,7 +3710,7 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler, goto out; } - IR3_PASS(ir, ir3_postsched); + IR3_PASS(ir, ir3_postsched, so); if (compiler->gpu_id >= 600) { IR3_PASS(ir, ir3_a6xx_fixup_atomic_dests, so); diff --git a/src/freedreno/ir3/ir3_postsched.c b/src/freedreno/ir3/ir3_postsched.c index fd36fdc0cdd..ad16526cd50 100644 --- a/src/freedreno/ir3/ir3_postsched.c +++ b/src/freedreno/ir3/ir3_postsched.c @@ -53,6 +53,8 @@ struct ir3_postsched_ctx { struct ir3 *ir; + struct ir3_shader_variant *v; + void *mem_ctx; struct ir3_block *block; /* the current block */ struct dag *dag; @@ -701,10 +703,11 @@ cleanup_self_movs(struct ir3 *ir) } bool -ir3_postsched(struct ir3 *ir) +ir3_postsched(struct ir3 *ir, struct ir3_shader_variant *v) { struct ir3_postsched_ctx ctx = { .ir = ir, + .v = v, }; ir3_remove_nops(ir); -- 2.30.2