[Mesa-dev] [Bug 94747] Convert phi nodes to logical operations

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 18 21:46:04 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=94747

--- Comment #3 from Ian Romanick <idr at freedesktop.org> ---
(In reply to Timothy Arceri from comment #2)
> As (In reply to Jason Ekstrand from comment #1)
> > The code for this already exists.  It's called nir_opt_peephole_select.  The
> > only problem is that it only triggers if both sides of the if are empty. 
> > I've been wanting to add some sort of heuristic to it for some time now. 
> > The only problem is that it's really back-end specific.
> 
> Although i965 doesn't use it I believe this is otherwise fixed by the
> following commit. We should probably close this bug:

Thanks for reminding me about these "don't forget" bugs that I filed. :)  I
clearly forgot about them anyway.

I have a patch for this that has been on the list for almost 3 weeks.

https://patchwork.freedesktop.org/patch/233182/

That will just eliminate the flow control (but it might not since there are 2
instructions... I wish I could remember which shader this was).  Even then
we'll get something like

    ssa_177 = ssa_153 ? true : abs(ssa_171 - ssa_135) >= ssa_145

when we really want (ssa_153 || (abs(ssa_171 - ssa_135) >= ssa_145)).  I have
another patch series in progress that will take care of that.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180718/66f4b684/attachment.html>


More information about the mesa-dev mailing list