Re: [Patch v2 1/4] Replace i2f() in r600_blit.c with an optimized version.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sam, 2012-08-11 at 10:30 -0700, Steven Fuerst wrote: 
> We use __fls() to find the most significant bit.  Using that, the
> loop can be avoided.  A second trick is to use the behaviour of the
> rotate instructions to expand the range of the unsigned int to float
> conversion to the full 32 bits in a branchless way.
> 
> The routine is now exact up to 2^24.  Above that, we truncate which
> is equivalent to rounding towards zero.
> 
> Signed-off-by: Steven Fuerst <svfuerst@xxxxxxxxx>

It might be better to reorder the series to use a shared int2float first
and then optimize that. Either way though, although I haven't really
looked into the floating point encoding aspects, the series is

Reviewed-by: Michel Dänzer <michel.daenzer@xxxxxxx>


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux