[Mesa-dev] [PATCH 1/2] nir: Add a fquantize2f16 opcode
Ian Romanick
idr at freedesktop.org
Tue Jan 12 16:50:26 PST 2016
With the SPIR-V link added and the wording change suggested by Erik RE:
precision vs. number of bits in the type, this series is
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
At some point we should add a debug mode that inserts these operations
in GLSL ES shaders around mediump and lowp types and operations. Maybe
leave that as a GSoC or EVoC project...
On 01/12/2016 03:35 PM, Jason Ekstrand wrote:
> This opcode simply takes a 32-bit floating-point value and reduces its
> effective precision to 16 bits.
> ---
> src/glsl/nir/nir_opcodes.py | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py
> index d31507f..9dbb341 100644
> --- a/src/glsl/nir/nir_opcodes.py
> +++ b/src/glsl/nir/nir_opcodes.py
> @@ -176,6 +176,7 @@ unop("ffloor", tfloat, "floorf(src0)")
> unop("ffract", tfloat, "src0 - floorf(src0)")
> unop("fround_even", tfloat, "_mesa_roundevenf(src0)")
>
> +unop("fquantize2f16", tfloat, "_mesa_half_to_float(_mesa_float_to_half(src0))")
>
> # Trigonometric operations.
>
>
More information about the mesa-dev
mailing list