Re: [Mesa-dev] [PATCH v2 3/3] glsl: make loop unrolling more like the nir unrolling path

2017-10-09 Thread Timothy Arceri
On 10/10/17 01:26, Nicolai Hähnle wrote: On 21.09.2017 12:55, Timothy Arceri wrote: The old code assumed that loop terminators will always be at the start of the loop, resulting in otherwise unrollable loops not being unrolled at all. For example the current code would unroll:    int j = 0;  

Re: [Mesa-dev] [PATCH v2 3/3] glsl: make loop unrolling more like the nir unrolling path

2017-10-09 Thread Nicolai Hähnle
On 21.09.2017 12:55, Timothy Arceri wrote: The old code assumed that loop terminators will always be at the start of the loop, resulting in otherwise unrollable loops not being unrolled at all. For example the current code would unroll: int j = 0; do { if (j > 5) break;

Re: [Mesa-dev] [PATCH v2 3/3] glsl: make loop unrolling more like the nir unrolling path

2017-10-08 Thread Timothy Arceri
On 04/10/17 11:17, Timothy Arceri wrote: Ping on patches 1 & 3 Ping again on these two. Nicolai, I believe I've addressed all you feedback besides trying to add a pass that flips the branches so that the break is always in the then branch. I'd rather not spend to much more time on this code

Re: [Mesa-dev] [PATCH v2 3/3] glsl: make loop unrolling more like the nir unrolling path

2017-10-03 Thread Timothy Arceri
Ping on patches 1 & 3 On 21/09/17 20:55, Timothy Arceri wrote: The old code assumed that loop terminators will always be at the start of the loop, resulting in otherwise unrollable loops not being unrolled at all. For example the current code would unroll: int j = 0; do { if (j >