[Piglit] [PATCH] Add GLSL tests for loops with function calls that have side-effects.
Jose Fonseca
jfonseca at vmware.com
Fri Mar 23 00:03:11 PDT 2012
----- Original Message -----
> Mesa's loop unroller incorrectly unrolls these loops 7 times, when
> the
> function call within the body clearly makes the loop only execute
> once.
>
> Cc: Ian Romanick <idr at freedesktop.org>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> tests/shaders/glsl-fs-unroll-out-param.shader_test | 27
> ++++++++++++++++++
> .../shaders/glsl-fs-unroll-side-effect.shader_test | 29
> ++++++++++++++++++++
> 2 files changed, 56 insertions(+), 0 deletions(-)
> create mode 100644
> tests/shaders/glsl-fs-unroll-out-param.shader_test
> create mode 100644
> tests/shaders/glsl-fs-unroll-side-effect.shader_test
>
> Ian,
>
> The loop analysis code currently doesn't take calls into account
> whatsoever, which is clearly wrong. Any ideas on the best way to fix
> it?
I think that, before a loop is unrolled, any inner calls should be inlined. I don't any correctness/performance reason to do any differently.
Jose
More information about the Piglit
mailing list