[Bug 92929] Add a NIR pass to lower indirects to conditional load/store operations.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Nov 12 14:20:35 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=92929
Bug ID: 92929
Summary: Add a NIR pass to lower indirects to conditional
load/store operations.
Product: Mesa
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: enhancement
Priority: medium
Component: glsl-compiler
Assignee: idr at freedesktop.org
Reporter: jason at jlekstrand.net
QA Contact: intel-3d-bugs at lists.freedesktop.org
One of the things that NIR is currently missing is a pass to lower indirect
load/store operations to if-ladders. For example, an indirect load on a
5-element array would be rewritten as
if (i < 2) {
if (i < 1) {
a = foo[0];
} else {
b = foo[1];
}
c = phi(a, b);
} else {
if (i < 3) {
d = foo[2];
} else {
if (i < 4) {
e = foo[3];
} else {
f = foo[4];
}
g = phi(e, f);
}
h = phi(d, g);
}
result = phi(c, h);
where the if-ladder effectively does a binary search over the space of possible
indirect values. Implementing this shouldn't be terribly hard from a compiler
theory perspective; it's mostly an exercise in recursion. Lots of recursion...
--
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/20151112/32b0b3af/attachment.html>
More information about the intel-3d-bugs
mailing list