[Mesa-dev] [PATCH 3/6] glsl: move half<->float convertion to util

Matt Turner mattst88 at gmail.com
Mon Oct 12 16:01:26 PDT 2015


On Mon, Oct 12, 2015 at 3:07 PM, Roland Scheidegger <sroland at vmware.com> wrote:
> As far as I can tell (and I could easily be wrong here...) intel hw
> doesn't have explicit conversion instruction, you just say it's a f16
> destination. As such I believe the conversion used would just use
> ordinary rounding mode, which is of course usually round to nearest even
> (and the docs don't seem to mention it, but seems likely that too large
> floats would get converted to infinities using that mode). Rounding mode
> is of course changeable (but would need to change it back after f32->f16
> mov).

There's F32TO16/F16TO32 in Gen7 (IVB, HSW, VLV). The software routines
were modified to match their behavior for constant propagation, as far
as I know.


More information about the mesa-dev mailing list