<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Graphical glitches in Unreal Engine 4"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83510#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Graphical glitches in Unreal Engine 4"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83510">bug 83510</a>
from <span class="vcard"><a class="email" href="mailto:maraeo@gmail.com" title="Marek Olšák <maraeo@gmail.com>"> <span class="fn">Marek Olšák</span></a>
</span></b>
<pre>(In reply to Christoph Haag from <a href="show_bug.cgi?id=83510#c7">comment #7</a>)
<span class="quote">> I think in the new "Lightroom Interior" the blackness glitch is visible in a
> more interesting way:
> <a href="https://www.youtube.com/watch?v=R9N-srsF_Fg">https://www.youtube.com/watch?v=R9N-srsF_Fg</a></span >
I think I've tracked down what's causing the blackness in all Unreal Engine
demos: Division by zero.
There are several options to fix this:
1) Use V_RCP_LEGACY_F32 instead of V_RCP_F32 (not available on Tonga and later
chips).
2) Emulate V_RCP_LEGACY_F32(x) using (x != 0 ? 1/x : 0). This can be done in
Mesa or LLVM. For LLVM, a new intrinsic rcp.legacy needs to be added.
3) Disable lowering DIV_TO_MUL_RCP in glsl-to-tgsi and see what happens. Not
sure if this will change anything, but at least LLVM doesn't need the lowering
and we might need to do the same workaround for TGSI_OPCODE_DIV.
I've implemented (2) in Mesa and it fixes the Lightroom Interior demo. I'm not
sure if that's the best solution.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>