Module: Mesa
Branch: master
Commit: c5cbb9a54345319d3924f9c7d0572fcc4739c516
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5cbb9a54345319d3924f9c7d0572fcc4739c516

Author: Karol Herbst <karolher...@gmail.com>
Date:   Fri Jun 23 20:30:25 2017 +0200

gallium/docs: add precise instruction modifier

v4: add comment about intermediate rounding step to MAD

Signed-off-by: Karol Herbst <karolher...@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com>
Reviewed-by: Roland Scheidegger <srol...@vmware.com>

---

 src/gallium/docs/source/tgsi.rst | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 6214de3df0..0dd2ac0240 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -26,7 +26,13 @@ each of the components of *dst*. When this happens, the 
result is said to be
 Modifiers
 ^^^^^^^^^^^^^^^
 
-TGSI supports modifiers on inputs (as well as saturate modifier on 
instructions).
+TGSI supports modifiers on inputs (as well as saturate and precise modifier
+on instructions).
+
+For arithmetic instruction having a precise modifier certain optimizations
+which may alter the result are disallowed. Example: *add(mul(a,b),c)* can't be
+optimized to TGSI_OPCODE_MAD, because some hardware only supports the fused
+MAD instruction.
 
 For inputs which have a floating point type, both absolute value and
 negation modifiers are supported (with absolute value being applied
@@ -237,6 +243,9 @@ This instruction replicates its result.
 
 .. opcode:: MAD - Multiply And Add
 
+Perform a * b + c. The implementation is free to decide whether there is an
+intermediate rounding step or not.
+
 .. math::
 
   dst.x = src0.x \times src1.x + src2.x

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to