vc4: return progress on custom nir lowering

Report if the vc4 specific NIR lowering did any progress.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35127>
This commit is contained in:
Juan A. Suarez Romero
2025-05-23 22:46:32 +02:00
parent a9a54632af
commit b5706ef70a
4 changed files with 18 additions and 14 deletions
@@ -586,11 +586,12 @@ vc4_nir_lower_blend_impl(nir_builder *b, nir_intrinsic_instr *intr, void *data)
return true;
}
void
bool
vc4_nir_lower_blend(nir_shader *s, struct vc4_compile *c)
{
nir_shader_intrinsics_pass(s, vc4_nir_lower_blend_impl,
nir_metadata_control_flow, c);
bool progress =
nir_shader_intrinsics_pass(s, vc4_nir_lower_blend_impl,
nir_metadata_control_flow, c);
/* If we didn't do alpha-to-coverage on the output color, we still
* need to pass glSampleMask() through.
@@ -600,5 +601,8 @@ vc4_nir_lower_blend(nir_shader *s, struct vc4_compile *c)
nir_builder b = nir_builder_at(nir_after_impl(impl));
vc4_nir_store_sample_mask(c, &b, nir_load_sample_mask_in(&b));
progress = true;
}
return progress;
}
+3 -3
View File
@@ -338,9 +338,9 @@ vc4_nir_lower_io_impl(nir_builder *b, nir_intrinsic_instr *intr, void *data)
return true;
}
void
bool
vc4_nir_lower_io(nir_shader *s, struct vc4_compile *c)
{
nir_shader_intrinsics_pass(s, vc4_nir_lower_io_impl,
nir_metadata_control_flow, c);
return nir_shader_intrinsics_pass(s, vc4_nir_lower_io_impl,
nir_metadata_control_flow, c);
}
@@ -122,11 +122,11 @@ vc4_nir_lower_txf_ms_filter(const nir_instr *instr, const void *data)
nir_instr_as_tex(instr)->op == nir_texop_txf_ms);
}
void
bool
vc4_nir_lower_txf_ms(nir_shader *s, struct vc4_compile *c)
{
nir_shader_lower_instructions(s,
vc4_nir_lower_txf_ms_filter,
vc4_nir_lower_txf_ms_instr,
c);
return nir_shader_lower_instructions(s,
vc4_nir_lower_txf_ms_filter,
vc4_nir_lower_txf_ms_instr,
c);
}
+3 -3
View File
@@ -572,11 +572,11 @@ bool qir_opt_dead_code(struct vc4_compile *c);
bool qir_opt_peephole_sf(struct vc4_compile *c);
bool qir_opt_small_immediates(struct vc4_compile *c);
bool qir_opt_vpm(struct vc4_compile *c);
void vc4_nir_lower_blend(nir_shader *s, struct vc4_compile *c);
void vc4_nir_lower_io(nir_shader *s, struct vc4_compile *c);
bool vc4_nir_lower_blend(nir_shader *s, struct vc4_compile *c);
bool vc4_nir_lower_io(nir_shader *s, struct vc4_compile *c);
nir_def *vc4_nir_get_swizzled_channel(struct nir_builder *b,
nir_def **srcs, int swiz);
void vc4_nir_lower_txf_ms(nir_shader *s, struct vc4_compile *c);
bool vc4_nir_lower_txf_ms(nir_shader *s, struct vc4_compile *c);
void qir_lower_uniforms(struct vc4_compile *c);
uint32_t qpu_schedule_instructions(struct vc4_compile *c);