-/* $Id: dlist.c,v 1.54 2000/11/24 15:21:59 keithw Exp $ */
+/* $Id: dlist.c,v 1.84 2001/12/19 02:36:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 4.1
*
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
#include "all.h"
#else
#include "glheader.h"
-#include "accum.h"
#include "api_loopback.h"
#include "attrib.h"
-#include "bitmap.h"
#include "blend.h"
#include "buffers.h"
#include "clip.h"
#include "colortab.h"
#include "context.h"
#include "convolve.h"
-#include "copypix.h"
#include "depth.h"
+#include "dlist.h"
#include "enable.h"
#include "enums.h"
#include "eval.h"
#include "matrix.h"
#include "mem.h"
#include "pixel.h"
-#include "pixeltex.h"
#include "points.h"
#include "polygon.h"
-#include "readpix.h"
#include "state.h"
#include "texobj.h"
#include "teximage.h"
#include "texstate.h"
#include "mtypes.h"
#include "varray.h"
+#include "vpstate.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
glIsList
glGenLists
glDeleteLists
- glEndList
+ glEndList --- BUT: call ctx->Driver.EndList at end of list execution?
glFeedbackBuffer
glSelectBuffer
glRenderMode
/* How many nodes to allocate at a time:
* - reduced now that we hold vertices etc. elsewhere.
*/
-#define BLOCK_SIZE 64
+#define BLOCK_SIZE 256
/*
OPCODE_DRAW_BUFFER,
OPCODE_DRAW_PIXELS,
OPCODE_ENABLE,
- OPCODE_EVALCOORD1,
- OPCODE_EVALCOORD2,
OPCODE_EVALMESH1,
OPCODE_EVALMESH2,
- OPCODE_EVALPOINT1,
- OPCODE_EVALPOINT2,
OPCODE_FOG,
OPCODE_FRONT_FACE,
OPCODE_FRUSTUM,
OPCODE_HINT,
- OPCODE_HINT_PGI,
OPCODE_HISTOGRAM,
OPCODE_INDEX_MASK,
OPCODE_INIT_NAMES,
OPCODE_WINDOW_POS,
/* GL_ARB_multitexture */
OPCODE_ACTIVE_TEXTURE,
- OPCODE_CLIENT_ACTIVE_TEXTURE,
/* GL_SGIX/SGIS_pixel_texture */
OPCODE_PIXEL_TEXGEN_SGIX,
OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS,
OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D,
OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D,
OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D,
+ /* GL_ARB_multisample */
+ OPCODE_SAMPLE_COVERAGE,
+ /* GL_ARB_window_pos */
+ OPCODE_WINDOW_POS_ARB,
+ /* GL_NV_vertex_program */
+ OPCODE_BIND_PROGRAM_NV,
+ OPCODE_EXECUTE_PROGRAM_NV,
+ OPCODE_REQUEST_PROGRAMS_RESIDENT_NV,
+ OPCODE_LOAD_PROGRAM_NV,
+ OPCODE_PROGRAM_PARAMETER4F_NV,
+ OPCODE_PROGRAM_PARAMETERS4FV_NV,
+ OPCODE_TRACK_MATRIX_NV,
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
* Destroy all nodes in a display list.
* Input: list - display list number
*/
-void gl_destroy_list( GLcontext *ctx, GLuint list )
+void _mesa_destroy_list( GLcontext *ctx, GLuint list )
{
Node *n, *block;
GLboolean done;
/* check for extension opcodes first */
- int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
- if (i >= 0 && i < ctx->listext.nr_opcodes) {
+ GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0;
+ if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
ctx->listext.opcode[i].destroy(ctx, &n[1]);
n += ctx->listext.opcode[i].size;
}
/***** Public *****/
/**********************************************************************/
-void gl_init_lists( void )
+void _mesa_init_lists( void )
{
static int init_flag = 0;
InstSize[OPCODE_DRAW_BUFFER] = 2;
InstSize[OPCODE_DRAW_PIXELS] = 6;
InstSize[OPCODE_ENABLE] = 2;
- InstSize[OPCODE_EVALCOORD1] = 2;
- InstSize[OPCODE_EVALCOORD2] = 3;
InstSize[OPCODE_EVALMESH1] = 4;
InstSize[OPCODE_EVALMESH2] = 6;
- InstSize[OPCODE_EVALPOINT1] = 2;
- InstSize[OPCODE_EVALPOINT2] = 3;
InstSize[OPCODE_FOG] = 6;
InstSize[OPCODE_FRONT_FACE] = 2;
InstSize[OPCODE_FRUSTUM] = 7;
InstSize[OPCODE_HINT] = 3;
- InstSize[OPCODE_HINT_PGI] = 3;
InstSize[OPCODE_HISTOGRAM] = 5;
InstSize[OPCODE_INDEX_MASK] = 2;
InstSize[OPCODE_INIT_NAMES] = 1;
InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D] = 8;
InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D] = 10;
InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D] = 12;
+ /* GL_ARB_multisample */
+ InstSize[OPCODE_SAMPLE_COVERAGE] = 3;
/* GL_ARB_multitexture */
InstSize[OPCODE_ACTIVE_TEXTURE] = 2;
- InstSize[OPCODE_CLIENT_ACTIVE_TEXTURE] = 2;
+ /* GL_ARB_window_pos */
+ InstSize[OPCODE_WINDOW_POS_ARB] = 4;
+ /* GL_NV_vertex_program */
+ InstSize[OPCODE_BIND_PROGRAM_NV] = 3;
+ InstSize[OPCODE_EXECUTE_PROGRAM_NV] = 7;
+ InstSize[OPCODE_REQUEST_PROGRAMS_RESIDENT_NV] = 2;
+ InstSize[OPCODE_LOAD_PROGRAM_NV] = 4;
+ InstSize[OPCODE_PROGRAM_PARAMETER4F_NV] = 7;
+ InstSize[OPCODE_PROGRAM_PARAMETERS4FV_NV] = 4;
+ InstSize[OPCODE_TRACK_MATRIX_NV] = 5;
}
init_flag = 1;
}
#ifdef DEBUG
if (opcode < (int) OPCODE_DRV_0) {
- assert( (GLint) count == InstSize[opcode] );
+ assert( count == InstSize[opcode] );
}
#endif
n[0].opcode = OPCODE_CONTINUE;
newblock = (Node *) MALLOC( sizeof(Node) * BLOCK_SIZE );
if (!newblock) {
- gl_error( ctx, GL_OUT_OF_MEMORY, "Building display list" );
+ _mesa_error( ctx, GL_OUT_OF_MEMORY, "Building display list" );
return NULL;
}
n[1].next = (Node *) newblock;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_ACCUM, 2 );
if (n) {
n[1].e = op;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_ALPHA_FUNC, 2 );
if (n) {
n[1].e = func;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_BIND_TEXTURE, 2 );
if (n) {
n[1].e = target;
GET_CURRENT_CONTEXT(ctx);
GLvoid *image = _mesa_unpack_bitmap( width, height, pixels, &ctx->Unpack );
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_BITMAP, 7 );
if (n) {
n[1].i = (GLint) width;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_EQUATION, 1 );
if (n) {
n[1].e = mode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_FUNC, 2 );
if (n) {
n[1].e = sfactor;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_FUNC_SEPARATE, 4 );
if (n) {
n[1].e = sfactorRGB;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_COLOR, 4 );
if (n) {
n[1].f = red;
}
-static void save_CallList( GLuint list )
+void _mesa_save_CallList( GLuint list )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
+
n = ALLOC_INSTRUCTION( ctx, OPCODE_CALL_LIST, 1 );
if (n) {
n[1].ui = list;
}
-static void save_CallLists( GLsizei n, GLenum type, const GLvoid *lists )
+void _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists )
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
for (i=0;i<n;i++) {
GLuint list = translate_id( i, type, lists );
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR, 1 );
if (n) {
n[1].bf = mask;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_ACCUM, 4 );
if (n) {
n[1].f = red;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_COLOR, 4 );
if (n) {
n[1].f = red;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_DEPTH, 1 );
if (n) {
n[1].f = (GLfloat) depth;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_INDEX, 1 );
if (n) {
n[1].f = c;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_STENCIL, 1 );
if (n) {
n[1].i = s;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CLIP_PLANE, 5 );
if (n) {
n[1].e = plane;
- n[2].f = equ[0];
- n[3].f = equ[1];
- n[4].f = equ[2];
- n[5].f = equ[3];
+ n[2].f = (GLfloat) equ[0];
+ n[3].f = (GLfloat) equ[1];
+ n[4].f = (GLfloat) equ[2];
+ n[5].f = (GLfloat) equ[3];
}
if (ctx->ExecuteFlag) {
(*ctx->Exec->ClipPlane)( plane, equ );
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_MASK, 4 );
if (n) {
n[1].b = red;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
+
n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_MATERIAL, 2 );
if (n) {
n[1].e = face;
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_1D ||
target == GL_PROXY_TEXTURE_2D ||
- target == GL_PROXY_TEXTURE_3D) {
+ target == GL_PROXY_TEXTURE_3D ||
+ target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) {
/* execute immediately */
(*ctx->Exec->ColorTable)( target, internalFormat, width,
format, type, table );
GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, table,
&ctx->Unpack);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE, 6 );
if (n) {
n[1].e = target;
GET_CURRENT_CONTEXT(ctx);
Node *n;
- ASSERT_OUTSIDE_BEGIN_END(ctx, "glColorTableParameterfv");
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6 );
if (n) {
GET_CURRENT_CONTEXT(ctx);
Node *n;
- ASSERT_OUTSIDE_BEGIN_END(ctx, "glColorTableParameterfv");
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6 );
if (n) {
GLvoid *image = _mesa_unpack_image(count, 1, 1, format, type, table,
&ctx->Unpack);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_SUB_TABLE, 6 );
if (n) {
n[1].e = target;
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_SUB_TABLE, 6 );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5 );
if (n) {
n[1].e = target;
n[2].i = start;
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_TABLE, 6 );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_TABLE, 5 );
if (n) {
n[1].e = target;
n[2].e = internalformat;
GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, filter,
&ctx->Unpack);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_FILTER_1D, 6 );
if (n) {
n[1].e = target;
GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, filter,
&ctx->Unpack);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_FILTER_2D, 7 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6 );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6 );
if (n) {
n[1].e = target;
n[2].e = pname;
}
-static void save_CopyPixels( GLint x, GLint y,
- GLsizei width, GLsizei height, GLenum type )
+static void
+save_CopyPixels( GLint x, GLint y,
+ GLsizei width, GLsizei height, GLenum type )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_PIXELS, 5 );
if (n) {
n[1].i = x;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_IMAGE1D, 7 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_IMAGE2D, 8 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE1D, 6 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE2D, 8 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE3D, 9 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CULL_FACE, 1 );
if (n) {
n[1].e = mode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_FUNC, 1 );
if (n) {
n[1].e = func;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_MASK, 1 );
if (n) {
n[1].b = mask;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_RANGE, 2 );
if (n) {
n[1].f = (GLfloat) nearval;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_DISABLE, 1 );
if (n) {
n[1].e = cap;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_DRAW_BUFFER, 1 );
if (n) {
n[1].e = mode;
GLvoid *image = _mesa_unpack_image(width, height, 1, format, type,
pixels, &ctx->Unpack);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_DRAW_PIXELS, 5 );
if (n) {
n[1].i = width;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_ENABLE, 1 );
if (n) {
n[1].e = cap;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_EVALMESH1, 3 );
if (n) {
n[1].e = mode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_EVALMESH2, 5 );
if (n) {
n[1].e = mode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_FOG, 5 );
if (n) {
n[1].e = pname;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_FRONT_FACE, 1 );
if (n) {
n[1].e = mode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_FRUSTUM, 6 );
if (n) {
- n[1].f = left;
- n[2].f = right;
- n[3].f = bottom;
- n[4].f = top;
- n[5].f = nearval;
- n[6].f = farval;
+ n[1].f = (GLfloat) left;
+ n[2].f = (GLfloat) right;
+ n[3].f = (GLfloat) bottom;
+ n[4].f = (GLfloat) top;
+ n[5].f = (GLfloat) nearval;
+ n[6].f = (GLfloat) farval;
}
if (ctx->ExecuteFlag) {
(*ctx->Exec->Frustum)( left, right, bottom, top, nearval, farval );
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_HINT, 2 );
if (n) {
n[1].e = target;
}
-/* GL_PGI_misc_hints*/
-static void save_HintPGI( GLenum target, GLint mode )
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_HINT_PGI, 2 );
- if (n) {
- n[1].e = target;
- n[2].i = mode;
- }
- if (ctx->ExecuteFlag) {
- (*ctx->Exec->HintPGI)( target, mode );
- }
-}
-
-
static void
save_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_HISTOGRAM, 4 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_INDEX_MASK, 1 );
if (n) {
n[1].ui = mask;
static void save_InitNames( void )
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
(void) ALLOC_INSTRUCTION( ctx, OPCODE_INIT_NAMES, 0 );
if (ctx->ExecuteFlag) {
(*ctx->Exec->InitNames)();
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LIGHT, 6 );
if (OPCODE_LIGHT) {
GLint i, nParams;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LIGHT_MODEL, 5 );
if (n) {
n[1].e = pname;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LINE_STIPPLE, 2 );
if (n) {
n[1].i = factor;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LINE_WIDTH, 1 );
if (n) {
n[1].f = width;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LIST_BASE, 1 );
if (n) {
n[1].ui = base;
static void save_LoadIdentity( void )
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
(void) ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_IDENTITY, 0 );
if (ctx->ExecuteFlag) {
(*ctx->Exec->LoadIdentity)();
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_MATRIX, 16 );
if (n) {
GLuint i;
GLfloat f[16];
GLint i;
for (i = 0; i < 16; i++) {
- f[i] = m[i];
+ f[i] = (GLfloat) m[i];
}
save_LoadMatrixf(f);
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_NAME, 1 );
if (n) {
n[1].ui = name;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_LOGIC_OP, 1 );
if (n) {
n[1].e = opcode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 );
if (n) {
- GLfloat *pnts = gl_copy_map_points1d( target, stride, order, points );
+ GLfloat *pnts = _mesa_copy_map_points1d( target, stride, order, points );
n[1].e = target;
- n[2].f = u1;
- n[3].f = u2;
+ n[2].f = (GLfloat) u1;
+ n[3].f = (GLfloat) u2;
n[4].i = _mesa_evaluator_components(target); /* stride */
n[5].i = order;
n[6].data = (void *) pnts;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 );
if (n) {
- GLfloat *pnts = gl_copy_map_points1f( target, stride, order, points );
+ GLfloat *pnts = _mesa_copy_map_points1f( target, stride, order, points );
n[1].e = target;
n[2].f = u1;
n[3].f = u2;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 );
if (n) {
- GLfloat *pnts = gl_copy_map_points2d( target, ustride, uorder,
+ GLfloat *pnts = _mesa_copy_map_points2d( target, ustride, uorder,
vstride, vorder, points );
n[1].e = target;
- n[2].f = u1;
- n[3].f = u2;
- n[4].f = v1;
- n[5].f = v2;
+ n[2].f = (GLfloat) u1;
+ n[3].f = (GLfloat) u2;
+ n[4].f = (GLfloat) v1;
+ n[5].f = (GLfloat) v2;
/* XXX verify these strides are correct */
n[6].i = _mesa_evaluator_components(target) * vorder; /*ustride*/
n[7].i = _mesa_evaluator_components(target); /*vstride*/
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 );
if (n) {
- GLfloat *pnts = gl_copy_map_points2f( target, ustride, uorder,
+ GLfloat *pnts = _mesa_copy_map_points2f( target, ustride, uorder,
vstride, vorder, points );
n[1].e = target;
n[2].f = u1;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MAPGRID1, 3 );
if (n) {
n[1].i = un;
static void save_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 )
{
- save_MapGrid1f(un, u1, u2);
+ save_MapGrid1f(un, (GLfloat) u1, (GLfloat) u2);
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MAPGRID2, 6 );
if (n) {
n[1].i = un;
static void save_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
GLint vn, GLdouble v1, GLdouble v2 )
{
- save_MapGrid2f(un, u1, u2, vn, v1, v2);
+ save_MapGrid2f(un, (GLfloat) u1, (GLfloat) u2,
+ vn, (GLfloat) v1, (GLfloat) v2);
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MATRIX_MODE, 1 );
if (n) {
n[1].e = mode;
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MIN_MAX, 3 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_MULT_MATRIX, 16 );
if (n) {
GLuint i;
GLfloat f[16];
GLint i;
for (i = 0; i < 16; i++) {
- f[i] = m[i];
+ f[i] = (GLfloat) m[i];
}
save_MultMatrixf(f);
}
{
GET_CURRENT_CONTEXT(ctx);
/* It's an error to call this function while building a display list */
- gl_error( ctx, GL_INVALID_OPERATION, "glNewList" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" );
(void) list;
(void) mode;
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_ORTHO, 6 );
if (n) {
- n[1].f = left;
- n[2].f = right;
- n[3].f = bottom;
- n[4].f = top;
- n[5].f = nearval;
- n[6].f = farval;
+ n[1].f = (GLfloat) left;
+ n[2].f = (GLfloat) right;
+ n[3].f = (GLfloat) bottom;
+ n[4].f = (GLfloat) top;
+ n[5].f = (GLfloat) nearval;
+ n[6].f = (GLfloat) farval;
}
if (ctx->ExecuteFlag) {
(*ctx->Exec->Ortho)( left, right, bottom, top, nearval, farval );
}
-static void save_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values )
+static void
+save_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_MAP, 3 );
if (n) {
n[1].e = map;
}
-static void save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values )
+static void
+save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values )
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
GLint i;
}
-static void save_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values)
+static void
+save_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values)
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
GLint i;
}
-static void save_PixelTransferf( GLenum pname, GLfloat param )
+static void
+save_PixelTransferf( GLenum pname, GLfloat param )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TRANSFER, 2 );
if (n) {
n[1].e = pname;
}
-static void save_PixelTransferi( GLenum pname, GLint param )
+static void
+save_PixelTransferi( GLenum pname, GLint param )
{
save_PixelTransferf( pname, (GLfloat) param );
}
-static void save_PixelZoom( GLfloat xfactor, GLfloat yfactor )
+static void
+save_PixelZoom( GLfloat xfactor, GLfloat yfactor )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_ZOOM, 2 );
if (n) {
n[1].f = xfactor;
}
-static void save_PointParameterfvEXT( GLenum pname, const GLfloat *params )
+static void
+save_PointParameterfvEXT( GLenum pname, const GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_POINT_PARAMETERS, 4 );
if (n) {
n[1].e = pname;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_POINT_SIZE, 1 );
if (n) {
n[1].f = size;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_MODE, 2 );
if (n) {
n[1].e = face;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_STIPPLE, 1 );
if (n) {
void *data;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_OFFSET, 2 );
if (n) {
n[1].f = factor;
static void save_PolygonOffsetEXT( GLfloat factor, GLfloat bias )
{
GET_CURRENT_CONTEXT(ctx);
- save_PolygonOffset(factor, ctx->Visual.DepthMaxF * bias);
+ save_PolygonOffset(factor, ctx->DepthMaxF * bias);
}
static void save_PopAttrib( void )
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
(void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_ATTRIB, 0 );
if (ctx->ExecuteFlag) {
(*ctx->Exec->PopAttrib)();
static void save_PopMatrix( void )
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
(void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_MATRIX, 0 );
if (ctx->ExecuteFlag) {
(*ctx->Exec->PopMatrix)();
static void save_PopName( void )
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
(void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_NAME, 0 );
if (ctx->ExecuteFlag) {
(*ctx->Exec->PopName)();
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
for (i=0;i<num;i++) {
Node *n;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_ATTRIB, 1 );
if (n) {
n[1].bf = mask;
static void save_PushMatrix( void )
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
(void) ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_MATRIX, 0 );
if (ctx->ExecuteFlag) {
(*ctx->Exec->PushMatrix)();
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_NAME, 1 );
if (n) {
n[1].ui = name;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
n = ALLOC_INSTRUCTION( ctx, OPCODE_RASTER_POS, 4 );
if (n) {
n[1].f = x;
static void save_RasterPos2d(GLdouble x, GLdouble y)
{
- save_RasterPos4f(x, y, 0.0F, 1.0F);
+ save_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
static void save_RasterPos2f(GLfloat x, GLfloat y)
static void save_RasterPos2i(GLint x, GLint y)
{
- save_RasterPos4f(x, y, 0.0F, 1.0F);
+ save_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
static void save_RasterPos2s(GLshort x, GLshort y)
static void save_RasterPos3d(GLdouble x, GLdouble y, GLdouble z)
{
- save_RasterPos4f(x, y, z, 1.0F);
+ save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
static void save_RasterPos3f(GLfloat x, GLfloat y, GLfloat z)
static void save_RasterPos3i(GLint x, GLint y, GLint z)
{
- save_RasterPos4f(x, y, z, 1.0F);
+ save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
static void save_RasterPos3s(GLshort x, GLshort y, GLshort z)
static void save_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- save_RasterPos4f(x, y, z, w);
+ save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
static void save_RasterPos4i(GLint x, GLint y, GLint z, GLint w)
{
- save_RasterPos4f(x, y, z, w);
+ save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
static void save_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
static void save_RasterPos2dv(const GLdouble *v)
{
- save_RasterPos4f(v[0], v[1], 0.0F, 1.0F);
+ save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
static void save_RasterPos2fv(const GLfloat *v)
static void save_RasterPos2iv(const GLint *v)
{
- save_RasterPos4f(v[0], v[1], 0.0F, 1.0F);
+ save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
static void save_RasterPos2sv(const GLshort *v)
static void save_RasterPos3dv(const GLdouble *v)
{
- save_RasterPos4f(v[0], v[1], v[2], 1.0F);
+ save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
static void save_RasterPos3fv(const GLfloat *v)
static void save_RasterPos3iv(const GLint *v)
{
- save_RasterPos4f(v[0], v[1], v[2], 1.0F);
+ save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
static void save_RasterPos3sv(const GLshort *v)
static void save_RasterPos4dv(const GLdouble *v)
{
- save_RasterPos4f(v[0], v[1], v[2], v[3]);
+ save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
}
static void save_RasterPos4fv(const GLfloat *v)
static void save_RasterPos4iv(const GLint *v)
{
- save_RasterPos4f(v[0], v[1], v[2], v[3]);
+ save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
}
static void save_RasterPos4sv(const GLshort *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PASSTHROUGH, 1 );
if (n) {
n[1].f = token;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_READ_BUFFER, 1 );
if (n) {
n[1].e = mode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_RESET_HISTOGRAM, 1 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_RESET_MIN_MAX, 1 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_ROTATE, 4 );
if (n) {
n[1].f = angle;
static void save_Rotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z )
{
- save_Rotatef(angle, x, y, z);
+ save_Rotatef((GLfloat) angle, (GLfloat) x, (GLfloat) y, (GLfloat) z);
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_SCALE, 3 );
if (n) {
n[1].f = x;
static void save_Scaled( GLdouble x, GLdouble y, GLdouble z )
{
- save_Scalef(x, y, z);
+ save_Scalef((GLfloat) x, (GLfloat) y, (GLfloat) z);
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_SCISSOR, 4 );
if (n) {
n[1].i = x;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_SHADE_MODEL, 1 );
if (n) {
n[1].e = mode;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_FUNC, 3 );
if (n) {
n[1].e = func;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_MASK, 1 );
if (n) {
n[1].ui = mask;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_OP, 3 );
if (n) {
n[1].e = fail;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXENV, 6 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXGEN, 6 );
if (n) {
n[1].e = coord;
static void save_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
{
GLfloat p[4];
- p[0] = params[0];
- p[1] = params[1];
- p[2] = params[2];
- p[3] = params[3];
+ p[0] = (GLfloat) params[0];
+ p[1] = (GLfloat) params[1];
+ p[2] = (GLfloat) params[2];
+ p[3] = (GLfloat) params[3];
save_TexGenfv(coord, pname, p);
}
static void save_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
{
GLfloat p[4];
- p[0] = params[0];
- p[1] = params[1];
- p[2] = params[2];
- p[3] = params[3];
+ p[0] = (GLfloat) params[0];
+ p[1] = (GLfloat) params[1];
+ p[2] = (GLfloat) params[2];
+ p[3] = (GLfloat) params[3];
save_TexGenfv( coord, pname, p );
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXPARAMETER, 6 );
if (n) {
n[1].e = target;
}
-static void save_TexParameteri( GLenum target, GLenum pname, const GLint param )
+static void save_TexParameteri( GLenum target, GLenum pname, GLint param )
{
GLfloat fparam[4];
fparam[0] = (GLfloat) param;
GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type,
pixels, &ctx->Unpack);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE1D, 8 );
if (n) {
n[1].e = target;
GLvoid *image = _mesa_unpack_image(width, height, 1, format, type,
pixels, &ctx->Unpack);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE2D, 9 );
if (n) {
n[1].e = target;
Node *n;
GLvoid *image = _mesa_unpack_image(width, height, depth, format, type,
pixels, &ctx->Unpack);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE3D, 10 );
if (n) {
n[1].e = target;
n[2].i = level;
- n[3].i = internalFormat;
+ n[3].i = (GLint) internalFormat;
n[4].i = (GLint) width;
n[5].i = (GLint) height;
n[6].i = (GLint) depth;
Node *n;
GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type,
pixels, &ctx->Unpack);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE1D, 7 );
if (n) {
n[1].e = target;
Node *n;
GLvoid *image = _mesa_unpack_image(width, height, 1, format, type,
pixels, &ctx->Unpack);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE2D, 9 );
if (n) {
n[1].e = target;
Node *n;
GLvoid *image = _mesa_unpack_image(width, height, depth, format, type,
pixels, &ctx->Unpack);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE3D, 11 );
if (n) {
n[1].e = target;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_TRANSLATE, 3 );
if (n) {
n[1].f = x;
static void save_Translated( GLdouble x, GLdouble y, GLdouble z )
{
- save_Translatef(x, y, z);
+ save_Translatef((GLfloat) x, (GLfloat) y, (GLfloat) z);
}
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_VIEWPORT, 4 );
if (n) {
n[1].i = x;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
n = ALLOC_INSTRUCTION( ctx, OPCODE_WINDOW_POS, 4 );
if (n) {
n[1].f = x;
static void save_WindowPos2dMESA(GLdouble x, GLdouble y)
{
- save_WindowPos4fMESA(x, y, 0.0F, 1.0F);
+ save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
static void save_WindowPos2fMESA(GLfloat x, GLfloat y)
static void save_WindowPos2iMESA(GLint x, GLint y)
{
- save_WindowPos4fMESA(x, y, 0.0F, 1.0F);
+ save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
static void save_WindowPos2sMESA(GLshort x, GLshort y)
static void save_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z)
{
- save_WindowPos4fMESA(x, y, z, 1.0F);
+ save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
static void save_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
static void save_WindowPos3iMESA(GLint x, GLint y, GLint z)
{
- save_WindowPos4fMESA(x, y, z, 1.0F);
+ save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
static void save_WindowPos3sMESA(GLshort x, GLshort y, GLshort z)
static void save_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- save_WindowPos4fMESA(x, y, z, w);
+ save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
static void save_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w)
{
- save_WindowPos4fMESA(x, y, z, w);
+ save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
static void save_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w)
static void save_WindowPos2dvMESA(const GLdouble *v)
{
- save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
+ save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
static void save_WindowPos2fvMESA(const GLfloat *v)
static void save_WindowPos2ivMESA(const GLint *v)
{
- save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
+ save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
static void save_WindowPos2svMESA(const GLshort *v)
static void save_WindowPos3dvMESA(const GLdouble *v)
{
- save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
+ save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
static void save_WindowPos3fvMESA(const GLfloat *v)
static void save_WindowPos3ivMESA(const GLint *v)
{
- save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
+ save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
static void save_WindowPos3svMESA(const GLshort *v)
static void save_WindowPos4dvMESA(const GLdouble *v)
{
- save_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
+ save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
}
static void save_WindowPos4fvMESA(const GLfloat *v)
static void save_WindowPos4ivMESA(const GLint *v)
{
- save_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
+ save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1],
+ (GLfloat) v[2], (GLfloat) v[3]);
}
static void save_WindowPos4svMESA(const GLshort *v)
-/* GL_ARB_multitexture */
-static void save_ActiveTextureARB( GLenum target )
+/*
+ * GL_ARB_window_pos
+ */
+
+static void save_WindowPos3fARB( GLfloat x, GLfloat y, GLfloat z )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ACTIVE_TEXTURE, 1 );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_WINDOW_POS_ARB, 3 );
if (n) {
- n[1].e = target;
+ n[1].f = x;
+ n[2].f = y;
+ n[3].f = z;
}
if (ctx->ExecuteFlag) {
- (*ctx->Exec->ActiveTextureARB)( target );
+ (*ctx->Exec->WindowPos3fMESA)( x, y, z );
}
}
+static void save_WindowPos2dARB(GLdouble x, GLdouble y)
+{
+ save_WindowPos3fARB((GLfloat) x, (GLfloat) y, 0.0F);
+}
+
+static void save_WindowPos2fARB(GLfloat x, GLfloat y)
+{
+ save_WindowPos3fARB(x, y, 0.0F);
+}
+
+static void save_WindowPos2iARB(GLint x, GLint y)
+{
+ save_WindowPos3fARB((GLfloat) x, (GLfloat) y, 0.0F);
+}
+
+static void save_WindowPos2sARB(GLshort x, GLshort y)
+{
+ save_WindowPos3fARB(x, y, 0.0F);
+}
+
+static void save_WindowPos3dARB(GLdouble x, GLdouble y, GLdouble z)
+{
+ save_WindowPos3fARB((GLfloat) x, (GLfloat) y, (GLfloat) z);
+}
+
+static void save_WindowPos3iARB(GLint x, GLint y, GLint z)
+{
+ save_WindowPos3fARB((GLfloat) x, (GLfloat) y, (GLfloat) z);
+}
+
+static void save_WindowPos3sARB(GLshort x, GLshort y, GLshort z)
+{
+ save_WindowPos3fARB(x, y, z);
+}
+
+static void save_WindowPos2dvARB(const GLdouble *v)
+{
+ save_WindowPos3fARB((GLfloat) v[0], (GLfloat) v[1], 0.0F);
+}
+
+static void save_WindowPos2fvARB(const GLfloat *v)
+{
+ save_WindowPos3fARB(v[0], v[1], 0.0F);
+}
+
+static void save_WindowPos2ivARB(const GLint *v)
+{
+ save_WindowPos3fARB((GLfloat) v[0], (GLfloat) v[1], 0.0F);
+}
+
+static void save_WindowPos2svARB(const GLshort *v)
+{
+ save_WindowPos3fARB(v[0], v[1], 0.0F);
+}
+
+static void save_WindowPos3dvARB(const GLdouble *v)
+{
+ save_WindowPos3fARB((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
+}
+
+static void save_WindowPos3fvARB(const GLfloat *v)
+{
+ save_WindowPos3fARB(v[0], v[1], v[2]);
+}
+
+static void save_WindowPos3ivARB(const GLint *v)
+{
+ save_WindowPos3fARB((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
+}
+
+static void save_WindowPos3svARB(const GLshort *v)
+{
+ save_WindowPos3fARB(v[0], v[1], v[2]);
+}
+
/* GL_ARB_multitexture */
-static void save_ClientActiveTextureARB( GLenum target )
+static void save_ActiveTextureARB( GLenum target )
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLIENT_ACTIVE_TEXTURE, 1 );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_ACTIVE_TEXTURE, 1 );
if (n) {
n[1].e = target;
}
if (ctx->ExecuteFlag) {
- (*ctx->Exec->ClientActiveTextureARB)( target );
+ (*ctx->Exec->ActiveTextureARB)( target );
}
}
-
/* GL_ARB_transpose_matrix */
static void save_LoadTransposeMatrixdARB( const GLdouble m[16] )
}
-static void save_MultTransposeMatrixdARB( const GLdouble m[16] )
+static void
+save_MultTransposeMatrixdARB( const GLdouble m[16] )
{
GLfloat tm[16];
_math_transposefd(tm, m);
}
-static void save_MultTransposeMatrixfARB( const GLfloat m[16] )
+static void
+save_MultTransposeMatrixfARB( const GLfloat m[16] )
{
GLfloat tm[16];
_math_transposef(tm, m);
}
-static void save_PixelTexGenSGIX(GLenum mode)
+static void
+save_PixelTexGenSGIX(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_SGIX, 1 );
if (n) {
n[1].e = mode;
else {
Node *n;
GLvoid *image;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
/* make copy of image */
image = MALLOC(imageSize);
if (!image) {
- gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB");
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 8 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7 );
if (n) {
n[1].e = target;
n[2].i = level;
else {
Node *n;
GLvoid *image;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
/* make copy of image */
image = MALLOC(imageSize);
if (!image) {
- gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB");
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 9 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8 );
if (n) {
n[1].e = target;
n[2].i = level;
else {
Node *n;
GLvoid *image;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
/* make copy of image */
image = MALLOC(imageSize);
if (!image) {
- gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB");
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 10 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9 );
if (n) {
n[1].e = target;
n[2].i = level;
GLvoid *image;
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
/* make copy of image */
image = MALLOC(imageSize);
if (!image) {
- gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB");
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 8 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7 );
if (n) {
n[1].e = target;
n[2].i = level;
}
if (ctx->ExecuteFlag) {
(*ctx->Exec->CompressedTexSubImage1DARB)(target, level, xoffset,
- width, format, imageSize, data);
+ width, format, imageSize, data);
}
}
GLvoid *image;
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
/* make copy of image */
image = MALLOC(imageSize);
if (!image) {
- gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB");
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 10 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9 );
if (n) {
n[1].e = target;
n[2].i = level;
GLvoid *image;
GET_CURRENT_CONTEXT(ctx);
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
/* make copy of image */
image = MALLOC(imageSize);
if (!image) {
- gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB");
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 12 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11 );
if (n) {
n[1].e = target;
n[2].i = level;
}
+/* GL_ARB_multisample */
+static void
+save_SampleCoverageARB(GLclampf value, GLboolean invert)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_SAMPLE_COVERAGE, 2 );
+ if (n) {
+ n[1].f = value;
+ n[2].b = invert;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->SampleCoverageARB)( value, invert );
+ }
+}
+
+
/* GL_SGIS_pixel_texture */
-static void save_PixelTexGenParameteriSGIS(GLenum target, GLint value)
+static void
+save_PixelTexGenParameteriSGIS(GLenum target, GLint value)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_TNL( ctx, FLUSH_STORED_VERTICES );
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS, 2 );
if (n) {
n[1].e = target;
}
-static void save_PixelTexGenParameterfSGIS(GLenum target, GLfloat value)
+static void
+save_PixelTexGenParameterfSGIS(GLenum target, GLfloat value)
{
save_PixelTexGenParameteriSGIS(target, (GLint) value);
}
-static void save_PixelTexGenParameterivSGIS(GLenum target, const GLint *value)
+static void
+save_PixelTexGenParameterivSGIS(GLenum target, const GLint *value)
{
save_PixelTexGenParameteriSGIS(target, *value);
}
-static void save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value)
+static void
+save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value)
{
save_PixelTexGenParameteriSGIS(target, (GLint) *value);
}
+/*
+ * GL_NV_vertex_program
+ */
+static void
+save_BindProgramNV(GLenum target, GLuint id)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_BIND_PROGRAM_NV, 2 );
+ if (n) {
+ n[1].e = target;
+ n[2].ui = id;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->BindProgramNV)( target, id );
+ }
+}
+
+static void
+save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_EXECUTE_PROGRAM_NV, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].ui = id;
+ n[3].f = params[0];
+ n[4].f = params[1];
+ n[5].f = params[2];
+ n[6].f = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ExecuteProgramNV)(target, id, params);
+ }
+}
+
+
+static void
+save_ProgramParameter4fNV(GLenum target, GLuint index,
+ GLfloat x, GLfloat y,
+ GLfloat z, GLfloat w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_PARAMETER4F_NV, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].ui = index;
+ n[3].f = x;
+ n[4].f = y;
+ n[5].f = z;
+ n[6].f = w;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ProgramParameter4fNV)(target, index, x, y, z, w);
+ }
+}
+
+
+static void
+save_ProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat *params)
+{
+ save_ProgramParameter4fNV(target, index, params[0], params[1],
+ params[2], params[3]);
+}
+
+
+static void
+save_ProgramParameter4dNV(GLenum target, GLuint index,
+ GLdouble x, GLdouble y,
+ GLdouble z, GLdouble w)
+{
+ save_ProgramParameter4fNV(target, index, (GLfloat) x, (GLfloat) y,
+ (GLfloat) z, (GLfloat) w);
+}
+
+
+static void
+save_ProgramParameter4dvNV(GLenum target, GLuint index,
+ const GLdouble *params)
+{
+ save_ProgramParameter4fNV(target, index, (GLfloat) params[0],
+ (GLfloat) params[1], (GLfloat) params[2],
+ (GLfloat) params[3]);
+}
+
+
+static void
+save_TrackMatrixNV(GLenum target, GLuint address,
+ GLenum matrix, GLenum transform)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_TRACK_MATRIX_NV, 4 );
+ if (n) {
+ n[1].e = target;
+ n[2].ui = address;
+ n[3].e = matrix;
+ n[4].e = transform;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->TrackMatrixNV)(target, address, matrix, transform);
+ }
+}
+
+
+
+
/* KW: Compile commands
*
* Will appear in the list before the vertex buffer containing the
* command that provoked the error. I don't see this as a problem.
*/
-void gl_save_error( GLcontext *ctx, GLenum error, const char *s )
+void
+_mesa_save_error( GLcontext *ctx, GLenum error, const char *s )
{
Node *n;
n = ALLOC_INSTRUCTION( ctx, OPCODE_ERROR, 2 );
}
+/*
+ * Compile an error into current display list.
+ */
+void
+_mesa_compile_error( GLcontext *ctx, GLenum error, const char *s )
+{
+ if (ctx->CompileFlag)
+ _mesa_save_error( ctx, error, s );
+
+ if (ctx->ExecuteFlag)
+ _mesa_error( ctx, error, s );
+}
+
+
+
static GLboolean
islist(GLcontext *ctx, GLuint list)
{
* the absolute list number, not relative to ListBase.
* Input: list - display list number
*/
-static void execute_list( GLcontext *ctx, GLuint list )
+static void
+execute_list( GLcontext *ctx, GLuint list )
{
Node *n;
GLboolean done;
if (!islist(ctx,list))
return;
+ if (ctx->Driver.BeginCallList)
+ ctx->Driver.BeginCallList( ctx, list );
+
+/* fprintf(stderr, "execute list %d\n", list); */
/* mesa_print_display_list( list ); */
ctx->CallDepth++;
OpCode opcode = n[0].opcode;
int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
- if (i >= 0 && i < ctx->listext.nr_opcodes) {
+ if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
ctx->listext.opcode[i].execute(ctx, &n[1]);
n += ctx->listext.opcode[i].size;
}
else {
switch (opcode) {
case OPCODE_ERROR:
- gl_error( ctx, n[1].e, (const char *) n[2].data );
+ _mesa_error( ctx, n[1].e, (const char *) n[2].data );
break;
case OPCODE_ACCUM:
(*ctx->Exec->Accum)( n[1].e, n[2].f );
(*ctx->Exec->ClearDepth)( (GLclampd) n[1].f );
break;
case OPCODE_CLEAR_INDEX:
- (*ctx->Exec->ClearIndex)( n[1].ui );
+ (*ctx->Exec->ClearIndex)( (GLfloat) n[1].ui );
break;
case OPCODE_CLEAR_STENCIL:
(*ctx->Exec->ClearStencil)( n[1].i );
case OPCODE_HINT:
(*ctx->Exec->Hint)( n[1].e, n[2].e );
break;
- case OPCODE_HINT_PGI:
- (*ctx->Exec->HintPGI)( n[1].e, n[2].i );
- break;
case OPCODE_HISTOGRAM:
(*ctx->Exec->Histogram)( n[1].e, n[2].i, n[3].e, n[4].b );
break;
case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */
(*ctx->Exec->ActiveTextureARB)( n[1].e );
break;
- case OPCODE_CLIENT_ACTIVE_TEXTURE: /* GL_ARB_multitexture */
- (*ctx->Exec->ClientActiveTextureARB)( n[1].e );
- break;
case OPCODE_PIXEL_TEXGEN_SGIX: /* GL_SGIX_pixel_texture */
(*ctx->Exec->PixelTexGenSGIX)( n[1].e );
break;
n[4].i, n[5].i, n[6].i, n[7].i, n[8].i,
n[9].e, n[10].i, n[11].data);
break;
+ case OPCODE_SAMPLE_COVERAGE: /* GL_ARB_multisample */
+ (*ctx->Exec->SampleCoverageARB)(n[1].f, n[2].b);
+ break;
+ case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */
+ (*ctx->Exec->WindowPos3fARB)( n[1].f, n[2].f, n[3].f );
+ break;
+ case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */
+ (*ctx->Exec->BindProgramNV)( n[1].e, n[2].ui );
+ break;
+ case OPCODE_EXECUTE_PROGRAM_NV:
+ {
+ GLfloat v[4];
+ v[0] = n[3].f;
+ v[1] = n[4].f;
+ v[2] = n[5].f;
+ v[3] = n[6].f;
+ (*ctx->Exec->ExecuteProgramNV)(n[1].e, n[2].ui, v);
+ }
+ break;
+ case OPCODE_REQUEST_PROGRAMS_RESIDENT_NV:
+ /*
+ (*ctx->Exec->RequestResidentProgramsNV)();
+ */
+ break;
+ case OPCODE_LOAD_PROGRAM_NV:
+ /*
+ (*ctx->Exec->LoadProgramNV)();
+ */
+ break;
+ case OPCODE_PROGRAM_PARAMETER4F_NV:
+ (*ctx->Exec->ProgramParameter4fNV)(n[1].e, n[2].ui, n[3].f,
+ n[4].f, n[5].f, n[6].f);
+ break;
+ case OPCODE_PROGRAM_PARAMETERS4FV_NV:
+ /*
+ (*ctx->Exec->ProgramParameters4fvNV)();
+ */
+ break;
+ case OPCODE_TRACK_MATRIX_NV:
+ (*ctx->Exec->TrackMatrixNV)(n[1].e, n[2].ui, n[3].e, n[4].e);
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
{
char msg[1000];
sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode);
- gl_problem( ctx, msg );
+ _mesa_problem( ctx, msg );
}
done = GL_TRUE;
}
}
}
ctx->CallDepth--;
+
+ if (ctx->Driver.EndCallList)
+ ctx->Driver.EndCallList( ctx );
}
_mesa_IsList( GLuint list )
{
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
return islist(ctx, list);
}
{
GET_CURRENT_CONTEXT(ctx);
GLuint i;
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glDeleteLists");
if (range<0) {
- gl_error( ctx, GL_INVALID_VALUE, "glDeleteLists" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glDeleteLists" );
return;
}
for (i=list;i<list+range;i++) {
- gl_destroy_list( ctx, i );
+ _mesa_destroy_list( ctx, i );
}
}
{
GET_CURRENT_CONTEXT(ctx);
GLuint base;
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, "glGenLists", 0);
if (range<0) {
- gl_error( ctx, GL_INVALID_VALUE, "glGenLists" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glGenLists" );
return 0;
}
if (range==0) {
_mesa_NewList( GLuint list, GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glNewList");
- FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
+ FLUSH_CURRENT(ctx, 0); /* must be called before assert */
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glNewList %u %s\n", list, gl_lookup_enum_by_nr(mode));
+ fprintf(stderr, "glNewList %u %s\n", list, _mesa_lookup_enum_by_nr(mode));
if (list==0) {
- gl_error( ctx, GL_INVALID_VALUE, "glNewList" );
+ _mesa_error( ctx, GL_INVALID_VALUE, "glNewList" );
return;
}
if (mode!=GL_COMPILE && mode!=GL_COMPILE_AND_EXECUTE) {
- gl_error( ctx, GL_INVALID_ENUM, "glNewList" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "glNewList" );
return;
}
if (ctx->CurrentListPtr) {
/* already compiling a display list */
- gl_error( ctx, GL_INVALID_OPERATION, "glNewList" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" );
return;
}
/*
- * End definition of current display list. Is the current
+ * End definition of current display list. Is the current
* ASSERT_OUTSIDE_BEGIN_END strong enough to really guarentee that
* we are outside begin/end calls?
*/
_mesa_EndList( void )
{
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_CURRENT(ctx, 0); /* must be called before assert */
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
fprintf(stderr, "glEndList\n");
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, "glEndList" );
- FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
-
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx ); /* ??? */
/* Check that a list is under construction */
if (!ctx->CurrentListPtr) {
- gl_error( ctx, GL_INVALID_OPERATION, "glEndList" );
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glEndList" );
return;
}
(void) ALLOC_INSTRUCTION( ctx, OPCODE_END_OF_LIST, 0 );
/* Destroy old list, if any */
- gl_destroy_list(ctx, ctx->CurrentListNum);
+ _mesa_destroy_list(ctx, ctx->CurrentListNum);
/* Install the list */
_mesa_HashInsert(ctx->Shared->DisplayList, ctx->CurrentListNum, ctx->CurrentListPtr);
ctx->Driver.EndList( ctx );
- /* Haven't tracked down why this is needed.
- */
- ctx->NewState = ~0;
-
ctx->CurrentDispatch = ctx->Exec;
_glapi_set_dispatch( ctx->CurrentDispatch );
+
}
void
_mesa_CallList( GLuint list )
{
+ GLboolean save_compile_flag;
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_CURRENT(ctx, 0);
/* VERY IMPORTANT: Save the CompileFlag status, turn it off, */
/* execute the display list, and restore the CompileFlag. */
- GLboolean save_compile_flag;
- if (MESA_VERBOSE&VERBOSE_API) {
- fprintf(stderr, "glCallList %u\n", list);
- mesa_print_display_list( list );
- }
+/* mesa_print_display_list( list ); */
save_compile_flag = ctx->CompileFlag;
- ctx->CompileFlag = GL_FALSE;
+ if (save_compile_flag) {
+ ctx->CompileFlag = GL_FALSE;
+ }
- FLUSH_TNL( ctx, (FLUSH_STORED_VERTICES | FLUSH_UPDATE_CURRENT) );
execute_list( ctx, list );
ctx->CompileFlag = save_compile_flag;
save_compile_flag = ctx->CompileFlag;
ctx->CompileFlag = GL_FALSE;
- FLUSH_TNL( ctx, (FLUSH_STORED_VERTICES | FLUSH_UPDATE_CURRENT) );
-
for (i=0;i<n;i++) {
list = translate_id( i, type, lists );
execute_list( ctx, ctx->List.ListBase + list );
_mesa_ListBase( GLuint base )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glListBase");
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
ctx->List.ListBase = base;
}
-
-
-/*
- * Assign all the pointers in <table> to point to Mesa's display list
- * building functions.
- *
- * This does not include any of the tnl functions - they are
- * initialized from _mesa_init_api_defaults and from the active vtxfmt
- * struct.
+/* Can no longer assume ctx->Exec->Func is equal to _mesa_Func.
*/
-void
-_mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize )
+static void exec_Finish( void )
{
- _mesa_init_no_op_table(table, tableSize);
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->Finish();
+}
- _mesa_loopback_init_api_table( table, GL_FALSE );
+static void exec_Flush( void )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->Flush( );
+}
+
+static void exec_GetBooleanv( GLenum pname, GLboolean *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetBooleanv( pname, params );
+}
+
+static void exec_GetClipPlane( GLenum plane, GLdouble *equation )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetClipPlane( plane, equation );
+}
+
+static void exec_GetDoublev( GLenum pname, GLdouble *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetDoublev( pname, params );
+}
+
+static GLenum exec_GetError( void )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ return ctx->Exec->GetError( );
+}
+
+static void exec_GetFloatv( GLenum pname, GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetFloatv( pname, params );
+}
+
+static void exec_GetIntegerv( GLenum pname, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetIntegerv( pname, params );
+}
+
+static void exec_GetLightfv( GLenum light, GLenum pname, GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetLightfv( light, pname, params );
+}
+
+static void exec_GetLightiv( GLenum light, GLenum pname, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetLightiv( light, pname, params );
+}
+
+static void exec_GetMapdv( GLenum target, GLenum query, GLdouble *v )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMapdv( target, query, v );
+}
+
+static void exec_GetMapfv( GLenum target, GLenum query, GLfloat *v )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMapfv( target, query, v );
+}
+
+static void exec_GetMapiv( GLenum target, GLenum query, GLint *v )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMapiv( target, query, v );
+}
+
+static void exec_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMaterialfv( face, pname, params );
+}
+
+static void exec_GetMaterialiv( GLenum face, GLenum pname, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMaterialiv( face, pname, params );
+}
+
+static void exec_GetPixelMapfv( GLenum map, GLfloat *values )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetPixelMapfv( map, values );
+}
+
+static void exec_GetPixelMapuiv( GLenum map, GLuint *values )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetPixelMapuiv( map, values );
+}
+
+static void exec_GetPixelMapusv( GLenum map, GLushort *values )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetPixelMapusv( map, values );
+}
+
+static void exec_GetPolygonStipple( GLubyte *dest )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetPolygonStipple( dest );
+}
+
+static const GLubyte *exec_GetString( GLenum name )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ return ctx->Exec->GetString( name );
+}
+
+static void exec_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexEnvfv( target, pname, params );
+}
+
+static void exec_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexEnviv( target, pname, params );
+}
+
+static void exec_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexGendv( coord, pname, params );
+}
+
+static void exec_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexGenfv( coord, pname, params );
+}
+
+static void exec_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexGeniv( coord, pname, params );
+}
+
+static void exec_GetTexImage( GLenum target, GLint level, GLenum format,
+ GLenum type, GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexImage( target, level, format, type, pixels );
+}
+
+static void exec_GetTexLevelParameterfv( GLenum target, GLint level,
+ GLenum pname, GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexLevelParameterfv( target, level, pname, params );
+}
+
+static void exec_GetTexLevelParameteriv( GLenum target, GLint level,
+ GLenum pname, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexLevelParameteriv( target, level, pname, params );
+}
+
+static void exec_GetTexParameterfv( GLenum target, GLenum pname,
+ GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexParameterfv( target, pname, params );
+}
+
+static void exec_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetTexParameteriv( target, pname, params );
+}
+
+static GLboolean exec_IsEnabled( GLenum cap )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ return ctx->Exec->IsEnabled( cap );
+}
+
+static void exec_PixelStoref( GLenum pname, GLfloat param )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->PixelStoref( pname, param );
+}
+
+static void exec_PixelStorei( GLenum pname, GLint param )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->PixelStorei( pname, param );
+}
+
+static void exec_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
+ GLenum format, GLenum type, GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->ReadPixels( x, y, width, height, format, type, pixels );
+}
+
+static GLint exec_RenderMode( GLenum mode )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ return ctx->Exec->RenderMode( mode );
+}
+
+static void exec_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->FeedbackBuffer( size, type, buffer );
+}
+
+static void exec_SelectBuffer( GLsizei size, GLuint *buffer )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->SelectBuffer( size, buffer );
+}
+
+static GLboolean exec_AreTexturesResident(GLsizei n, const GLuint *texName,
+ GLboolean *residences)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ return ctx->Exec->AreTexturesResident( n, texName, residences);
+}
+
+static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->ColorPointer( size, type, stride, ptr);
+}
+
+static void exec_DeleteTextures( GLsizei n, const GLuint *texName)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->DeleteTextures( n, texName);
+}
+
+static void exec_DisableClientState( GLenum cap )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->DisableClientState( cap );
+}
+
+static void exec_EdgeFlagPointer(GLsizei stride, const void *vptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->EdgeFlagPointer( stride, vptr);
+}
+
+static void exec_EnableClientState( GLenum cap )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->EnableClientState( cap );
+}
+
+static void exec_GenTextures( GLsizei n, GLuint *texName )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GenTextures( n, texName );
+}
+
+static void exec_GetPointerv( GLenum pname, GLvoid **params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetPointerv( pname, params );
+}
+
+static void exec_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->IndexPointer( type, stride, ptr);
+}
+
+static void exec_InterleavedArrays(GLenum format, GLsizei stride,
+ const GLvoid *pointer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->InterleavedArrays( format, stride, pointer);
+}
+
+static GLboolean exec_IsTexture( GLuint texture )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ return ctx->Exec->IsTexture( texture );
+}
+
+static void exec_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->NormalPointer( type, stride, ptr );
+}
+
+static void exec_PopClientAttrib(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->PopClientAttrib();
+}
+
+static void exec_PushClientAttrib(GLbitfield mask)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->PushClientAttrib( mask);
+}
+
+static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->TexCoordPointer( size, type, stride, ptr);
+}
+
+static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
+ GLvoid *img)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetCompressedTexImageARB( target, level, img);
+}
+
+static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->VertexPointer( size, type, stride, ptr);
+}
+
+static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
+ GLint x, GLint y, GLsizei width)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->CopyConvolutionFilter1D( target, internalFormat, x, y, width);
+}
+
+static void exec_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat,
+ GLint x, GLint y, GLsizei width,
+ GLsizei height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->CopyConvolutionFilter2D( target, internalFormat, x, y, width,
+ height);
+}
+
+static void exec_GetColorTable( GLenum target, GLenum format,
+ GLenum type, GLvoid *data )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetColorTable( target, format, type, data );
+}
+
+static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
+ GLfloat *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetColorTableParameterfv( target, pname, params );
+}
+
+static void exec_GetColorTableParameteriv( GLenum target, GLenum pname,
+ GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetColorTableParameteriv( target, pname, params );
+}
+
+static void exec_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
+ GLvoid *image)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetConvolutionFilter( target, format, type, image);
+}
+
+static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
+ GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetConvolutionParameterfv( target, pname, params);
+}
+
+static void exec_GetConvolutionParameteriv(GLenum target, GLenum pname,
+ GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetConvolutionParameteriv( target, pname, params);
+}
+
+static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
+ GLenum type, GLvoid *values)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetHistogram( target, reset, format, type, values);
+}
+
+static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
+ GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetHistogramParameterfv( target, pname, params);
+}
+
+static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
+ GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetHistogramParameteriv( target, pname, params);
+}
+
+static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
+ GLenum type, GLvoid *values)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMinmax( target, reset, format, type, values);
+}
+
+static void exec_GetMinmaxParameterfv(GLenum target, GLenum pname,
+ GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMinmaxParameterfv( target, pname, params);
+}
+
+static void exec_GetMinmaxParameteriv(GLenum target, GLenum pname,
+ GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetMinmaxParameteriv( target, pname, params);
+}
+
+static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
+ GLvoid *row, GLvoid *column, GLvoid *span)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetSeparableFilter( target, format, type, row, column, span);
+}
+
+static void exec_SeparableFilter2D(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLenum format,
+ GLenum type, const GLvoid *row,
+ const GLvoid *column)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->SeparableFilter2D( target, internalFormat, width, height, format,
+ type, row, column);
+}
+
+static void exec_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetPixelTexGenParameterivSGIS( target, value);
+}
+
+static void exec_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->GetPixelTexGenParameterfvSGIS( target, value);
+}
+
+static void exec_ColorPointerEXT(GLint size, GLenum type, GLsizei stride,
+ GLsizei count, const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->ColorPointerEXT( size, type, stride, count, ptr);
+}
+
+static void exec_EdgeFlagPointerEXT(GLsizei stride, GLsizei count,
+ const GLboolean *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->EdgeFlagPointerEXT( stride, count, ptr);
+}
+
+static void exec_IndexPointerEXT(GLenum type, GLsizei stride, GLsizei count,
+ const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->IndexPointerEXT( type, stride, count, ptr);
+}
+
+static void exec_NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count,
+ const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->NormalPointerEXT( type, stride, count, ptr);
+}
+
+static void exec_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
+ GLsizei count, const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->TexCoordPointerEXT( size, type, stride, count, ptr);
+}
+
+static void exec_VertexPointerEXT(GLint size, GLenum type, GLsizei stride,
+ GLsizei count, const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->VertexPointerEXT( size, type, stride, count, ptr);
+}
+
+static void exec_LockArraysEXT(GLint first, GLsizei count)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->LockArraysEXT( first, count);
+}
+
+static void exec_UnlockArraysEXT( void )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->UnlockArraysEXT( );
+}
+
+static void exec_ResizeBuffersMESA( void )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->ResizeBuffersMESA( );
+}
+
+
+static void exec_ClientActiveTextureARB( GLenum target )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->ClientActiveTextureARB(target);
+}
+
+static void exec_SecondaryColorPointerEXT(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->SecondaryColorPointerEXT( size, type, stride, ptr);
+}
+
+static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
+ const GLvoid *ptr)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->FogCoordPointerEXT( type, stride, ptr);
+}
+
+
+/*
+ * Assign all the pointers in <table> to point to Mesa's display list
+ * building functions.
+ *
+ * This does not include any of the tnl functions - they are
+ * initialized from _mesa_init_api_defaults and from the active vtxfmt
+ * struct.
+ */
+void
+_mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize )
+{
+ _mesa_init_no_op_table(table, tableSize);
+
+ _mesa_loopback_init_api_table( table, GL_TRUE );
/* GL 1.0 */
table->Accum = save_Accum;
table->AlphaFunc = save_AlphaFunc;
table->Bitmap = save_Bitmap;
table->BlendFunc = save_BlendFunc;
- table->CallList = save_CallList;
- table->CallLists = save_CallLists;
+ table->CallList = _mesa_save_CallList;
+ table->CallLists = _mesa_save_CallLists;
table->Clear = save_Clear;
table->ClearAccum = save_ClearAccum;
table->ClearColor = save_ClearColor;
table->EndList = _mesa_EndList;
table->EvalMesh1 = _mesa_save_EvalMesh1;
table->EvalMesh2 = _mesa_save_EvalMesh2;
- table->Finish = _mesa_Finish;
- table->Flush = _mesa_Flush;
+ table->Finish = exec_Finish;
+ table->Flush = exec_Flush;
table->Fogf = save_Fogf;
table->Fogfv = save_Fogfv;
table->Fogi = save_Fogi;
table->FrontFace = save_FrontFace;
table->Frustum = save_Frustum;
table->GenLists = _mesa_GenLists;
- table->GetBooleanv = _mesa_GetBooleanv;
- table->GetClipPlane = _mesa_GetClipPlane;
- table->GetDoublev = _mesa_GetDoublev;
- table->GetError = _mesa_GetError;
- table->GetFloatv = _mesa_GetFloatv;
- table->GetIntegerv = _mesa_GetIntegerv;
- table->GetLightfv = _mesa_GetLightfv;
- table->GetLightiv = _mesa_GetLightiv;
- table->GetMapdv = _mesa_GetMapdv;
- table->GetMapfv = _mesa_GetMapfv;
- table->GetMapiv = _mesa_GetMapiv;
- table->GetMaterialfv = _mesa_GetMaterialfv;
- table->GetMaterialiv = _mesa_GetMaterialiv;
- table->GetPixelMapfv = _mesa_GetPixelMapfv;
- table->GetPixelMapuiv = _mesa_GetPixelMapuiv;
- table->GetPixelMapusv = _mesa_GetPixelMapusv;
- table->GetPolygonStipple = _mesa_GetPolygonStipple;
- table->GetString = _mesa_GetString;
- table->GetTexEnvfv = _mesa_GetTexEnvfv;
- table->GetTexEnviv = _mesa_GetTexEnviv;
- table->GetTexGendv = _mesa_GetTexGendv;
- table->GetTexGenfv = _mesa_GetTexGenfv;
- table->GetTexGeniv = _mesa_GetTexGeniv;
- table->GetTexImage = _mesa_GetTexImage;
- table->GetTexLevelParameterfv = _mesa_GetTexLevelParameterfv;
- table->GetTexLevelParameteriv = _mesa_GetTexLevelParameteriv;
- table->GetTexParameterfv = _mesa_GetTexParameterfv;
- table->GetTexParameteriv = _mesa_GetTexParameteriv;
+ table->GetBooleanv = exec_GetBooleanv;
+ table->GetClipPlane = exec_GetClipPlane;
+ table->GetDoublev = exec_GetDoublev;
+ table->GetError = exec_GetError;
+ table->GetFloatv = exec_GetFloatv;
+ table->GetIntegerv = exec_GetIntegerv;
+ table->GetLightfv = exec_GetLightfv;
+ table->GetLightiv = exec_GetLightiv;
+ table->GetMapdv = exec_GetMapdv;
+ table->GetMapfv = exec_GetMapfv;
+ table->GetMapiv = exec_GetMapiv;
+ table->GetMaterialfv = exec_GetMaterialfv;
+ table->GetMaterialiv = exec_GetMaterialiv;
+ table->GetPixelMapfv = exec_GetPixelMapfv;
+ table->GetPixelMapuiv = exec_GetPixelMapuiv;
+ table->GetPixelMapusv = exec_GetPixelMapusv;
+ table->GetPolygonStipple = exec_GetPolygonStipple;
+ table->GetString = exec_GetString;
+ table->GetTexEnvfv = exec_GetTexEnvfv;
+ table->GetTexEnviv = exec_GetTexEnviv;
+ table->GetTexGendv = exec_GetTexGendv;
+ table->GetTexGenfv = exec_GetTexGenfv;
+ table->GetTexGeniv = exec_GetTexGeniv;
+ table->GetTexImage = exec_GetTexImage;
+ table->GetTexLevelParameterfv = exec_GetTexLevelParameterfv;
+ table->GetTexLevelParameteriv = exec_GetTexLevelParameteriv;
+ table->GetTexParameterfv = exec_GetTexParameterfv;
+ table->GetTexParameteriv = exec_GetTexParameteriv;
table->Hint = save_Hint;
table->IndexMask = save_IndexMask;
table->InitNames = save_InitNames;
- table->IsEnabled = _mesa_IsEnabled;
+ table->IsEnabled = exec_IsEnabled;
table->IsList = _mesa_IsList;
table->LightModelf = save_LightModelf;
table->LightModelfv = save_LightModelfv;
table->PixelMapfv = save_PixelMapfv;
table->PixelMapuiv = save_PixelMapuiv;
table->PixelMapusv = save_PixelMapusv;
- table->PixelStoref = _mesa_PixelStoref;
- table->PixelStorei = _mesa_PixelStorei;
+ table->PixelStoref = exec_PixelStoref;
+ table->PixelStorei = exec_PixelStorei;
table->PixelTransferf = save_PixelTransferf;
table->PixelTransferi = save_PixelTransferi;
table->PixelZoom = save_PixelZoom;
table->RasterPos4s = save_RasterPos4s;
table->RasterPos4sv = save_RasterPos4sv;
table->ReadBuffer = save_ReadBuffer;
- table->ReadPixels = _mesa_ReadPixels;
- table->RenderMode = _mesa_RenderMode;
+ table->ReadPixels = exec_ReadPixels;
+ table->RenderMode = exec_RenderMode;
table->Rotated = save_Rotated;
table->Rotatef = save_Rotatef;
table->Scaled = save_Scaled;
table->Scalef = save_Scalef;
table->Scissor = save_Scissor;
- table->FeedbackBuffer = _mesa_FeedbackBuffer;
- table->SelectBuffer = _mesa_SelectBuffer;
+ table->FeedbackBuffer = exec_FeedbackBuffer;
+ table->SelectBuffer = exec_SelectBuffer;
table->ShadeModel = save_ShadeModel;
table->StencilFunc = save_StencilFunc;
table->StencilMask = save_StencilMask;
table->Viewport = save_Viewport;
/* GL 1.1 */
- table->AreTexturesResident = _mesa_AreTexturesResident;
+ table->AreTexturesResident = exec_AreTexturesResident;
table->BindTexture = save_BindTexture;
- table->ColorPointer = _mesa_ColorPointer;
+ table->ColorPointer = exec_ColorPointer;
table->CopyTexImage1D = save_CopyTexImage1D;
table->CopyTexImage2D = save_CopyTexImage2D;
table->CopyTexSubImage1D = save_CopyTexSubImage1D;
table->CopyTexSubImage2D = save_CopyTexSubImage2D;
- table->DeleteTextures = _mesa_DeleteTextures;
- table->DisableClientState = _mesa_DisableClientState;
- table->EdgeFlagPointer = _mesa_EdgeFlagPointer;
- table->EnableClientState = _mesa_EnableClientState;
- table->GenTextures = _mesa_GenTextures;
- table->GetPointerv = _mesa_GetPointerv;
- table->IndexPointer = _mesa_IndexPointer;
- table->InterleavedArrays = _mesa_InterleavedArrays;
- table->IsTexture = _mesa_IsTexture;
- table->NormalPointer = _mesa_NormalPointer;
- table->PopClientAttrib = _mesa_PopClientAttrib;
+ table->DeleteTextures = exec_DeleteTextures;
+ table->DisableClientState = exec_DisableClientState;
+ table->EdgeFlagPointer = exec_EdgeFlagPointer;
+ table->EnableClientState = exec_EnableClientState;
+ table->GenTextures = exec_GenTextures;
+ table->GetPointerv = exec_GetPointerv;
+ table->IndexPointer = exec_IndexPointer;
+ table->InterleavedArrays = exec_InterleavedArrays;
+ table->IsTexture = exec_IsTexture;
+ table->NormalPointer = exec_NormalPointer;
+ table->PopClientAttrib = exec_PopClientAttrib;
table->PrioritizeTextures = save_PrioritizeTextures;
- table->PushClientAttrib = _mesa_PushClientAttrib;
- table->TexCoordPointer = _mesa_TexCoordPointer;
+ table->PushClientAttrib = exec_PushClientAttrib;
+ table->TexCoordPointer = exec_TexCoordPointer;
table->TexSubImage1D = save_TexSubImage1D;
table->TexSubImage2D = save_TexSubImage2D;
- table->VertexPointer = _mesa_VertexPointer;
+ table->VertexPointer = exec_VertexPointer;
/* GL 1.2 */
table->CopyTexSubImage3D = save_CopyTexSubImage3D;
table->ConvolutionParameteriv = save_ConvolutionParameteriv;
table->CopyColorSubTable = save_CopyColorSubTable;
table->CopyColorTable = save_CopyColorTable;
- table->CopyConvolutionFilter1D = _mesa_CopyConvolutionFilter1D;
- table->CopyConvolutionFilter2D = _mesa_CopyConvolutionFilter2D;
- table->GetColorTable = _mesa_GetColorTable;
- table->GetColorTableParameterfv = _mesa_GetColorTableParameterfv;
- table->GetColorTableParameteriv = _mesa_GetColorTableParameteriv;
- table->GetConvolutionFilter = _mesa_GetConvolutionFilter;
- table->GetConvolutionParameterfv = _mesa_GetConvolutionParameterfv;
- table->GetConvolutionParameteriv = _mesa_GetConvolutionParameteriv;
- table->GetHistogram = _mesa_GetHistogram;
- table->GetHistogramParameterfv = _mesa_GetHistogramParameterfv;
- table->GetHistogramParameteriv = _mesa_GetHistogramParameteriv;
- table->GetMinmax = _mesa_GetMinmax;
- table->GetMinmaxParameterfv = _mesa_GetMinmaxParameterfv;
- table->GetMinmaxParameteriv = _mesa_GetMinmaxParameteriv;
- table->GetSeparableFilter = _mesa_GetSeparableFilter;
+ table->CopyConvolutionFilter1D = exec_CopyConvolutionFilter1D;
+ table->CopyConvolutionFilter2D = exec_CopyConvolutionFilter2D;
+ table->GetColorTable = exec_GetColorTable;
+ table->GetColorTableParameterfv = exec_GetColorTableParameterfv;
+ table->GetColorTableParameteriv = exec_GetColorTableParameteriv;
+ table->GetConvolutionFilter = exec_GetConvolutionFilter;
+ table->GetConvolutionParameterfv = exec_GetConvolutionParameterfv;
+ table->GetConvolutionParameteriv = exec_GetConvolutionParameteriv;
+ table->GetHistogram = exec_GetHistogram;
+ table->GetHistogramParameterfv = exec_GetHistogramParameterfv;
+ table->GetHistogramParameteriv = exec_GetHistogramParameteriv;
+ table->GetMinmax = exec_GetMinmax;
+ table->GetMinmaxParameterfv = exec_GetMinmaxParameterfv;
+ table->GetMinmaxParameteriv = exec_GetMinmaxParameteriv;
+ table->GetSeparableFilter = exec_GetSeparableFilter;
table->Histogram = save_Histogram;
table->Minmax = save_Minmax;
table->ResetHistogram = save_ResetHistogram;
table->ResetMinmax = save_ResetMinmax;
- table->SeparableFilter2D = _mesa_SeparableFilter2D;
+ table->SeparableFilter2D = exec_SeparableFilter2D;
/* 2. GL_EXT_blend_color */
#if 0
table->PixelTexGenParameterfSGIS = save_PixelTexGenParameterfSGIS;
table->PixelTexGenParameterivSGIS = save_PixelTexGenParameterivSGIS;
table->PixelTexGenParameterfvSGIS = save_PixelTexGenParameterfvSGIS;
- table->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS;
- table->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS;
+ table->GetPixelTexGenParameterivSGIS = exec_GetPixelTexGenParameterivSGIS;
+ table->GetPixelTexGenParameterfvSGIS = exec_GetPixelTexGenParameterfvSGIS;
/* 30. GL_EXT_vertex_array */
- table->ColorPointerEXT = _mesa_ColorPointerEXT;
- table->EdgeFlagPointerEXT = _mesa_EdgeFlagPointerEXT;
- table->IndexPointerEXT = _mesa_IndexPointerEXT;
- table->NormalPointerEXT = _mesa_NormalPointerEXT;
- table->TexCoordPointerEXT = _mesa_TexCoordPointerEXT;
- table->VertexPointerEXT = _mesa_VertexPointerEXT;
+ table->ColorPointerEXT = exec_ColorPointerEXT;
+ table->EdgeFlagPointerEXT = exec_EdgeFlagPointerEXT;
+ table->IndexPointerEXT = exec_IndexPointerEXT;
+ table->NormalPointerEXT = exec_NormalPointerEXT;
+ table->TexCoordPointerEXT = exec_TexCoordPointerEXT;
+ table->VertexPointerEXT = exec_VertexPointerEXT;
/* 37. GL_EXT_blend_minmax */
#if 0
table->PointParameterfEXT = save_PointParameterfEXT;
table->PointParameterfvEXT = save_PointParameterfvEXT;
- /* 77. GL_PGI_misc_hints */
- table->HintPGI = save_HintPGI;
-
/* 78. GL_EXT_paletted_texture */
#if 0
table->ColorTableEXT = save_ColorTable;
table->ColorSubTableEXT = save_ColorSubTable;
#endif
- table->GetColorTableEXT = _mesa_GetColorTable;
- table->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
- table->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
+ table->GetColorTableEXT = exec_GetColorTable;
+ table->GetColorTableParameterfvEXT = exec_GetColorTableParameterfv;
+ table->GetColorTableParameterivEXT = exec_GetColorTableParameteriv;
/* 97. GL_EXT_compiled_vertex_array */
- table->LockArraysEXT = _mesa_LockArraysEXT;
- table->UnlockArraysEXT = _mesa_UnlockArraysEXT;
+ table->LockArraysEXT = exec_LockArraysEXT;
+ table->UnlockArraysEXT = exec_UnlockArraysEXT;
- /* GL_ARB_multitexture */
- table->ActiveTextureARB = save_ActiveTextureARB;
- table->ClientActiveTextureARB = save_ClientActiveTextureARB;
+ /* 145. GL_EXT_secondary_color */
+ table->SecondaryColorPointerEXT = exec_SecondaryColorPointerEXT;
+
+ /* 149. GL_EXT_fog_coord */
+ table->FogCoordPointerEXT = exec_FogCoordPointerEXT;
- /* GL_EXT_blend_func_separate */
+ /* 173. GL_EXT_blend_func_separate */
table->BlendFuncSeparateEXT = save_BlendFuncSeparateEXT;
- /* GL_MESA_window_pos */
+ /* 196. GL_MESA_resize_buffers */
+ table->ResizeBuffersMESA = exec_ResizeBuffersMESA;
+
+ /* 197. GL_MESA_window_pos */
table->WindowPos2dMESA = save_WindowPos2dMESA;
table->WindowPos2dvMESA = save_WindowPos2dvMESA;
table->WindowPos2fMESA = save_WindowPos2fMESA;
table->WindowPos4sMESA = save_WindowPos4sMESA;
table->WindowPos4svMESA = save_WindowPos4svMESA;
- /* GL_MESA_resize_buffers */
- table->ResizeBuffersMESA = _mesa_ResizeBuffersMESA;
+ /* 233. GL_NV_vertex_program */
+ /* XXX Need to implement vertex program in display lists !!! */
+ /* The following commands DO NOT go into display lists:
+ * AreProgramsResidentNV, IsProgramNV, GenProgramsNV, DeleteProgramsNV,
+ * VertexAttribPointerNV, GetProgram*, GetVertexAttrib*
+ */
+ table->BindProgramNV = save_BindProgramNV;
+ table->DeleteProgramsNV = _mesa_DeleteProgramsNV;
+ table->ExecuteProgramNV = save_ExecuteProgramNV;
+ table->GenProgramsNV = _mesa_GenProgramsNV;
+ table->AreProgramsResidentNV = _mesa_AreProgramsResidentNV;
+ table->RequestResidentProgramsNV = _mesa_RequestResidentProgramsNV;
+ table->GetProgramParameterfvNV = _mesa_GetProgramParameterfvNV;
+ table->GetProgramParameterdvNV = _mesa_GetProgramParameterdvNV;
+ table->GetProgramivNV = _mesa_GetProgramivNV;
+ table->GetProgramStringNV = _mesa_GetProgramStringNV;
+ table->GetTrackMatrixivNV = _mesa_GetTrackMatrixivNV;
+ table->GetVertexAttribdvNV = _mesa_GetVertexAttribdvNV;
+ table->GetVertexAttribfvNV = _mesa_GetVertexAttribfvNV;
+ table->GetVertexAttribivNV = _mesa_GetVertexAttribivNV;
+ table->GetVertexAttribPointervNV = _mesa_GetVertexAttribPointervNV;
+ table->IsProgramNV = _mesa_IsProgramNV;
+ table->LoadProgramNV = _mesa_LoadProgramNV;
+ table->ProgramParameter4dNV = save_ProgramParameter4dNV;
+ table->ProgramParameter4dvNV = save_ProgramParameter4dvNV;
+ table->ProgramParameter4fNV = save_ProgramParameter4fNV;
+ table->ProgramParameter4fvNV = save_ProgramParameter4fvNV;
+ table->ProgramParameters4dvNV = _mesa_ProgramParameters4dvNV;
+ table->ProgramParameters4fvNV = _mesa_ProgramParameters4fvNV;
+ table->TrackMatrixNV = save_TrackMatrixNV;
+ table->VertexAttribPointerNV = _mesa_VertexAttribPointerNV;
+
+ /* ARB 1. GL_ARB_multitexture */
+ table->ActiveTextureARB = save_ActiveTextureARB;
+ table->ClientActiveTextureARB = exec_ClientActiveTextureARB;
- /* GL_ARB_transpose_matrix */
+ /* ARB 3. GL_ARB_transpose_matrix */
table->LoadTransposeMatrixdARB = save_LoadTransposeMatrixdARB;
table->LoadTransposeMatrixfARB = save_LoadTransposeMatrixfARB;
table->MultTransposeMatrixdARB = save_MultTransposeMatrixdARB;
table->MultTransposeMatrixfARB = save_MultTransposeMatrixfARB;
+ /* ARB 5. GL_ARB_multisample */
+ table->SampleCoverageARB = save_SampleCoverageARB;
+
/* ARB 12. GL_ARB_texture_compression */
table->CompressedTexImage3DARB = save_CompressedTexImage3DARB;
table->CompressedTexImage2DARB = save_CompressedTexImage2DARB;
table->CompressedTexSubImage3DARB = save_CompressedTexSubImage3DARB;
table->CompressedTexSubImage2DARB = save_CompressedTexSubImage2DARB;
table->CompressedTexSubImage1DARB = save_CompressedTexSubImage1DARB;
- table->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB;
+ table->GetCompressedTexImageARB = exec_GetCompressedTexImageARB;
- /* GL_EXT_secondary_color */
- table->SecondaryColorPointerEXT = _mesa_SecondaryColorPointerEXT;
-
- /* GL_EXT_fog_coord */
- table->FogCoordPointerEXT = _mesa_FogCoordPointerEXT;
+ /* ARB ??. GL_ARB_window_pos */
+ table->WindowPos2dARB = save_WindowPos2dARB;
+ table->WindowPos2dvARB = save_WindowPos2dvARB;
+ table->WindowPos2fARB = save_WindowPos2fARB;
+ table->WindowPos2fvARB = save_WindowPos2fvARB;
+ table->WindowPos2iARB = save_WindowPos2iARB;
+ table->WindowPos2ivARB = save_WindowPos2ivARB;
+ table->WindowPos2sARB = save_WindowPos2sARB;
+ table->WindowPos2svARB = save_WindowPos2svARB;
+ table->WindowPos3dARB = save_WindowPos3dARB;
+ table->WindowPos3dvARB = save_WindowPos3dvARB;
+ table->WindowPos3fARB = save_WindowPos3fARB;
+ table->WindowPos3fvARB = save_WindowPos3fvARB;
+ table->WindowPos3iARB = save_WindowPos3iARB;
+ table->WindowPos3ivARB = save_WindowPos3ivARB;
+ table->WindowPos3sARB = save_WindowPos3sARB;
+ table->WindowPos3svARB = save_WindowPos3svARB;
}
***/
static const char *enum_string( GLenum k )
{
- return gl_lookup_enum_by_nr( k );
+ return _mesa_lookup_enum_by_nr( k );
}
done = n ? GL_FALSE : GL_TRUE;
while (!done) {
OpCode opcode = n[0].opcode;
- int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
+ GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0;
- if (i >= 0 && i < ctx->listext.nr_opcodes) {
+ if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
ctx->listext.opcode[i].print(ctx, &n[1]);
n += ctx->listext.opcode[i].size;
- } else {
+ }
+ else {
switch (opcode) {
case OPCODE_ACCUM:
fprintf(f,"accum %s %g\n", enum_string(n[1].e), n[2].f );
fprintf(f,"Translate %g %g %g\n", n[1].f, n[2].f, n[3].f );
break;
case OPCODE_BIND_TEXTURE:
- fprintf(f,"BindTexture %s %d\n", gl_lookup_enum_by_nr(n[1].ui),
+ fprintf(f,"BindTexture %s %d\n", _mesa_lookup_enum_by_nr(n[1].ui),
n[2].ui);
break;
case OPCODE_SHADE_MODEL:
- fprintf(f,"ShadeModel %s\n", gl_lookup_enum_by_nr(n[1].ui));
+ fprintf(f,"ShadeModel %s\n", _mesa_lookup_enum_by_nr(n[1].ui));
+ break;
+ case OPCODE_MAP1:
+ fprintf(f,"Map1 %s %.3f %.3f %d %d\n",
+ _mesa_lookup_enum_by_nr(n[1].ui),
+ n[2].f, n[3].f, n[4].i, n[5].i);
+ break;
+ case OPCODE_MAP2:
+ fprintf(f,"Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n",
+ _mesa_lookup_enum_by_nr(n[1].ui),
+ n[2].f, n[3].f, n[4].f, n[5].f,
+ n[6].i, n[7].i, n[8].i, n[9].i);
+ break;
+ case OPCODE_MAPGRID1:
+ fprintf(f,"MapGrid1 %d %.3f %.3f\n", n[1].i, n[2].f, n[3].f);
+ break;
+ case OPCODE_MAPGRID2:
+ fprintf(f,"MapGrid2 %d %.3f %.3f, %d %.3f %.3f\n",
+ n[1].i, n[2].f, n[3].f,
+ n[4].i, n[5].f, n[6].f);
+ break;
+ case OPCODE_EVALMESH1:
+ fprintf(f,"EvalMesh1 %d %d\n", n[1].i, n[2].i);
+ break;
+ case OPCODE_EVALMESH2:
+ fprintf(f,"EvalMesh2 %d %d %d %d\n",
+ n[1].i, n[2].i, n[3].i, n[4].i);
break;
/*