summaryrefslogtreecommitdiffstats
path: root/src/gallium/docs
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-07-11 12:16:06 -0400
committerZack Rusin <[email protected]>2013-07-11 20:19:04 -0400
commit00cd455bd50c6b16b2f72a6d2726de3d3818c7f5 (patch)
tree2b13c67bd84020a1bad285c3678b497a571ae1a4 /src/gallium/docs
parenta171812d27afb1a52c5d81deaa6027f30bc102e8 (diff)
gallium: fixup definitions of the rsq and sqrt
GLSL spec says that rsq is undefined for src<=0, but the D3D10 spec says it needs to be a NaN, so lets stop taking an absolute value of the source which completely breaks that behavior. For the gl program we can simply insert an extra abs instrunction which produces the desired behavior there. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/docs')
-rw-r--r--src/gallium/docs/source/tgsi.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 13daa62ab62..4d26c465579 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -94,16 +94,16 @@ This instruction replicates its result.
.. opcode:: RSQ - Reciprocal Square Root
-This instruction replicates its result.
+This instruction replicates its result. The results are undefined for src <= 0.
.. math::
- dst = \frac{1}{\sqrt{|src.x|}}
+ dst = \frac{1}{\sqrt{src.x}}
.. opcode:: SQRT - Square Root
-This instruction replicates its result.
+This instruction replicates its result. The results are undefined for src < 0.
.. math::