mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
broadcom/compiler: move nir_lower_undef_to_zero out of optimization loop
The combination of nir_opt_if and nir_lower_undef_to_zero running inside the optimization loop could make it to not converge. This was exercised by ollama running gemma3 compute shaders. Removing the pass from the optimization loop results in No changes in shader-db. Assisted-by: Claude Opus 4.6 Fixes:cbe24a0e9c("broadcom/compiler: use nir_lower_undef_to_zero") Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> (cherry picked from commit2cd51a6efc) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41402>
This commit is contained in:
parent
1ad28db0f1
commit
d968629409
2 changed files with 3 additions and 2 deletions
|
|
@ -2754,7 +2754,7 @@
|
|||
"description": "broadcom/compiler: move nir_lower_undef_to_zero out of optimization loop",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "cbe24a0e9c57a1e65243a9dce1c122597b08d50f",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2243,7 +2243,6 @@ v3d_optimize_nir(struct v3d_compile *c, struct nir_shader *s)
|
|||
}
|
||||
|
||||
NIR_PASS(progress, s, nir_opt_undef);
|
||||
NIR_PASS(progress, s, nir_lower_undef_to_zero);
|
||||
|
||||
if (c && !c->disable_loop_unrolling &&
|
||||
s->options->max_unroll_iterations > 0) {
|
||||
|
|
@ -2254,6 +2253,8 @@ v3d_optimize_nir(struct v3d_compile *c, struct nir_shader *s)
|
|||
}
|
||||
} while (progress);
|
||||
|
||||
NIR_PASS(progress, s, nir_lower_undef_to_zero);
|
||||
|
||||
/* needs to be outside of optimization loop, otherwise it fights with
|
||||
* opt_algebraic optimizing the conversion lowering
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue