projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aee970c
)
nir: Add a fquantize2f16 opcode
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Tue, 12 Jan 2016 23:32:51 +0000
(15:32 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Tue, 12 Jan 2016 23:33:02 +0000
(15:33 -0800)
This opcode simply takes a 32-bit floating-point value and reduces its
effective precision to 16 bits.
src/glsl/nir/nir_opcodes.py
patch
|
blob
|
history
diff --git
a/src/glsl/nir/nir_opcodes.py
b/src/glsl/nir/nir_opcodes.py
index d31507fe53166fcca47e56ff97f5bf6dc9fbd21d..9dbb341d91cd4625647c87dd74bf335de4b64374 100644
(file)
--- 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.