ir3: Gather pixlod status earlier

We'll need this to skip optimizing helper invocations if it's
unnecessary.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
This commit is contained in:
Connor Abbott 2023-08-01 13:12:55 +02:00 committed by Marge Bot
parent 5411f01f93
commit b9489dea3d

View file

@ -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;