--- src/gallium/docs/source/format.rst | 8 +++--- src/gallium/docs/source/tgsi.rst | 37 +++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/src/gallium/docs/source/format.rst b/src/gallium/docs/source/format.rst index 93faf4f..f6ddbdf 100644 --- a/src/gallium/docs/source/format.rst +++ b/src/gallium/docs/source/format.rst @@ -17,15 +17,15 @@ with the X component in the s least-significant bits of the integer. In C:: Format suffixes affect the interpretation of the channel: -- ``SINT``: N bit signed integer [-2^(N-1) ... 2^(N-1) - 1] +- ``SINT``: N bit signed integer [:math:`-2^{N-1} ... (2^{N-1} - 1)`] - ``SNORM``: N bit signed integer normalized to [-1 ... 1] -- ``SSCALED``: N bit signed integer [-2^(N-1) ... 2^(N-1) - 1] +- ``SSCALED``: N bit signed integer [:math:`-2^{N-1} ... (2^{N-1} - 1)`] - ``FIXED``: Signed fixed point integer, (N/2 - 1) bits of mantissa - ``FLOAT``: N bit IEEE754 float - ``NORM``: Normalized integers, signed or unsigned per channel -- ``UINT``: N bit unsigned integer [0 ... 2^N - 1] +- ``UINT``: N bit unsigned integer [:math:`0 ... (2^N - 1)`] - ``UNORM``: N bit unsigned integer normalized to [0 ... 1] -- ``USCALED``: N bit unsigned integer [0 ... 2^N - 1] +- ``USCALED``: N bit unsigned integer [:math:`0 ... (2^N - 1)`] The difference between ``SINT`` and ``SSCALED`` is that the former are pure integers in shaders, while the latter are floats; likewise for ``UINT`` versus diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 9bfefd8..cf61dce 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -958,7 +958,7 @@ XXX doesn't look like most of the opcodes really belong here. dst = texture\_gather4 (unit, coord, component) -(with SM5 - cube array shadow) +(with `SM5` - cube array shadow) .. math:: @@ -1245,10 +1245,10 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?) .. math:: - dst.x &= src0.x >> (unsigned) (0x1f \quad \& \quad src1.x) \\ - dst.y &= src0.y >> (unsigned) (0x1f \quad \& \quad src1.y) \\ - dst.z &= src0.z >> (unsigned) (0x1f \quad \& \quad src1.z) \\ - dst.w &= src0.w >> (unsigned) (0x1f \quad \& \quad src1.w) + dst.x &= src0.x \underset{unsigned}\gg (0x1f \quad \& \quad src1.x) \\ + dst.y &= src0.y \underset{unsigned}\gg (0x1f \quad \& \quad src1.y) \\ + dst.z &= src0.z \underset{unsigned}\gg (0x1f \quad \& \quad src1.z) \\ + dst.w &= src0.w \underset{unsigned}\gg (0x1f \quad \& \quad src1.w) .. opcode:: UCMP - Integer Conditional Move @@ -1408,7 +1408,7 @@ These opcodes are used for bit-level manipulation of integers. .. opcode:: IBFE - Signed Bitfield Extract - See SM5 instruction of the same name. Extracts a set of bits from the input, + See `SM5` instruction [#sm5-ops]_ of the same name. Extracts a set of bits from the input, and sign-extends them if the high bit of the extracted window is set. Pseudocode:: @@ -1423,9 +1423,12 @@ These opcodes are used for bit-level manipulation of integers. else: return value >> offset +.. [#sm5-ops] http://msdn.microsoft.com/en-us/library/windows/desktop/hh447232%28v=vs.85%29.aspx + + .. opcode:: UBFE - Unsigned Bitfield Extract - See SM5 instruction of the same name. Extracts a set of bits from the input, + See `SM5` instruction of the same name. Extracts a set of bits from the input, without any sign-extension. Pseudocode:: @@ -1442,7 +1445,7 @@ These opcodes are used for bit-level manipulation of integers. .. opcode:: BFI - Bitfield Insert - See SM5 instruction of the same name. Replaces a bit region of 'base' with + See `SM5` instruction of the same name. Replaces a bit region of 'base' with the low bits of 'insert'. Pseudocode:: @@ -1455,27 +1458,27 @@ These opcodes are used for bit-level manipulation of integers. .. opcode:: BREV - Bitfield Reverse - See SM5 instruction BFREV. Reverses the bits of the argument. + See `SM5` instruction BFREV. Reverses the bits of the argument. .. opcode:: POPC - Population Count - See SM5 instruction COUNTBITS. Counts the number of set bits in the argument. + See `SM5` instruction COUNTBITS. Counts the number of set bits in the argument. .. opcode:: LSB - Index of lowest set bit - See SM5 instruction FIRSTBIT_LO. Computes the 0-based index of the first set + See `SM5` instruction FIRSTBIT_LO. Computes the 0-based index of the first set bit of the argument. Returns -1 if none are set. .. opcode:: IMSB - Index of highest non-sign bit - See SM5 instruction FIRSTBIT_SHI. Computes the 0-based index of the highest + See `SM5` instruction FIRSTBIT_SHI. Computes the 0-based index of the highest non-sign bit of the argument (i.e. highest 0 bit for negative numbers, highest 1 bit for positive numbers). Returns -1 if all bits are the same (i.e. for inputs 0 and -1). .. opcode:: UMSB - Index of highest set bit - See SM5 instruction FIRSTBIT_HI. Computes the 0-based index of the highest + See `SM5` instruction FIRSTBIT_HI. Computes the 0-based index of the highest set bit of the argument. Returns -1 if none are set. Geometry ISA @@ -1729,7 +1732,7 @@ Support for these opcodes is XXX undecided. :T Like the ``frexp()`` routine in many math libraries, this opcode stores the exponent of its source to ``dst0``, and the significand to ``dst1``, such that -:math:`dst1 \times 2^{dst0} = src` . +:math:`(dst1) \times 2^{dst0} = src` . .. math:: @@ -1744,8 +1747,8 @@ This opcode is the inverse of :opcode:`DFRACEXP`. .. math:: - dst.xy &= src0.xy \times 2^{src1.xy} \\ - dst.zw &= src0.zw \times 2^{src1.zw} + dst.xy &= src0.xy \times 2^{(src1.xy)} \\ + dst.zw &= src0.zw \times 2^{(src1.zw)} .. opcode:: DMIN - Minimum @@ -2579,7 +2582,7 @@ Declaration Interpolate This token is only valid for fragment shader INPUT declarations. The Interpolate field specifes the way input is being interpolated by -the rasteriser and is one of TGSI_INTERPOLATE_*. +the rasteriser and is one of ``TGSI_INTERPOLATE_*``. The Location field specifies the location inside the pixel that the interpolation should be done at, one of ``TGSI_INTERPOLATE_LOC_*``. Note that -- 1.7.3.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev