[Bug 99221] >2% perf drop in GfxBench T-Rex with "i965: disable loop unrolling in GLSL IR"

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Dec 30 08:57:44 UTC 2016


--- Comment #3 from Eero Tamminen <eero.t.tamminen at intel.com> ---
(In reply to Timothy Arceri from comment #2)
> Oh I see GFXBench is free to download. Will check it out.

Note: the free version doesn't support automation, so you can just get the
shaders, any perf testing unfortunately would need to be manual.

(Once you've verified a set of patches that help with T-Rex shaders, I can do 
automated runs to check the perf for the affected benchmarks.)

I went through all the T-Rex GLSL shaders.  They contain a huge amount of dead
code and are in the end fairly simple.  Only little control flow, and if one
ignores the dead code, they're fairly short.  Several use discard though.

The only shader with loop in it is this motion blur fragment shader (which is
known to have clear impact on the test performance):
uniform sampler2D texture_unit0;
uniform sampler2D texture_unit1;
varying vec2 out_texcoord0;

void main()
        const int n = 4;
        vec3 motion = texture2D(texture_unit1, out_texcoord0).xyz;
        vec4 texel = texture2D(texture_unit0, out_texcoord0);
        vec3 color = texel.xyz / float (n);
        motion.xy = (motion.xy - 0.5) * vec2(0.0666667, .125);
        motion.xy *= texel.a;
        for (int i = 1; i < n; i++) {
                vec2 tc = out_texcoord0 - motion.xy * float (i);
                color += texture2D(texture_unit0, tc).xyz / float (n);
        gl_FragColor.xyz = color;
(I removed all the dead code, uniforms, varyings etc.)

All the other loops in T-Rex shaders are dead code.

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20161230/59a365fc/attachment.html>

More information about the intel-3d-bugs mailing list