<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - [IVB regression] Rendering issues in Mass Effect through VMware Workstation"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89180#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - [IVB regression] Rendering issues in Mass Effect through VMware Workstation"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89180">bug 89180</a>
from <span class="vcard"><a class="email" href="mailto:svyatoslav.pankratov@intel.com" title="Svyatoslav Pankratov <svyatoslav.pankratov@intel.com>"> <span class="fn">Svyatoslav Pankratov</span></a>
</span></b>
<pre>I have found guilty commit between 10.3 and 10.4 -
0e2ba3ee827f77af0b1f322d95c650f6f7f4da88 (glsl: Optimize clamp(x, b, 1.0),
where b > 0.0 as max(saturate(x),b)).
<a href="http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e2ba3ee827f77af0b1f322d95c650f6f7f4da88">http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e2ba3ee827f77af0b1f322d95c650f6f7f4da88</a>
Looks like a mistake in second part of changes:
In second condition, ir_binop_max should be replaced to ir_binop_min:
if (outer_const->is_one() &&
is_greater_than_zero(inner_val_b->as_constant()))
return expr(ir_binop_max, saturate(inner_val_a), inner_val_b);
if (inner_val_b->as_constant()->is_one() &&
is_greater_than_zero(outer_const))
- return expr(ir_binop_max, saturate(inner_val_a), outer_const);
+ return expr(ir_binop_min, saturate(inner_val_a), outer_const);
}
}
Issue was gone in 2 cases:
- optimization was deleted;
- optimization was changed like described above.
Please check my fix or suggest more appropriate fix.</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>