From 420ff89067515a74c9625a103cadc267d5f64bd4 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Sat, 19 Dec 2009 20:25:43 +0100 Subject: gallium: don't use edgeflags if the app didn't supply them --- src/mesa/state_tracker/st_atom_shader.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mesa/state_tracker/st_atom_shader.c') diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index c2cb72e56a..46c8cbb309 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -112,10 +112,12 @@ find_translated_vp(struct st_context *st, * edgeflag semantics, and extend the vertex shader to pass through * the input to the output. We'll need to use similar logic to set * up the extra vertex_element input for edgeflags. + * _NEW_POLYGON, ST_NEW_EDGEFLAGS_DATA */ - key.passthrough_edgeflags = (st->ctx->Polygon.FrontMode != GL_FILL || - st->ctx->Polygon.BackMode != GL_FILL); - + key.passthrough_edgeflags = (st->vertdata_edgeflags && ( + st->ctx->Polygon.FrontMode != GL_FILL || + st->ctx->Polygon.BackMode != GL_FILL)); + /* Do we need to throw away old translations after a change in the * GL program string? @@ -228,7 +230,7 @@ const struct st_tracked_state st_update_vp = { "st_update_vp", /* name */ { /* dirty */ _NEW_POLYGON, /* mesa */ - ST_NEW_VERTEX_PROGRAM /* st */ + ST_NEW_VERTEX_PROGRAM | ST_NEW_EDGEFLAGS_DATA /* st */ }, update_vp /* update */ }; -- cgit v1.2.3