summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-03-04 01:11:49 +0100
committerMarek Olšák <[email protected]>2014-03-15 17:47:36 +0100
commit4e634c524024fa05d9ea2047497cd065c905bcdf (patch)
tree2362d9aefc9e01d7c94fd7afaa98d07db9995423 /src/mesa/state_tracker/st_atom.c
parent3d42696d10377bc8fcad06eac3be2ec291490545 (diff)
st/mesa: implement zero-stride edge flag by culling primitives
This was unimplemented.
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 378254d486d..00149f8ab77 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -132,7 +132,7 @@ static void check_program_state( struct st_context *st )
static void check_attrib_edgeflag(struct st_context *st)
{
const struct gl_client_array **arrays = st->ctx->Array._DrawArrays;
- GLboolean vertdata_edgeflags;
+ GLboolean vertdata_edgeflags, edgeflag_culls_prims;
if (!arrays)
return;
@@ -142,6 +142,13 @@ static void check_attrib_edgeflag(struct st_context *st)
st->vertdata_edgeflags = vertdata_edgeflags;
st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
}
+
+ edgeflag_culls_prims = !vertdata_edgeflags &&
+ !st->ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0];
+ if (edgeflag_culls_prims != st->edgeflag_culls_prims) {
+ st->edgeflag_culls_prims = edgeflag_culls_prims;
+ st->dirty.st |= ST_NEW_RASTERIZER;
+ }
}