[Mesa-dev] [PATCH 03/13] gallium/docs: Use fractions
Alexander Troosh
trush at yandex.ru
Wed Oct 8 04:40:20 PDT 2014
---
src/gallium/docs/source/tgsi.rst | 40 +++++++++++++++++++-------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index bdb4655..c23408e 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -412,7 +412,7 @@ XXX cleanup on aisle three
.. math::
- dst = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.84467e+019) : clamp(1 / src.x, -1.84467e+019, -5.42101e-020)
+ dst = (src.x > 0) ? clamp(\frac1{src.x}, 5.42101e-020, 1.84467e+019) : clamp(\frac1{src.x}, -1.84467e+019, -5.42101e-020)
.. opcode:: DPH - Homogeneous Dot Product
@@ -491,11 +491,11 @@ while DDY is allowed to be the same for the entire 2x2 quad.
.. math::
- dst.x = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / ((src0.x)^2 + (src0.y)^2 + (src0.z)^2) \times src0.x - src1.x
+ dst.x = 2 \times \frac{src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z} {((src0.x)^2 + (src0.y)^2 + (src0.z)^2) \times src0.x} - src1.x
- dst.y = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / ((src0.x)^2 + (src0.y)^2 + (src0.z)^2) \times src0.y - src1.y
+ dst.y = 2 \times \frac{src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z} {((src0.x)^2 + (src0.y)^2 + (src0.z)^2) \times src0.y} - src1.y
- dst.z = 2 \times (src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z) / ((src0.x)^2 + (src0.y)^2 + (src0.z)^2) \times src0.z - src1.z
+ dst.z = 2 \times \frac{src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z} {((src0.x)^2 + (src0.y)^2 + (src0.z)^2) \times src0.z} - src1.z
dst.w = 1
@@ -650,11 +650,11 @@ This instruction replicates its result.
.. math::
- coord.x = src0.x / src0.w
+ coord.x = \frac{src0.x}{src0.w}
- coord.y = src0.y / src0.w
+ coord.y = \frac{src0.y}{src0.w}
- coord.z = src0.z / src0.w
+ coord.z = \frac{src0.z}{src0.w}
coord.w = src0.w
@@ -838,11 +838,11 @@ This instruction replicates its result.
.. math::
- dst.x = src.x / ((src.x)^2 + (src.y)^2 + (src.z)^2)
+ dst.x = \frac{src.x} {(src.x)^2 + (src.y)^2 + (src.z)^2}
- dst.y = src.y / ((src.x)^2 + (src.y)^2 + (src.z)^2)
+ dst.y = \frac{src.y} {(src.x)^2 + (src.y)^2 + (src.z)^2}
- dst.z = src.z / ((src.x)^2 + (src.y)^2 + (src.z)^2)
+ dst.z = \frac{src.z} {(src.x)^2 + (src.y)^2 + (src.z)^2}
dst.w = 1
@@ -1270,13 +1270,13 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
.. math::
- dst.x = src0.x \ src1.x
+ dst.x = \frac{src0.x}{src1.x}
- dst.y = src0.y \ src1.y
+ dst.y = \frac{src0.y}{src1.y}
- dst.z = src0.z \ src1.z
+ dst.z = \frac{src0.z}{src1.z}
- dst.w = src0.w \ src1.w
+ dst.w = \frac{src0.w}{src1.w}
.. opcode:: UDIV - Unsigned Integer Division
@@ -1285,13 +1285,13 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
.. math::
- dst.x = src0.x \ src1.x
+ dst.x = \frac{src0.x}{src1.x}
- dst.y = src0.y \ src1.y
+ dst.y = \frac{src0.y}{src1.y}
- dst.z = src0.z \ src1.z
+ dst.z = \frac{src0.z}{src1.z}
- dst.w = src0.w \ src1.w
+ dst.w = \frac{src0.w}{src1.w}
.. opcode:: UMOD - Unsigned Integer Remainder
@@ -1943,9 +1943,9 @@ Support for these opcodes is XXX undecided. :T
.. math::
- dst.xy = src0.xy / src1.xy
+ dst.xy = \frac{src0.xy}{src1.xy}
- dst.zw = src0.zw / src1.zw
+ dst.zw = \frac{src0.zw}{src1.zw}
.. opcode:: DSEQ - Set on Equal
--
1.7.3.4
More information about the mesa-dev
mailing list