[Bug 92760] Add FP64 support to the i965 shader backends

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 30 23:28:43 PST 2015


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

--- Comment #18 from Iago Toral <itoral at igalia.com> ---
(In reply to Matt Turner from comment #16)
> (In reply to Connor Abbott from comment #15)
> > 2. "i965/fs: fix ceil/floor for doubles" -- sorry, you're not going to get
> > off that easily :) You can't use floats here, since you're going to run into
> > range and precision issues. If the piglit tests don't test for those, then
> > they need to be fixed. Since we don't have HW support for
> > ceil/floor/trunc/etc., you're going to need to implement them using integer
> > operations. I was planning on doing this in nir_lower_double_ops.c. I think
> > trunc is the easiest to implement using integer ops -- you don't need to
> > worry about the sign, you just have to mask off the appropriate number of
> > bits in the mantissa based on the exponent -- but the rub is that 64-bit
> > integer arithmetic isn't implemented yet in NIR or the backend, and it
> > doesn't even exist prior to Broadwell, so you have to split the double into
> > 32-bit chunks and operate on those. Then once you've implemented trunc, you
> > can implement all the other missing operations in terms  of it. Have fun :)
> 
> I knew at one point how to do these...
> 
> You basically implement trunc using bit operations (by looking at the
> exponent figure out how many bits of the mantissa you need to mask off, I
> think), and then you can implement floor and ceil by trunc(x ±
> nextafter(0.5, 0.0)).
> 
> Round-to-even was a little harder and I think required an explicit test
> against x.5.
> 
> I'll see if I can dig it back up.

Thanks Matt! I had a quick look for this yesterday but did not find exactly
what I need yet. If you happen to dig it up back that would be great, I'll keep
looking for it on my side though, so no pressure :)

-- 
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/20151201/94e96f7e/attachment.html>


More information about the intel-3d-bugs mailing list