-/* $Id: dlist.c,v 1.65 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: dlist.c,v 1.84 2001/12/19 02:36:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
#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 "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"
/* 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_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,
/* 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;
}
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_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
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- FLUSH_VERTICES(ctx, 0);
+ 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;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
n = ALLOC_INSTRUCTION( ctx, OPCODE_CALL_LIST, 1 );
if (n) {
GET_CURRENT_CONTEXT(ctx);
GLint i;
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 );
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;
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;
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_SUB_TABLE, 6 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5 );
if (n) {
n[1].e = target;
n[2].i = start;
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_TABLE, 6 );
+ n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_TABLE, 5 );
if (n) {
n[1].e = target;
n[2].e = internalformat;
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6 );
+ 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;
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 );
GLfloat f[16];
GLint i;
for (i = 0; i < 16; i++) {
- f[i] = m[i];
+ f[i] = (GLfloat) m[i];
}
save_LoadMatrixf(f);
}
if (n) {
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;
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*/
static void save_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 )
{
- save_MapGrid1f(un, u1, u2);
+ save_MapGrid1f(un, (GLfloat) u1, (GLfloat) u2);
}
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);
}
GLfloat f[16];
GLint i;
for (i = 0; i < 16; i++) {
- f[i] = m[i];
+ f[i] = (GLfloat) m[i];
}
save_MultMatrixf(f);
}
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 );
{
GET_CURRENT_CONTEXT(ctx);
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)();
GET_CURRENT_CONTEXT(ctx);
Node *n;
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;
GET_CURRENT_CONTEXT(ctx);
Node *n;
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)
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);
}
static void save_Scaled( GLdouble x, GLdouble y, GLdouble z )
{
- save_Scalef(x, y, z);
+ save_Scalef((GLfloat) x, (GLfloat) y, (GLfloat) z);
}
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 );
}
}
-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;
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;
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;
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;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ACTIVE_TEXTURE, 1 );
+ 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;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLIENT_ACTIVE_TEXTURE, 1 );
+ 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] )
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;
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;
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;
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);
}
}
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;
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
}
+/*
+ * 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
}
+/*
+ * 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)
{
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;
}
(*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_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;
/*
- * 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?
*/
ctx->Exec->GetTexLevelParameteriv( target, level, pname, params );
}
-static void exec_GetTexParameterfv( GLenum target, GLenum pname,
+static void exec_GetTexParameterfv( GLenum target, GLenum pname,
GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
return ctx->Exec->AreTexturesResident( n, texName, residences);
}
-static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
+static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->IndexPointer( type, stride, ptr);
}
-static void exec_InterleavedArrays(GLenum format, GLsizei stride,
+static void exec_InterleavedArrays(GLenum format, GLsizei stride,
const GLvoid *pointer)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->PushClientAttrib( mask);
}
-static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
+static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->TexCoordPointer( size, type, stride, ptr);
}
-static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
+static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
GLvoid *img)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetCompressedTexImageARB( target, level, img);
}
-static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
+static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->VertexPointer( size, type, stride, ptr);
}
-static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
+static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetColorTable( target, format, type, data );
}
-static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
+static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetColorTableParameterfv( target, pname, params );
}
-static void exec_GetColorTableParameteriv( GLenum target, GLenum pname,
+static void exec_GetColorTableParameteriv( GLenum target, GLenum pname,
GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetConvolutionFilter( target, format, type, image);
}
-static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
+static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetConvolutionParameteriv( target, pname, params);
}
-static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
+static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetHistogram( target, reset, format, type, values);
}
-static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
+static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetHistogramParameterfv( target, pname, params);
}
-static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
+static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetHistogramParameteriv( target, pname, params);
}
-static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
+static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Exec->GetMinmaxParameteriv( target, pname, params);
}
-static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
+static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
GLvoid *row, GLvoid *column, GLvoid *span)
{
GET_CURRENT_CONTEXT(ctx);
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)
{
ctx->Exec->SecondaryColorPointerEXT( size, type, stride, ptr);
}
-static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
+static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
{
_mesa_init_no_op_table(table, tableSize);
- _mesa_loopback_init_api_table( table, GL_FALSE );
+ _mesa_loopback_init_api_table( table, GL_TRUE );
/* GL 1.0 */
table->Accum = save_Accum;
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;
- /* GL_EXT_blend_func_separate */
+ /* 149. GL_EXT_fog_coord */
+ table->FogCoordPointerEXT = exec_FogCoordPointerEXT;
+
+ /* 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 = exec_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->CompressedTexSubImage1DARB = save_CompressedTexSubImage1DARB;
table->GetCompressedTexImageARB = exec_GetCompressedTexImageARB;
- /* GL_EXT_secondary_color */
- table->SecondaryColorPointerEXT = exec_SecondaryColorPointerEXT;
-
- /* GL_EXT_fog_coord */
- table->FogCoordPointerEXT = exec_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;
}
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 );
case OPCODE_SHADE_MODEL:
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;
/*
* meta opcodes/commands