summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_save_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo/vbo_save_api.c')
-rw-r--r--src/mesa/vbo/vbo_save_api.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 41cd21d04b..3f86c68b24 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -72,6 +72,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/context.h"
#include "main/dlist.h"
#include "main/enums.h"
+#include "main/eval.h"
#include "main/macros.h"
#include "main/api_noop.h"
#include "main/api_validate.h"
@@ -269,7 +270,7 @@ static void _save_compile_vertex_list( GLcontext *ctx )
* being compiled.
*/
node = (struct vbo_save_vertex_list *)
- _mesa_alloc_instruction(ctx, save->opcode_vertex_list, sizeof(*node));
+ _mesa_dlist_alloc(ctx, save->opcode_vertex_list, sizeof(*node));
if (!node)
return;
@@ -988,7 +989,8 @@ static void _save_vtxfmt_init( GLcontext *ctx )
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLvertexformat *vfmt = &save->vtxfmt;
- vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */
+ _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_);
+
vfmt->Begin = _save_Begin;
vfmt->Color3f = _save_Color3f;
vfmt->Color3fv = _save_Color3fv;
@@ -1047,20 +1049,13 @@ static void _save_vtxfmt_init( GLcontext *ctx )
/* This will all require us to fallback to saving the list as opcodes:
*/
- vfmt->CallList = _save_CallList; /* inside begin/end */
- vfmt->CallLists = _save_CallLists; /* inside begin/end */
- vfmt->EvalCoord1f = _save_EvalCoord1f;
- vfmt->EvalCoord1fv = _save_EvalCoord1fv;
- vfmt->EvalCoord2f = _save_EvalCoord2f;
- vfmt->EvalCoord2fv = _save_EvalCoord2fv;
- vfmt->EvalPoint1 = _save_EvalPoint1;
- vfmt->EvalPoint2 = _save_EvalPoint2;
+ _MESA_INIT_DLIST_VTXFMT(vfmt, _save_); /* inside begin/end */
+
+ _MESA_INIT_EVAL_VTXFMT(vfmt, _save_);
/* These are all errors as we at least know we are in some sort of
* begin/end pair:
*/
- vfmt->EvalMesh1 = _save_EvalMesh1;
- vfmt->EvalMesh2 = _save_EvalMesh2;
vfmt->Begin = _save_Begin;
vfmt->Rectf = _save_Rectf;
vfmt->DrawArrays = _save_DrawArrays;
@@ -1238,11 +1233,11 @@ void vbo_save_api_init( struct vbo_save_context *save )
GLuint i;
save->opcode_vertex_list =
- _mesa_alloc_opcode( ctx,
- sizeof(struct vbo_save_vertex_list),
- vbo_save_playback_vertex_list,
- vbo_destroy_vertex_list,
- vbo_print_vertex_list );
+ _mesa_dlist_alloc_opcode( ctx,
+ sizeof(struct vbo_save_vertex_list),
+ vbo_save_playback_vertex_list,
+ vbo_destroy_vertex_list,
+ vbo_print_vertex_list );
ctx->Driver.NotifySaveBegin = vbo_save_NotifyBegin;