diff options
author | Dave Airlie <[email protected]> | 2016-05-13 15:47:34 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-05-23 11:03:44 +1000 |
commit | e6d93893662db45a7ddcc822f744be8d3e5ba30e (patch) | |
tree | c6bc732298704231d1bd6b390147eccd2eef4b98 /src/gallium | |
parent | d17062a40e16454a15aa037a4d1d9e9562cedd46 (diff) |
tgsi: remove culldist semantic.
This isn't used anymore in the tree, culldist's
are part of the clipdist semantic, we could in theory
rename it, but I'm not sure there is much point, and
I'd have to be careful with virgl.
Reviewed-by: Roland Scheidegger <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_strings.c | 1 | ||||
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 22 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 1 |
3 files changed, 18 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c index 306ab4fefa8..c13f7eaecca 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c @@ -85,7 +85,6 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] = "PCOORD", "VIEWPORT_INDEX", "LAYER", - "CULLDIST", "SAMPLEID", "SAMPLEPOS", "SAMPLEMASK", diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 4315707e643..ab12490fb5f 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -2876,18 +2876,32 @@ annotated with those semantics. TGSI_SEMANTIC_CLIPDIST """""""""""""""""""""" +Note this covers clipping and culling distances. + When components of vertex elements are identified this way, these values are each assumed to be a float32 signed distance to a plane. + +For clip distances: Primitive setup only invokes rasterization on pixels for which -the interpolated plane distances are >= 0. Multiple clip planes -can be implemented simultaneously, by annotating multiple -components of one or more vertex elements with the above specified -semantic. The limits on both clip and cull distances are bound +the interpolated plane distances are >= 0. + +For cull distances: +Primitives will be completely discarded if the plane distance +for all of the vertices in the primitive are < 0. +If a vertex has a cull distance of NaN, that vertex counts as "out" +(as if its < 0); + +Multiple clip/cull planes can be implemented simultaneously, by +annotating multiple components of one or more vertex elements with +the above specified semantic. +The limits on both clip and cull distances are bound by the PIPE_MAX_CLIP_OR_CULL_DISTANCE_COUNT define which defines the maximum number of components that can be used to hold the distances and by the PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT which specifies the maximum number of registers which can be annotated with those semantics. +The properties NUM_CLIPDIST_ENABLED and NUM_CULLDIST_ENABLED +are used to divide up the 2 x vec4 space between clipping and culling. TGSI_SEMANTIC_SAMPLEID """""""""""""""""""""" diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 514b339da71..b9d28fe458c 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -185,7 +185,6 @@ enum tgsi_semantic { TGSI_SEMANTIC_PCOORD, /**< point sprite coordinate */ TGSI_SEMANTIC_VIEWPORT_INDEX, /**< viewport index */ TGSI_SEMANTIC_LAYER, /**< layer (rendertarget index) */ - TGSI_SEMANTIC_CULLDIST, TGSI_SEMANTIC_SAMPLEID, TGSI_SEMANTIC_SAMPLEPOS, TGSI_SEMANTIC_SAMPLEMASK, |