diff options
author | Dave Airlie <[email protected]> | 2014-08-14 18:38:51 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-02-20 08:49:12 +1000 |
commit | 3cd1338534374c8ed13651548dcbf3949857dbcd (patch) | |
tree | 95836bf4ab683aa3d38684421ad173ac0ed711b4 /src/gallium/docs/source/tgsi.rst | |
parent | 14b9bf630c23ad060ea8bd12da2f7b18cb4f4101 (diff) |
gallium: add double opcodes and TGSI execution (v4.2)
This patch adds support for a set of double opcodes
to TGSI. It is an update of work done originally
by Michal Krol on the gallium-double-opcodes branch.
The opcodes have a hint where they came from in the
header file.
v2: add unsigned/int <-> double
v2.1: update docs.
v3: add DRSQ (Glenn), fix review comments (Glenn).
v4: drop DDIV
v4.1: cleanups, fix some docs bugs, (Ilia)
rework store_dest and fetch_source fns. (Ilia)
4.2: fixup float comparisons (Ilia)
This is based on code by Michael Krol <[email protected]>
Roland and Glenn also reviewed earlier versions.
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/docs/source/tgsi.rst')
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 92 |
1 files changed, 79 insertions, 13 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 84b0ed60a80..e20af79d9f3 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -1808,7 +1808,10 @@ Double ISA The double-precision opcodes reinterpret four-component vectors into two-component vectors with doubled precision in each component. -Support for these opcodes is XXX undecided. :T +.. opcode:: DABS - Absolute + + dst.xy = |src0.xy| + dst.zw = |src0.zw| .. opcode:: DADD - Add @@ -1818,30 +1821,37 @@ Support for these opcodes is XXX undecided. :T dst.zw = src0.zw + src1.zw - -.. opcode:: DDIV - Divide +.. opcode:: DSEQ - Set on Equal .. math:: - dst.xy = src0.xy / src1.xy + dst.x = src0.xy == src1.xy ? \sim 0 : 0 - dst.zw = src0.zw / src1.zw + dst.z = src0.zw == src1.zw ? \sim 0 : 0 -.. opcode:: DSEQ - Set on Equal +.. opcode:: DSNE - Set on Equal .. math:: - dst.xy = src0.xy == src1.xy ? 1.0F : 0.0F + dst.x = src0.xy != src1.xy ? \sim 0 : 0 - dst.zw = src0.zw == src1.zw ? 1.0F : 0.0F + dst.z = src0.zw != src1.zw ? \sim 0 : 0 .. opcode:: DSLT - Set on Less than .. math:: - dst.xy = src0.xy < src1.xy ? 1.0F : 0.0F + dst.x = src0.xy < src1.xy ? \sim 0 : 0 + + dst.z = src0.zw < src1.zw ? \sim 0 : 0 - dst.zw = src0.zw < src1.zw ? 1.0F : 0.0F +.. opcode:: DSGE - Set on Greater equal + +.. math:: + + dst.x = src0.xy >= src1.xy ? \sim 0 : 0 + + dst.z = src0.zw >= src1.zw ? \sim 0 : 0 .. opcode:: DFRAC - Fraction @@ -1870,13 +1880,14 @@ exponent of its source to ``dst0``, and the significand to ``dst1``, such that .. opcode:: DLDEXP - Multiply Number by Integral Power of 2 -This opcode is the inverse of :opcode:`DFRACEXP`. +This opcode is the inverse of :opcode:`DFRACEXP`. The second +source is an integer. .. math:: - dst.xy = src0.xy \times 2^{src1.xy} + dst.xy = src0.xy \times 2^{src1.x} - dst.zw = src0.zw \times 2^{src1.zw} + dst.zw = src0.zw \times 2^{src1.y} .. opcode:: DMIN - Minimum @@ -1928,6 +1939,61 @@ This opcode is the inverse of :opcode:`DFRACEXP`. dst.zw = \sqrt{src.zw} +.. opcode:: DRSQ - Reciprocal Square Root + +.. math:: + + dst.xy = \frac{1}{\sqrt{src.xy}} + + dst.zw = \frac{1}{\sqrt{src.zw}} + +.. opcode:: F2D - Float to Double + +.. math:: + + dst.xy = double(src0.x) + + dst.zw = double(src0.y) + +.. opcode:: D2F - Double to Float + +.. math:: + + dst.x = float(src0.xy) + + dst.y = float(src0.zw) + +.. opcode:: I2D - Int to Double + +.. math:: + + dst.xy = double(src0.x) + + dst.zw = double(src0.y) + +.. opcode:: D2I - Double to Int + +.. math:: + + dst.x = int(src0.xy) + + dst.y = int(src0.zw) + +.. opcode:: U2D - Unsigned Int to Double + +.. math:: + + dst.xy = double(src0.x) + + dst.zw = double(src0.y) + +.. opcode:: D2U - Double to Unsigned Int + +.. math:: + + dst.x = unsigned(src0.xy) + + dst.y = unsigned(src0.zw) .. _samplingopcodes: |