diff options
Diffstat (limited to 'src/gallium/docs/source')
-rw-r--r-- | src/gallium/docs/source/screen.rst | 6 | ||||
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 36 |
2 files changed, 42 insertions, 0 deletions
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index bd553f44086..6b5a195765a 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -182,6 +182,12 @@ The integer capabilities: vertex components output by a single invocation of a geometry shader. This is the product of the number of attribute components per vertex and the number of output vertices. +* ``PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS``: Max number of components + in format that texture gather can operate on. 1 == RED, ALPHA etc, + 4 == All formats. +* ``PIPE_CAP_TEXTURE_GATHER_SM5``: Whether the texture gather + hardware implements the SM5 features, component selection, + shadow comparison, and run-time offsets. .. _pipe_capf: diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index be4257255b3..03c5df846f7 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -986,6 +986,42 @@ XXX doesn't look like most of the opcodes really belong here. dst.z = texture_depth(unit, lod) +.. opcode:: TG4 - Texture Gather (as per ARB_texture_gather) + Gathers the four texels to be used in a bi-linear + filtering operation and packs them into a single register. + Only works with 2D, 2D array, cubemaps, and cubemaps arrays. + For 2D textures, only the addressing modes of the sampler and + the top level of any mip pyramid are used. Set W to zero. + It behaves like the TEX instruction, but a filtered + sample is not generated. The four samples that contribute + to filtering are placed into xyzw in clockwise order, + starting with the (u,v) texture coordinate delta at the + following locations (-, +), (+, +), (+, -), (-, -), where + the magnitude of the deltas are half a texel. + + PIPE_CAP_TEXTURE_SM5 enhances this instruction to support + shadow per-sample depth compares, single component selection, + and a non-constant offset. It doesn't allow support for the + GL independent offset to get i0,j0. This would require another + CAP is hw can do it natively. For now we lower that before + TGSI. + +.. math:: + + coord = src0 + + component = src1 + + dst = texture_gather4 (unit, coord, component) + +(with SM5 - cube array shadow) + + coord = src0 + + compare = src1 + + dst = texture_gather (uint, coord, compare) + Integer ISA ^^^^^^^^^^^^^^^^^^^^^^^^ |