[igt-dev] [RFC 1/5] lib: Add halffloat implementation

Strasser, Kevin kevin.strasser at intel.com
Mon Mar 4 17:03:07 UTC 2019


Maarten Lankhorst wrote:
> 4 function calls for every pixel is a bit much. Is there any cleaner way we
> could accomplish the same?
> 
> void igt_float_to_half(const float *, uint16_t *, int num)
> 
> void igt_half_to_float(const uint16_t *, float *, int num)
> 
> If no swizzle is required, it could do an entire line in 1 go, else per 4 or 3.
> 
> Might be worth it to still do a line in 1 go, even for xrgb, with format
> always set to rba128f, hardware will ignore the X component anyway. :)
> 
> And then if required reswizzle.

Interesting ideas, I agree we should be able to shave off some overhead with the
function calls. I'm not so sure the payoff would be worth the extra conversions
in the xrgb case, but I'll do some experimentation and fix accordingly.

Thanks,
Kevin


More information about the igt-dev mailing list