diff options
Diffstat (limited to 'src/mesa/main/vtxfmt.c')
-rw-r--r-- | src/mesa/main/vtxfmt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index 4f9a7c0e24f..e45e5ca22e2 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -49,6 +49,7 @@ { \ GET_CURRENT_CONTEXT(ctx); \ struct gl_tnl_module *tnl = &(ctx->TnlModule); \ + typedef void (*func_ptr_t)(); \ \ ASSERT( tnl->Current ); \ ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES ); \ @@ -56,7 +57,7 @@ /* Save the swapped function's dispatch entry so it can be */ \ /* restored later. */ \ tnl->Swapped[tnl->SwapCount][0] = (void *)&(ctx->Exec->FUNC); \ - tnl->Swapped[tnl->SwapCount][1] = (void *)TAG(FUNC); \ + *(func_ptr_t *)(tnl->Swapped[tnl->SwapCount]+1) = (func_ptr_t)TAG(FUNC); \ tnl->SwapCount++; \ \ if ( 0 ) \ |