[Bug 78468] Compiling of shader gets stuck in infinite loop

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Sep 12 10:17:40 PDT 2014


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

--- Comment #16 from Mike Stroyan <mike at LunarG.com> ---
This extremely slow compilation is not actually an infinite loop.
But the compile time does increase with every unrolled loop step in the shader.
The time to complete is 2^N, where N is the number of loop iterations.

The call to
 (*rvalue)->accept(this);
in ir_constant_folding_visitor::handle_rvalue is key to this.
Dropping that call for the case when rvalue is not a constant makes compilation
finish very quickly.  And for at least this shader it produces exactly the
same results.  Constant folding is done very effectively for the y and z
channels.

But the x channel still produces a series of adds of constants instead of one
add with the sum.  That same pattern made the compilation faster for operations
on a full vec4 than for separate channels by limiting the complexity of the
expressions.  But it is less efficient than the instructions created for the y
and z channels.
That is a separate issue that could still be investigated.

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


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