From 15a56459d7562c02fb288f1b9a5a77f41c2d3ee1 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 12 Jan 2016 15:32:51 -0800 Subject: [PATCH] nir: Add a fquantize2f16 opcode 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 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. -- 2.30.2