summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_draw.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2009-12-19 20:25:43 +0100
committerRoland Scheidegger <[email protected]>2009-12-19 20:25:43 +0100
commit420ff89067515a74c9625a103cadc267d5f64bd4 (patch)
treec7101e7c9012a83463d48c74a377d4f4146d4e4d /src/mesa/state_tracker/st_draw.c
parent1aba413a702cad3da04cf6d686ce81dd6330f1a9 (diff)
gallium: don't use edgeflags if the app didn't supply them
Diffstat (limited to 'src/mesa/state_tracker/st_draw.c')
-rw-r--r--src/mesa/state_tracker/st_draw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 6b0007a824e..2d287ef4ef5 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -514,6 +514,7 @@ st_draw_vbo(GLcontext *ctx,
struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
unsigned num_vbuffers, num_velements;
GLboolean userSpace;
+ GLboolean vertDataEdgeFlags;
/* Gallium probably doesn't want this in some cases. */
if (!index_bounds_valid)
@@ -522,6 +523,13 @@ st_draw_vbo(GLcontext *ctx,
/* sanity check for pointer arithmetic below */
assert(sizeof(arrays[0]->Ptr[0]) == 1);
+ vertDataEdgeFlags = arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj &&
+ arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj->Name;
+ if (vertDataEdgeFlags != ctx->st->vertdata_edgeflags) {
+ ctx->st->vertdata_edgeflags = vertDataEdgeFlags;
+ ctx->st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
+ }
+
st_validate_state(ctx->st);
/* must get these after state validation! */