[Bug 76862] New: clamp with bounds inside [0, 1] generates slow code
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Mar 31 14:39:51 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=76862
Priority: medium
Bug ID: 76862
Assignee: idr at freedesktop.org
Summary: clamp with bounds inside [0, 1] generates slow code
QA Contact: intel-3d-bugs at lists.freedesktop.org
Severity: enhancement
Classification: Unclassified
OS: All
Reporter: idr at freedesktop.org
Hardware: Other
Status: NEW
Version: git
Component: glsl-compiler
Product: Mesa
Code sequences like
a = clamp(b, 0, .5)
c = clamp(d, .1, 1);
generates both instructions. However, each of these could be implemented with
a single instruction with a SAT modifier. The first example above should be
MAX_SAT a, b, .5;
and the second should be
MIN_SAT c, d, .1;
The requirements for this optimiation are that the lower bound be zero and the
upper bound less than 1, or the lower bound greater than zero and the upper
bound equal to 1.
--
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/20140331/668bd86e/attachment.html>
More information about the intel-3d-bugs
mailing list