<div dir="auto">Drp...<div dir="auto"><br></div><div dir="auto">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 3, 2017 7:00 PM, "Timothy Arceri" <<a href="mailto:timothy.arceri@collabora.com">timothy.arceri@collabora.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fixes performance regression in SynMark PSPom caused by loops with float<br>
counters not always unrolling.<br>
<br>
For example:<br>
<br>
for (float i = 0.02; i < 0.9; i += 0.11)<br>
...<br>
---<br>
src/compiler/nir/nir_loop_<wbr>analyze.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/nir/nir_loop_<wbr>analyze.c b/src/compiler/nir/nir_loop_<wbr>analyze.c<br>
index 71cbe3c..a5f464a 100644<br>
--- a/src/compiler/nir/nir_loop_<wbr>analyze.c<br>
+++ b/src/compiler/nir/nir_loop_<wbr>analyze.c<br>
@@ -384,8 +384,8 @@ get_iteration(nir_op cond_op, nir_const_value *initial, nir_const_value *step,<br>
case nir_op_flt:<br>
case nir_op_feq:<br>
case nir_op_fne: {<br>
- int32_t initial_val = initial->f32[0];<br>
- int32_t span = limit->f32[0] - initial_val;<br>
+ float initial_val = initial->f32[0];<br>
+ float span = limit->f32[0] - initial_val;<br>
iter = span / step->f32[0];<br>
break;<br>
}<br>
--<br>
2.9.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>