aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/docs/source/tgsi.rst
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-03-31 18:19:18 -0400
committerIlia Mirkin <[email protected]>2014-04-01 10:17:13 -0400
commitb4cf1806950db335fa75267bc7bac742eed3372f (patch)
treea243b23bcb74378b3ec686eacaffd25db915f42c /src/gallium/docs/source/tgsi.rst
parent05d0223da32a2749b7eb260c351f5623dafee022 (diff)
gallium/docs: line up some of the equations
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/docs/source/tgsi.rst')
-rw-r--r--src/gallium/docs/source/tgsi.rst44
1 files changed, 16 insertions, 28 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 16990de01ef..d64df5b7415 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -74,13 +74,10 @@ used.
.. math::
- dst.x = 1
-
- dst.y = max(src.x, 0)
-
- dst.z = (src.x > 0) ? max(src.y, 0)^{clamp(src.w, -128, 128))} : 0
-
- dst.w = 1
+ dst.x &= 1 \\
+ dst.y &= max(src.x, 0) \\
+ dst.z &= (src.x > 0) ? max(src.y, 0)^{clamp(src.w, -128, 128))} : 0 \\
+ dst.w &= 1
.. opcode:: RCP - Reciprocal
@@ -114,26 +111,20 @@ This instruction replicates its result. The results are undefined for src < 0.
.. math::
- dst.x = 2^{\lfloor src.x\rfloor}
-
- dst.y = src.x - \lfloor src.x\rfloor
-
- dst.z = 2^{src.x}
-
- dst.w = 1
+ dst.x &= 2^{\lfloor src.x\rfloor} \\
+ dst.y &= src.x - \lfloor src.x\rfloor \\
+ dst.z &= 2^{src.x} \\
+ dst.w &= 1
.. opcode:: LOG - Approximate Logarithm Base 2
.. math::
- dst.x = \lfloor\log_2{|src.x|}\rfloor
-
- dst.y = \frac{|src.x|}{2^{\lfloor\log_2{|src.x|}\rfloor}}
-
- dst.z = \log_2{|src.x|}
-
- dst.w = 1
+ dst.x &= \lfloor\log_2{|src.x|}\rfloor \\
+ dst.y &= \frac{|src.x|}{2^{\lfloor\log_2{|src.x|}\rfloor}} \\
+ dst.z &= \log_2{|src.x|} \\
+ dst.w &= 1
.. opcode:: MUL - Multiply
@@ -184,13 +175,10 @@ This instruction replicates its result.
.. math::
- dst.x = 1
-
- dst.y = src0.y \times src1.y
-
- dst.z = src0.z
-
- dst.w = src1.w
+ dst.x &= 1\\
+ dst.y &= src0.y \times src1.y\\
+ dst.z &= src0.z\\
+ dst.w &= src1.w
.. opcode:: MIN - Minimum