[Bug 110412] Over 15% performance lost on large branching shader

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 12 15:39:52 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110412

--- Comment #4 from Eero Tamminen <eero.t.tamminen at intel.com> ---
Looking at the attached shader assembly...

Mesa 18.2:
SIMD8 shader: 2413 instructions. 11 loops. 131452 cycles. 0:0 spills:fills.
Promoted 15 constants. Compacted 38608 to 27856 bytes (28%)

Mesa git:
SIMD8 shader: 2388 instructions. 11 loops. 120307 cycles. 0:0 spills:fills.
Promoted 14 constants. Compacted 38208 to 27392 bytes (28%)

=> Both versions reach only SIMD8 and new version uses less instructions.

Loops in git version are shorter, except for last two which are marginally
longer:

Mesa 18.2:
while(8)        JIP: -216                                       { align1 1Q };
while(8)        JIP: -216                                       { align1 1Q };
while(8)        JIP: -216                                       { align1 1Q };
while(8)        JIP: -216                                       { align1 1Q };
while(8)        JIP: -216                                       { align1 1Q };
while(8)        JIP: -216                                       { align1 1Q };
while(8)        JIP: -216                                       { align1 1Q };
while(8)        JIP: -296                                       { align1 1Q };
while(8)        JIP: -4496                                      { align1 1Q };
while(8)        JIP: -1136                                      { align1 1Q };
while(8)        JIP: -1136                                      { align1 1Q };

Mesa git:
while(8)        JIP: -200                                       { align1 1Q };
while(8)        JIP: -200                                       { align1 1Q };
while(8)        JIP: -200                                       { align1 1Q };
while(8)        JIP: -200                                       { align1 1Q };
while(8)        JIP: -200                                       { align1 1Q };
while(8)        JIP: -200                                       { align1 1Q };
while(8)        JIP: -200                                       { align1 1Q };
while(8)        JIP: -288                                       { align1 1Q };
while(8)        JIP: -4424                                      { align1 1Q };
while(8)        JIP: -1144                                      { align1 1Q };
while(8)        JIP: -1144                                      { align1 1Q };

At maximum, old code seems to have 61 live regs, new one 62.

Both Mesa and my own (crappy) ISA analyzer think that the new version (which
has more lrp & mad reg bank conflicts) should use less cycles, but in branching
code that can't really be predicted as it depends so much on which branches get
selected.

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


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