diff options
author | Roland Scheidegger <[email protected]> | 2014-12-12 04:13:43 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2014-12-16 04:23:00 +0100 |
commit | ade8b26bf515fa4f0cbf43e9df4885368e984277 (patch) | |
tree | c536a0936c5a55a4b6679f39527b97ec1f9cbab4 /src/gallium/docs/source/tgsi.rst | |
parent | 3c8ef3a74b51d5c79bbbc3e73244085efd89206b (diff) |
gallium: add TGSI_SEMANTIC_VERTEXID_NOBASE and TGSI_SEMANTIC_BASEVERTEX
Plus a new PIPE_CAP_VERTEXID_NOBASE query. The idea is that drivers not
supporting vertex ids with base vertex offset applied (so, only support
d3d10-style vertex ids) will get such a d3d10-style vertex id instead -
with the caveat they'll also need to handle the basevertex system value
too (this follows what core mesa already does).
Additionally, this is also useful for other state trackers (for instance
llvmpipe / draw right now implement the d3d10 behavior on purpose, but
with different semantics it can just do both).
Doesn't do anything yet.
And fix up the docs wrt similar values.
v2: incorporate feedback from Brian and others, better names, better docs.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/docs/source/tgsi.rst')
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index cbb8f74ab89..ff322e864ec 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -2651,7 +2651,7 @@ TGSI_SEMANTIC_VIEWPORT_INDEX For geometry shaders, this semantic label indicates that an output contains the index of the viewport (and scissor) to use. -Only the X value is used. +This is an integer value, and only the X component is used. TGSI_SEMANTIC_LAYER @@ -2659,7 +2659,8 @@ TGSI_SEMANTIC_LAYER For geometry shaders, this semantic label indicates that an output contains the layer value to use for the color and depth/stencil surfaces. -Only the X value is used. (Also known as rendertarget array index.) +This is an integer value, and only the X component is used. +(Also known as rendertarget array index.) TGSI_SEMANTIC_CULLDIST @@ -2700,7 +2701,8 @@ TGSI_SEMANTIC_SAMPLEID """""""""""""""""""""" For fragment shaders, this semantic label indicates that a system value -contains the current sample id (i.e. gl_SampleID). Only the X value is used. +contains the current sample id (i.e. gl_SampleID). +This is an integer value, and only the X component is used. TGSI_SEMANTIC_SAMPLEPOS """"""""""""""""""""""" @@ -2720,8 +2722,48 @@ TGSI_SEMANTIC_INVOCATIONID """""""""""""""""""""""""" For geometry shaders, this semantic label indicates that a system value -contains the current invocation id (i.e. gl_InvocationID). Only the X value is -used. +contains the current invocation id (i.e. gl_InvocationID). +This is an integer value, and only the X component is used. + +TGSI_SEMANTIC_INSTANCEID +"""""""""""""""""""""""" + +For vertex shaders, this semantic label indicates that a system value contains +the current instance id (i.e. gl_InstanceID). It does not include the base +instance. This is an integer value, and only the X component is used. + +TGSI_SEMANTIC_VERTEXID +"""""""""""""""""""""" + +For vertex shaders, this semantic label indicates that a system value contains +the current vertex id (i.e. gl_VertexID). It does (unlike in d3d10) include the +base vertex. This is an integer value, and only the X component is used. + +TGSI_SEMANTIC_VERTEXID_NOBASE +""""""""""""""""""""""""""""""" + +For vertex shaders, this semantic label indicates that a system value contains +the current vertex id without including the base vertex (this corresponds to +d3d10 vertex id, so TGSI_SEMANTIC_VERTEXID_NOBASE + TGSI_SEMANTIC_BASEVERTEX +== TGSI_SEMANTIC_VERTEXID). This is an integer value, and only the X component +is used. + +TGSI_SEMANTIC_BASEVERTEX +"""""""""""""""""""""""" + +For vertex shaders, this semantic label indicates that a system value contains +the base vertex (i.e. gl_BaseVertex). Note that for non-indexed draw calls, +this contains the first (or start) value instead. +This is an integer value, and only the X component is used. + +TGSI_SEMANTIC_PRIMID +"""""""""""""""""""" + +For geometry and fragment shaders, this semantic label indicates the value +contains the primitive id (i.e. gl_PrimitiveID). This is an integer value, +and only the X component is used. +FIXME: This right now can be either a ordinary input or a system value... + Declaration Interpolate ^^^^^^^^^^^^^^^^^^^^^^^ |