<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Too many temporary expressions in shader freeze glLinkProgram"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94477#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Too many temporary expressions in shader freeze glLinkProgram"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94477">bug 94477</a>
from <span class="vcard"><a class="email" href="mailto:mattst88@gmail.com" title="Matt Turner <mattst88@gmail.com>"> <span class="fn">Matt Turner</span></a>
</span></b>
<pre>(In reply to Tapani Pälli from <a href="show_bug.cgi?id=94477#c6">comment #6</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=126170" name="attach_126170" title="fix">attachment 126170</a> <a href="attachment.cgi?id=126170&action=edit" title="fix">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=94477&attachment=126170'>[review]</a> [review]
> fix
>
> This should result in same effect as the first experimentation, I will run
> testing on this and if it works fine then I'll send it to mesa-dev mailing
> list.</span >
That's pretty clever, but unfortunately it cannot work. Cases of dividing by
zero, inf, nan, etc cannot be handled. We don't do this optimization in
opt_algebraic for exactly that reason.
On top of that, the purpose of the test is to check whether you can compile a
huge expression, and the one it uses is hilariously unrepresentative and prone
to abuse by hacks like this one :)
The test has uncovered real flaws in our compiler: GLSL IR's copy propagation
runs in O(n^2), and the channel_expressions pass creates a huge number of
expressions.
Ken and I have spent time recently trying to handle the shader-db regressions
by disabling channel_expressions. It's slow going and other tasks keep taking
priority.
The most direct way forward then, is to improve copy propagate's run time like
I described in <a href="show_bug.cgi?id=94477#c3">comment 3</a>. Maybe you want to take a stab at replacing the linked
lists in the pass with hash tables? I spent some time on it... maybe you'll
have better luck. :)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>