diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2010-02-02 17:02:28 -0800 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2010-02-02 17:03:42 -0800 |
commit | 17c2a4476131d46babf3dffcc3906271f38c0ef2 (patch) | |
tree | cdece0e1f26d007fc7d52db5744f1fa887711845 | |
parent | 62ca7b85ae1f7d914156a9b376d0520db85ba495 (diff) |
gallium/docs: TGSI notes on replication to dst, and also cleanups.
Slowly, surely, I'm making this better.
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 221 |
1 files changed, 104 insertions, 117 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 7e6dce9953..380fa4704c 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -19,6 +19,10 @@ Some instructions, like :opcode:`I2F`, permit re-interpretation of vector components as integers. Other instructions permit using registers as two-component vectors with double precision; see :ref:`Double Opcodes`. +When an instruction has a scalar result, the result is usually copied into +each of the components of *dst*. When this happens, the result is said to be +*replicated* to *dst*. :opcode:`RCP` is one such instruction. + Instruction Set --------------- @@ -67,28 +71,20 @@ From GL_NV_vertex_program .. opcode:: RCP - Reciprocal -.. math:: - - dst.x = \frac{1}{src.x} +This instruction replicates its result. - dst.y = \frac{1}{src.x} - - dst.z = \frac{1}{src.x} +.. math:: - dst.w = \frac{1}{src.x} + dst = \frac{1}{src.x} .. opcode:: RSQ - Reciprocal Square Root -.. math:: +This instruction replicates its result. - dst.x = \frac{1}{\sqrt{|src.x|}} - - dst.y = \frac{1}{\sqrt{|src.x|}} - - dst.z = \frac{1}{\sqrt{|src.x|}} +.. math:: - dst.w = \frac{1}{\sqrt{|src.x|}} + dst = \frac{1}{\sqrt{|src.x|}} .. opcode:: EXP - Approximate Exponential Base 2 @@ -145,28 +141,20 @@ From GL_NV_vertex_program .. opcode:: DP3 - 3-component Dot Product -.. math:: - - dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z +This instruction replicates its result. - dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z - - dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z +.. math:: - dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z .. opcode:: DP4 - 4-component Dot Product -.. math:: - - dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w - - dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w +This instruction replicates its result. - dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w +.. math:: - dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w + dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src0.w \times src1.w .. opcode:: DST - Distance Vector @@ -327,7 +315,7 @@ From GL_NV_vertex_program .. opcode:: FLR - Floor -This is identical to ARL. +This is identical to :opcode:`ARL`. .. math:: @@ -355,41 +343,29 @@ This is identical to ARL. .. opcode:: EX2 - Exponential Base 2 -.. math:: - - dst.x = 2^{src.x} - - dst.y = 2^{src.x} +This instruction replicates its result. - dst.z = 2^{src.x} +.. math:: - dst.w = 2^{src.x} + dst = 2^{src.x} .. opcode:: LG2 - Logarithm Base 2 -.. math:: - - dst.x = \log_2{src.x} - - dst.y = \log_2{src.x} +This instruction replicates its result. - dst.z = \log_2{src.x} +.. math:: - dst.w = \log_2{src.x} + dst = \log_2{src.x} .. opcode:: POW - Power -.. math:: - - dst.x = src0.x^{src1.x} +This instruction replicates its result. - dst.y = src0.x^{src1.x} - - dst.z = src0.x^{src1.x} +.. math:: - dst.w = src0.x^{src1.x} + dst = src0.x^{src1.x} .. opcode:: XPD - Cross Product @@ -419,43 +395,31 @@ This is identical to ARL. .. opcode:: RCC - Reciprocal Clamped +This instruction replicates its result. + XXX cleanup on aisle three .. math:: - dst.x = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) - - dst.y = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) - - dst.z = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) - - dst.w = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) + dst = (1 / src.x) > 0 ? clamp(1 / src.x, 5.42101e-020, 1.884467e+019) : clamp(1 / src.x, -1.884467e+019, -5.42101e-020) .. opcode:: DPH - Homogeneous Dot Product -.. math:: - - dst.x = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w +This instruction replicates its result. - dst.y = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w - - dst.z = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w +.. math:: - dst.w = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w + dst = src0.x \times src1.x + src0.y \times src1.y + src0.z \times src1.z + src1.w .. opcode:: COS - Cosine -.. math:: - - dst.x = \cos{src.x} +This instruction replicates its result. - dst.y = \cos{src.x} - - dst.z = \cos{src.x} +.. math:: - dst.w = \cos{src.x} + dst = \cos{src.x} .. opcode:: DDX - Derivative Relative To X @@ -521,7 +485,9 @@ XXX cleanup on aisle three dst.w = 1 -Considered for removal. +.. note:: + + Considered for removal. .. opcode:: SEQ - Set On Equal @@ -539,17 +505,16 @@ Considered for removal. .. opcode:: SFL - Set On False -.. math:: +This instruction replicates its result. - dst.x = 0 +.. math:: - dst.y = 0 + dst = 0 - dst.z = 0 +.. note:: - dst.w = 0 + Considered for removal. -Considered for removal. .. opcode:: SGT - Set On Greater Than @@ -566,15 +531,11 @@ Considered for removal. .. opcode:: SIN - Sine -.. math:: - - dst.x = \sin{src.x} +This instruction replicates its result. - dst.y = \sin{src.x} - - dst.z = \sin{src.x} +.. math:: - dst.w = \sin{src.x} + dst = \sin{src.x} .. opcode:: SLE - Set On Less Equal Than @@ -605,15 +566,11 @@ Considered for removal. .. opcode:: STR - Set On True -.. math:: - - dst.x = 1 - - dst.y = 1 +This instruction replicates its result. - dst.z = 1 +.. math:: - dst.w = 1 + dst = 1 .. opcode:: TEX - Texture Lookup @@ -635,25 +592,33 @@ Considered for removal. TBD - Considered for removal. +.. note:: + + Considered for removal. .. opcode:: UP2US - Unpack Two Unsigned 16-Bit Scalars TBD - Considered for removal. +.. note:: + + Considered for removal. .. opcode:: UP4B - Unpack Four Signed 8-Bit Values TBD - Considered for removal. +.. note:: + + Considered for removal. .. opcode:: UP4UB - Unpack Four Unsigned 8-Bit Scalars TBD - Considered for removal. +.. note:: + + Considered for removal. .. opcode:: X2D - 2D Coordinate Transformation @@ -667,7 +632,9 @@ Considered for removal. dst.w = src0.y + src1.x \times src2.z + src1.y \times src2.w -Considered for removal. +.. note:: + + Considered for removal. From GL_NV_vertex_program2 @@ -678,7 +645,9 @@ From GL_NV_vertex_program2 TBD - Considered for removal. +.. note:: + + Considered for removal. .. opcode:: ARR - Address Register Load With Round @@ -697,7 +666,9 @@ From GL_NV_vertex_program2 pc = target - Considered for removal. +.. note:: + + Considered for removal. .. opcode:: CAL - Subroutine Call @@ -793,15 +764,11 @@ From GL_NV_vertex_program2 .. opcode:: DP2 - 2-component Dot Product -.. math:: - - dst.x = src0.x \times src1.x + src0.y \times src1.y +This instruction replicates its result. - dst.y = src0.x \times src1.x + src0.y \times src1.y - - dst.z = src0.x \times src1.x + src0.y \times src1.y +.. math:: - dst.w = src0.x \times src1.x + src0.y \times src1.y + dst = src0.x \times src1.x + src0.y \times src1.y .. opcode:: TXL - Texture Lookup With LOD @@ -832,7 +799,13 @@ From GL_NV_vertex_program2 Note: The destination must be a loop register. The source must be a constant register. - Considered for cleanup / removal. +.. note:: + + Considered for cleanup. + +.. note:: + + Considered for removal. .. opcode:: REP - Repeat @@ -861,7 +834,13 @@ From GL_NV_vertex_program2 Note: The destination must be a loop register. - Considered for cleanup / removal. +.. note:: + + Considered for cleanup. + +.. note:: + + Considered for removal. .. opcode:: ENDREP - End Repeat @@ -875,7 +854,13 @@ From GL_NV_vertex_program2 push(src.z) push(src.w) - Considered for cleanup / removal. +.. note:: + + Considered for cleanup. + +.. note:: + + Considered for removal. .. opcode:: POPA - Pop Address Register From Stack @@ -884,7 +869,13 @@ From GL_NV_vertex_program2 dst.y = pop() dst.x = pop() - Considered for cleanup / removal. +.. note:: + + Considered for cleanup. + +.. note:: + + Considered for removal. From GL_NV_gpu_program4 @@ -1095,15 +1086,11 @@ From GLSL .. opcode:: NRM4 - 4-component Vector Normalise -.. math:: - - dst.x = \frac{src.x}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} +This instruction replicates its result. - dst.y = \frac{src.y}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} - - dst.z = \frac{src.z}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} +.. math:: - dst.w = \frac{src.w}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} + dst = \frac{src.x}{src.x \times src.x + src.y \times src.y + src.z \times src.z + src.w \times src.w} ps_2_x |