summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/vtxfmt.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-03-03 10:41:57 +0000
committerKeith Whitwell <[email protected]>2009-03-03 10:41:57 +0000
commitc64a2b708944ec671b1104067245500fcfc6ed94 (patch)
tree6c7a0d642264502993c1be2bc9d3da7e288615fc /src/mesa/main/vtxfmt.c
parent050ce17799cbe652962f898942ae6551d31f21a2 (diff)
mesa: Add BeginVertices driver call
Provides notification to the VBO modules prior to the first immediate call. Pairs with FlushVertices()
Diffstat (limited to 'src/mesa/main/vtxfmt.c')
-rw-r--r--src/mesa/main/vtxfmt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 0204979003e..1f807dc3dc3 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -54,9 +54,12 @@
ASSERT( tnl->Current ); \
ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES ); \
ASSERT( tmp_offset >= 0 ); \
- \
- /* Save the swapped function's dispatch entry so it can be */ \
- /* restored later. */ \
+ \
+ if (tnl->SwapCount == 0) \
+ ctx->Driver.BeginVertices( ctx ); \
+ \
+ /* Save the swapped function's dispatch entry so it can be */ \
+ /* restored later. */ \
tnl->Swapped[tnl->SwapCount].location = & (((_glapi_proc *)ctx->Exec)[tmp_offset]); \
tnl->Swapped[tnl->SwapCount].function = (_glapi_proc)TAG(FUNC); \
tnl->SwapCount++; \