diff options
author | Brian Paul <[email protected]> | 2014-10-31 16:01:25 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-11-01 09:00:07 -0600 |
commit | 52576dcb882202ea1e2c239c5865b1ce74ff9847 (patch) | |
tree | 745b4444eb829af050e5cb9207969108f349158a /src/gallium/docs/source | |
parent | afdc4309dc2f68372c39f940e1cc394f1dc25d30 (diff) |
gallium/docs: fix NRM, NRM4 docs
Need to do a sqrt().
FWIW, the html that Sphinx 1.1.3 generates for the math expressions
looks completely broken.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/docs/source')
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 7d5918fc4fe..2e0197172fa 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -837,16 +837,37 @@ This instruction replicates its result. .. opcode:: NRM - 3-component Vector Normalise .. math:: + + u = src.x \times src.x + src.y \times src.y + src.z \times src.z - dst.x = src.x / (src.x \times src.x + src.y \times src.y + src.z \times src.z) + v = \frac{1}{\sqrt{u}} - dst.y = src.y / (src.x \times src.x + src.y \times src.y + src.z \times src.z) + dst.x = src.x \times v - dst.z = src.z / (src.x \times src.x + src.y \times src.y + src.z \times src.z) + dst.y = src.y \times v + + dst.z = src.z \times v dst.w = 1 +.. opcode:: NRM4 - 4-component Vector Normalise + +.. math:: + + u = src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w + + v = \frac{1}{\sqrt{u}} + + dst.x = src.x \times v + + dst.y = src.y \times v + + dst.z = src.z \times v + + dst.w = src.w \times v + + .. opcode:: DIV - Divide .. math:: @@ -1888,15 +1909,6 @@ Some require glsl version 1.30 (UIF/BREAKC/SWITCH/CASE/DEFAULT/ENDSWITCH). Ends a switch expression. -.. opcode:: NRM4 - 4-component Vector Normalise - -This instruction replicates its result. - -.. math:: - - dst = \frac{src.x}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} - - Interpolation ISA ^^^^^^^^^^^^^^^^^ |