From: Jason Ekstrand Date: Tue, 12 Jan 2016 23:32:51 +0000 (-0800) Subject: nir: Add a fquantize2f16 opcode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15a56459d7562c02fb288f1b9a5a77f41c2d3ee1;p=mesa.git nir: Add a fquantize2f16 opcode This opcode simply takes a 32-bit floating-point value and reduces its effective precision to 16 bits. --- diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py index d31507fe531..9dbb341d91c 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.