mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
gallium/docs: line up some of the equations
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
05d0223da3
commit
b4cf180695
1 changed files with 16 additions and 28 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue