On Wed, Jan 13, 2016 at 1:10 AM, Jason Ekstrand <ja...@jlekstrand.net> wrote: > On Tue, Jan 12, 2016 at 3:52 PM, Matt Turner <matts...@gmail.com> wrote: >> >> On Tue, Jan 12, 2016 at 3:35 PM, Jason Ekstrand <ja...@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
Ah, that seems to be slightly different from what the commit message say (but seemingly identical to what the code does): it doesn't reduce a 32-bit float to 16-bit precision, it reduces it to the precision (and range) of FP16. FP16 numbers has 10 bit precision, not 16. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev