diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index a6b2b1aef65..6a8afde3c33 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -4815,6 +4815,12 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler, fixup_binning_pass(ctx, end); } + if (so->type == MESA_SHADER_FRAGMENT && + ctx->s->info.fs.needs_quad_helper_invocations) { + so->need_pixlod = true; + so->need_full_quad = true; + } + ir3_debug_print(ir, "AFTER: nir->ir3"); ir3_validate(ir); @@ -4999,12 +5005,6 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler, /* Collect sampling instructions eligible for pre-dispatch. */ collect_tex_prefetches(ctx, ir); - if (so->type == MESA_SHADER_FRAGMENT && - ctx->s->info.fs.needs_quad_helper_invocations) { - so->need_pixlod = true; - so->need_full_quad = true; - } - if ((ctx->so->type == MESA_SHADER_FRAGMENT) && !ctx->s->info.fs.early_fragment_tests) ctx->so->no_earlyz |= ctx->s->info.writes_memory;