[Mesa-dev] [PATCH 1/2] nir: Add a fquantize2f16 opcode

Jason Ekstrand jason at jlekstrand.net
Tue Jan 12 16:10:33 PST 2016


On Tue, Jan 12, 2016 at 3:52 PM, Matt Turner <mattst88 at gmail.com> wrote:

> On Tue, Jan 12, 2016 at 3:35 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > This opcode simply takes a 32-bit floating-point value and reduces its
> > effective precision to 16 bits.
> > ---
>
> What's it supposed to do for values not representable in half-precision?
>

If they're in-range, round.  If they're out-of-range, the appropriate
infinity.


>
> I think we need some more information about this opcode's purpose to
> be able to review.
>

The purpose is very specifically to implement the OpQuantizeF16 opcode in
spirv:
https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html#OpQuantizeToF16

Sorry, I meant to reply immediately with the link, but I forgot.  Maybe I
should have even put that in the commit message.
--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20160112/6e9fc2c4/attachment.html>


More information about the mesa-dev mailing list