summaryrefslogtreecommitdiff
path: root/src/mesa/main/vtxfmt.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-03-03 13:18:15 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-03-03 13:18:15 +0000
commitc7e46c1857b744a35c086dddb651f38df948a5fa (patch)
tree6d984aea871340574cd7286c11a53a7b9b094f81 /src/mesa/main/vtxfmt.c
parent97a1fd158c9acfaa3a8deda7eb5bf0b253e85c15 (diff)
parentdceb09909ea9d6eaef0334897ebed6da45db6faa (diff)
Merge commit 'origin/master' into gallium-map-range
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 0204979003..1f807dc3dc 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++; \