fulldecl->Semantic.Name == TGSI_SEMANTIC_CLIPDIST) {
info->num_written_clipdistance += util_bitcount(fulldecl->Declaration.UsageMask);
}
+ if ((procType == TGSI_PROCESSOR_VERTEX || procType == TGSI_PROCESSOR_GEOMETRY) &&
+ fulldecl->Semantic.Name == TGSI_SEMANTIC_CULLDIST) {
+ info->num_written_culldistance += util_bitcount(fulldecl->Declaration.UsageMask);
+ }
/* extra info for special outputs */
if (procType == TGSI_PROCESSOR_FRAGMENT &&
fulldecl->Semantic.Name == TGSI_SEMANTIC_POSITION)
boolean writes_viewport_index;
boolean writes_layer;
+ unsigned num_written_culldistance;
unsigned num_written_clipdistance;
/**
* Bitmask indicating which register files are accessed with
"TEXCOORD",
"PCOORD",
"VIEWPORT_INDEX",
- "LAYER"
+ "LAYER",
+ "CULLDIST"
};
const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
Only the X value is used. (Also known as rendertarget array index.)
+TGSI_SEMANTIC_CULLDIST
+""""""""""""""""""""""
+
+Used as distance to plane for performing application-defined culling
+of individual primitives against a plane. When components of vertex
+elements are given this label, these values are assumed to be a
+float32 signed distance to a plane. 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);
+
Declaration Interpolate
^^^^^^^^^^^^^^^^^^^^^^^
#define TGSI_SEMANTIC_PCOORD 20 /**< point sprite coordinate */
#define TGSI_SEMANTIC_VIEWPORT_INDEX 21 /**< viewport index */
#define TGSI_SEMANTIC_LAYER 22 /**< layer (rendertarget index) */
-#define TGSI_SEMANTIC_COUNT 23 /**< number of semantic values */
+#define TGSI_SEMANTIC_CULLDIST 23
+#define TGSI_SEMANTIC_COUNT 24 /**< number of semantic values */
struct tgsi_declaration_semantic
{