summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2010-06-16 18:45:50 -0700
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-06-16 18:58:18 -0700
commitf98c462770ad26888c4c89f7e0989c2dba48e77d (patch)
treeadb84479cac98703bd8ef9bf7a2aef6fc0f8655a /src/gallium
parentdbc95e8edca408346c5a2fae5e584658c5feea76 (diff)
gallium/docs: Explain DFRACEXP/DLDEXP.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/docs/source/tgsi.rst20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index ba844a2d26..ecab7cb809 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -1125,19 +1125,29 @@ Support for these opcodes is XXX undecided. :T
.. opcode:: DFRACEXP - Convert Number to Fractional and Integral Components
+Like the ``frexp()`` routine in many math libraries, this opcode stores the
+exponent of its source to ``dst0``, and the significand to ``dst1``, such that
+:math:`dst1 \times 2^{dst0} = src` .
+
.. math::
- dst0.xy = frexp(src.xy, dst1.xy)
+ dst0.xy = exp(src.xy)
+
+ dst1.xy = frac(src.xy)
+
+ dst0.zw = exp(src.zw)
+
+ dst1.zw = frac(src.zw)
- dst0.zw = frexp(src.zw, dst1.zw)
+.. opcode:: DLDEXP - Multiply Number by Integral Power of 2
-.. opcode:: DLDEXP - Multiple Number by Integral Power of 2
+This opcode is the inverse of :opcode:`DFRACEXP`.
.. math::
- dst.xy = ldexp(src0.xy, src1.xy)
+ dst.xy = src0.xy \times 2^{src1.xy}
- dst.zw = ldexp(src0.zw, src1.zw)
+ dst.zw = src0.zw \times 2^{src1.zw}
.. opcode:: DMIN - Minimum