[Bug 97035] [regression] WebGL demo iamnop.com/particles is very slow and spends far too long compiling shaders

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 29 15:51:45 UTC 2016


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

Eero Tamminen <eero.t.tamminen at intel.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.freedesktop.or
                   |                            |g/show_bug.cgi?id=91857

--- Comment #3 from Eero Tamminen <eero.t.tamminen at intel.com> ---
Tested this on SKL GT2 with today's Mesa.

All the other shapes selectable in the WebGL demo load instantly and run well
over 60FPS.  However, selecting the default "galaxy" shape takes ~20s and runs
at ~2FPS.

Problem is couple of shaders that get compiled, Mesa spills with them and as
result they're huge.  I've attached cleaned up versions of the shaders
(indented then & replaced hex hash names with something shorter).

OGL_PS_0016.glsl is the main culprit, Mesa produces 800KB shader assembly file
with ~8000 instructions for it.  According to 'perf', compile time goes to:
-------------------------------
# Cost  Object        Symbol
27.14%  i965_dri.so   ra_allocate                                              
19.94%  i965_dri.so   fs_visitor::virtual_grf_interferes                       
13.90%  i965_dri.so   ra_add_node_adjacency                                    
10.21%  i965_dri.so   fs_visitor::assign_regs                                  
 4.11%  i965_dri.so   decrement_q.isra.2                                       
 3.83%  i965_dri.so   instruction_scheduler::add_dep                           
 2.97%  i965_dri.so   ra_add_node_interference                                 
 1.71%  libc-2.23.so  _int_malloc
-------------------------------

While OGL_PS_0031.glsl also spills and is in instruction count nearly half of
the previous shader, it compiles and runs >10x faster.  Its 'perf' profile
looks completely different:
-------------------------------
# Cost  Object        Symbol
17.66%  i965_dri.so   (anon)::ir_copy_propagation_visitor::visit
17.12%  i965_dri.so   (anon)::ir_copy_propagation_elements_visitor::kill
12.46%  i965_dri.so   (anon)::ir_copy_propagation_visitor::kill
12.14%  i965_dri.so  
(anon)::ir_copy_propagation_elements_visitor::handle_rvalue
 4.47%  i965_dri.so   ra_allocate
 3.12%  i965_dri.so   ir_expression::accept
 2.66%  i965_dri.so   fs_visitor::virtual_grf_interferes
 1.61%  i965_dri.so   ra_add_node_adjacency
 1.39%  i965_dri.so   fs_visitor::assign_regs
-------------------------------

-- 
You are receiving this mail because:
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/20160829/043c7eae/attachment.html>


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