summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-02-26 18:18:12 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-02-26 18:18:12 +0000
commitc56f2c49a51e7ad1106c46e3e86dfe2756ef87c4 (patch)
tree801b7bb80a7f1f86ebe2a13481ef52f9cb4c4cab /src
parentbe42f5302091d792728172ba8fddebaddbddd0b1 (diff)
re-formated with indent.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/dlist.c4977
1 files changed, 2657 insertions, 2320 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 697f7d2050..dc4a973663 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -169,191 +169,191 @@ do { \
* The fact that these identifiers are assigned consecutive
* integer values starting at 0 is very important, see InstSize array usage)
*/
-typedef enum {
- OPCODE_INVALID = -1, /* Force signed enum */
- OPCODE_ACCUM,
- OPCODE_ALPHA_FUNC,
- OPCODE_BIND_TEXTURE,
- OPCODE_BITMAP,
- OPCODE_BLEND_COLOR,
- OPCODE_BLEND_EQUATION,
- OPCODE_BLEND_EQUATION_SEPARATE,
- OPCODE_BLEND_FUNC_SEPARATE,
- OPCODE_CALL_LIST,
- OPCODE_CALL_LIST_OFFSET,
- OPCODE_CLEAR,
- OPCODE_CLEAR_ACCUM,
- OPCODE_CLEAR_COLOR,
- OPCODE_CLEAR_DEPTH,
- OPCODE_CLEAR_INDEX,
- OPCODE_CLEAR_STENCIL,
- OPCODE_CLIP_PLANE,
- OPCODE_COLOR_MASK,
- OPCODE_COLOR_MATERIAL,
- OPCODE_COLOR_TABLE,
- OPCODE_COLOR_TABLE_PARAMETER_FV,
- OPCODE_COLOR_TABLE_PARAMETER_IV,
- OPCODE_COLOR_SUB_TABLE,
- OPCODE_CONVOLUTION_FILTER_1D,
- OPCODE_CONVOLUTION_FILTER_2D,
- OPCODE_CONVOLUTION_PARAMETER_I,
- OPCODE_CONVOLUTION_PARAMETER_IV,
- OPCODE_CONVOLUTION_PARAMETER_F,
- OPCODE_CONVOLUTION_PARAMETER_FV,
- OPCODE_COPY_COLOR_SUB_TABLE,
- OPCODE_COPY_COLOR_TABLE,
- OPCODE_COPY_PIXELS,
- OPCODE_COPY_TEX_IMAGE1D,
- OPCODE_COPY_TEX_IMAGE2D,
- OPCODE_COPY_TEX_SUB_IMAGE1D,
- OPCODE_COPY_TEX_SUB_IMAGE2D,
- OPCODE_COPY_TEX_SUB_IMAGE3D,
- OPCODE_CULL_FACE,
- OPCODE_DEPTH_FUNC,
- OPCODE_DEPTH_MASK,
- OPCODE_DEPTH_RANGE,
- OPCODE_DISABLE,
- OPCODE_DRAW_BUFFER,
- OPCODE_DRAW_PIXELS,
- OPCODE_ENABLE,
- OPCODE_EVALMESH1,
- OPCODE_EVALMESH2,
- OPCODE_FOG,
- OPCODE_FRONT_FACE,
- OPCODE_FRUSTUM,
- OPCODE_HINT,
- OPCODE_HISTOGRAM,
- OPCODE_INDEX_MASK,
- OPCODE_INIT_NAMES,
- OPCODE_LIGHT,
- OPCODE_LIGHT_MODEL,
- OPCODE_LINE_STIPPLE,
- OPCODE_LINE_WIDTH,
- OPCODE_LIST_BASE,
- OPCODE_LOAD_IDENTITY,
- OPCODE_LOAD_MATRIX,
- OPCODE_LOAD_NAME,
- OPCODE_LOGIC_OP,
- OPCODE_MAP1,
- OPCODE_MAP2,
- OPCODE_MAPGRID1,
- OPCODE_MAPGRID2,
- OPCODE_MATRIX_MODE,
- OPCODE_MIN_MAX,
- OPCODE_MULT_MATRIX,
- OPCODE_ORTHO,
- OPCODE_PASSTHROUGH,
- OPCODE_PIXEL_MAP,
- OPCODE_PIXEL_TRANSFER,
- OPCODE_PIXEL_ZOOM,
- OPCODE_POINT_SIZE,
- OPCODE_POINT_PARAMETERS,
- OPCODE_POLYGON_MODE,
- OPCODE_POLYGON_STIPPLE,
- OPCODE_POLYGON_OFFSET,
- OPCODE_POP_ATTRIB,
- OPCODE_POP_MATRIX,
- OPCODE_POP_NAME,
- OPCODE_PRIORITIZE_TEXTURE,
- OPCODE_PUSH_ATTRIB,
- OPCODE_PUSH_MATRIX,
- OPCODE_PUSH_NAME,
- OPCODE_RASTER_POS,
- OPCODE_READ_BUFFER,
- OPCODE_RESET_HISTOGRAM,
- OPCODE_RESET_MIN_MAX,
- OPCODE_ROTATE,
- OPCODE_SCALE,
- OPCODE_SCISSOR,
- OPCODE_SELECT_TEXTURE_SGIS,
- OPCODE_SELECT_TEXTURE_COORD_SET,
- OPCODE_SHADE_MODEL,
- OPCODE_STENCIL_FUNC,
- OPCODE_STENCIL_MASK,
- OPCODE_STENCIL_OP,
- OPCODE_TEXENV,
- OPCODE_TEXGEN,
- OPCODE_TEXPARAMETER,
- OPCODE_TEX_IMAGE1D,
- OPCODE_TEX_IMAGE2D,
- OPCODE_TEX_IMAGE3D,
- OPCODE_TEX_SUB_IMAGE1D,
- OPCODE_TEX_SUB_IMAGE2D,
- OPCODE_TEX_SUB_IMAGE3D,
- OPCODE_TRANSLATE,
- OPCODE_VIEWPORT,
- OPCODE_WINDOW_POS,
- /* GL_ARB_multitexture */
- OPCODE_ACTIVE_TEXTURE,
- /* GL_ARB_texture_compression */
- OPCODE_COMPRESSED_TEX_IMAGE_1D,
- OPCODE_COMPRESSED_TEX_IMAGE_2D,
- OPCODE_COMPRESSED_TEX_IMAGE_3D,
- 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_RESIDENT_PROGRAMS_NV,
- OPCODE_LOAD_PROGRAM_NV,
- OPCODE_PROGRAM_PARAMETER4F_NV,
- OPCODE_TRACK_MATRIX_NV,
- /* GL_NV_fragment_program */
- OPCODE_PROGRAM_LOCAL_PARAMETER_ARB,
- OPCODE_PROGRAM_NAMED_PARAMETER_NV,
- /* GL_EXT_stencil_two_side */
- OPCODE_ACTIVE_STENCIL_FACE_EXT,
- /* GL_EXT_depth_bounds_test */
- OPCODE_DEPTH_BOUNDS_EXT,
- /* GL_ARB_vertex/fragment_program */
- OPCODE_PROGRAM_STRING_ARB,
- OPCODE_PROGRAM_ENV_PARAMETER_ARB,
- /* GL_ARB_occlusion_query */
- OPCODE_BEGIN_QUERY_ARB,
- OPCODE_END_QUERY_ARB,
- /* GL_ARB_draw_buffers */
- OPCODE_DRAW_BUFFERS_ARB,
- /* GL_ATI_fragment_shader */
- OPCODE_BIND_FRAGMENT_SHADER_ATI,
- OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI,
- /* OpenGL 2.0 */
- OPCODE_STENCIL_FUNC_SEPARATE,
- OPCODE_STENCIL_OP_SEPARATE,
- OPCODE_STENCIL_MASK_SEPARATE,
-
- /* Vertex attributes -- fallback for when optimized display
- * list build isn't active.
- */
- OPCODE_ATTR_1F_NV,
- OPCODE_ATTR_2F_NV,
- OPCODE_ATTR_3F_NV,
- OPCODE_ATTR_4F_NV,
- OPCODE_ATTR_1F_ARB,
- OPCODE_ATTR_2F_ARB,
- OPCODE_ATTR_3F_ARB,
- OPCODE_ATTR_4F_ARB,
- OPCODE_MATERIAL,
- OPCODE_INDEX,
- OPCODE_EDGEFLAG,
- OPCODE_BEGIN,
- OPCODE_END,
- OPCODE_RECTF,
- OPCODE_EVAL_C1,
- OPCODE_EVAL_C2,
- OPCODE_EVAL_P1,
- OPCODE_EVAL_P2,
-
-
- /* The following three are meta instructions */
- OPCODE_ERROR, /* raise compiled-in error */
- OPCODE_CONTINUE,
- OPCODE_END_OF_LIST,
- OPCODE_EXT_0
+typedef enum
+{
+ OPCODE_INVALID = -1, /* Force signed enum */
+ OPCODE_ACCUM,
+ OPCODE_ALPHA_FUNC,
+ OPCODE_BIND_TEXTURE,
+ OPCODE_BITMAP,
+ OPCODE_BLEND_COLOR,
+ OPCODE_BLEND_EQUATION,
+ OPCODE_BLEND_EQUATION_SEPARATE,
+ OPCODE_BLEND_FUNC_SEPARATE,
+ OPCODE_CALL_LIST,
+ OPCODE_CALL_LIST_OFFSET,
+ OPCODE_CLEAR,
+ OPCODE_CLEAR_ACCUM,
+ OPCODE_CLEAR_COLOR,
+ OPCODE_CLEAR_DEPTH,
+ OPCODE_CLEAR_INDEX,
+ OPCODE_CLEAR_STENCIL,
+ OPCODE_CLIP_PLANE,
+ OPCODE_COLOR_MASK,
+ OPCODE_COLOR_MATERIAL,
+ OPCODE_COLOR_TABLE,
+ OPCODE_COLOR_TABLE_PARAMETER_FV,
+ OPCODE_COLOR_TABLE_PARAMETER_IV,
+ OPCODE_COLOR_SUB_TABLE,
+ OPCODE_CONVOLUTION_FILTER_1D,
+ OPCODE_CONVOLUTION_FILTER_2D,
+ OPCODE_CONVOLUTION_PARAMETER_I,
+ OPCODE_CONVOLUTION_PARAMETER_IV,
+ OPCODE_CONVOLUTION_PARAMETER_F,
+ OPCODE_CONVOLUTION_PARAMETER_FV,
+ OPCODE_COPY_COLOR_SUB_TABLE,
+ OPCODE_COPY_COLOR_TABLE,
+ OPCODE_COPY_PIXELS,
+ OPCODE_COPY_TEX_IMAGE1D,
+ OPCODE_COPY_TEX_IMAGE2D,
+ OPCODE_COPY_TEX_SUB_IMAGE1D,
+ OPCODE_COPY_TEX_SUB_IMAGE2D,
+ OPCODE_COPY_TEX_SUB_IMAGE3D,
+ OPCODE_CULL_FACE,
+ OPCODE_DEPTH_FUNC,
+ OPCODE_DEPTH_MASK,
+ OPCODE_DEPTH_RANGE,
+ OPCODE_DISABLE,
+ OPCODE_DRAW_BUFFER,
+ OPCODE_DRAW_PIXELS,
+ OPCODE_ENABLE,
+ OPCODE_EVALMESH1,
+ OPCODE_EVALMESH2,
+ OPCODE_FOG,
+ OPCODE_FRONT_FACE,
+ OPCODE_FRUSTUM,
+ OPCODE_HINT,
+ OPCODE_HISTOGRAM,
+ OPCODE_INDEX_MASK,
+ OPCODE_INIT_NAMES,
+ OPCODE_LIGHT,
+ OPCODE_LIGHT_MODEL,
+ OPCODE_LINE_STIPPLE,
+ OPCODE_LINE_WIDTH,
+ OPCODE_LIST_BASE,
+ OPCODE_LOAD_IDENTITY,
+ OPCODE_LOAD_MATRIX,
+ OPCODE_LOAD_NAME,
+ OPCODE_LOGIC_OP,
+ OPCODE_MAP1,
+ OPCODE_MAP2,
+ OPCODE_MAPGRID1,
+ OPCODE_MAPGRID2,
+ OPCODE_MATRIX_MODE,
+ OPCODE_MIN_MAX,
+ OPCODE_MULT_MATRIX,
+ OPCODE_ORTHO,
+ OPCODE_PASSTHROUGH,
+ OPCODE_PIXEL_MAP,
+ OPCODE_PIXEL_TRANSFER,
+ OPCODE_PIXEL_ZOOM,
+ OPCODE_POINT_SIZE,
+ OPCODE_POINT_PARAMETERS,
+ OPCODE_POLYGON_MODE,
+ OPCODE_POLYGON_STIPPLE,
+ OPCODE_POLYGON_OFFSET,
+ OPCODE_POP_ATTRIB,
+ OPCODE_POP_MATRIX,
+ OPCODE_POP_NAME,
+ OPCODE_PRIORITIZE_TEXTURE,
+ OPCODE_PUSH_ATTRIB,
+ OPCODE_PUSH_MATRIX,
+ OPCODE_PUSH_NAME,
+ OPCODE_RASTER_POS,
+ OPCODE_READ_BUFFER,
+ OPCODE_RESET_HISTOGRAM,
+ OPCODE_RESET_MIN_MAX,
+ OPCODE_ROTATE,
+ OPCODE_SCALE,
+ OPCODE_SCISSOR,
+ OPCODE_SELECT_TEXTURE_SGIS,
+ OPCODE_SELECT_TEXTURE_COORD_SET,
+ OPCODE_SHADE_MODEL,
+ OPCODE_STENCIL_FUNC,
+ OPCODE_STENCIL_MASK,
+ OPCODE_STENCIL_OP,
+ OPCODE_TEXENV,
+ OPCODE_TEXGEN,
+ OPCODE_TEXPARAMETER,
+ OPCODE_TEX_IMAGE1D,
+ OPCODE_TEX_IMAGE2D,
+ OPCODE_TEX_IMAGE3D,
+ OPCODE_TEX_SUB_IMAGE1D,
+ OPCODE_TEX_SUB_IMAGE2D,
+ OPCODE_TEX_SUB_IMAGE3D,
+ OPCODE_TRANSLATE,
+ OPCODE_VIEWPORT,
+ OPCODE_WINDOW_POS,
+ /* GL_ARB_multitexture */
+ OPCODE_ACTIVE_TEXTURE,
+ /* GL_ARB_texture_compression */
+ OPCODE_COMPRESSED_TEX_IMAGE_1D,
+ OPCODE_COMPRESSED_TEX_IMAGE_2D,
+ OPCODE_COMPRESSED_TEX_IMAGE_3D,
+ 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_RESIDENT_PROGRAMS_NV,
+ OPCODE_LOAD_PROGRAM_NV,
+ OPCODE_PROGRAM_PARAMETER4F_NV,
+ OPCODE_TRACK_MATRIX_NV,
+ /* GL_NV_fragment_program */
+ OPCODE_PROGRAM_LOCAL_PARAMETER_ARB,
+ OPCODE_PROGRAM_NAMED_PARAMETER_NV,
+ /* GL_EXT_stencil_two_side */
+ OPCODE_ACTIVE_STENCIL_FACE_EXT,
+ /* GL_EXT_depth_bounds_test */
+ OPCODE_DEPTH_BOUNDS_EXT,
+ /* GL_ARB_vertex/fragment_program */
+ OPCODE_PROGRAM_STRING_ARB,
+ OPCODE_PROGRAM_ENV_PARAMETER_ARB,
+ /* GL_ARB_occlusion_query */
+ OPCODE_BEGIN_QUERY_ARB,
+ OPCODE_END_QUERY_ARB,
+ /* GL_ARB_draw_buffers */
+ OPCODE_DRAW_BUFFERS_ARB,
+ /* GL_ATI_fragment_shader */
+ OPCODE_BIND_FRAGMENT_SHADER_ATI,
+ OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI,
+ /* OpenGL 2.0 */
+ OPCODE_STENCIL_FUNC_SEPARATE,
+ OPCODE_STENCIL_OP_SEPARATE,
+ OPCODE_STENCIL_MASK_SEPARATE,
+
+ /* Vertex attributes -- fallback for when optimized display
+ * list build isn't active.
+ */
+ OPCODE_ATTR_1F_NV,
+ OPCODE_ATTR_2F_NV,
+ OPCODE_ATTR_3F_NV,
+ OPCODE_ATTR_4F_NV,
+ OPCODE_ATTR_1F_ARB,
+ OPCODE_ATTR_2F_ARB,
+ OPCODE_ATTR_3F_ARB,
+ OPCODE_ATTR_4F_ARB,
+ OPCODE_MATERIAL,
+ OPCODE_INDEX,
+ OPCODE_EDGEFLAG,
+ OPCODE_BEGIN,
+ OPCODE_END,
+ OPCODE_RECTF,
+ OPCODE_EVAL_C1,
+ OPCODE_EVAL_C2,
+ OPCODE_EVAL_P1,
+ OPCODE_EVAL_P2,
+
+ /* The following three are meta instructions */
+ OPCODE_ERROR, /* raise compiled-in error */
+ OPCODE_CONTINUE,
+ OPCODE_END_OF_LIST,
+ OPCODE_EXT_0
} OpCode;
@@ -369,19 +369,20 @@ typedef enum {
* contiguous nodes in memory.
* Each node is the union of a variety of data types.
*/
-union node {
- OpCode opcode;
- GLboolean b;
- GLbitfield bf;
- GLubyte ub;
- GLshort s;
- GLushort us;
- GLint i;
- GLuint ui;
- GLenum e;
- GLfloat f;
- GLvoid *data;
- void *next; /* If prev node's opcode==OPCODE_CONTINUE */
+union node
+{
+ OpCode opcode;
+ GLboolean b;
+ GLbitfield bf;
+ GLubyte ub;
+ GLshort s;
+ GLushort us;
+ GLint i;
+ GLuint ui;
+ GLenum e;
+ GLfloat f;
+ GLvoid *data;
+ void *next; /* If prev node's opcode==OPCODE_CONTINUE */
};
@@ -398,9 +399,9 @@ union node {
* Number of nodes of storage needed for each instruction.
* Sizes for dynamically allocated opcodes are stored in the context struct.
*/
-static GLuint InstSize[ OPCODE_END_OF_LIST+1 ];
+static GLuint InstSize[OPCODE_END_OF_LIST + 1];
-void mesa_print_display_list( GLuint list );
+void mesa_print_display_list(GLuint list);
/**********************************************************************/
@@ -412,34 +413,38 @@ void mesa_print_display_list( GLuint list );
* Make an empty display list. This is used by glGenLists() to
* reserve display list IDs.
*/
-static struct mesa_display_list *make_list( GLuint list, GLuint count )
+static struct mesa_display_list *
+make_list(GLuint list, GLuint count)
{
- struct mesa_display_list *dlist = CALLOC_STRUCT( mesa_display_list );
+ struct mesa_display_list *dlist = CALLOC_STRUCT(mesa_display_list);
dlist->id = list;
- dlist->node = (Node *) _mesa_malloc( sizeof(Node) * count );
+ dlist->node = (Node *) _mesa_malloc(sizeof(Node) * count);
dlist->node[0].opcode = OPCODE_END_OF_LIST;
return dlist;
}
-/*
+/**
* Destroy all nodes in a display list.
* \param list - display list number
*/
-void _mesa_destroy_list( GLcontext *ctx, GLuint list )
+void
+_mesa_destroy_list(GLcontext *ctx, GLuint list)
{
struct mesa_display_list *dlist;
Node *n, *block;
GLboolean done;
- if (list==0)
+ if (list == 0)
return;
- dlist = (struct mesa_display_list *) _mesa_HashLookup(ctx->Shared->DisplayList, list);
+ dlist =
+ (struct mesa_display_list *) _mesa_HashLookup(ctx->Shared->DisplayList,
+ list);
if (!dlist)
return;
-
+
n = block = dlist->node;
done = block ? GL_FALSE : GL_TRUE;
@@ -449,60 +454,60 @@ void _mesa_destroy_list( GLcontext *ctx, GLuint list )
GLint i = (GLint) n[0].opcode - (GLint) OPCODE_EXT_0;
if (i >= 0 && i < (GLint) ctx->ListExt.NumOpcodes) {
- ctx->ListExt.Opcode[i].Destroy(ctx, &n[1]);
- n += ctx->ListExt.Opcode[i].Size;
+ ctx->ListExt.Opcode[i].Destroy(ctx, &n[1]);
+ n += ctx->ListExt.Opcode[i].Size;
}
else {
- switch (n[0].opcode) {
- /* for some commands, we need to free malloc'd memory */
- case OPCODE_MAP1:
+ switch (n[0].opcode) {
+ /* for some commands, we need to free malloc'd memory */
+ case OPCODE_MAP1:
_mesa_free(n[6].data);
- n += InstSize[n[0].opcode];
- break;
- case OPCODE_MAP2:
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_MAP2:
_mesa_free(n[10].data);
- n += InstSize[n[0].opcode];
- break;
- case OPCODE_DRAW_PIXELS:
- _mesa_free( n[5].data );
- n += InstSize[n[0].opcode];
- break;
- case OPCODE_BITMAP:
- _mesa_free( n[7].data );
- n += InstSize[n[0].opcode];
- break;
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_DRAW_PIXELS:
+ _mesa_free(n[5].data);
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_BITMAP:
+ _mesa_free(n[7].data);
+ n += InstSize[n[0].opcode];
+ break;
case OPCODE_COLOR_TABLE:
- _mesa_free( n[6].data );
+ _mesa_free(n[6].data);
n += InstSize[n[0].opcode];
break;
case OPCODE_COLOR_SUB_TABLE:
- _mesa_free( n[6].data );
+ _mesa_free(n[6].data);
n += InstSize[n[0].opcode];
break;
case OPCODE_CONVOLUTION_FILTER_1D:
- _mesa_free( n[6].data );
+ _mesa_free(n[6].data);
n += InstSize[n[0].opcode];
break;
case OPCODE_CONVOLUTION_FILTER_2D:
- _mesa_free( n[7].data );
+ _mesa_free(n[7].data);
n += InstSize[n[0].opcode];
break;
case OPCODE_POLYGON_STIPPLE:
- _mesa_free( n[1].data );
- n += InstSize[n[0].opcode];
+ _mesa_free(n[1].data);
+ n += InstSize[n[0].opcode];
break;
- case OPCODE_TEX_IMAGE1D:
+ case OPCODE_TEX_IMAGE1D:
_mesa_free(n[8].data);
n += InstSize[n[0].opcode];
- break;
- case OPCODE_TEX_IMAGE2D:
- _mesa_free( n[9]. data );
+ break;
+ case OPCODE_TEX_IMAGE2D:
+ _mesa_free(n[9].data);
n += InstSize[n[0].opcode];
- break;
- case OPCODE_TEX_IMAGE3D:
- _mesa_free( n[10]. data );
+ break;
+ case OPCODE_TEX_IMAGE3D:
+ _mesa_free(n[10].data);
n += InstSize[n[0].opcode];
- break;
+ break;
case OPCODE_TEX_SUB_IMAGE1D:
_mesa_free(n[7].data);
n += InstSize[n[0].opcode];
@@ -541,44 +546,44 @@ void _mesa_destroy_list( GLcontext *ctx, GLuint list )
break;
#if FEATURE_NV_vertex_program
case OPCODE_LOAD_PROGRAM_NV:
- _mesa_free(n[4].data); /* program string */
+ _mesa_free(n[4].data); /* program string */
n += InstSize[n[0].opcode];
break;
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
- _mesa_free(n[2].data); /* array of program ids */
+ _mesa_free(n[2].data); /* array of program ids */
n += InstSize[n[0].opcode];
break;
#endif
#if FEATURE_NV_fragment_program
case OPCODE_PROGRAM_NAMED_PARAMETER_NV:
- _mesa_free(n[3].data); /* parameter name */
+ _mesa_free(n[3].data); /* parameter name */
n += InstSize[n[0].opcode];
break;
#endif
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
case OPCODE_PROGRAM_STRING_ARB:
- _mesa_free(n[4].data); /* program string */
+ _mesa_free(n[4].data); /* program string */
n += InstSize[n[0].opcode];
break;
#endif
- case OPCODE_CONTINUE:
- n = (Node *) n[1].next;
- _mesa_free( block );
- block = n;
- break;
- case OPCODE_END_OF_LIST:
- _mesa_free( block );
- done = GL_TRUE;
- break;
- default:
- /* Most frequent case */
- n += InstSize[n[0].opcode];
- break;
- }
+ case OPCODE_CONTINUE:
+ n = (Node *) n[1].next;
+ _mesa_free(block);
+ block = n;
+ break;
+ case OPCODE_END_OF_LIST:
+ _mesa_free(block);
+ done = GL_TRUE;
+ break;
+ default:
+ /* Most frequent case */
+ n += InstSize[n[0].opcode];
+ break;
+ }
}
}
- _mesa_free( dlist );
+ _mesa_free(dlist);
_mesa_HashRemove(ctx->Shared->DisplayList, list);
}
@@ -587,7 +592,8 @@ void _mesa_destroy_list( GLcontext *ctx, GLuint list )
/*
* Translate the nth element of list from type to GLuint.
*/
-static GLuint translate_id( GLsizei n, GLenum type, const GLvoid *list )
+static GLuint
+translate_id(GLsizei n, GLenum type, const GLvoid * list)
{
GLbyte *bptr;
GLubyte *ubptr;
@@ -598,43 +604,41 @@ static GLuint translate_id( GLsizei n, GLenum type, const GLvoid *list )
GLfloat *fptr;
switch (type) {
- case GL_BYTE:
- bptr = (GLbyte *) list;
- return (GLuint) *(bptr+n);
- case GL_UNSIGNED_BYTE:
- ubptr = (GLubyte *) list;
- return (GLuint) *(ubptr+n);
- case GL_SHORT:
- sptr = (GLshort *) list;
- return (GLuint) *(sptr+n);
- case GL_UNSIGNED_SHORT:
- usptr = (GLushort *) list;
- return (GLuint) *(usptr+n);
- case GL_INT:
- iptr = (GLint *) list;
- return (GLuint) *(iptr+n);
- case GL_UNSIGNED_INT:
- uiptr = (GLuint *) list;
- return (GLuint) *(uiptr+n);
- case GL_FLOAT:
- fptr = (GLfloat *) list;
- return (GLuint) *(fptr+n);
- case GL_2_BYTES:
- ubptr = ((GLubyte *) list) + 2*n;
- return (GLuint) *ubptr * 256 + (GLuint) *(ubptr+1);
- case GL_3_BYTES:
- ubptr = ((GLubyte *) list) + 3*n;
- return (GLuint) *ubptr * 65536
- + (GLuint) *(ubptr+1) * 256
- + (GLuint) *(ubptr+2);
- case GL_4_BYTES:
- ubptr = ((GLubyte *) list) + 4*n;
- return (GLuint) *ubptr * 16777216
- + (GLuint) *(ubptr+1) * 65536
- + (GLuint) *(ubptr+2) * 256
- + (GLuint) *(ubptr+3);
- default:
- return 0;
+ case GL_BYTE:
+ bptr = (GLbyte *) list;
+ return (GLuint) *(bptr + n);
+ case GL_UNSIGNED_BYTE:
+ ubptr = (GLubyte *) list;
+ return (GLuint) *(ubptr + n);
+ case GL_SHORT:
+ sptr = (GLshort *) list;
+ return (GLuint) *(sptr + n);
+ case GL_UNSIGNED_SHORT:
+ usptr = (GLushort *) list;
+ return (GLuint) *(usptr + n);
+ case GL_INT:
+ iptr = (GLint *) list;
+ return (GLuint) *(iptr + n);
+ case GL_UNSIGNED_INT:
+ uiptr = (GLuint *) list;
+ return (GLuint) *(uiptr + n);
+ case GL_FLOAT:
+ fptr = (GLfloat *) list;
+ return (GLuint) *(fptr + n);
+ case GL_2_BYTES:
+ ubptr = ((GLubyte *) list) + 2 * n;
+ return (GLuint) *ubptr * 256 + (GLuint) * (ubptr + 1);
+ case GL_3_BYTES:
+ ubptr = ((GLubyte *) list) + 3 * n;
+ return (GLuint) * ubptr * 65536
+ + (GLuint) *(ubptr + 1) * 256 + (GLuint) * (ubptr + 2);
+ case GL_4_BYTES:
+ ubptr = ((GLubyte *) list) + 4 * n;
+ return (GLuint) *ubptr * 16777216
+ + (GLuint) *(ubptr + 1) * 65536
+ + (GLuint) *(ubptr + 2) * 256 + (GLuint) * (ubptr + 3);
+ default:
+ return 0;
}
}
@@ -651,20 +655,21 @@ static GLuint translate_id( GLsizei n, GLenum type, const GLvoid *list )
* \todo This won't suffice when the PBO is really in VRAM/GPU memory.
*/
static GLvoid *
-unpack_image( GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *unpack )
+unpack_image(GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid * pixels,
+ const struct gl_pixelstore_attrib *unpack)
{
if (unpack->BufferObj->Name == 0) {
/* no PBO */
- return _mesa_unpack_image(dimensions, width, height, depth, format, type,
- pixels, unpack);
+ return _mesa_unpack_image(dimensions, width, height, depth, format,
+ type, pixels, unpack);
}
- else if (_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
- format, type, pixels)) {
+ else
+ if (_mesa_validate_pbo_access
+ (dimensions, unpack, width, height, depth, format, type, pixels)) {
const GLubyte *src = ADD_POINTERS(unpack->BufferObj->Data, pixels);
- return _mesa_unpack_image(dimensions, width, height, depth, format, type,
- src, unpack);
+ return _mesa_unpack_image(dimensions, width, height, depth, format,
+ type, src, unpack);
}
/* bad access! */
return NULL;
@@ -700,9 +705,9 @@ _mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
Node *newblock;
n = ctx->ListState.CurrentBlock + ctx->ListState.CurrentPos;
n[0].opcode = OPCODE_CONTINUE;
- newblock = (Node *) _mesa_malloc( sizeof(Node) * BLOCK_SIZE );
+ newblock = (Node *) _mesa_malloc(sizeof(Node) * BLOCK_SIZE);
if (!newblock) {
- _mesa_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;
@@ -715,7 +720,7 @@ _mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
n[0].opcode = (OpCode) opcode;
- return (void *) (n + 1); /* return ptr to node following opcode */
+ return (void *) (n + 1); /* return ptr to node following opcode */
}
@@ -730,15 +735,16 @@ _mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
* \return the new opcode number or -1 if error
*/
GLint
-_mesa_alloc_opcode( GLcontext *ctx,
- GLuint size,
- void (*execute)( GLcontext *, void * ),
- void (*destroy)( GLcontext *, void * ),
- void (*print)( GLcontext *, void * ) )
+_mesa_alloc_opcode(GLcontext *ctx,
+ GLuint size,
+ void (*execute) (GLcontext *, void *),
+ void (*destroy) (GLcontext *, void *),
+ void (*print) (GLcontext *, void *))
{
if (ctx->ListExt.NumOpcodes < MAX_DLIST_EXT_OPCODES) {
const GLuint i = ctx->ListExt.NumOpcodes++;
- ctx->ListExt.Opcode[i].Size = 1 + (size + sizeof(Node) - 1)/sizeof(Node);
+ ctx->ListExt.Opcode[i].Size =
+ 1 + (size + sizeof(Node) - 1) / sizeof(Node);
ctx->ListExt.Opcode[i].Execute = execute;
ctx->ListExt.Opcode[i].Destroy = destroy;
ctx->ListExt.Opcode[i].Print = print;
@@ -764,64 +770,67 @@ _mesa_alloc_opcode( GLcontext *ctx,
/*
* Display List compilation functions
*/
-static void GLAPIENTRY save_Accum( GLenum op, GLfloat value )
+static void GLAPIENTRY
+save_Accum(GLenum op, GLfloat value)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ACCUM, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ACCUM, 2);
if (n) {
n[1].e = op;
n[2].f = value;
}
if (ctx->ExecuteFlag) {
- CALL_Accum(ctx->Exec, ( op, value ));
+ CALL_Accum(ctx->Exec, (op, value));
}
}
-static void GLAPIENTRY save_AlphaFunc( GLenum func, GLclampf ref )
+static void GLAPIENTRY
+save_AlphaFunc(GLenum func, GLclampf ref)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ALPHA_FUNC, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ALPHA_FUNC, 2);
if (n) {
n[1].e = func;
n[2].f = (GLfloat) ref;
}
if (ctx->ExecuteFlag) {
- CALL_AlphaFunc(ctx->Exec, ( func, ref ));
+ CALL_AlphaFunc(ctx->Exec, (func, ref));
}
}
-static void GLAPIENTRY save_BindTexture( GLenum target, GLuint texture )
+static void GLAPIENTRY
+save_BindTexture(GLenum target, GLuint texture)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BIND_TEXTURE, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BIND_TEXTURE, 2);
if (n) {
n[1].e = target;
n[2].ui = texture;
}
if (ctx->ExecuteFlag) {
- CALL_BindTexture(ctx->Exec, ( target, texture ));
+ CALL_BindTexture(ctx->Exec, (target, texture));
}
}
-static void GLAPIENTRY save_Bitmap( GLsizei width, GLsizei height,
- GLfloat xorig, GLfloat yorig,
- GLfloat xmove, GLfloat ymove,
- const GLubyte *pixels )
+static void GLAPIENTRY
+save_Bitmap(GLsizei width, GLsizei height,
+ GLfloat xorig, GLfloat yorig,
+ GLfloat xmove, GLfloat ymove, const GLubyte * pixels)
{
GET_CURRENT_CONTEXT(ctx);
- GLvoid *image = _mesa_unpack_bitmap( width, height, pixels, &ctx->Unpack );
+ GLvoid *image = _mesa_unpack_bitmap(width, height, pixels, &ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BITMAP, 7 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BITMAP, 7);
if (n) {
n[1].i = (GLint) width;
n[2].i = (GLint) height;
@@ -835,51 +844,53 @@ static void GLAPIENTRY save_Bitmap( GLsizei width, GLsizei height,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_Bitmap(ctx->Exec, ( width, height,
- xorig, yorig, xmove, ymove, pixels ));
+ CALL_Bitmap(ctx->Exec, (width, height,
+ xorig, yorig, xmove, ymove, pixels));
}
}
-static void GLAPIENTRY save_BlendEquation( GLenum mode )
+static void GLAPIENTRY
+save_BlendEquation(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_EQUATION, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_EQUATION, 1);
if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_BlendEquation(ctx->Exec, ( mode ));
+ CALL_BlendEquation(ctx->Exec, (mode));
}
}
-static void GLAPIENTRY save_BlendEquationSeparateEXT( GLenum modeRGB,
- GLenum modeA )
+static void GLAPIENTRY
+save_BlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_EQUATION_SEPARATE, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_EQUATION_SEPARATE, 2);
if (n) {
n[1].e = modeRGB;
n[2].e = modeA;
}
if (ctx->ExecuteFlag) {
- CALL_BlendEquationSeparateEXT(ctx->Exec, ( modeRGB, modeA ));
+ CALL_BlendEquationSeparateEXT(ctx->Exec, (modeRGB, modeA));
}
}
-static void GLAPIENTRY save_BlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
- GLenum sfactorA, GLenum dfactorA)
+static void GLAPIENTRY
+save_BlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
+ GLenum sfactorA, GLenum dfactorA)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_FUNC_SEPARATE, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_FUNC_SEPARATE, 4);
if (n) {
n[1].e = sfactorRGB;
n[2].e = dfactorRGB;
@@ -887,19 +898,19 @@ static void GLAPIENTRY save_BlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfact
n[4].e = dfactorA;
}
if (ctx->ExecuteFlag) {
- CALL_BlendFuncSeparateEXT(ctx->Exec,
- (sfactorRGB, dfactorRGB, sfactorA, dfactorA));
+ CALL_BlendFuncSeparateEXT(ctx->Exec,
+ (sfactorRGB, dfactorRGB, sfactorA, dfactorA));
}
}
-static void GLAPIENTRY save_BlendColor( GLfloat red, GLfloat green,
- GLfloat blue, GLfloat alpha )
+static void GLAPIENTRY
+save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_COLOR, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_COLOR, 4);
if (n) {
n[1].f = red;
n[2].f = green;
@@ -907,33 +918,35 @@ static void GLAPIENTRY save_BlendColor( GLfloat red, GLfloat green,
n[4].f = alpha;
}
if (ctx->ExecuteFlag) {
- CALL_BlendColor(ctx->Exec, ( red, green, blue, alpha ));
+ CALL_BlendColor(ctx->Exec, (red, green, blue, alpha));
}
}
-void GLAPIENTRY _mesa_save_CallList( GLuint list )
+void GLAPIENTRY
+_mesa_save_CallList(GLuint list)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CALL_LIST, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST, 1);
if (n) {
n[1].ui = list;
}
-
+
/* After this, we don't know what begin/end state we're in:
*/
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
if (ctx->ExecuteFlag) {
- CALL_CallList(ctx->Exec, ( list ));
+ CALL_CallList(ctx->Exec, (list));
}
}
-void GLAPIENTRY _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists )
+void GLAPIENTRY
+_mesa_save_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
@@ -942,25 +955,25 @@ void GLAPIENTRY _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *list
SAVE_FLUSH_VERTICES(ctx);
switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- case GL_2_BYTES:
- case GL_3_BYTES:
- case GL_4_BYTES:
- typeErrorFlag = GL_FALSE;
- break;
- default:
- typeErrorFlag = GL_TRUE;
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ case GL_2_BYTES:
+ case GL_3_BYTES:
+ case GL_4_BYTES:
+ typeErrorFlag = GL_FALSE;
+ break;
+ default:
+ typeErrorFlag = GL_TRUE;
}
- for (i=0;i<n;i++) {
- GLuint list = translate_id( i, type, lists );
- Node *n = ALLOC_INSTRUCTION( ctx, OPCODE_CALL_LIST_OFFSET, 2 );
+ for (i = 0; i < n; i++) {
+ GLuint list = translate_id(i, type, lists);
+ Node *n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST_OFFSET, 2);
if (n) {
n[1].ui = list;
n[2].b = typeErrorFlag;
@@ -972,33 +985,34 @@ void GLAPIENTRY _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *list
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
if (ctx->ExecuteFlag) {
- CALL_CallLists(ctx->Exec, ( n, type, lists ));
+ CALL_CallLists(ctx->Exec, (n, type, lists));
}
}
-static void GLAPIENTRY save_Clear( GLbitfield mask )
+static void GLAPIENTRY
+save_Clear(GLbitfield mask)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR, 1);
if (n) {
n[1].bf = mask;
}
if (ctx->ExecuteFlag) {
- CALL_Clear(ctx->Exec, ( mask ));
+ CALL_Clear(ctx->Exec, (mask));
}
}
-static void GLAPIENTRY save_ClearAccum( GLfloat red, GLfloat green,
- GLfloat blue, GLfloat alpha )
+static void GLAPIENTRY
+save_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_ACCUM, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_ACCUM, 4);
if (n) {
n[1].f = red;
n[2].f = green;
@@ -1006,18 +1020,18 @@ static void GLAPIENTRY save_ClearAccum( GLfloat red, GLfloat green,
n[4].f = alpha;
}
if (ctx->ExecuteFlag) {
- CALL_ClearAccum(ctx->Exec, ( red, green, blue, alpha ));
+ CALL_ClearAccum(ctx->Exec, (red, green, blue, alpha));
}
}
-static void GLAPIENTRY save_ClearColor( GLclampf red, GLclampf green,
- GLclampf blue, GLclampf alpha )
+static void GLAPIENTRY
+save_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_COLOR, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_COLOR, 4);
if (n) {
n[1].f = red;
n[2].f = green;
@@ -1025,62 +1039,66 @@ static void GLAPIENTRY save_ClearColor( GLclampf red, GLclampf green,
n[4].f = alpha;
}
if (ctx->ExecuteFlag) {
- CALL_ClearColor(ctx->Exec, ( red, green, blue, alpha ));
+ CALL_ClearColor(ctx->Exec, (red, green, blue, alpha));
}
}
-static void GLAPIENTRY save_ClearDepth( GLclampd depth )
+static void GLAPIENTRY
+save_ClearDepth(GLclampd depth)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_DEPTH, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_DEPTH, 1);
if (n) {
n[1].f = (GLfloat) depth;
}
if (ctx->ExecuteFlag) {
- CALL_ClearDepth(ctx->Exec, ( depth ));
+ CALL_ClearDepth(ctx->Exec, (depth));
}
}
-static void GLAPIENTRY save_ClearIndex( GLfloat c )
+static void GLAPIENTRY
+save_ClearIndex(GLfloat c)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_INDEX, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_INDEX, 1);
if (n) {
n[1].f = c;
}
if (ctx->ExecuteFlag) {
- CALL_ClearIndex(ctx->Exec, ( c ));
+ CALL_ClearIndex(ctx->Exec, (c));
}
}
-static void GLAPIENTRY save_ClearStencil( GLint s )
+static void GLAPIENTRY
+save_ClearStencil(GLint s)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_STENCIL, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_STENCIL, 1);
if (n) {
n[1].i = s;
}
if (ctx->ExecuteFlag) {
- CALL_ClearStencil(ctx->Exec, ( s ));
+ CALL_ClearStencil(ctx->Exec, (s));
}
}
-static void GLAPIENTRY save_ClipPlane( GLenum plane, const GLdouble *equ )
+static void GLAPIENTRY
+save_ClipPlane(GLenum plane, const GLdouble * equ)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CLIP_PLANE, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CLIP_PLANE, 5);
if (n) {
n[1].e = plane;
n[2].f = (GLfloat) equ[0];
@@ -1089,19 +1107,20 @@ static void GLAPIENTRY save_ClipPlane( GLenum plane, const GLdouble *equ )
n[5].f = (GLfloat) equ[3];
}
if (ctx->ExecuteFlag) {
- CALL_ClipPlane(ctx->Exec, ( plane, equ ));
+ CALL_ClipPlane(ctx->Exec, (plane, equ));
}
}
-static void GLAPIENTRY save_ColorMask( GLboolean red, GLboolean green,
- GLboolean blue, GLboolean alpha )
+static void GLAPIENTRY
+save_ColorMask(GLboolean red, GLboolean green,
+ GLboolean blue, GLboolean alpha)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_MASK, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_MASK, 4);
if (n) {
n[1].b = red;
n[2].b = green;
@@ -1109,44 +1128,46 @@ static void GLAPIENTRY save_ColorMask( GLboolean red, GLboolean green,
n[4].b = alpha;
}
if (ctx->ExecuteFlag) {
- CALL_ColorMask(ctx->Exec, ( red, green, blue, alpha ));
+ CALL_ColorMask(ctx->Exec, (red, green, blue, alpha));
}
}
-static void GLAPIENTRY save_ColorMaterial( GLenum face, GLenum mode )
+static void GLAPIENTRY
+save_ColorMaterial(GLenum face, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_MATERIAL, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_MATERIAL, 2);
if (n) {
n[1].e = face;
n[2].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_ColorMaterial(ctx->Exec, ( face, mode ));
+ CALL_ColorMaterial(ctx->Exec, (face, mode));
}
}
-static void GLAPIENTRY save_ColorTable( GLenum target, GLenum internalFormat,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid *table )
+static void GLAPIENTRY
+save_ColorTable(GLenum target, GLenum internalFormat,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid * table)
{
GET_CURRENT_CONTEXT(ctx);
if (_mesa_is_proxy_texture(target)) {
/* execute immediately */
- CALL_ColorTable(ctx->Exec, ( target, internalFormat, width,
- format, type, table ));
+ CALL_ColorTable(ctx->Exec, (target, internalFormat, width,
+ format, type, table));
}
else {
GLvoid *image = unpack_image(1, width, 1, 1, format, type, table,
&ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE, 6);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
@@ -1159,8 +1180,8 @@ static void GLAPIENTRY save_ColorTable( GLenum target, GLenum internalFormat,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_ColorTable(ctx->Exec, ( target, internalFormat, width,
- format, type, table ));
+ CALL_ColorTable(ctx->Exec, (target, internalFormat, width,
+ format, type, table));
}
}
}
@@ -1168,14 +1189,15 @@ static void GLAPIENTRY save_ColorTable( GLenum target, GLenum internalFormat,
static void GLAPIENTRY
-save_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+save_ColorTableParameterfv(GLenum target, GLenum pname,
+ const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1191,7 +1213,7 @@ save_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
}
if (ctx->ExecuteFlag) {
- CALL_ColorTableParameterfv(ctx->Exec, ( target, pname, params ));
+ CALL_ColorTableParameterfv(ctx->Exec, (target, pname, params));
}
}
@@ -1204,7 +1226,7 @@ save_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1220,22 +1242,22 @@ save_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
}
if (ctx->ExecuteFlag) {
- CALL_ColorTableParameteriv(ctx->Exec, ( target, pname, params ));
+ CALL_ColorTableParameteriv(ctx->Exec, (target, pname, params));
}
}
-static void GLAPIENTRY save_ColorSubTable( GLenum target, GLsizei start, GLsizei count,
- GLenum format, GLenum type,
- const GLvoid *table)
+static void GLAPIENTRY
+save_ColorSubTable(GLenum target, GLsizei start, GLsizei count,
+ GLenum format, GLenum type, const GLvoid * table)
{
GET_CURRENT_CONTEXT(ctx);
GLvoid *image = unpack_image(1, count, 1, 1, format, type, table,
&ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_SUB_TABLE, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_SUB_TABLE, 6);
if (n) {
n[1].e = target;
n[2].i = start;
@@ -1248,7 +1270,8 @@ static void GLAPIENTRY save_ColorSubTable( GLenum target, GLsizei start, GLsizei
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_ColorSubTable(ctx->Exec, (target, start, count, format, type, table));
+ CALL_ColorSubTable(ctx->Exec,
+ (target, start, count, format, type, table));
}
}
@@ -1261,7 +1284,7 @@ save_CopyColorSubTable(GLenum target, GLsizei start,
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5);
if (n) {
n[1].e = target;
n[2].i = start;
@@ -1283,7 +1306,7 @@ save_CopyColorTable(GLenum target, GLenum internalformat,
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_TABLE, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_COLOR_TABLE, 5);
if (n) {
n[1].e = target;
n[2].e = internalformat;
@@ -1299,14 +1322,14 @@ save_CopyColorTable(GLenum target, GLenum internalformat,
static void GLAPIENTRY
save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
- GLenum format, GLenum type, const GLvoid *filter)
+ GLenum format, GLenum type, const GLvoid * filter)
{
GET_CURRENT_CONTEXT(ctx);
GLvoid *image = unpack_image(1, width, 1, 1, format, type, filter,
&ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_FILTER_1D, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
@@ -1319,8 +1342,8 @@ save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_ConvolutionFilter1D(ctx->Exec, ( target, internalFormat, width,
- format, type, filter ));
+ CALL_ConvolutionFilter1D(ctx->Exec, (target, internalFormat, width,
+ format, type, filter));
}
}
@@ -1328,14 +1351,14 @@ save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
static void GLAPIENTRY
save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
GLsizei width, GLsizei height, GLenum format,
- GLenum type, const GLvoid *filter)
+ GLenum type, const GLvoid * filter)
{
GET_CURRENT_CONTEXT(ctx);
GLvoid *image = unpack_image(2, width, height, 1, format, type, filter,
&ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_FILTER_2D, 7 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
@@ -1349,8 +1372,9 @@ save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_ConvolutionFilter2D(ctx->Exec, ( target, internalFormat, width, height,
- format, type, filter ));
+ CALL_ConvolutionFilter2D(ctx->Exec,
+ (target, internalFormat, width, height, format,
+ type, filter));
}
}
@@ -1361,14 +1385,14 @@ save_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3);
if (n) {
n[1].e = target;
n[2].e = pname;
n[3].i = param;
}
if (ctx->ExecuteFlag) {
- CALL_ConvolutionParameteri(ctx->Exec, ( target, pname, param ));
+ CALL_ConvolutionParameteri(ctx->Exec, (target, pname, param));
}
}
@@ -1379,7 +1403,7 @@ save_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
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_IV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1396,7 +1420,7 @@ save_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
}
}
if (ctx->ExecuteFlag) {
- CALL_ConvolutionParameteriv(ctx->Exec, ( target, pname, params ));
+ CALL_ConvolutionParameteriv(ctx->Exec, (target, pname, params));
}
}
@@ -1407,25 +1431,26 @@ save_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3);
if (n) {
n[1].e = target;
n[2].e = pname;
n[3].f = param;
}
if (ctx->ExecuteFlag) {
- CALL_ConvolutionParameterf(ctx->Exec, ( target, pname, param ));
+ CALL_ConvolutionParameterf(ctx->Exec, (target, pname, param));
}
}
static void GLAPIENTRY
-save_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+save_ConvolutionParameterfv(GLenum target, GLenum pname,
+ const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1442,19 +1467,18 @@ save_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
}
}
if (ctx->ExecuteFlag) {
- CALL_ConvolutionParameterfv(ctx->Exec, ( target, pname, params ));
+ CALL_ConvolutionParameterfv(ctx->Exec, (target, pname, params));
}
}
static void GLAPIENTRY
-save_CopyPixels( GLint x, GLint y,
- GLsizei width, GLsizei height, GLenum type )
+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_COPY_PIXELS, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_PIXELS, 5);
if (n) {
n[1].i = x;
n[2].i = y;
@@ -1463,20 +1487,20 @@ save_CopyPixels( GLint x, GLint y,
n[5].e = type;
}
if (ctx->ExecuteFlag) {
- CALL_CopyPixels(ctx->Exec, ( x, y, width, height, type ));
+ CALL_CopyPixels(ctx->Exec, (x, y, width, height, type));
}
}
static void GLAPIENTRY
-save_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat,
- GLint x, GLint y, GLsizei width, GLint border )
+save_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
+ GLint x, GLint y, GLsizei width, GLint border)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_IMAGE1D, 7 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_IMAGE1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1487,22 +1511,22 @@ save_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat,
n[7].i = border;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTexImage1D(ctx->Exec, ( target, level, internalformat,
- x, y, width, border ));
+ CALL_CopyTexImage1D(ctx->Exec, (target, level, internalformat,
+ x, y, width, border));
}
}
static void GLAPIENTRY
-save_CopyTexImage2D( GLenum target, GLint level,
- GLenum internalformat,
- GLint x, GLint y, GLsizei width,
- GLsizei height, GLint border )
+save_CopyTexImage2D(GLenum target, GLint level,
+ GLenum internalformat,
+ GLint x, GLint y, GLsizei width,
+ GLsizei height, GLint border)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_IMAGE2D, 8 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_IMAGE2D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1514,22 +1538,21 @@ save_CopyTexImage2D( GLenum target, GLint level,
n[8].i = border;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTexImage2D(ctx->Exec, ( target, level, internalformat,
- x, y, width, height, border ));
+ CALL_CopyTexImage2D(ctx->Exec, (target, level, internalformat,
+ x, y, width, height, border));
}
}
static void GLAPIENTRY
-save_CopyTexSubImage1D( GLenum target, GLint level,
- GLint xoffset, GLint x, GLint y,
- GLsizei width )
+save_CopyTexSubImage1D(GLenum target, GLint level,
+ GLint xoffset, GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE1D, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_SUB_IMAGE1D, 6);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1539,21 +1562,21 @@ save_CopyTexSubImage1D( GLenum target, GLint level,
n[6].i = width;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTexSubImage1D(ctx->Exec, ( target, level, xoffset, x, y, width ));
+ CALL_CopyTexSubImage1D(ctx->Exec,
+ (target, level, xoffset, x, y, width));
}
}
static void GLAPIENTRY
-save_CopyTexSubImage2D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset,
- GLint x, GLint y,
- GLsizei width, GLint height )
+save_CopyTexSubImage2D(GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint x, GLint y, GLsizei width, GLint height)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE2D, 8 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_SUB_IMAGE2D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1565,22 +1588,21 @@ save_CopyTexSubImage2D( GLenum target, GLint level,
n[8].i = height;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTexSubImage2D(ctx->Exec, ( target, level, xoffset, yoffset,
- x, y, width, height ));
+ CALL_CopyTexSubImage2D(ctx->Exec, (target, level, xoffset, yoffset,
+ x, y, width, height));
}
}
static void GLAPIENTRY
-save_CopyTexSubImage3D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint x, GLint y,
- GLsizei width, GLint height )
+save_CopyTexSubImage3D(GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint x, GLint y, GLsizei width, GLint height)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE3D, 9 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_SUB_IMAGE3D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1593,114 +1615,120 @@ save_CopyTexSubImage3D( GLenum target, GLint level,
n[9].i = height;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTexSubImage3D(ctx->Exec, ( target, level,
- xoffset, yoffset, zoffset,
- x, y, width, height ));
+ CALL_CopyTexSubImage3D(ctx->Exec, (target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height));
}
}
-static void GLAPIENTRY save_CullFace( GLenum mode )
+static void GLAPIENTRY
+save_CullFace(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_CULL_FACE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_CULL_FACE, 1);
if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_CullFace(ctx->Exec, ( mode ));
+ CALL_CullFace(ctx->Exec, (mode));
}
}
-static void GLAPIENTRY save_DepthFunc( GLenum func )
+static void GLAPIENTRY
+save_DepthFunc(GLenum func)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_FUNC, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_FUNC, 1);
if (n) {
n[1].e = func;
}
if (ctx->ExecuteFlag) {
- CALL_DepthFunc(ctx->Exec, ( func ));
+ CALL_DepthFunc(ctx->Exec, (func));
}
}
-static void GLAPIENTRY save_DepthMask( GLboolean mask )
+static void GLAPIENTRY
+save_DepthMask(GLboolean mask)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_MASK, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_MASK, 1);
if (n) {
n[1].b = mask;
}
if (ctx->ExecuteFlag) {
- CALL_DepthMask(ctx->Exec, ( mask ));
+ CALL_DepthMask(ctx->Exec, (mask));
}
}
-static void GLAPIENTRY save_DepthRange( GLclampd nearval, GLclampd farval )
+static void GLAPIENTRY
+save_DepthRange(GLclampd nearval, GLclampd farval)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_RANGE, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_RANGE, 2);
if (n) {
n[1].f = (GLfloat) nearval;
n[2].f = (GLfloat) farval;
}
if (ctx->ExecuteFlag) {
- CALL_DepthRange(ctx->Exec, ( nearval, farval ));
+ CALL_DepthRange(ctx->Exec, (nearval, farval));
}
}
-static void GLAPIENTRY save_Disable( GLenum cap )
+static void GLAPIENTRY
+save_Disable(GLenum cap)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DISABLE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DISABLE, 1);
if (n) {
n[1].e = cap;
}
if (ctx->ExecuteFlag) {
- CALL_Disable(ctx->Exec, ( cap ));
+ CALL_Disable(ctx->Exec, (cap));
}
}
-static void GLAPIENTRY save_DrawBuffer( GLenum mode )
+static void GLAPIENTRY
+save_DrawBuffer(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DRAW_BUFFER, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_BUFFER, 1);
if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_DrawBuffer(ctx->Exec, ( mode ));
+ CALL_DrawBuffer(ctx->Exec, (mode));
}
}
-static void GLAPIENTRY save_DrawPixels( GLsizei width, GLsizei height,
- GLenum format, GLenum type,
- const GLvoid *pixels )
+static void GLAPIENTRY
+save_DrawPixels(GLsizei width, GLsizei height,
+ GLenum format, GLenum type, const GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
GLvoid *image = unpack_image(2, width, height, 1, format, type,
pixels, &ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DRAW_PIXELS, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_PIXELS, 5);
if (n) {
n[1].i = width;
n[2].i = height;
@@ -1712,51 +1740,54 @@ static void GLAPIENTRY save_DrawPixels( GLsizei width, GLsizei height,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_DrawPixels(ctx->Exec, ( width, height, format, type, pixels ));
+ CALL_DrawPixels(ctx->Exec, (width, height, format, type, pixels));
}
}
-static void GLAPIENTRY save_Enable( GLenum cap )
+static void GLAPIENTRY
+save_Enable(GLenum cap)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ENABLE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ENABLE, 1);
if (n) {
n[1].e = cap;
}
if (ctx->ExecuteFlag) {
- CALL_Enable(ctx->Exec, ( cap ));
+ CALL_Enable(ctx->Exec, (cap));
}
}
-static void GLAPIENTRY _mesa_save_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
+static void GLAPIENTRY
+_mesa_save_EvalMesh1(GLenum mode, GLint i1, GLint i2)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_EVALMESH1, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EVALMESH1, 3);
if (n) {
n[1].e = mode;
n[2].i = i1;
n[3].i = i2;
}
if (ctx->ExecuteFlag) {
- CALL_EvalMesh1(ctx->Exec, ( mode, i1, i2 ));
+ CALL_EvalMesh1(ctx->Exec, (mode, i1, i2));
}
}
-static void GLAPIENTRY _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
+static void GLAPIENTRY
+_mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_EVALMESH2, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EVALMESH2, 5);
if (n) {
n[1].e = mode;
n[2].i = i1;
@@ -1765,19 +1796,20 @@ static void GLAPIENTRY _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLi
n[5].i = j2;
}
if (ctx->ExecuteFlag) {
- CALL_EvalMesh2(ctx->Exec, ( mode, i1, i2, j1, j2 ));
+ CALL_EvalMesh2(ctx->Exec, (mode, i1, i2, j1, j2));
}
}
-static void GLAPIENTRY save_Fogfv( GLenum pname, const GLfloat *params )
+static void GLAPIENTRY
+save_Fogfv(GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_FOG, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_FOG, 5);
if (n) {
n[1].e = pname;
n[2].f = params[0];
@@ -1786,71 +1818,75 @@ static void GLAPIENTRY save_Fogfv( GLenum pname, const GLfloat *params )
n[5].f = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_Fogfv(ctx->Exec, ( pname, params ));
+ CALL_Fogfv(ctx->Exec, (pname, params));
}
}
-static void GLAPIENTRY save_Fogf( GLenum pname, GLfloat param )
+static void GLAPIENTRY
+save_Fogf(GLenum pname, GLfloat param)
{
save_Fogfv(pname, &param);
}
-static void GLAPIENTRY save_Fogiv(GLenum pname, const GLint *params )
+static void GLAPIENTRY
+save_Fogiv(GLenum pname, const GLint *params)
{
GLfloat p[4];
switch (pname) {
- case GL_FOG_MODE:
- case GL_FOG_DENSITY:
- case GL_FOG_START:
- case GL_FOG_END:
- case GL_FOG_INDEX:
- p[0] = (GLfloat) *params;
- break;
- case GL_FOG_COLOR:
- p[0] = INT_TO_FLOAT( params[0] );
- p[1] = INT_TO_FLOAT( params[1] );
- p[2] = INT_TO_FLOAT( params[2] );
- p[3] = INT_TO_FLOAT( params[3] );
- break;
- default:
- /* Error will be caught later in gl_Fogfv */
- ;
+ case GL_FOG_MODE:
+ case GL_FOG_DENSITY:
+ case GL_FOG_START:
+ case GL_FOG_END:
+ case GL_FOG_INDEX:
+ p[0] = (GLfloat) *params;
+ break;
+ case GL_FOG_COLOR:
+ p[0] = INT_TO_FLOAT(params[0]);
+ p[1] = INT_TO_FLOAT(params[1]);
+ p[2] = INT_TO_FLOAT(params[2]);
+ p[3] = INT_TO_FLOAT(params[3]);
+ break;
+ default:
+ /* Error will be caught later in gl_Fogfv */
+ ;
}
save_Fogfv(pname, p);
}
-static void GLAPIENTRY save_Fogi(GLenum pname, GLint param )
+static void GLAPIENTRY
+save_Fogi(GLenum pname, GLint param)
{
save_Fogiv(pname, &param);
}
-static void GLAPIENTRY save_FrontFace( GLenum mode )
+static void GLAPIENTRY
+save_FrontFace(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_FRONT_FACE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_FRONT_FACE, 1);
if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_FrontFace(ctx->Exec, ( mode ));
+ CALL_FrontFace(ctx->Exec, (mode));
}
}
-static void GLAPIENTRY save_Frustum( GLdouble left, GLdouble right,
- GLdouble bottom, GLdouble top,
- GLdouble nearval, GLdouble farval )
+static void GLAPIENTRY
+save_Frustum(GLdouble left, GLdouble right,
+ GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_FRUSTUM, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_FRUSTUM, 6);
if (n) {
n[1].f = (GLfloat) left;
n[2].f = (GLfloat) right;
@@ -1860,35 +1896,37 @@ static void GLAPIENTRY save_Frustum( GLdouble left, GLdouble right,
n[6].f = (GLfloat) farval;
}
if (ctx->ExecuteFlag) {
- CALL_Frustum(ctx->Exec, ( left, right, bottom, top, nearval, farval ));
+ CALL_Frustum(ctx->Exec, (left, right, bottom, top, nearval, farval));
}
}
-static void GLAPIENTRY save_Hint( GLenum target, GLenum mode )
+static void GLAPIENTRY
+save_Hint(GLenum target, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_HINT, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_HINT, 2);
if (n) {
n[1].e = target;
n[2].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_Hint(ctx->Exec, ( target, mode ));
+ CALL_Hint(ctx->Exec, (target, mode));
}
}
static void GLAPIENTRY
-save_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
+save_Histogram(GLenum target, GLsizei width, GLenum internalFormat,
+ GLboolean sink)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_HISTOGRAM, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_HISTOGRAM, 4);
if (n) {
n[1].e = target;
n[2].i = width;
@@ -1896,147 +1934,154 @@ save_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean si
n[4].b = sink;
}
if (ctx->ExecuteFlag) {
- CALL_Histogram(ctx->Exec, ( target, width, internalFormat, sink ));
+ CALL_Histogram(ctx->Exec, (target, width, internalFormat, sink));
}
}
-static void GLAPIENTRY save_IndexMask( GLuint mask )
+static void GLAPIENTRY
+save_IndexMask(GLuint mask)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_INDEX_MASK, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_INDEX_MASK, 1);
if (n) {
n[1].ui = mask;
}
if (ctx->ExecuteFlag) {
- CALL_IndexMask(ctx->Exec, ( mask ));
+ CALL_IndexMask(ctx->Exec, (mask));
}
}
-static void GLAPIENTRY save_InitNames( void )
+static void GLAPIENTRY
+save_InitNames(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_INIT_NAMES, 0 );
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_INIT_NAMES, 0);
if (ctx->ExecuteFlag) {
CALL_InitNames(ctx->Exec, ());
}
}
-static void GLAPIENTRY save_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
+static void GLAPIENTRY
+save_Lightfv(GLenum light, GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LIGHT, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LIGHT, 6);
if (OPCODE_LIGHT) {
GLint i, nParams;
n[1].e = light;
n[2].e = pname;
switch (pname) {
- case GL_AMBIENT:
- nParams = 4;
- break;
- case GL_DIFFUSE:
- nParams = 4;
- break;
- case GL_SPECULAR:
- nParams = 4;
- break;
- case GL_POSITION:
- nParams = 4;
- break;
- case GL_SPOT_DIRECTION:
- nParams = 3;
- break;
- case GL_SPOT_EXPONENT:
- nParams = 1;
- break;
- case GL_SPOT_CUTOFF:
- nParams = 1;
- break;
- case GL_CONSTANT_ATTENUATION:
- nParams = 1;
- break;
- case GL_LINEAR_ATTENUATION:
- nParams = 1;
- break;
- case GL_QUADRATIC_ATTENUATION:
- nParams = 1;
- break;
- default:
- nParams = 0;
+ case GL_AMBIENT:
+ nParams = 4;
+ break;
+ case GL_DIFFUSE:
+ nParams = 4;
+ break;
+ case GL_SPECULAR:
+ nParams = 4;
+ break;
+ case GL_POSITION:
+ nParams = 4;
+ break;
+ case GL_SPOT_DIRECTION:
+ nParams = 3;
+ break;
+ case GL_SPOT_EXPONENT:
+ nParams = 1;
+ break;
+ case GL_SPOT_CUTOFF:
+ nParams = 1;
+ break;
+ case GL_CONSTANT_ATTENUATION:
+ nParams = 1;
+ break;
+ case GL_LINEAR_ATTENUATION:
+ nParams = 1;
+ break;
+ case GL_QUADRATIC_ATTENUATION:
+ nParams = 1;
+ break;
+ default:
+ nParams = 0;
}
for (i = 0; i < nParams; i++) {
- n[3+i].f = params[i];
+ n[3 + i].f = params[i];
}
}
if (ctx->ExecuteFlag) {
- CALL_Lightfv(ctx->Exec, ( light, pname, params ));
+ CALL_Lightfv(ctx->Exec, (light, pname, params));
}
}
-static void GLAPIENTRY save_Lightf( GLenum light, GLenum pname, GLfloat params )
+static void GLAPIENTRY
+save_Lightf(GLenum light, GLenum pname, GLfloat params)
{
save_Lightfv(light, pname, &params);
}
-static void GLAPIENTRY save_Lightiv( GLenum light, GLenum pname, const GLint *params )
+static void GLAPIENTRY
+save_Lightiv(GLenum light, GLenum pname, const GLint *params)
{
GLfloat fparam[4];
switch (pname) {
- case GL_AMBIENT:
- case GL_DIFFUSE:
- case GL_SPECULAR:
- fparam[0] = INT_TO_FLOAT( params[0] );
- fparam[1] = INT_TO_FLOAT( params[1] );
- fparam[2] = INT_TO_FLOAT( params[2] );
- fparam[3] = INT_TO_FLOAT( params[3] );
- break;
- case GL_POSITION:
- fparam[0] = (GLfloat) params[0];
- fparam[1] = (GLfloat) params[1];
- fparam[2] = (GLfloat) params[2];
- fparam[3] = (GLfloat) params[3];
- break;
- case GL_SPOT_DIRECTION:
- fparam[0] = (GLfloat) params[0];
- fparam[1] = (GLfloat) params[1];
- fparam[2] = (GLfloat) params[2];
- break;
- case GL_SPOT_EXPONENT:
- case GL_SPOT_CUTOFF:
- case GL_CONSTANT_ATTENUATION:
- case GL_LINEAR_ATTENUATION:
- case GL_QUADRATIC_ATTENUATION:
- fparam[0] = (GLfloat) params[0];
- break;
- default:
- /* error will be caught later in gl_Lightfv */
- ;
+ case GL_AMBIENT:
+ case GL_DIFFUSE:
+ case GL_SPECULAR:
+ fparam[0] = INT_TO_FLOAT(params[0]);
+ fparam[1] = INT_TO_FLOAT(params[1]);
+ fparam[2] = INT_TO_FLOAT(params[2]);
+ fparam[3] = INT_TO_FLOAT(params[3]);
+ break;
+ case GL_POSITION:
+ fparam[0] = (GLfloat) params[0];
+ fparam[1] = (GLfloat) params[1];
+ fparam[2] = (GLfloat) params[2];
+ fparam[3] = (GLfloat) params[3];
+ break;
+ case GL_SPOT_DIRECTION:
+ fparam[0] = (GLfloat) params[0];
+ fparam[1] = (GLfloat) params[1];
+ fparam[2] = (GLfloat) params[2];
+ break;
+ case GL_SPOT_EXPONENT:
+ case GL_SPOT_CUTOFF:
+ case GL_CONSTANT_ATTENUATION:
+ case GL_LINEAR_ATTENUATION:
+ case GL_QUADRATIC_ATTENUATION:
+ fparam[0] = (GLfloat) params[0];
+ break;
+ default:
+ /* error will be caught later in gl_Lightfv */
+ ;
}
- save_Lightfv( light, pname, fparam );
+ save_Lightfv(light, pname, fparam);
}
-static void GLAPIENTRY save_Lighti( GLenum light, GLenum pname, GLint param )
+static void GLAPIENTRY
+save_Lighti(GLenum light, GLenum pname, GLint param)
{
- save_Lightiv( light, pname, &param );
+ save_Lightiv(light, pname, &param);
}
-static void GLAPIENTRY save_LightModelfv( GLenum pname, const GLfloat *params )
+static void GLAPIENTRY
+save_LightModelfv(GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LIGHT_MODEL, 5 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LIGHT_MODEL, 5);
if (n) {
n[1].e = pname;
n[2].f = params[0];
@@ -2045,122 +2090,131 @@ static void GLAPIENTRY save_LightModelfv( GLenum pname, const GLfloat *params )
n[5].f = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_LightModelfv(ctx->Exec, ( pname, params ));
+ CALL_LightModelfv(ctx->Exec, (pname, params));
}
}
-static void GLAPIENTRY save_LightModelf( GLenum pname, GLfloat param )
+static void GLAPIENTRY
+save_LightModelf(GLenum pname, GLfloat param)
{
save_LightModelfv(pname, &param);
}
-static void GLAPIENTRY save_LightModeliv( GLenum pname, const GLint *params )
+static void GLAPIENTRY
+save_LightModeliv(GLenum pname, const GLint *params)
{
GLfloat fparam[4];
switch (pname) {
- case GL_LIGHT_MODEL_AMBIENT:
- fparam[0] = INT_TO_FLOAT( params[0] );
- fparam[1] = INT_TO_FLOAT( params[1] );
- fparam[2] = INT_TO_FLOAT( params[2] );
- fparam[3] = INT_TO_FLOAT( params[3] );
- break;
- case GL_LIGHT_MODEL_LOCAL_VIEWER:
- case GL_LIGHT_MODEL_TWO_SIDE:
- case GL_LIGHT_MODEL_COLOR_CONTROL:
- fparam[0] = (GLfloat) params[0];
- break;
- default:
- /* Error will be caught later in gl_LightModelfv */
- ;
+ case GL_LIGHT_MODEL_AMBIENT:
+ fparam[0] = INT_TO_FLOAT(params[0]);
+ fparam[1] = INT_TO_FLOAT(params[1]);
+ fparam[2] = INT_TO_FLOAT(params[2]);
+ fparam[3] = INT_TO_FLOAT(params[3]);
+ break;
+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
+ case GL_LIGHT_MODEL_TWO_SIDE:
+ case GL_LIGHT_MODEL_COLOR_CONTROL:
+ fparam[0] = (GLfloat) params[0];
+ break;
+ default:
+ /* Error will be caught later in gl_LightModelfv */
+ ;
}
save_LightModelfv(pname, fparam);
}
-static void GLAPIENTRY save_LightModeli( GLenum pname, GLint param )
+static void GLAPIENTRY
+save_LightModeli(GLenum pname, GLint param)
{
save_LightModeliv(pname, &param);
}
-static void GLAPIENTRY save_LineStipple( GLint factor, GLushort pattern )
+static void GLAPIENTRY
+save_LineStipple(GLint factor, GLushort pattern)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LINE_STIPPLE, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LINE_STIPPLE, 2);
if (n) {
n[1].i = factor;
n[2].us = pattern;
}
if (ctx->ExecuteFlag) {
- CALL_LineStipple(ctx->Exec, ( factor, pattern ));
+ CALL_LineStipple(ctx->Exec, (factor, pattern));
}
}
-static void GLAPIENTRY save_LineWidth( GLfloat width )
+static void GLAPIENTRY
+save_LineWidth(GLfloat width)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LINE_WIDTH, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LINE_WIDTH, 1);
if (n) {
n[1].f = width;
}
if (ctx->ExecuteFlag) {
- CALL_LineWidth(ctx->Exec, ( width ));
+ CALL_LineWidth(ctx->Exec, (width));
}
}
-static void GLAPIENTRY save_ListBase( GLuint base )
+static void GLAPIENTRY
+save_ListBase(GLuint base)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LIST_BASE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LIST_BASE, 1);
if (n) {
n[1].ui = base;
}
if (ctx->ExecuteFlag) {
- CALL_ListBase(ctx->Exec, ( base ));
+ CALL_ListBase(ctx->Exec, (base));
}
}
-static void GLAPIENTRY save_LoadIdentity( void )
+static void GLAPIENTRY
+save_LoadIdentity(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_IDENTITY, 0 );
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_IDENTITY, 0);
if (ctx->ExecuteFlag) {
CALL_LoadIdentity(ctx->Exec, ());
}
}
-static void GLAPIENTRY save_LoadMatrixf( const GLfloat *m )
+static void GLAPIENTRY
+save_LoadMatrixf(const GLfloat * m)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_MATRIX, 16 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_MATRIX, 16);
if (n) {
GLuint i;
- for (i=0;i<16;i++) {
- n[1+i].f = m[i];
+ for (i = 0; i < 16; i++) {
+ n[1 + i].f = m[i];
}
}
if (ctx->ExecuteFlag) {
- CALL_LoadMatrixf(ctx->Exec, ( m ));
+ CALL_LoadMatrixf(ctx->Exec, (m));
}
}
-static void GLAPIENTRY save_LoadMatrixd( const GLdouble *m )
+static void GLAPIENTRY
+save_LoadMatrixd(const GLdouble * m)
{
GLfloat f[16];
GLint i;
@@ -2171,172 +2225,181 @@ static void GLAPIENTRY save_LoadMatrixd( const GLdouble *m )
}
-static void GLAPIENTRY save_LoadName( GLuint name )
+static void GLAPIENTRY
+save_LoadName(GLuint name)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_NAME, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_NAME, 1);
if (n) {
n[1].ui = name;
}
if (ctx->ExecuteFlag) {
- CALL_LoadName(ctx->Exec, ( name ));
+ CALL_LoadName(ctx->Exec, (name));
}
}
-static void GLAPIENTRY save_LogicOp( GLenum opcode )
+static void GLAPIENTRY
+save_LogicOp(GLenum opcode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LOGIC_OP, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LOGIC_OP, 1);
if (n) {
n[1].e = opcode;
}
if (ctx->ExecuteFlag) {
- CALL_LogicOp(ctx->Exec, ( opcode ));
+ CALL_LogicOp(ctx->Exec, (opcode));
}
}
-static void GLAPIENTRY save_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride,
- GLint order, const GLdouble *points)
+static void GLAPIENTRY
+save_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride,
+ GLint order, const GLdouble * points)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP1, 6);
if (n) {
- GLfloat *pnts = _mesa_copy_map_points1d( target, stride, order, points );
+ GLfloat *pnts = _mesa_copy_map_points1d(target, stride, order, points);
n[1].e = target;
n[2].f = (GLfloat) u1;
n[3].f = (GLfloat) u2;
- n[4].i = _mesa_evaluator_components(target); /* stride */
+ n[4].i = _mesa_evaluator_components(target); /* stride */
n[5].i = order;
n[6].data = (void *) pnts;
}
if (ctx->ExecuteFlag) {
- CALL_Map1d(ctx->Exec, ( target, u1, u2, stride, order, points ));
+ CALL_Map1d(ctx->Exec, (target, u1, u2, stride, order, points));
}
}
-static void GLAPIENTRY save_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride,
- GLint order, const GLfloat *points)
+static void GLAPIENTRY
+save_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride,
+ GLint order, const GLfloat * points)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP1, 6);
if (n) {
- GLfloat *pnts = _mesa_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;
- n[4].i = _mesa_evaluator_components(target); /* stride */
+ n[4].i = _mesa_evaluator_components(target); /* stride */
n[5].i = order;
n[6].data = (void *) pnts;
}
if (ctx->ExecuteFlag) {
- CALL_Map1f(ctx->Exec, ( target, u1, u2, stride, order, points ));
+ CALL_Map1f(ctx->Exec, (target, u1, u2, stride, order, points));
}
}
-static void GLAPIENTRY save_Map2d( GLenum target,
- GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
- GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
- const GLdouble *points )
+static void GLAPIENTRY
+save_Map2d(GLenum target,
+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
+ const GLdouble * points)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP2, 10);
if (n) {
- GLfloat *pnts = _mesa_copy_map_points2d( target, ustride, uorder,
- vstride, vorder, points );
+ GLfloat *pnts = _mesa_copy_map_points2d(target, ustride, uorder,
+ vstride, vorder, points);
n[1].e = target;
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*/
+ n[6].i = _mesa_evaluator_components(target) * vorder; /*ustride */
+ n[7].i = _mesa_evaluator_components(target); /*vstride */
n[8].i = uorder;
n[9].i = vorder;
n[10].data = (void *) pnts;
}
if (ctx->ExecuteFlag) {
- CALL_Map2d(ctx->Exec, ( target,
- u1, u2, ustride, uorder,
- v1, v2, vstride, vorder, points ));
+ CALL_Map2d(ctx->Exec, (target,
+ u1, u2, ustride, uorder,
+ v1, v2, vstride, vorder, points));
}
}
-static void GLAPIENTRY save_Map2f( GLenum target,
- GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
- GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
- const GLfloat *points )
+static void GLAPIENTRY
+save_Map2f(GLenum target,
+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
+ const GLfloat * points)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP2, 10);
if (n) {
- GLfloat *pnts = _mesa_copy_map_points2f( target, ustride, uorder,
- vstride, vorder, points );
+ GLfloat *pnts = _mesa_copy_map_points2f(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;
/* XXX verify these strides are correct */
- n[6].i = _mesa_evaluator_components(target) * vorder; /*ustride*/
- n[7].i = _mesa_evaluator_components(target); /*vstride*/
+ n[6].i = _mesa_evaluator_components(target) * vorder; /*ustride */
+ n[7].i = _mesa_evaluator_components(target); /*vstride */
n[8].i = uorder;
n[9].i = vorder;
n[10].data = (void *) pnts;
}
if (ctx->ExecuteFlag) {
- CALL_Map2f(ctx->Exec, ( target, u1, u2, ustride, uorder,
- v1, v2, vstride, vorder, points ));
+ CALL_Map2f(ctx->Exec, (target, u1, u2, ustride, uorder,
+ v1, v2, vstride, vorder, points));
}
}
-static void GLAPIENTRY save_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 )
+static void GLAPIENTRY
+save_MapGrid1f(GLint un, GLfloat u1, GLfloat u2)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MAPGRID1, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MAPGRID1, 3);
if (n) {
n[1].i = un;
n[2].f = u1;
n[3].f = u2;
}
if (ctx->ExecuteFlag) {
- CALL_MapGrid1f(ctx->Exec, ( un, u1, u2 ));
+ CALL_MapGrid1f(ctx->Exec, (un, u1, u2));
}
}
-static void GLAPIENTRY save_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 )
+static void GLAPIENTRY
+save_MapGrid1d(GLint un, GLdouble u1, GLdouble u2)
{
save_MapGrid1f(un, (GLfloat) u1, (GLfloat) u2);
}
-static void GLAPIENTRY save_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
- GLint vn, GLfloat v1, GLfloat v2 )
+static void GLAPIENTRY
+save_MapGrid2f(GLint un, GLfloat u1, GLfloat u2,
+ GLint vn, GLfloat v1, GLfloat v2)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MAPGRID2, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MAPGRID2, 6);
if (n) {
n[1].i = un;
n[2].f = u1;
@@ -2346,31 +2409,33 @@ static void GLAPIENTRY save_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
n[6].f = v2;
}
if (ctx->ExecuteFlag) {
- CALL_MapGrid2f(ctx->Exec, ( un, u1, u2, vn, v1, v2 ));
+ CALL_MapGrid2f(ctx->Exec, (un, u1, u2, vn, v1, v2));
}
}
-static void GLAPIENTRY save_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
- GLint vn, GLdouble v1, GLdouble v2 )
+static void GLAPIENTRY
+save_MapGrid2d(GLint un, GLdouble u1, GLdouble u2,
+ GLint vn, GLdouble v1, GLdouble v2)
{
save_MapGrid2f(un, (GLfloat) u1, (GLfloat) u2,
- vn, (GLfloat) v1, (GLfloat) v2);
+ vn, (GLfloat) v1, (GLfloat) v2);
}
-static void GLAPIENTRY save_MatrixMode( GLenum mode )
+static void GLAPIENTRY
+save_MatrixMode(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MATRIX_MODE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MATRIX_MODE, 1);
if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_MatrixMode(ctx->Exec, ( mode ));
+ CALL_MatrixMode(ctx->Exec, (mode));
}
}
@@ -2382,37 +2447,39 @@ save_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MIN_MAX, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MIN_MAX, 3);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
n[3].b = sink;
}
if (ctx->ExecuteFlag) {
- CALL_Minmax(ctx->Exec, ( target, internalFormat, sink ));
+ CALL_Minmax(ctx->Exec, (target, internalFormat, sink));
}
}
-static void GLAPIENTRY save_MultMatrixf( const GLfloat *m )
+static void GLAPIENTRY
+save_MultMatrixf(const GLfloat * m)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MULT_MATRIX, 16 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MULT_MATRIX, 16);
if (n) {
GLuint i;
- for (i=0;i<16;i++) {
- n[1+i].f = m[i];
+ for (i = 0; i < 16; i++) {
+ n[1 + i].f = m[i];
}
}
if (ctx->ExecuteFlag) {
- CALL_MultMatrixf(ctx->Exec, ( m ));
+ CALL_MultMatrixf(ctx->Exec, (m));
}
}
-static void GLAPIENTRY save_MultMatrixd( const GLdouble *m )
+static void GLAPIENTRY
+save_MultMatrixd(const GLdouble * m)
{
GLfloat f[16];
GLint i;
@@ -2423,25 +2490,26 @@ static void GLAPIENTRY save_MultMatrixd( const GLdouble *m )
}
-static void GLAPIENTRY save_NewList( GLuint list, GLenum mode )
+static void GLAPIENTRY
+save_NewList(GLuint list, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
/* It's an error to call this function while building a display list */
- _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" );
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glNewList");
(void) list;
(void) mode;
}
-static void GLAPIENTRY save_Ortho( GLdouble left, GLdouble right,
- GLdouble bottom, GLdouble top,
- GLdouble nearval, GLdouble farval )
+static void GLAPIENTRY
+save_Ortho(GLdouble left, GLdouble right,
+ GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ORTHO, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ORTHO, 6);
if (n) {
n[1].f = (GLfloat) left;
n[2].f = (GLfloat) right;
@@ -2451,43 +2519,43 @@ static void GLAPIENTRY save_Ortho( GLdouble left, GLdouble right,
n[6].f = (GLfloat) farval;
}
if (ctx->ExecuteFlag) {
- CALL_Ortho(ctx->Exec, ( left, right, bottom, top, nearval, farval ));
+ CALL_Ortho(ctx->Exec, (left, right, bottom, top, nearval, farval));
}
}
static void GLAPIENTRY
-save_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values )
+save_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_MAP, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PIXEL_MAP, 3);
if (n) {
n[1].e = map;
n[2].i = mapsize;
- n[3].data = (void *) _mesa_malloc( mapsize * sizeof(GLfloat) );
- MEMCPY( n[3].data, (void *) values, mapsize * sizeof(GLfloat) );
+ n[3].data = (void *) _mesa_malloc(mapsize * sizeof(GLfloat));
+ MEMCPY(n[3].data, (void *) values, mapsize * sizeof(GLfloat));
}
if (ctx->ExecuteFlag) {
- CALL_PixelMapfv(ctx->Exec, ( map, mapsize, values ));
+ CALL_PixelMapfv(ctx->Exec, (map, mapsize, values));
}
}
static void GLAPIENTRY
-save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values )
+save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values)
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
GLint i;
- if (map==GL_PIXEL_MAP_I_TO_I || map==GL_PIXEL_MAP_S_TO_S) {
- for (i=0;i<mapsize;i++) {
+ if (map == GL_PIXEL_MAP_I_TO_I || map == GL_PIXEL_MAP_S_TO_S) {
+ for (i = 0; i < mapsize; i++) {
fvalues[i] = (GLfloat) values[i];
}
}
else {
- for (i=0;i<mapsize;i++) {
- fvalues[i] = UINT_TO_FLOAT( values[i] );
+ for (i = 0; i < mapsize; i++) {
+ fvalues[i] = UINT_TO_FLOAT(values[i]);
}
}
save_PixelMapfv(map, mapsize, fvalues);
@@ -2499,14 +2567,14 @@ save_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values)
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
GLint i;
- if (map==GL_PIXEL_MAP_I_TO_I || map==GL_PIXEL_MAP_S_TO_S) {
- for (i=0;i<mapsize;i++) {
+ if (map == GL_PIXEL_MAP_I_TO_I || map == GL_PIXEL_MAP_S_TO_S) {
+ for (i = 0; i < mapsize; i++) {
fvalues[i] = (GLfloat) values[i];
}
}
else {
- for (i=0;i<mapsize;i++) {
- fvalues[i] = USHORT_TO_FLOAT( values[i] );
+ for (i = 0; i < mapsize; i++) {
+ fvalues[i] = USHORT_TO_FLOAT(values[i]);
}
}
save_PixelMapfv(map, mapsize, fvalues);
@@ -2514,53 +2582,53 @@ save_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values)
static void GLAPIENTRY
-save_PixelTransferf( GLenum pname, GLfloat param )
+save_PixelTransferf(GLenum pname, GLfloat param)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TRANSFER, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PIXEL_TRANSFER, 2);
if (n) {
n[1].e = pname;
n[2].f = param;
}
if (ctx->ExecuteFlag) {
- CALL_PixelTransferf(ctx->Exec, ( pname, param ));
+ CALL_PixelTransferf(ctx->Exec, (pname, param));
}
}
static void GLAPIENTRY
-save_PixelTransferi( GLenum pname, GLint param )
+save_PixelTransferi(GLenum pname, GLint param)
{
- save_PixelTransferf( pname, (GLfloat) param );
+ save_PixelTransferf(pname, (GLfloat) param);
}
static void GLAPIENTRY
-save_PixelZoom( GLfloat xfactor, GLfloat yfactor )
+save_PixelZoom(GLfloat xfactor, GLfloat yfactor)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_ZOOM, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PIXEL_ZOOM, 2);
if (n) {
n[1].f = xfactor;
n[2].f = yfactor;
}
if (ctx->ExecuteFlag) {
- CALL_PixelZoom(ctx->Exec, ( xfactor, yfactor ));
+ CALL_PixelZoom(ctx->Exec, (xfactor, yfactor));
}
}
static void GLAPIENTRY
-save_PointParameterfvEXT( GLenum pname, const GLfloat *params )
+save_PointParameterfvEXT(GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_POINT_PARAMETERS, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_POINT_PARAMETERS, 4);
if (n) {
n[1].e = pname;
n[2].f = params[0];
@@ -2568,56 +2636,61 @@ save_PointParameterfvEXT( GLenum pname, const GLfloat *params )
n[4].f = params[2];
}
if (ctx->ExecuteFlag) {
- CALL_PointParameterfvEXT(ctx->Exec, ( pname, params ));
+ CALL_PointParameterfvEXT(ctx->Exec, (pname, params));
}
}
-static void GLAPIENTRY save_PointParameterfEXT( GLenum pname, GLfloat param )
+static void GLAPIENTRY
+save_PointParameterfEXT(GLenum pname, GLfloat param)
{
save_PointParameterfvEXT(pname, &param);
}
-static void GLAPIENTRY save_PointParameteriNV( GLenum pname, GLint param )
+static void GLAPIENTRY
+save_PointParameteriNV(GLenum pname, GLint param)
{
GLfloat p = (GLfloat) param;
save_PointParameterfvEXT(pname, &p);
}
-static void GLAPIENTRY save_PointParameterivNV( GLenum pname, const GLint *param )
+static void GLAPIENTRY
+save_PointParameterivNV(GLenum pname, const GLint * param)
{
GLfloat p = (GLfloat) param[0];
save_PointParameterfvEXT(pname, &p);
}
-static void GLAPIENTRY save_PointSize( GLfloat size )
+static void GLAPIENTRY
+save_PointSize(GLfloat size)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_POINT_SIZE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_POINT_SIZE, 1);
if (n) {
n[1].f = size;
}
if (ctx->ExecuteFlag) {
- CALL_PointSize(ctx->Exec, ( size ));
+ CALL_PointSize(ctx->Exec, (size));
}
}
-static void GLAPIENTRY save_PolygonMode( GLenum face, GLenum mode )
+static void GLAPIENTRY
+save_PolygonMode(GLenum face, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_MODE, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_MODE, 2);
if (n) {
n[1].e = face;
n[2].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_PolygonMode(ctx->Exec, ( face, mode ));
+ CALL_PolygonMode(ctx->Exec, (face, mode));
}
}
@@ -2625,41 +2698,44 @@ static void GLAPIENTRY save_PolygonMode( GLenum face, GLenum mode )
/*
* Polygon stipple must have been upacked already!
*/
-static void GLAPIENTRY save_PolygonStipple( const GLubyte *pattern )
+static void GLAPIENTRY
+save_PolygonStipple(const GLubyte * pattern)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_STIPPLE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_STIPPLE, 1);
if (n) {
void *data;
- n[1].data = _mesa_malloc( 32 * 4 );
- data = n[1].data; /* This needed for Acorn compiler */
- MEMCPY( data, pattern, 32 * 4 );
+ n[1].data = _mesa_malloc(32 * 4);
+ data = n[1].data; /* This needed for Acorn compiler */
+ MEMCPY(data, pattern, 32 * 4);
}
if (ctx->ExecuteFlag) {
- CALL_PolygonStipple(ctx->Exec, ( (GLubyte*) pattern ));
+ CALL_PolygonStipple(ctx->Exec, ((GLubyte *) pattern));
}
}
-static void GLAPIENTRY save_PolygonOffset( GLfloat factor, GLfloat units )
+static void GLAPIENTRY
+save_PolygonOffset(GLfloat factor, GLfloat units)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_OFFSET, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_OFFSET, 2);
if (n) {
n[1].f = factor;
n[2].f = units;
}
if (ctx->ExecuteFlag) {
- CALL_PolygonOffset(ctx->Exec, ( factor, units ));
+ CALL_PolygonOffset(ctx->Exec, (factor, units));
}
}
-static void GLAPIENTRY save_PolygonOffsetEXT( GLfloat factor, GLfloat bias )
+static void GLAPIENTRY
+save_PolygonOffsetEXT(GLfloat factor, GLfloat bias)
{
GET_CURRENT_CONTEXT(ctx);
/* XXX mult by DepthMaxF here??? */
@@ -2667,107 +2743,115 @@ static void GLAPIENTRY save_PolygonOffsetEXT( GLfloat factor, GLfloat bias )
}
-static void GLAPIENTRY save_PopAttrib( void )
+static void GLAPIENTRY
+save_PopAttrib(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_ATTRIB, 0 );
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_POP_ATTRIB, 0);
if (ctx->ExecuteFlag) {
CALL_PopAttrib(ctx->Exec, ());
}
}
-static void GLAPIENTRY save_PopMatrix( void )
+static void GLAPIENTRY
+save_PopMatrix(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_MATRIX, 0 );
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_POP_MATRIX, 0);
if (ctx->ExecuteFlag) {
CALL_PopMatrix(ctx->Exec, ());
}
}
-static void GLAPIENTRY save_PopName( void )
+static void GLAPIENTRY
+save_PopName(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_NAME, 0 );
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_POP_NAME, 0);
if (ctx->ExecuteFlag) {
CALL_PopName(ctx->Exec, ());
}
}
-static void GLAPIENTRY save_PrioritizeTextures( GLsizei num, const GLuint *textures,
- const GLclampf *priorities )
+static void GLAPIENTRY
+save_PrioritizeTextures(GLsizei num, const GLuint * textures,
+ const GLclampf * priorities)
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- for (i=0;i<num;i++) {
+ for (i = 0; i < num; i++) {
Node *n;
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PRIORITIZE_TEXTURE, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PRIORITIZE_TEXTURE, 2);
if (n) {
n[1].ui = textures[i];
n[2].f = priorities[i];
}
}
if (ctx->ExecuteFlag) {
- CALL_PrioritizeTextures(ctx->Exec, ( num, textures, priorities ));
+ CALL_PrioritizeTextures(ctx->Exec, (num, textures, priorities));
}
}
-static void GLAPIENTRY save_PushAttrib( GLbitfield mask )
+static void GLAPIENTRY
+save_PushAttrib(GLbitfield mask)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_ATTRIB, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PUSH_ATTRIB, 1);
if (n) {
n[1].bf = mask;
}
if (ctx->ExecuteFlag) {
- CALL_PushAttrib(ctx->Exec, ( mask ));
+ CALL_PushAttrib(ctx->Exec, (mask));
}
}
-static void GLAPIENTRY save_PushMatrix( void )
+static void GLAPIENTRY
+save_PushMatrix(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_MATRIX, 0 );
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_PUSH_MATRIX, 0);
if (ctx->ExecuteFlag) {
CALL_PushMatrix(ctx->Exec, ());
}
}
-static void GLAPIENTRY save_PushName( GLuint name )
+static void GLAPIENTRY
+save_PushName(GLuint name)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_NAME, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PUSH_NAME, 1);
if (n) {
n[1].ui = name;
}
if (ctx->ExecuteFlag) {
- CALL_PushName(ctx->Exec, ( name ));
+ CALL_PushName(ctx->Exec, (name));
}
}
-static void GLAPIENTRY save_RasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+save_RasterPos4f(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_RASTER_POS, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_RASTER_POS, 4);
if (n) {
n[1].f = x;
n[2].f = y;
@@ -2775,154 +2859,179 @@ static void GLAPIENTRY save_RasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloa
n[4].f = w;
}
if (ctx->ExecuteFlag) {
- CALL_RasterPos4f(ctx->Exec, ( x, y, z, w ));
+ CALL_RasterPos4f(ctx->Exec, (x, y, z, w));
}
}
-static void GLAPIENTRY save_RasterPos2d(GLdouble x, GLdouble y)
+static void GLAPIENTRY
+save_RasterPos2d(GLdouble x, GLdouble y)
{
save_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos2f(GLfloat x, GLfloat y)
+static void GLAPIENTRY
+save_RasterPos2f(GLfloat x, GLfloat y)
{
save_RasterPos4f(x, y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos2i(GLint x, GLint y)
+static void GLAPIENTRY
+save_RasterPos2i(GLint x, GLint y)
{
save_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos2s(GLshort x, GLshort y)
+static void GLAPIENTRY
+save_RasterPos2s(GLshort x, GLshort y)
{
save_RasterPos4f(x, y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos3d(GLdouble x, GLdouble y, GLdouble z)
+static void GLAPIENTRY
+save_RasterPos3d(GLdouble x, GLdouble y, GLdouble z)
{
save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-static void GLAPIENTRY save_RasterPos3f(GLfloat x, GLfloat y, GLfloat z)
+static void GLAPIENTRY
+save_RasterPos3f(GLfloat x, GLfloat y, GLfloat z)
{
save_RasterPos4f(x, y, z, 1.0F);
}
-static void GLAPIENTRY save_RasterPos3i(GLint x, GLint y, GLint z)
+static void GLAPIENTRY
+save_RasterPos3i(GLint x, GLint y, GLint z)
{
save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-static void GLAPIENTRY save_RasterPos3s(GLshort x, GLshort y, GLshort z)
+static void GLAPIENTRY
+save_RasterPos3s(GLshort x, GLshort y, GLshort z)
{
save_RasterPos4f(x, y, z, 1.0F);
}
-static void GLAPIENTRY save_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+static void GLAPIENTRY
+save_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-static void GLAPIENTRY save_RasterPos4i(GLint x, GLint y, GLint z, GLint w)
+static void GLAPIENTRY
+save_RasterPos4i(GLint x, GLint y, GLint z, GLint w)
{
save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-static void GLAPIENTRY save_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
+static void GLAPIENTRY
+save_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
{
save_RasterPos4f(x, y, z, w);
}
-static void GLAPIENTRY save_RasterPos2dv(const GLdouble *v)
+static void GLAPIENTRY
+save_RasterPos2dv(const GLdouble * v)
{
save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos2fv(const GLfloat *v)
+static void GLAPIENTRY
+save_RasterPos2fv(const GLfloat * v)
{
save_RasterPos4f(v[0], v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos2iv(const GLint *v)
+static void GLAPIENTRY
+save_RasterPos2iv(const GLint * v)
{
save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos2sv(const GLshort *v)
+static void GLAPIENTRY
+save_RasterPos2sv(const GLshort * v)
{
save_RasterPos4f(v[0], v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_RasterPos3dv(const GLdouble *v)
+static void GLAPIENTRY
+save_RasterPos3dv(const GLdouble * v)
{
save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-static void GLAPIENTRY save_RasterPos3fv(const GLfloat *v)
+static void GLAPIENTRY
+save_RasterPos3fv(const GLfloat * v)
{
save_RasterPos4f(v[0], v[1], v[2], 1.0F);
}
-static void GLAPIENTRY save_RasterPos3iv(const GLint *v)
+static void GLAPIENTRY
+save_RasterPos3iv(const GLint * v)
{
save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-static void GLAPIENTRY save_RasterPos3sv(const GLshort *v)
+static void GLAPIENTRY
+save_RasterPos3sv(const GLshort * v)
{
save_RasterPos4f(v[0], v[1], v[2], 1.0F);
}
-static void GLAPIENTRY save_RasterPos4dv(const GLdouble *v)
+static void GLAPIENTRY
+save_RasterPos4dv(const GLdouble * v)
{
save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ (GLfloat) v[2], (GLfloat) v[3]);
}
-static void GLAPIENTRY save_RasterPos4fv(const GLfloat *v)
+static void GLAPIENTRY
+save_RasterPos4fv(const GLfloat * v)
{
save_RasterPos4f(v[0], v[1], v[2], v[3]);
}
-static void GLAPIENTRY save_RasterPos4iv(const GLint *v)
+static void GLAPIENTRY
+save_RasterPos4iv(const GLint * v)
{
save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ (GLfloat) v[2], (GLfloat) v[3]);
}
-static void GLAPIENTRY save_RasterPos4sv(const GLshort *v)
+static void GLAPIENTRY
+save_RasterPos4sv(const GLshort * v)
{
save_RasterPos4f(v[0], v[1], v[2], v[3]);
}
-static void GLAPIENTRY save_PassThrough( GLfloat token )
+static void GLAPIENTRY
+save_PassThrough(GLfloat token)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PASSTHROUGH, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PASSTHROUGH, 1);
if (n) {
n[1].f = token;
}
if (ctx->ExecuteFlag) {
- CALL_PassThrough(ctx->Exec, ( token ));
+ CALL_PassThrough(ctx->Exec, (token));
}
}
-static void GLAPIENTRY save_ReadBuffer( GLenum mode )
+static void GLAPIENTRY
+save_ReadBuffer(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_READ_BUFFER, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_READ_BUFFER, 1);
if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_ReadBuffer(ctx->Exec, ( mode ));
+ CALL_ReadBuffer(ctx->Exec, (mode));
}
}
@@ -2933,12 +3042,12 @@ save_ResetHistogram(GLenum target)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_RESET_HISTOGRAM, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_RESET_HISTOGRAM, 1);
if (n) {
n[1].e = target;
}
if (ctx->ExecuteFlag) {
- CALL_ResetHistogram(ctx->Exec, ( target ));
+ CALL_ResetHistogram(ctx->Exec, (target));
}
}
@@ -2949,22 +3058,23 @@ save_ResetMinmax(GLenum target)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_RESET_MIN_MAX, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_RESET_MIN_MAX, 1);
if (n) {
n[1].e = target;
}
if (ctx->ExecuteFlag) {
- CALL_ResetMinmax(ctx->Exec, ( target ));
+ CALL_ResetMinmax(ctx->Exec, (target));
}
}
-static void GLAPIENTRY save_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_Rotatef(GLfloat angle, 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_ROTATE, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ROTATE, 4);
if (n) {
n[1].f = angle;
n[2].f = x;
@@ -2972,46 +3082,50 @@ static void GLAPIENTRY save_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloa
n[4].f = z;
}
if (ctx->ExecuteFlag) {
- CALL_Rotatef(ctx->Exec, ( angle, x, y, z ));
+ CALL_Rotatef(ctx->Exec, (angle, x, y, z));
}
}
-static void GLAPIENTRY save_Rotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z )
+static void GLAPIENTRY
+save_Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
{
save_Rotatef((GLfloat) angle, (GLfloat) x, (GLfloat) y, (GLfloat) z);
}
-static void GLAPIENTRY save_Scalef( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_Scalef(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_SCALE, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_SCALE, 3);
if (n) {
n[1].f = x;
n[2].f = y;
n[3].f = z;
}
if (ctx->ExecuteFlag) {
- CALL_Scalef(ctx->Exec, ( x, y, z ));
+ CALL_Scalef(ctx->Exec, (x, y, z));
}
}
-static void GLAPIENTRY save_Scaled( GLdouble x, GLdouble y, GLdouble z )
+static void GLAPIENTRY
+save_Scaled(GLdouble x, GLdouble y, GLdouble z)
{
save_Scalef((GLfloat) x, (GLfloat) y, (GLfloat) z);
}
-static void GLAPIENTRY save_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
+static void GLAPIENTRY
+save_Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_SCISSOR, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_SCISSOR, 4);
if (n) {
n[1].i = x;
n[2].i = y;
@@ -3019,71 +3133,75 @@ static void GLAPIENTRY save_Scissor( GLint x, GLint y, GLsizei width, GLsizei he
n[4].i = height;
}
if (ctx->ExecuteFlag) {
- CALL_Scissor(ctx->Exec, ( x, y, width, height ));
+ CALL_Scissor(ctx->Exec, (x, y, width, height));
}
}
-static void GLAPIENTRY save_ShadeModel( GLenum mode )
+static void GLAPIENTRY
+save_ShadeModel(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_SHADE_MODEL, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_SHADE_MODEL, 1);
if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_ShadeModel(ctx->Exec, ( mode ));
+ CALL_ShadeModel(ctx->Exec, (mode));
}
}
-static void GLAPIENTRY save_StencilFunc( GLenum func, GLint ref, GLuint mask )
+static void GLAPIENTRY
+save_StencilFunc(GLenum func, GLint ref, GLuint mask)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_FUNC, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_FUNC, 3);
if (n) {
n[1].e = func;
n[2].i = ref;
n[3].ui = mask;
}
if (ctx->ExecuteFlag) {
- CALL_StencilFunc(ctx->Exec, ( func, ref, mask ));
+ CALL_StencilFunc(ctx->Exec, (func, ref, mask));
}
}
-static void GLAPIENTRY save_StencilMask( GLuint mask )
+static void GLAPIENTRY
+save_StencilMask(GLuint mask)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_MASK, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_MASK, 1);
if (n) {
n[1].ui = mask;
}
if (ctx->ExecuteFlag) {
- CALL_StencilMask(ctx->Exec, ( mask ));
+ CALL_StencilMask(ctx->Exec, (mask));
}
}
-static void GLAPIENTRY save_StencilOp( GLenum fail, GLenum zfail, GLenum zpass )
+static void GLAPIENTRY
+save_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_OP, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_OP, 3);
if (n) {
n[1].e = fail;
n[2].e = zfail;
n[3].e = zpass;
}
if (ctx->ExecuteFlag) {
- CALL_StencilOp(ctx->Exec, ( fail, zfail, zpass ));
+ CALL_StencilOp(ctx->Exec, (fail, zfail, zpass));
}
}
@@ -3130,7 +3248,7 @@ save_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_OP_SEPARATE, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_OP_SEPARATE, 4);
if (n) {
n[1].e = face;
n[2].e = fail;
@@ -3143,12 +3261,13 @@ save_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
}
-static void GLAPIENTRY save_TexEnvfv( GLenum target, GLenum pname, const GLfloat *params )
+static void GLAPIENTRY
+save_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXENV, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEXENV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -3164,49 +3283,53 @@ static void GLAPIENTRY save_TexEnvfv( GLenum target, GLenum pname, const GLfloat
}
}
if (ctx->ExecuteFlag) {
- CALL_TexEnvfv(ctx->Exec, ( target, pname, params ));
+ CALL_TexEnvfv(ctx->Exec, (target, pname, params));
}
}
-static void GLAPIENTRY save_TexEnvf( GLenum target, GLenum pname, GLfloat param )
+static void GLAPIENTRY
+save_TexEnvf(GLenum target, GLenum pname, GLfloat param)
{
- save_TexEnvfv( target, pname, &param );
+ save_TexEnvfv(target, pname, &param);
}
-static void GLAPIENTRY save_TexEnvi( GLenum target, GLenum pname, GLint param )
+static void GLAPIENTRY
+save_TexEnvi(GLenum target, GLenum pname, GLint param)
{
GLfloat p[4];
p[0] = (GLfloat) param;
p[1] = p[2] = p[3] = 0.0;
- save_TexEnvfv( target, pname, p );
+ save_TexEnvfv(target, pname, p);
}
-static void GLAPIENTRY save_TexEnviv( GLenum target, GLenum pname, const GLint *param )
+static void GLAPIENTRY
+save_TexEnviv(GLenum target, GLenum pname, const GLint * param)
{
GLfloat p[4];
if (pname == GL_TEXTURE_ENV_COLOR) {
- p[0] = INT_TO_FLOAT( param[0] );
- p[1] = INT_TO_FLOAT( param[1] );
- p[2] = INT_TO_FLOAT( param[2] );
- p[3] = INT_TO_FLOAT( param[3] );
+ p[0] = INT_TO_FLOAT(param[0]);
+ p[1] = INT_TO_FLOAT(param[1]);
+ p[2] = INT_TO_FLOAT(param[2]);
+ p[3] = INT_TO_FLOAT(param[3]);
}
else {
p[0] = (GLfloat) param[0];
p[1] = p[2] = p[3] = 0.0F;
}
- save_TexEnvfv( target, pname, p );
+ save_TexEnvfv(target, pname, p);
}
-static void GLAPIENTRY save_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
+static void GLAPIENTRY
+save_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXGEN, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEXGEN, 6);
if (n) {
n[1].e = coord;
n[2].e = pname;
@@ -3216,12 +3339,13 @@ static void GLAPIENTRY save_TexGenfv( GLenum coord, GLenum pname, const GLfloat
n[6].f = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_TexGenfv(ctx->Exec, ( coord, pname, params ));
+ CALL_TexGenfv(ctx->Exec, (coord, pname, params));
}
}
-static void GLAPIENTRY save_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
+static void GLAPIENTRY
+save_TexGeniv(GLenum coord, GLenum pname, const GLint *params)
{
GLfloat p[4];
p[0] = (GLfloat) params[0];
@@ -3232,43 +3356,47 @@ static void GLAPIENTRY save_TexGeniv(GLenum coord, GLenum pname, const GLint *pa
}
-static void GLAPIENTRY save_TexGend(GLenum coord, GLenum pname, GLdouble param )
+static void GLAPIENTRY
+save_TexGend(GLenum coord, GLenum pname, GLdouble param)
{
GLfloat p = (GLfloat) param;
- save_TexGenfv( coord, pname, &p );
+ save_TexGenfv(coord, pname, &p);
}
-static void GLAPIENTRY save_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
+static void GLAPIENTRY
+save_TexGendv(GLenum coord, GLenum pname, const GLdouble *params)
{
GLfloat p[4];
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 );
+ save_TexGenfv(coord, pname, p);
}
-static void GLAPIENTRY save_TexGenf( GLenum coord, GLenum pname, GLfloat param )
+static void GLAPIENTRY
+save_TexGenf(GLenum coord, GLenum pname, GLfloat param)
{
save_TexGenfv(coord, pname, &param);
}
-static void GLAPIENTRY save_TexGeni( GLenum coord, GLenum pname, GLint param )
+static void GLAPIENTRY
+save_TexGeni(GLenum coord, GLenum pname, GLint param)
{
- save_TexGeniv( coord, pname, &param );
+ save_TexGeniv(coord, pname, &param);
}
-static void GLAPIENTRY save_TexParameterfv( GLenum target,
- GLenum pname, const GLfloat *params )
+static void GLAPIENTRY
+save_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXPARAMETER, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEXPARAMETER, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -3278,18 +3406,20 @@ static void GLAPIENTRY save_TexParameterfv( GLenum target,
n[6].f = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_TexParameterfv(ctx->Exec, ( target, pname, params ));
+ CALL_TexParameterfv(ctx->Exec, (target, pname, params));
}
}
-static void GLAPIENTRY save_TexParameterf( GLenum target, GLenum pname, GLfloat param )
+static void GLAPIENTRY
+save_TexParameterf(GLenum target, GLenum pname, GLfloat param)
{
save_TexParameterfv(target, pname, &param);
}
-static void GLAPIENTRY save_TexParameteri( GLenum target, GLenum pname, GLint param )
+static void GLAPIENTRY
+save_TexParameteri(GLenum target, GLenum pname, GLint param)
{
GLfloat fparam[4];
fparam[0] = (GLfloat) param;
@@ -3298,7 +3428,8 @@ static void GLAPIENTRY save_TexParameteri( GLenum target, GLenum pname, GLint pa
}
-static void GLAPIENTRY save_TexParameteriv( GLenum target, GLenum pname, const GLint *params )
+static void GLAPIENTRY
+save_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
{
GLfloat fparam[4];
fparam[0] = (GLfloat) params[0];
@@ -3307,24 +3438,24 @@ static void GLAPIENTRY save_TexParameteriv( GLenum target, GLenum pname, const G
}
-static void GLAPIENTRY save_TexImage1D( GLenum target,
- GLint level, GLint components,
- GLsizei width, GLint border,
- GLenum format, GLenum type,
- const GLvoid *pixels )
+static void GLAPIENTRY
+save_TexImage1D(GLenum target,
+ GLint level, GLint components,
+ GLsizei width, GLint border,
+ GLenum format, GLenum type, const GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_1D) {
/* don't compile, execute immediately */
- CALL_TexImage1D(ctx->Exec, ( target, level, components, width,
- border, format, type, pixels ));
+ CALL_TexImage1D(ctx->Exec, (target, level, components, width,
+ border, format, type, pixels));
}
else {
GLvoid *image = unpack_image(1, width, 1, 1, format, type,
pixels, &ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE1D, 8 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE1D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3339,31 +3470,31 @@ static void GLAPIENTRY save_TexImage1D( GLenum target,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_TexImage1D(ctx->Exec, ( target, level, components, width,
- border, format, type, pixels ));
+ CALL_TexImage1D(ctx->Exec, (target, level, components, width,
+ border, format, type, pixels));
}
}
}
-static void GLAPIENTRY save_TexImage2D( GLenum target,
- GLint level, GLint components,
- GLsizei width, GLsizei height, GLint border,
- GLenum format, GLenum type,
- const GLvoid *pixels)
+static void GLAPIENTRY
+save_TexImage2D(GLenum target,
+ GLint level, GLint components,
+ GLsizei width, GLsizei height, GLint border,
+ GLenum format, GLenum type, const GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_2D) {
/* don't compile, execute immediately */
- CALL_TexImage2D(ctx->Exec, ( target, level, components, width,
- height, border, format, type, pixels ));
+ CALL_TexImage2D(ctx->Exec, (target, level, components, width,
+ height, border, format, type, pixels));
}
else {
GLvoid *image = unpack_image(2, width, height, 1, format, type,
pixels, &ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE2D, 9 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE2D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3379,32 +3510,33 @@ static void GLAPIENTRY save_TexImage2D( GLenum target,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_TexImage2D(ctx->Exec, ( target, level, components, width,
- height, border, format, type, pixels ));
+ CALL_TexImage2D(ctx->Exec, (target, level, components, width,
+ height, border, format, type, pixels));
}
}
}
-static void GLAPIENTRY save_TexImage3D( GLenum target,
- GLint level, GLint internalFormat,
- GLsizei width, GLsizei height, GLsizei depth,
- GLint border,
- GLenum format, GLenum type,
- const GLvoid *pixels )
+static void GLAPIENTRY
+save_TexImage3D(GLenum target,
+ GLint level, GLint internalFormat,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLint border,
+ GLenum format, GLenum type, const GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_3D) {
/* don't compile, execute immediately */
- CALL_TexImage3D(ctx->Exec, ( target, level, internalFormat, width,
- height, depth, border, format, type, pixels ));
+ CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width,
+ height, depth, border, format, type,
+ pixels));
}
else {
Node *n;
GLvoid *image = unpack_image(3, width, height, depth, format, type,
pixels, &ctx->Unpack);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE3D, 10 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE3D, 10);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3421,23 +3553,25 @@ static void GLAPIENTRY save_TexImage3D( GLenum target,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_TexImage3D(ctx->Exec, ( target, level, internalFormat, width,
- height, depth, border, format, type, pixels ));
+ CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width,
+ height, depth, border, format, type,
+ pixels));
}
}
}
-static void GLAPIENTRY save_TexSubImage1D( GLenum target, GLint level, GLint xoffset,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid *pixels )
+static void GLAPIENTRY
+save_TexSubImage1D(GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
GLvoid *image = unpack_image(1, width, 1, 1, format, type,
pixels, &ctx->Unpack);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE1D, 7 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3451,24 +3585,24 @@ static void GLAPIENTRY save_TexSubImage1D( GLenum target, GLint level, GLint xof
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_TexSubImage1D(ctx->Exec, ( target, level, xoffset, width,
- format, type, pixels ));
+ CALL_TexSubImage1D(ctx->Exec, (target, level, xoffset, width,
+ format, type, pixels));
}
}
-static void GLAPIENTRY save_TexSubImage2D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height,
- GLenum format, GLenum type,
- const GLvoid *pixels )
+static void GLAPIENTRY
+save_TexSubImage2D(GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type, const GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
GLvoid *image = unpack_image(2, width, height, 1, format, type,
pixels, &ctx->Unpack);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE2D, 9 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE2D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3484,24 +3618,24 @@ static void GLAPIENTRY save_TexSubImage2D( GLenum target, GLint level,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_TexSubImage2D(ctx->Exec, ( target, level, xoffset, yoffset,
- width, height, format, type, pixels ));
+ CALL_TexSubImage2D(ctx->Exec, (target, level, xoffset, yoffset,
+ width, height, format, type, pixels));
}
}
-static void GLAPIENTRY save_TexSubImage3D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset,GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type,
- const GLvoid *pixels )
+static void GLAPIENTRY
+save_TexSubImage3D(GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
GLvoid *image = unpack_image(3, width, height, depth, format, type,
pixels, &ctx->Unpack);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE3D, 11 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE3D, 11);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3519,43 +3653,47 @@ static void GLAPIENTRY save_TexSubImage3D( GLenum target, GLint level,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_TexSubImage3D(ctx->Exec, ( target, level,
- xoffset, yoffset, zoffset,
- width, height, depth, format, type, pixels ));
+ CALL_TexSubImage3D(ctx->Exec, (target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth, format, type,
+ pixels));
}
}
-static void GLAPIENTRY save_Translatef( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_Translatef(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_TRANSLATE, 3 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TRANSLATE, 3);
if (n) {
n[1].f = x;
n[2].f = y;
n[3].f = z;
}
if (ctx->ExecuteFlag) {
- CALL_Translatef(ctx->Exec, ( x, y, z ));
+ CALL_Translatef(ctx->Exec, (x, y, z));
}
}
-static void GLAPIENTRY save_Translated( GLdouble x, GLdouble y, GLdouble z )
+static void GLAPIENTRY
+save_Translated(GLdouble x, GLdouble y, GLdouble z)
{
save_Translatef((GLfloat) x, (GLfloat) y, (GLfloat) z);
}
-static void GLAPIENTRY save_Viewport( GLint x, GLint y, GLsizei width, GLsizei height )
+static void GLAPIENTRY
+save_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_VIEWPORT, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_VIEWPORT, 4);
if (n) {
n[1].i = x;
n[2].i = y;
@@ -3563,17 +3701,18 @@ static void GLAPIENTRY save_Viewport( GLint x, GLint y, GLsizei width, GLsizei h
n[4].i = (GLint) height;
}
if (ctx->ExecuteFlag) {
- CALL_Viewport(ctx->Exec, ( x, y, width, height ));
+ CALL_Viewport(ctx->Exec, (x, y, width, height));
}
}
-static void GLAPIENTRY save_WindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+save_WindowPos4fMESA(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_WINDOW_POS, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_WINDOW_POS, 4);
if (n) {
n[1].f = x;
n[2].f = y;
@@ -3581,123 +3720,146 @@ static void GLAPIENTRY save_WindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GL
n[4].f = w;
}
if (ctx->ExecuteFlag) {
- CALL_WindowPos4fMESA(ctx->Exec, ( x, y, z, w ));
+ CALL_WindowPos4fMESA(ctx->Exec, (x, y, z, w));
}
}
-static void GLAPIENTRY save_WindowPos2dMESA(GLdouble x, GLdouble y)
+static void GLAPIENTRY
+save_WindowPos2dMESA(GLdouble x, GLdouble y)
{
save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos2fMESA(GLfloat x, GLfloat y)
+static void GLAPIENTRY
+save_WindowPos2fMESA(GLfloat x, GLfloat y)
{
save_WindowPos4fMESA(x, y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos2iMESA(GLint x, GLint y)
+static void GLAPIENTRY
+save_WindowPos2iMESA(GLint x, GLint y)
{
save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos2sMESA(GLshort x, GLshort y)
+static void GLAPIENTRY
+save_WindowPos2sMESA(GLshort x, GLshort y)
{
save_WindowPos4fMESA(x, y, 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z)
+static void GLAPIENTRY
+save_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z)
{
save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-static void GLAPIENTRY save_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
+static void GLAPIENTRY
+save_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
{
save_WindowPos4fMESA(x, y, z, 1.0F);
}
-static void GLAPIENTRY save_WindowPos3iMESA(GLint x, GLint y, GLint z)
+static void GLAPIENTRY
+save_WindowPos3iMESA(GLint x, GLint y, GLint z)
{
save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-static void GLAPIENTRY save_WindowPos3sMESA(GLshort x, GLshort y, GLshort z)
+static void GLAPIENTRY
+save_WindowPos3sMESA(GLshort x, GLshort y, GLshort z)
{
save_WindowPos4fMESA(x, y, z, 1.0F);
}
-static void GLAPIENTRY save_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+static void GLAPIENTRY
+save_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-static void GLAPIENTRY save_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w)
+static void GLAPIENTRY
+save_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w)
{
save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-static void GLAPIENTRY save_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w)
+static void GLAPIENTRY
+save_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w)
{
save_WindowPos4fMESA(x, y, z, w);
}
-static void GLAPIENTRY save_WindowPos2dvMESA(const GLdouble *v)
+static void GLAPIENTRY
+save_WindowPos2dvMESA(const GLdouble * v)
{
save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos2fvMESA(const GLfloat *v)
+static void GLAPIENTRY
+save_WindowPos2fvMESA(const GLfloat * v)
{
save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos2ivMESA(const GLint *v)
+static void GLAPIENTRY
+save_WindowPos2ivMESA(const GLint * v)
{
save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos2svMESA(const GLshort *v)
+static void GLAPIENTRY
+save_WindowPos2svMESA(const GLshort * v)
{
save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
}
-static void GLAPIENTRY save_WindowPos3dvMESA(const GLdouble *v)
+static void GLAPIENTRY
+save_WindowPos3dvMESA(const GLdouble * v)
{
save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-static void GLAPIENTRY save_WindowPos3fvMESA(const GLfloat *v)
+static void GLAPIENTRY
+save_WindowPos3fvMESA(const GLfloat * v)
{
save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
}
-static void GLAPIENTRY save_WindowPos3ivMESA(const GLint *v)
+static void GLAPIENTRY
+save_WindowPos3ivMESA(const GLint * v)
{
save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-static void GLAPIENTRY save_WindowPos3svMESA(const GLshort *v)
+static void GLAPIENTRY
+save_WindowPos3svMESA(const GLshort * v)
{
save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
}
-static void GLAPIENTRY save_WindowPos4dvMESA(const GLdouble *v)
+static void GLAPIENTRY
+save_WindowPos4dvMESA(const GLdouble * v)
{
save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ (GLfloat) v[2], (GLfloat) v[3]);
}
-static void GLAPIENTRY save_WindowPos4fvMESA(const GLfloat *v)
+static void GLAPIENTRY
+save_WindowPos4fvMESA(const GLfloat * v)
{
save_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
}
-static void GLAPIENTRY save_WindowPos4ivMESA(const GLint *v)
+static void GLAPIENTRY
+save_WindowPos4ivMESA(const GLint * v)
{
save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ (GLfloat) v[2], (GLfloat) v[3]);
}
-static void GLAPIENTRY save_WindowPos4svMESA(const GLshort *v)
+static void GLAPIENTRY
+save_WindowPos4svMESA(const GLshort * v)
{
save_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
}
@@ -3705,24 +3867,26 @@ static void GLAPIENTRY save_WindowPos4svMESA(const GLshort *v)
/* GL_ARB_multitexture */
-static void GLAPIENTRY save_ActiveTextureARB( GLenum target )
+static void GLAPIENTRY
+save_ActiveTextureARB(GLenum target)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ACTIVE_TEXTURE, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ACTIVE_TEXTURE, 1);
if (n) {
n[1].e = target;
}
if (ctx->ExecuteFlag) {
- CALL_ActiveTextureARB(ctx->Exec, ( target ));
+ CALL_ActiveTextureARB(ctx->Exec, (target));
}
}
/* GL_ARB_transpose_matrix */
-static void GLAPIENTRY save_LoadTransposeMatrixdARB( const GLdouble m[16] )
+static void GLAPIENTRY
+save_LoadTransposeMatrixdARB(const GLdouble m[16])
{
GLfloat tm[16];
_math_transposefd(tm, m);
@@ -3730,7 +3894,8 @@ static void GLAPIENTRY save_LoadTransposeMatrixdARB( const GLdouble m[16] )
}
-static void GLAPIENTRY save_LoadTransposeMatrixfARB( const GLfloat m[16] )
+static void GLAPIENTRY
+save_LoadTransposeMatrixfARB(const GLfloat m[16])
{
GLfloat tm[16];
_math_transposef(tm, m);
@@ -3739,7 +3904,7 @@ static void GLAPIENTRY save_LoadTransposeMatrixfARB( const GLfloat m[16] )
static void GLAPIENTRY
-save_MultTransposeMatrixdARB( const GLdouble m[16] )
+save_MultTransposeMatrixdARB(const GLdouble m[16])
{
GLfloat tm[16];
_math_transposefd(tm, m);
@@ -3748,7 +3913,7 @@ save_MultTransposeMatrixdARB( const GLdouble m[16] )
static void GLAPIENTRY
-save_MultTransposeMatrixfARB( const GLfloat m[16] )
+save_MultTransposeMatrixfARB(const GLfloat m[16])
{
GLfloat tm[16];
_math_transposef(tm, m);
@@ -3761,13 +3926,14 @@ static void GLAPIENTRY
save_CompressedTexImage1DARB(GLenum target, GLint level,
GLenum internalFormat, GLsizei width,
GLint border, GLsizei imageSize,
- const GLvoid *data)
+ const GLvoid * data)
{
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_1D) {
/* don't compile, execute immediately */
CALL_CompressedTexImage1DARB(ctx->Exec, (target, level, internalFormat,
- width, border, imageSize, data));
+ width, border, imageSize,
+ data));
}
else {
Node *n;
@@ -3780,7 +3946,7 @@ save_CompressedTexImage1DARB(GLenum target, GLint level,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3794,8 +3960,9 @@ save_CompressedTexImage1DARB(GLenum target, GLint level,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_CompressedTexImage1DARB(ctx->Exec, (target, level, internalFormat,
- width, border, imageSize, data));
+ CALL_CompressedTexImage1DARB(ctx->Exec,
+ (target, level, internalFormat, width,
+ border, imageSize, data));
}
}
}
@@ -3805,13 +3972,14 @@ static void GLAPIENTRY
save_CompressedTexImage2DARB(GLenum target, GLint level,
GLenum internalFormat, GLsizei width,
GLsizei height, GLint border, GLsizei imageSize,
- const GLvoid *data)
+ const GLvoid * data)
{
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_2D) {
/* don't compile, execute immediately */
CALL_CompressedTexImage2DARB(ctx->Exec, (target, level, internalFormat,
- width, height, border, imageSize, data));
+ width, height, border,
+ imageSize, data));
}
else {
Node *n;
@@ -3824,7 +3992,7 @@ save_CompressedTexImage2DARB(GLenum target, GLint level,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3839,8 +4007,9 @@ save_CompressedTexImage2DARB(GLenum target, GLint level,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_CompressedTexImage2DARB(ctx->Exec, (target, level, internalFormat,
- width, height, border, imageSize, data));
+ CALL_CompressedTexImage2DARB(ctx->Exec,
+ (target, level, internalFormat, width,
+ height, border, imageSize, data));
}
}
}
@@ -3850,13 +4019,14 @@ static void GLAPIENTRY
save_CompressedTexImage3DARB(GLenum target, GLint level,
GLenum internalFormat, GLsizei width,
GLsizei height, GLsizei depth, GLint border,
- GLsizei imageSize, const GLvoid *data)
+ GLsizei imageSize, const GLvoid * data)
{
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_3D) {
/* don't compile, execute immediately */
CALL_CompressedTexImage3DARB(ctx->Exec, (target, level, internalFormat,
- width, height, depth, border, imageSize, data));
+ width, height, depth, border,
+ imageSize, data));
}
else {
Node *n;
@@ -3869,7 +4039,7 @@ save_CompressedTexImage3DARB(GLenum target, GLint level,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3885,8 +4055,10 @@ save_CompressedTexImage3DARB(GLenum target, GLint level,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_CompressedTexImage3DARB(ctx->Exec, (target, level, internalFormat,
- width, height, depth, border, imageSize, data));
+ CALL_CompressedTexImage3DARB(ctx->Exec,
+ (target, level, internalFormat, width,
+ height, depth, border, imageSize,
+ data));
}
}
}
@@ -3895,7 +4067,7 @@ save_CompressedTexImage3DARB(GLenum target, GLint level,
static void GLAPIENTRY
save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
GLsizei width, GLenum format,
- GLsizei imageSize, const GLvoid *data)
+ GLsizei imageSize, const GLvoid * data)
{
Node *n;
GLvoid *image;
@@ -3910,7 +4082,7 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3925,7 +4097,8 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
}
if (ctx->ExecuteFlag) {
CALL_CompressedTexSubImage1DARB(ctx->Exec, (target, level, xoffset,
- width, format, imageSize, data));
+ width, format, imageSize,
+ data));
}
}
@@ -3934,7 +4107,7 @@ static void GLAPIENTRY
save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
GLint yoffset, GLsizei width, GLsizei height,
GLenum format, GLsizei imageSize,
- const GLvoid *data)
+ const GLvoid * data)
{
Node *n;
GLvoid *image;
@@ -3949,7 +4122,7 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3965,8 +4138,9 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_CompressedTexSubImage2DARB(ctx->Exec, (target, level, xoffset, yoffset,
- width, height, format, imageSize, data));
+ CALL_CompressedTexSubImage2DARB(ctx->Exec,
+ (target, level, xoffset, yoffset, width,
+ height, format, imageSize, data));
}
}
@@ -3975,7 +4149,7 @@ static void GLAPIENTRY
save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
GLint yoffset, GLint zoffset, GLsizei width,
GLsizei height, GLsizei depth, GLenum format,
- GLsizei imageSize, const GLvoid *data)
+ GLsizei imageSize, const GLvoid * data)
{
Node *n;
GLvoid *image;
@@ -3990,7 +4164,7 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -4008,8 +4182,10 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
_mesa_free(image);
}
if (ctx->ExecuteFlag) {
- CALL_CompressedTexSubImage3DARB(ctx->Exec, (target, level, xoffset, yoffset,
- zoffset, width, height, depth, format, imageSize, data));
+ CALL_CompressedTexSubImage3DARB(ctx->Exec,
+ (target, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data));
}
}
@@ -4021,13 +4197,13 @@ 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 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_SAMPLE_COVERAGE, 2);
if (n) {
n[1].f = value;
n[2].b = invert;
}
if (ctx->ExecuteFlag) {
- CALL_SampleCoverageARB(ctx->Exec, ( value, invert ));
+ CALL_SampleCoverageARB(ctx->Exec, (value, invert));
}
}
@@ -4042,13 +4218,13 @@ 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 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BIND_PROGRAM_NV, 2);
if (n) {
n[1].e = target;
n[2].ui = id;
}
if (ctx->ExecuteFlag) {
- CALL_BindProgramNV(ctx->Exec, ( target, id ));
+ CALL_BindProgramNV(ctx->Exec, (target, id));
}
}
#endif /* FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */
@@ -4060,7 +4236,7 @@ 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 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EXECUTE_PROGRAM_NV, 6);
if (n) {
n[1].e = target;
n[2].ui = id;
@@ -4077,13 +4253,12 @@ save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
static void GLAPIENTRY
save_ProgramParameter4fNV(GLenum target, GLuint index,
- GLfloat x, GLfloat y,
- GLfloat z, GLfloat w)
+ 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 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_PARAMETER4F_NV, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4099,7 +4274,8 @@ save_ProgramParameter4fNV(GLenum target, GLuint index,
static void GLAPIENTRY
-save_ProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat *params)
+save_ProgramParameter4fvNV(GLenum target, GLuint index,
+ const GLfloat *params)
{
save_ProgramParameter4fNV(target, index, params[0], params[1],
params[2], params[3]);
@@ -4108,8 +4284,7 @@ save_ProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat *params)
static void GLAPIENTRY
save_ProgramParameter4dNV(GLenum target, GLuint index,
- GLdouble x, GLdouble y,
- GLdouble z, GLdouble w)
+ GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
save_ProgramParameter4fNV(target, index, (GLfloat) x, (GLfloat) y,
(GLfloat) z, (GLfloat) w);
@@ -4150,7 +4325,7 @@ save_ProgramParameters4fvNV(GLenum target, GLuint index,
static void GLAPIENTRY
save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
- const GLubyte *program)
+ const GLubyte * program)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
@@ -4164,7 +4339,7 @@ save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
_mesa_memcpy(programCopy, program, len);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_PROGRAM_NV, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_PROGRAM_NV, 4);
if (n) {
n[1].e = target;
n[2].ui = id;
@@ -4178,7 +4353,7 @@ save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
static void GLAPIENTRY
-save_RequestResidentProgramsNV(GLsizei num, const GLuint *ids)
+save_RequestResidentProgramsNV(GLsizei num, const GLuint * ids)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
@@ -4189,7 +4364,7 @@ save_RequestResidentProgramsNV(GLsizei num, const GLuint *ids)
}
_mesa_memcpy(idCopy, ids, num * sizeof(GLuint));
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TRACK_MATRIX_NV, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TRACK_MATRIX_NV, 2);
if (n) {
n[1].i = num;
n[2].data = idCopy;
@@ -4207,7 +4382,7 @@ save_TrackMatrixNV(GLenum target, GLuint address,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_TRACK_MATRIX_NV, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_TRACK_MATRIX_NV, 4);
if (n) {
n[1].e = target;
n[2].ui = address;
@@ -4232,7 +4407,7 @@ save_ProgramLocalParameter4fARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4254,7 +4429,7 @@ save_ProgramLocalParameter4fvARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4277,7 +4452,7 @@ save_ProgramLocalParameter4dARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4299,7 +4474,7 @@ save_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4314,7 +4489,7 @@ save_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
}
static void GLAPIENTRY
-save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
+save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name,
GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
GET_CURRENT_CONTEXT(ctx);
@@ -4327,7 +4502,7 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
_mesa_memcpy(nameCopy, name, len);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6);
if (n) {
n[1].ui = id;
n[2].i = len;
@@ -4344,7 +4519,7 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
static void GLAPIENTRY
-save_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name,
+save_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name,
const float v[])
{
save_ProgramNamedParameter4fNV(id, len, name, v[0], v[1], v[2], v[3]);
@@ -4352,16 +4527,16 @@ save_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name,
static void GLAPIENTRY
-save_ProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte *name,
+save_ProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name,
GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
save_ProgramNamedParameter4fNV(id, len, name, (GLfloat) x, (GLfloat) y,
- (GLfloat) z,(GLfloat) w);
+ (GLfloat) z, (GLfloat) w);
}
static void GLAPIENTRY
-save_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name,
+save_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name,
const double v[])
{
save_ProgramNamedParameter4fNV(id, len, name, (GLfloat) v[0],
@@ -4374,34 +4549,36 @@ save_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name,
/* GL_EXT_stencil_two_side */
-static void GLAPIENTRY save_ActiveStencilFaceEXT( GLenum face )
+static void GLAPIENTRY
+save_ActiveStencilFaceEXT(GLenum face)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ACTIVE_STENCIL_FACE_EXT, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ACTIVE_STENCIL_FACE_EXT, 1);
if (n) {
n[1].e = face;
}
if (ctx->ExecuteFlag) {
- CALL_ActiveStencilFaceEXT(ctx->Exec, ( face ));
+ CALL_ActiveStencilFaceEXT(ctx->Exec, (face));
}
}
/* GL_EXT_depth_bounds_test */
-static void GLAPIENTRY save_DepthBoundsEXT( GLclampd zmin, GLclampd zmax )
+static void GLAPIENTRY
+save_DepthBoundsEXT(GLclampd zmin, GLclampd zmax)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_BOUNDS_EXT, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_BOUNDS_EXT, 2);
if (n) {
n[1].f = (GLfloat) zmin;
n[2].f = (GLfloat) zmax;
}
if (ctx->ExecuteFlag) {
- CALL_DepthBoundsEXT(ctx->Exec, ( zmin, zmax ));
+ CALL_DepthBoundsEXT(ctx->Exec, (zmin, zmax));
}
}
@@ -4411,7 +4588,7 @@ static void GLAPIENTRY save_DepthBoundsEXT( GLclampd zmin, GLclampd zmax )
static void GLAPIENTRY
save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
- const GLvoid *string)
+ const GLvoid * string)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
@@ -4425,7 +4602,7 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
_mesa_memcpy(programCopy, string, len);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_STRING_ARB, 4 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_STRING_ARB, 4);
if (n) {
n[1].e = target;
n[2].e = format;
@@ -4445,7 +4622,7 @@ save_ProgramEnvParameter4fARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4455,7 +4632,7 @@ save_ProgramEnvParameter4fARB(GLenum target, GLuint index,
n[6].f = w;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramEnvParameter4fARB(ctx->Exec, ( target, index, x, y, z, w));
+ CALL_ProgramEnvParameter4fARB(ctx->Exec, (target, index, x, y, z, w));
}
}
@@ -4475,9 +4652,7 @@ save_ProgramEnvParameter4dARB(GLenum target, GLuint index,
{
save_ProgramEnvParameter4fARB(target, index,
(GLfloat) x,
- (GLfloat) y,
- (GLfloat) z,
- (GLfloat) w);
+ (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
@@ -4488,8 +4663,7 @@ save_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
save_ProgramEnvParameter4fARB(target, index,
(GLfloat) params[0],
(GLfloat) params[1],
- (GLfloat) params[2],
- (GLfloat) params[3]);
+ (GLfloat) params[2], (GLfloat) params[3]);
}
#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */
@@ -4503,13 +4677,13 @@ save_BeginQueryARB(GLenum target, GLuint id)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BEGIN_QUERY_ARB, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BEGIN_QUERY_ARB, 2);
if (n) {
n[1].e = target;
n[2].ui = id;
}
if (ctx->ExecuteFlag) {
- CALL_BeginQueryARB(ctx->Exec, ( target, id ));
+ CALL_BeginQueryARB(ctx->Exec, (target, id));
}
}
@@ -4520,12 +4694,12 @@ save_EndQueryARB(GLenum target)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_END_QUERY_ARB, 1 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_END_QUERY_ARB, 1);
if (n) {
n[1].e = target;
}
if (ctx->ExecuteFlag) {
- CALL_EndQueryARB(ctx->Exec, ( target ));
+ CALL_EndQueryARB(ctx->Exec, (target));
}
}
@@ -4533,19 +4707,19 @@ save_EndQueryARB(GLenum target)
static void GLAPIENTRY
-save_DrawBuffersARB(GLsizei count, const GLenum *buffers)
+save_DrawBuffersARB(GLsizei count, const GLenum * buffers)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_DRAW_BUFFERS_ARB, 1 + MAX_DRAW_BUFFERS );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_BUFFERS_ARB, 1 + MAX_DRAW_BUFFERS);
if (n) {
GLint i;
n[1].i = count;
if (count > MAX_DRAW_BUFFERS)
- count = MAX_DRAW_BUFFERS;
+ count = MAX_DRAW_BUFFERS;
for (i = 0; i < count; i++) {
- n[2 + i].e = buffers[i];
+ n[2 + i].e = buffers[i];
}
}
if (ctx->ExecuteFlag) {
@@ -4559,10 +4733,10 @@ save_BindFragmentShaderATI(GLuint id)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
-
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BIND_FRAGMENT_SHADER_ATI, 1);
+
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BIND_FRAGMENT_SHADER_ATI, 1);
if (n) {
- n[1].ui = id;
+ n[1].ui = id;
}
if (ctx->ExecuteFlag) {
CALL_BindFragmentShaderATI(ctx->Exec, (id));
@@ -4574,14 +4748,14 @@ save_SetFragmentShaderConstantATI(GLuint dst, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
-
- n = ALLOC_INSTRUCTION( ctx, OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI, 5);
+
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI, 5);
if (n) {
- n[1].ui = dst;
- n[2].f = value[0];
- n[3].f = value[1];
- n[4].f = value[2];
- n[5].f = value[3];
+ n[1].ui = dst;
+ n[2].f = value[0];
+ n[3].f = value[1];
+ n[4].f = value[2];
+ n[5].f = value[3];
}
if (ctx->ExecuteFlag) {
CALL_SetFragmentShaderConstantATI(ctx->Exec, (dst, value));
@@ -4589,12 +4763,13 @@ save_SetFragmentShaderConstantATI(GLuint dst, const GLfloat *value)
}
#endif
-static void save_Attr1fNV( GLenum attr, GLfloat x )
+static void
+save_Attr1fNV(GLenum attr, GLfloat x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_1F_NV, 2 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_1F_NV, 2);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4602,19 +4777,20 @@ static void save_Attr1fNV( GLenum attr, GLfloat x )
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 1;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib1fNV(ctx->Exec, ( attr, x ));
+ CALL_VertexAttrib1fNV(ctx->Exec, (attr, x));
}
}
-static void save_Attr2fNV( GLenum attr, GLfloat x, GLfloat y )
+static void
+save_Attr2fNV(GLenum attr, GLfloat x, GLfloat y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_2F_NV, 3 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_2F_NV, 3);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4623,19 +4799,20 @@ static void save_Attr2fNV( GLenum attr, GLfloat x, GLfloat y )
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 2;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, 0, 1);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, 0, 1);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib2fNV(ctx->Exec, ( attr, x, y ));
+ CALL_VertexAttrib2fNV(ctx->Exec, (attr, x, y));
}
}
-static void save_Attr3fNV( GLenum attr, GLfloat x, GLfloat y, GLfloat z )
+static void
+save_Attr3fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_3F_NV, 4 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_3F_NV, 4);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4645,20 +4822,20 @@ static void save_Attr3fNV( GLenum attr, GLfloat x, GLfloat y, GLfloat z )
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 3;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, 1);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, 1);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib3fNV(ctx->Exec, ( attr, x, y, z ));
+ CALL_VertexAttrib3fNV(ctx->Exec, (attr, x, y, z));
}
}
-static void save_Attr4fNV( GLenum attr, GLfloat x, GLfloat y, GLfloat z,
- GLfloat w )
+static void
+save_Attr4fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_4F_NV, 5 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_4F_NV, 5);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4669,20 +4846,21 @@ static void save_Attr4fNV( GLenum attr, GLfloat x, GLfloat y, GLfloat z,
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 4;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, w);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, w);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib4fNV(ctx->Exec, ( attr, x, y, z, w ));
+ CALL_VertexAttrib4fNV(ctx->Exec, (attr, x, y, z, w));
}
}
-static void save_Attr1fARB( GLenum attr, GLfloat x )
+static void
+save_Attr1fARB(GLenum attr, GLfloat x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_1F_ARB, 2 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_1F_ARB, 2);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4690,19 +4868,20 @@ static void save_Attr1fARB( GLenum attr, GLfloat x )
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 1;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib1fARB(ctx->Exec, ( attr, x ));
+ CALL_VertexAttrib1fARB(ctx->Exec, (attr, x));
}
}
-static void save_Attr2fARB( GLenum attr, GLfloat x, GLfloat y )
+static void
+save_Attr2fARB(GLenum attr, GLfloat x, GLfloat y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_2F_ARB, 3 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_2F_ARB, 3);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4711,19 +4890,20 @@ static void save_Attr2fARB( GLenum attr, GLfloat x, GLfloat y )
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 2;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, 0, 1);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, 0, 1);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib2fARB(ctx->Exec, ( attr, x, y ));
+ CALL_VertexAttrib2fARB(ctx->Exec, (attr, x, y));
}
}
-static void save_Attr3fARB( GLenum attr, GLfloat x, GLfloat y, GLfloat z )
+static void
+save_Attr3fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_3F_ARB, 4 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_3F_ARB, 4);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4733,20 +4913,20 @@ static void save_Attr3fARB( GLenum attr, GLfloat x, GLfloat y, GLfloat z )
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 3;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, 1);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, 1);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib3fARB(ctx->Exec, ( attr, x, y, z ));
+ CALL_VertexAttrib3fARB(ctx->Exec, (attr, x, y, z));
}
}
-static void save_Attr4fARB( GLenum attr, GLfloat x, GLfloat y, GLfloat z,
- GLfloat w )
+static void
+save_Attr4fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_4F_ARB, 5 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_4F_ARB, 5);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -4757,89 +4937,96 @@ static void save_Attr4fARB( GLenum attr, GLfloat x, GLfloat y, GLfloat z,
ASSERT(attr < VERT_ATTRIB_MAX);
ctx->ListState.ActiveAttribSize[attr] = 4;
- ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, w);
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, w);
if (ctx->ExecuteFlag) {
- CALL_VertexAttrib4fARB(ctx->Exec, ( attr, x, y, z, w ));
+ CALL_VertexAttrib4fARB(ctx->Exec, (attr, x, y, z, w));
}
}
-static void GLAPIENTRY save_EvalCoord1f( GLfloat x )
+static void GLAPIENTRY
+save_EvalCoord1f(GLfloat x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_EVAL_C1, 1 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_C1, 1);
if (n) {
n[1].f = x;
}
if (ctx->ExecuteFlag) {
- CALL_EvalCoord1f(ctx->Exec, ( x ));
+ CALL_EvalCoord1f(ctx->Exec, (x));
}
}
-static void GLAPIENTRY save_EvalCoord1fv( const GLfloat *v )
+static void GLAPIENTRY
+save_EvalCoord1fv(const GLfloat * v)
{
- save_EvalCoord1f( v[0] );
+ save_EvalCoord1f(v[0]);
}
-static void GLAPIENTRY save_EvalCoord2f( GLfloat x, GLfloat y )
+static void GLAPIENTRY
+save_EvalCoord2f(GLfloat x, GLfloat y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_EVAL_C2, 2 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_C2, 2);
if (n) {
n[1].f = x;
n[2].f = y;
}
if (ctx->ExecuteFlag) {
- CALL_EvalCoord2f(ctx->Exec, ( x, y ));
+ CALL_EvalCoord2f(ctx->Exec, (x, y));
}
}
-static void GLAPIENTRY save_EvalCoord2fv( const GLfloat *v )
+static void GLAPIENTRY
+save_EvalCoord2fv(const GLfloat * v)
{
- save_EvalCoord2f( v[0], v[1] );
+ save_EvalCoord2f(v[0], v[1]);
}
-static void GLAPIENTRY save_EvalPoint1( GLint x )
+static void GLAPIENTRY
+save_EvalPoint1(GLint x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_EVAL_P1, 1 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_P1, 1);
if (n) {
n[1].i = x;
}
if (ctx->ExecuteFlag) {
- CALL_EvalPoint1(ctx->Exec, ( x ));
+ CALL_EvalPoint1(ctx->Exec, (x));
}
}
-static void GLAPIENTRY save_EvalPoint2( GLint x, GLint y )
+static void GLAPIENTRY
+save_EvalPoint2(GLint x, GLint y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_EVAL_P2, 2 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_P2, 2);
if (n) {
n[1].i = x;
n[2].i = y;
}
if (ctx->ExecuteFlag) {
- CALL_EvalPoint2(ctx->Exec, ( x, y ));
+ CALL_EvalPoint2(ctx->Exec, (x, y));
}
}
-static void GLAPIENTRY save_Indexf( GLfloat x )
+static void GLAPIENTRY
+save_Indexf(GLfloat x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_INDEX, 1 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_INDEX, 1);
if (n) {
n[1].f = x;
}
@@ -4848,21 +5035,23 @@ static void GLAPIENTRY save_Indexf( GLfloat x )
ctx->ListState.CurrentIndex = x;
if (ctx->ExecuteFlag) {
- CALL_Indexi(ctx->Exec, ( (GLint) x ));
+ CALL_Indexi(ctx->Exec, ((GLint) x));
}
}
-static void GLAPIENTRY save_Indexfv( const GLfloat *v )
+static void GLAPIENTRY
+save_Indexfv(const GLfloat * v)
{
- save_Indexf( v[0] );
+ save_Indexf(v[0]);
}
-static void GLAPIENTRY save_EdgeFlag( GLboolean x )
+static void GLAPIENTRY
+save_EdgeFlag(GLboolean x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_EDGEFLAG, 1 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_EDGEFLAG, 1);
if (n) {
n[1].b = x;
}
@@ -4871,22 +5060,24 @@ static void GLAPIENTRY save_EdgeFlag( GLboolean x )
ctx->ListState.CurrentEdgeFlag = x;
if (ctx->ExecuteFlag) {
- CALL_EdgeFlag(ctx->Exec, ( x ));
+ CALL_EdgeFlag(ctx->Exec, (x));
}
}
-static void GLAPIENTRY save_EdgeFlagv( const GLboolean *v )
+static void GLAPIENTRY
+save_EdgeFlagv(const GLboolean * v)
{
- save_EdgeFlag( v[0] );
+ save_EdgeFlag(v[0]);
}
-static void GLAPIENTRY save_Materialfv( GLenum face, GLenum pname, const GLfloat *param )
+static void GLAPIENTRY
+save_Materialfv(GLenum face, GLenum pname, const GLfloat * param)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
int args, i;
- SAVE_FLUSH_VERTICES( ctx );
+ SAVE_FLUSH_VERTICES(ctx);
switch (face) {
case GL_BACK:
@@ -4894,7 +5085,7 @@ static void GLAPIENTRY save_Materialfv( GLenum face, GLenum pname, const GLfloat
case GL_FRONT_AND_BACK:
break;
default:
- _mesa_compile_error( ctx, GL_INVALID_ENUM, "material(face)" );
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "material(face)");
return;
}
@@ -4913,40 +5104,41 @@ static void GLAPIENTRY save_Materialfv( GLenum face, GLenum pname, const GLfloat
args = 3;
break;
default:
- _mesa_compile_error( ctx, GL_INVALID_ENUM, "material(pname)" );
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "material(pname)");
return;
}
- n = ALLOC_INSTRUCTION( ctx, OPCODE_MATERIAL, 6 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_MATERIAL, 6);
if (n) {
n[1].e = face;
n[2].e = pname;
- for (i = 0 ; i < args ; i++)
- n[3+i].f = param[i];
+ for (i = 0; i < args; i++)
+ n[3 + i].f = param[i];
}
{
- GLuint bitmask = _mesa_material_bitmask( ctx, face, pname, ~0, NULL );
- for (i = 0 ; i < MAT_ATTRIB_MAX ; i++)
- if (bitmask & (1<<i)) {
- ctx->ListState.ActiveMaterialSize[i] = args;
- COPY_SZ_4V( ctx->ListState.CurrentMaterial[i], args, param );
- }
+ GLuint bitmask = _mesa_material_bitmask(ctx, face, pname, ~0, NULL);
+ for (i = 0; i < MAT_ATTRIB_MAX; i++)
+ if (bitmask & (1 << i)) {
+ ctx->ListState.ActiveMaterialSize[i] = args;
+ COPY_SZ_4V(ctx->ListState.CurrentMaterial[i], args, param);
+ }
}
if (ctx->ExecuteFlag) {
- CALL_Materialfv(ctx->Exec, ( face, pname, param ));
+ CALL_Materialfv(ctx->Exec, (face, pname, param));
}
}
-static void GLAPIENTRY save_Begin( GLenum mode )
+static void GLAPIENTRY
+save_Begin(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
GLboolean error = GL_FALSE;
- if (/*mode < GL_POINTS ||*/ mode > GL_POLYGON) {
- _mesa_compile_error( ctx, GL_INVALID_ENUM, "Begin (mode)");
+ if ( /*mode < GL_POINTS || */ mode > GL_POLYGON) {
+ _mesa_compile_error(ctx, GL_INVALID_ENUM, "Begin (mode)");
error = GL_TRUE;
}
else if (ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN) {
@@ -4960,7 +5152,7 @@ static void GLAPIENTRY save_Begin( GLenum mode )
ctx->Driver.CurrentSavePrimitive = mode;
}
else {
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "recursive begin" );
+ _mesa_compile_error(ctx, GL_INVALID_OPERATION, "recursive begin");
error = GL_TRUE;
}
@@ -4968,38 +5160,40 @@ static void GLAPIENTRY save_Begin( GLenum mode )
/* Give the driver an opportunity to hook in an optimized
* display list compiler.
*/
- if (ctx->Driver.NotifySaveBegin( ctx, mode ))
- return;
+ if (ctx->Driver.NotifySaveBegin(ctx, mode))
+ return;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_BEGIN, 1 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_BEGIN, 1);
if (n) {
- n[1].e = mode;
+ n[1].e = mode;
}
}
if (ctx->ExecuteFlag) {
- CALL_Begin(ctx->Exec, ( mode ));
+ CALL_Begin(ctx->Exec, (mode));
}
}
-static void GLAPIENTRY save_End( void )
+static void GLAPIENTRY
+save_End(void)
{
GET_CURRENT_CONTEXT(ctx);
- SAVE_FLUSH_VERTICES( ctx );
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_END, 0 );
+ SAVE_FLUSH_VERTICES(ctx);
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_END, 0);
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
if (ctx->ExecuteFlag) {
- CALL_End(ctx->Exec, ( ));
+ CALL_End(ctx->Exec, ());
}
}
-static void GLAPIENTRY save_Rectf( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
+static void GLAPIENTRY
+save_Rectf(GLfloat a, GLfloat b, GLfloat c, GLfloat d)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- SAVE_FLUSH_VERTICES( ctx );
- n = ALLOC_INSTRUCTION( ctx, OPCODE_RECTF, 4 );
+ SAVE_FLUSH_VERTICES(ctx);
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_RECTF, 4);
if (n) {
n[1].f = a;
n[2].f = b;
@@ -5007,257 +5201,296 @@ static void GLAPIENTRY save_Rectf( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
n[4].f = d;
}
if (ctx->ExecuteFlag) {
- CALL_Rectf(ctx->Exec, ( a, b, c, d ));
+ CALL_Rectf(ctx->Exec, (a, b, c, d));
}
}
-static void GLAPIENTRY save_Vertex2f( GLfloat x, GLfloat y )
+static void GLAPIENTRY
+save_Vertex2f(GLfloat x, GLfloat y)
{
- save_Attr2fNV( VERT_ATTRIB_POS, x, y );
+ save_Attr2fNV(VERT_ATTRIB_POS, x, y);
}
-static void GLAPIENTRY save_Vertex2fv( const GLfloat *v )
+static void GLAPIENTRY
+save_Vertex2fv(const GLfloat * v)
{
- save_Attr2fNV( VERT_ATTRIB_POS, v[0], v[1] );
+ save_Attr2fNV(VERT_ATTRIB_POS, v[0], v[1]);
}
-static void GLAPIENTRY save_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_Vertex3f(GLfloat x, GLfloat y, GLfloat z)
{
- save_Attr3fNV( VERT_ATTRIB_POS, x, y, z );
+ save_Attr3fNV(VERT_ATTRIB_POS, x, y, z);
}
-static void GLAPIENTRY save_Vertex3fv( const GLfloat *v )
+static void GLAPIENTRY
+save_Vertex3fv(const GLfloat * v)
{
- save_Attr3fNV( VERT_ATTRIB_POS, v[0], v[1], v[2] );
+ save_Attr3fNV(VERT_ATTRIB_POS, v[0], v[1], v[2]);
}
-static void GLAPIENTRY save_Vertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+save_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- save_Attr4fNV( VERT_ATTRIB_POS, x, y, z, w );
+ save_Attr4fNV(VERT_ATTRIB_POS, x, y, z, w);
}
-static void GLAPIENTRY save_Vertex4fv( const GLfloat *v )
+static void GLAPIENTRY
+save_Vertex4fv(const GLfloat * v)
{
- save_Attr4fNV( VERT_ATTRIB_POS, v[0], v[1], v[2], v[3] );
+ save_Attr4fNV(VERT_ATTRIB_POS, v[0], v[1], v[2], v[3]);
}
-static void GLAPIENTRY save_TexCoord1f( GLfloat x )
+static void GLAPIENTRY
+save_TexCoord1f(GLfloat x)
{
- save_Attr1fNV( VERT_ATTRIB_TEX0, x );
+ save_Attr1fNV(VERT_ATTRIB_TEX0, x);
}
-static void GLAPIENTRY save_TexCoord1fv( const GLfloat *v )
+static void GLAPIENTRY
+save_TexCoord1fv(const GLfloat * v)
{
- save_Attr1fNV( VERT_ATTRIB_TEX0, v[0] );
+ save_Attr1fNV(VERT_ATTRIB_TEX0, v[0]);
}
-static void GLAPIENTRY save_TexCoord2f( GLfloat x, GLfloat y )
+static void GLAPIENTRY
+save_TexCoord2f(GLfloat x, GLfloat y)
{
- save_Attr2fNV( VERT_ATTRIB_TEX0, x, y );
+ save_Attr2fNV(VERT_ATTRIB_TEX0, x, y);
}
-static void GLAPIENTRY save_TexCoord2fv( const GLfloat *v )
+static void GLAPIENTRY
+save_TexCoord2fv(const GLfloat * v)
{
- save_Attr2fNV( VERT_ATTRIB_TEX0, v[0], v[1] );
+ save_Attr2fNV(VERT_ATTRIB_TEX0, v[0], v[1]);
}
-static void GLAPIENTRY save_TexCoord3f( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_TexCoord3f(GLfloat x, GLfloat y, GLfloat z)
{
- save_Attr3fNV( VERT_ATTRIB_TEX0, x, y, z );
+ save_Attr3fNV(VERT_ATTRIB_TEX0, x, y, z);
}
-static void GLAPIENTRY save_TexCoord3fv( const GLfloat *v )
+static void GLAPIENTRY
+save_TexCoord3fv(const GLfloat * v)
{
- save_Attr3fNV( VERT_ATTRIB_TEX0, v[0], v[1], v[2] );
+ save_Attr3fNV(VERT_ATTRIB_TEX0, v[0], v[1], v[2]);
}
-static void GLAPIENTRY save_TexCoord4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+save_TexCoord4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- save_Attr4fNV( VERT_ATTRIB_TEX0, x, y, z, w );
+ save_Attr4fNV(VERT_ATTRIB_TEX0, x, y, z, w);
}
-static void GLAPIENTRY save_TexCoord4fv( const GLfloat *v )
+static void GLAPIENTRY
+save_TexCoord4fv(const GLfloat * v)
{
- save_Attr4fNV( VERT_ATTRIB_TEX0, v[0], v[1], v[2], v[3] );
+ save_Attr4fNV(VERT_ATTRIB_TEX0, v[0], v[1], v[2], v[3]);
}
-static void GLAPIENTRY save_Normal3f( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_Normal3f(GLfloat x, GLfloat y, GLfloat z)
{
- save_Attr3fNV( VERT_ATTRIB_NORMAL, x, y, z );
+ save_Attr3fNV(VERT_ATTRIB_NORMAL, x, y, z);
}
-static void GLAPIENTRY save_Normal3fv( const GLfloat *v )
+static void GLAPIENTRY
+save_Normal3fv(const GLfloat * v)
{
- save_Attr3fNV( VERT_ATTRIB_NORMAL, v[0], v[1], v[2] );
+ save_Attr3fNV(VERT_ATTRIB_NORMAL, v[0], v[1], v[2]);
}
-static void GLAPIENTRY save_FogCoordfEXT( GLfloat x )
+static void GLAPIENTRY
+save_FogCoordfEXT(GLfloat x)
{
- save_Attr1fNV( VERT_ATTRIB_FOG, x );
+ save_Attr1fNV(VERT_ATTRIB_FOG, x);
}
-static void GLAPIENTRY save_FogCoordfvEXT( const GLfloat *v )
+static void GLAPIENTRY
+save_FogCoordfvEXT(const GLfloat * v)
{
- save_Attr1fNV( VERT_ATTRIB_FOG, v[0] );
+ save_Attr1fNV(VERT_ATTRIB_FOG, v[0]);
}
-static void GLAPIENTRY save_Color3f( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_Color3f(GLfloat x, GLfloat y, GLfloat z)
{
- save_Attr3fNV( VERT_ATTRIB_COLOR0, x, y, z );
+ save_Attr3fNV(VERT_ATTRIB_COLOR0, x, y, z);
}
-static void GLAPIENTRY save_Color3fv( const GLfloat *v )
+static void GLAPIENTRY
+save_Color3fv(const GLfloat * v)
{
- save_Attr3fNV( VERT_ATTRIB_COLOR0, v[0], v[1], v[2] );
+ save_Attr3fNV(VERT_ATTRIB_COLOR0, v[0], v[1], v[2]);
}
-static void GLAPIENTRY save_Color4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+save_Color4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- save_Attr4fNV( VERT_ATTRIB_COLOR0, x, y, z, w );
+ save_Attr4fNV(VERT_ATTRIB_COLOR0, x, y, z, w);
}
-static void GLAPIENTRY save_Color4fv( const GLfloat *v )
+static void GLAPIENTRY
+save_Color4fv(const GLfloat * v)
{
- save_Attr4fNV( VERT_ATTRIB_COLOR0, v[0], v[1], v[2], v[3] );
+ save_Attr4fNV(VERT_ATTRIB_COLOR0, v[0], v[1], v[2], v[3]);
}
-static void GLAPIENTRY save_SecondaryColor3fEXT( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+save_SecondaryColor3fEXT(GLfloat x, GLfloat y, GLfloat z)
{
- save_Attr3fNV( VERT_ATTRIB_COLOR1, x, y, z );
+ save_Attr3fNV(VERT_ATTRIB_COLOR1, x, y, z);
}
-static void GLAPIENTRY save_SecondaryColor3fvEXT( const GLfloat *v )
+static void GLAPIENTRY
+save_SecondaryColor3fvEXT(const GLfloat * v)
{
- save_Attr3fNV( VERT_ATTRIB_COLOR1, v[0], v[1], v[2] );
+ save_Attr3fNV(VERT_ATTRIB_COLOR1, v[0], v[1], v[2]);
}
/* Just call the respective ATTR for texcoord
*/
-static void GLAPIENTRY save_MultiTexCoord1f( GLenum target, GLfloat x )
+static void GLAPIENTRY
+save_MultiTexCoord1f(GLenum target, GLfloat x)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr1fNV( attr, x );
+ save_Attr1fNV(attr, x);
}
-static void GLAPIENTRY save_MultiTexCoord1fv( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+save_MultiTexCoord1fv(GLenum target, const GLfloat * v)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr1fNV( attr, v[0] );
+ save_Attr1fNV(attr, v[0]);
}
-static void GLAPIENTRY save_MultiTexCoord2f( GLenum target, GLfloat x, GLfloat y )
+static void GLAPIENTRY
+save_MultiTexCoord2f(GLenum target, GLfloat x, GLfloat y)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr2fNV( attr, x, y );
+ save_Attr2fNV(attr, x, y);
}
-static void GLAPIENTRY save_MultiTexCoord2fv( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+save_MultiTexCoord2fv(GLenum target, const GLfloat * v)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr2fNV( attr, v[0], v[1] );
+ save_Attr2fNV(attr, v[0], v[1]);
}
-static void GLAPIENTRY save_MultiTexCoord3f( GLenum target, GLfloat x, GLfloat y,
- GLfloat z)
+static void GLAPIENTRY
+save_MultiTexCoord3f(GLenum target, GLfloat x, GLfloat y, GLfloat z)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr3fNV( attr, x, y, z );
+ save_Attr3fNV(attr, x, y, z);
}
-static void GLAPIENTRY save_MultiTexCoord3fv( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+save_MultiTexCoord3fv(GLenum target, const GLfloat * v)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr3fNV( attr, v[0], v[1], v[2] );
+ save_Attr3fNV(attr, v[0], v[1], v[2]);
}
-static void GLAPIENTRY save_MultiTexCoord4f( GLenum target, GLfloat x, GLfloat y,
- GLfloat z, GLfloat w )
+static void GLAPIENTRY
+save_MultiTexCoord4f(GLenum target, GLfloat x, GLfloat y,
+ GLfloat z, GLfloat w)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr4fNV( attr, x, y, z, w );
+ save_Attr4fNV(attr, x, y, z, w);
}
-static void GLAPIENTRY save_MultiTexCoord4fv( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+save_MultiTexCoord4fv(GLenum target, const GLfloat * v)
{
GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr4fNV( attr, v[0], v[1], v[2], v[3] );
+ save_Attr4fNV(attr, v[0], v[1], v[2], v[3]);
}
-static void enum_error( void )
+static void
+enum_error(void)
{
- GET_CURRENT_CONTEXT( ctx );
- _mesa_error( ctx, GL_INVALID_ENUM, "VertexAttribfNV" );
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_ENUM, "VertexAttribfNV");
}
/* First level for NV_vertex_program:
*
* Check for errors at compile time?.
*/
-static void GLAPIENTRY save_VertexAttrib1fNV( GLuint index, GLfloat x )
+static void GLAPIENTRY
+save_VertexAttrib1fNV(GLuint index, GLfloat x)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr1fNV( index, x );
+ save_Attr1fNV(index, x);
else
- enum_error();
+ enum_error();
}
-static void GLAPIENTRY save_VertexAttrib1fvNV( GLuint index, const GLfloat *v )
+static void GLAPIENTRY
+save_VertexAttrib1fvNV(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr1fNV( index, v[0] );
+ save_Attr1fNV(index, v[0]);
else
enum_error();
}
-static void GLAPIENTRY save_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
+static void GLAPIENTRY
+save_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr2fNV( index, x, y );
+ save_Attr2fNV(index, x, y);
else
enum_error();
}
-static void GLAPIENTRY save_VertexAttrib2fvNV( GLuint index, const GLfloat *v )
+static void GLAPIENTRY
+save_VertexAttrib2fvNV(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr2fNV( index, v[0], v[1] );
+ save_Attr2fNV(index, v[0], v[1]);
else
enum_error();
}
-static void GLAPIENTRY save_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y,
- GLfloat z )
+static void GLAPIENTRY
+save_VertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr3fNV( index, x, y, z );
+ save_Attr3fNV(index, x, y, z);
else
enum_error();
}
-static void GLAPIENTRY save_VertexAttrib3fvNV( GLuint index, const GLfloat *v )
+static void GLAPIENTRY
+save_VertexAttrib3fvNV(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr3fNV( index, v[0], v[1], v[2] );
+ save_Attr3fNV(index, v[0], v[1], v[2]);
else
enum_error();
}
-static void GLAPIENTRY save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y,
- GLfloat z, GLfloat w )
+static void GLAPIENTRY
+save_VertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y,
+ GLfloat z, GLfloat w)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr4fNV( index, x, y, z, w );
+ save_Attr4fNV(index, x, y, z, w);
else
enum_error();
}
-static void GLAPIENTRY save_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
+static void GLAPIENTRY
+save_VertexAttrib4fvNV(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr4fNV( index, v[0], v[1], v[2], v[3] );
+ save_Attr4fNV(index, v[0], v[1], v[2], v[3]);
else
enum_error();
}
@@ -5266,73 +5499,74 @@ static void GLAPIENTRY save_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
static void GLAPIENTRY
-save_VertexAttrib1fARB( GLuint index, GLfloat x )
+save_VertexAttrib1fARB(GLuint index, GLfloat x)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr1fARB( index, x );
+ save_Attr1fARB(index, x);
else
- enum_error();
+ enum_error();
}
static void GLAPIENTRY
-save_VertexAttrib1fvARB( GLuint index, const GLfloat *v )
+save_VertexAttrib1fvARB(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr1fARB( index, v[0] );
+ save_Attr1fARB(index, v[0]);
else
enum_error();
}
static void GLAPIENTRY
-save_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y )
+save_VertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr2fARB( index, x, y );
+ save_Attr2fARB(index, x, y);
else
enum_error();
}
static void GLAPIENTRY
-save_VertexAttrib2fvARB( GLuint index, const GLfloat *v )
+save_VertexAttrib2fvARB(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr2fARB( index, v[0], v[1] );
+ save_Attr2fARB(index, v[0], v[1]);
else
enum_error();
}
static void GLAPIENTRY
-save_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z )
+save_VertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr3fARB( index, x, y, z );
+ save_Attr3fARB(index, x, y, z);
else
enum_error();
}
static void GLAPIENTRY
-save_VertexAttrib3fvARB( GLuint index, const GLfloat *v )
+save_VertexAttrib3fvARB(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr3fARB( index, v[0], v[1], v[2] );
+ save_Attr3fARB(index, v[0], v[1], v[2]);
else
enum_error();
}
static void GLAPIENTRY
-save_VertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+save_VertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
+ GLfloat w)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr4fARB( index, x, y, z, w );
+ save_Attr4fARB(index, x, y, z, w);
else
enum_error();
}
static void GLAPIENTRY
-save_VertexAttrib4fvARB( GLuint index, const GLfloat *v )
+save_VertexAttrib4fvARB(GLuint index, const GLfloat * v)
{
if (index < VERT_ATTRIB_MAX)
- save_Attr4fARB( index, v[0], v[1], v[2], v[3] );
+ save_Attr4fARB(index, v[0], v[1], v[2], v[3]);
else
enum_error();
}
@@ -5347,10 +5581,10 @@ save_VertexAttrib4fvARB( GLuint index, const GLfloat *v )
* command that provoked the error. I don't see this as a problem.
*/
void
-_mesa_save_error( GLcontext *ctx, GLenum error, const char *s )
+_mesa_save_error(GLcontext *ctx, GLenum error, const char *s)
{
Node *n;
- n = ALLOC_INSTRUCTION( ctx, OPCODE_ERROR, 2 );
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_ERROR, 2);
if (n) {
n[1].e = error;
n[2].data = (void *) s;
@@ -5363,13 +5597,13 @@ _mesa_save_error( GLcontext *ctx, GLenum error, const char *s )
* Compile an error into current display list.
*/
void
-_mesa_compile_error( GLcontext *ctx, GLenum error, const char *s )
+_mesa_compile_error(GLcontext *ctx, GLenum error, const char *s)
{
if (ctx->CompileFlag)
- _mesa_save_error( ctx, error, s );
+ _mesa_save_error(ctx, error, s);
if (ctx->ExecuteFlag)
- _mesa_error( ctx, error, s );
+ _mesa_error(ctx, error, s);
}
@@ -5399,13 +5633,13 @@ islist(GLcontext *ctx, GLuint list)
* \param list - display list number
*/
static void GLAPIENTRY
-execute_list( GLcontext *ctx, GLuint list )
+execute_list(GLcontext *ctx, GLuint list)
{
struct mesa_display_list *dlist;
Node *n;
GLboolean done;
- if (list == 0 || !islist(ctx,list))
+ if (list == 0 || !islist(ctx, list))
return;
if (ctx->ListState.CallDepth == MAX_LIST_NESTING) {
@@ -5414,96 +5648,100 @@ execute_list( GLcontext *ctx, GLuint list )
}
- dlist = (struct mesa_display_list *) _mesa_HashLookup(ctx->Shared->DisplayList, list);
+ dlist =
+ (struct mesa_display_list *) _mesa_HashLookup(ctx->Shared->DisplayList,
+ list);
if (!dlist)
return;
ctx->ListState.CallStack[ctx->ListState.CallDepth++] = dlist;
if (ctx->Driver.BeginCallList)
- ctx->Driver.BeginCallList( ctx, dlist );
+ ctx->Driver.BeginCallList(ctx, dlist);
n = dlist->node;
done = GL_FALSE;
while (!done) {
OpCode opcode = n[0].opcode;
- int i = (int)n[0].opcode - (int)OPCODE_EXT_0;
+ int i = (int) n[0].opcode - (int) OPCODE_EXT_0;
if (i >= 0 && i < (GLint) ctx->ListExt.NumOpcodes) {
/* this is a driver-extended opcode */
- ctx->ListExt.Opcode[i].Execute(ctx, &n[1]);
- n += ctx->ListExt.Opcode[i].Size;
+ ctx->ListExt.Opcode[i].Execute(ctx, &n[1]);
+ n += ctx->ListExt.Opcode[i].Size;
}
else {
- switch (opcode) {
- case OPCODE_ERROR:
- _mesa_error( ctx, n[1].e, (const char *) n[2].data );
- break;
+ switch (opcode) {
+ case OPCODE_ERROR:
+ _mesa_error(ctx, n[1].e, (const char *) n[2].data);
+ break;
case OPCODE_ACCUM:
- CALL_Accum(ctx->Exec, ( n[1].e, n[2].f ));
- break;
+ CALL_Accum(ctx->Exec, (n[1].e, n[2].f));
+ break;
case OPCODE_ALPHA_FUNC:
- CALL_AlphaFunc(ctx->Exec, ( n[1].e, n[2].f ));
- break;
+ CALL_AlphaFunc(ctx->Exec, (n[1].e, n[2].f));
+ break;
case OPCODE_BIND_TEXTURE:
- CALL_BindTexture(ctx->Exec, ( n[1].e, n[2].ui ));
+ CALL_BindTexture(ctx->Exec, (n[1].e, n[2].ui));
break;
- case OPCODE_BITMAP:
+ case OPCODE_BITMAP:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_Bitmap(ctx->Exec, ( (GLsizei) n[1].i, (GLsizei) n[2].i,
- n[3].f, n[4].f, n[5].f, n[6].f, (const GLubyte *) n[7].data ));
- ctx->Unpack = save; /* restore */
+ CALL_Bitmap(ctx->Exec, ((GLsizei) n[1].i, (GLsizei) n[2].i,
+ n[3].f, n[4].f, n[5].f, n[6].f,
+ (const GLubyte *) n[7].data));
+ ctx->Unpack = save; /* restore */
}
- break;
- case OPCODE_BLEND_COLOR:
- CALL_BlendColor(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f ));
- break;
- case OPCODE_BLEND_EQUATION:
- CALL_BlendEquation(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_BLEND_EQUATION_SEPARATE:
- CALL_BlendEquationSeparateEXT(ctx->Exec, ( n[1].e, n[2].e ));
- break;
- case OPCODE_BLEND_FUNC_SEPARATE:
- CALL_BlendFuncSeparateEXT(ctx->Exec, (n[1].e, n[2].e, n[3].e, n[4].e));
- break;
+ break;
+ case OPCODE_BLEND_COLOR:
+ CALL_BlendColor(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_BLEND_EQUATION:
+ CALL_BlendEquation(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_BLEND_EQUATION_SEPARATE:
+ CALL_BlendEquationSeparateEXT(ctx->Exec, (n[1].e, n[2].e));
+ break;
+ case OPCODE_BLEND_FUNC_SEPARATE:
+ CALL_BlendFuncSeparateEXT(ctx->Exec,
+ (n[1].e, n[2].e, n[3].e, n[4].e));
+ break;
case OPCODE_CALL_LIST:
- /* Generated by glCallList(), don't add ListBase */
- if (ctx->ListState.CallDepth<MAX_LIST_NESTING) {
- execute_list( ctx, n[1].ui );
+ /* Generated by glCallList(), don't add ListBase */
+ if (ctx->ListState.CallDepth < MAX_LIST_NESTING) {
+ execute_list(ctx, n[1].ui);
}
break;
case OPCODE_CALL_LIST_OFFSET:
- /* Generated by glCallLists() so we must add ListBase */
+ /* Generated by glCallLists() so we must add ListBase */
if (n[2].b) {
/* user specified a bad data type at compile time */
_mesa_error(ctx, GL_INVALID_ENUM, "glCallLists(type)");
}
else if (ctx->ListState.CallDepth < MAX_LIST_NESTING) {
- execute_list( ctx, ctx->List.ListBase + n[1].ui );
+ execute_list(ctx, ctx->List.ListBase + n[1].ui);
}
break;
- case OPCODE_CLEAR:
- CALL_Clear(ctx->Exec, ( n[1].bf ));
- break;
- case OPCODE_CLEAR_COLOR:
- CALL_ClearColor(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f ));
- break;
- case OPCODE_CLEAR_ACCUM:
- CALL_ClearAccum(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f ));
- break;
- case OPCODE_CLEAR_DEPTH:
- CALL_ClearDepth(ctx->Exec, ( (GLclampd) n[1].f ));
- break;
- case OPCODE_CLEAR_INDEX:
- CALL_ClearIndex(ctx->Exec, ( (GLfloat) n[1].ui ));
- break;
- case OPCODE_CLEAR_STENCIL:
- CALL_ClearStencil(ctx->Exec, ( n[1].i ));
- break;
+ case OPCODE_CLEAR:
+ CALL_Clear(ctx->Exec, (n[1].bf));
+ break;
+ case OPCODE_CLEAR_COLOR:
+ CALL_ClearColor(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_CLEAR_ACCUM:
+ CALL_ClearAccum(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_CLEAR_DEPTH:
+ CALL_ClearDepth(ctx->Exec, ((GLclampd) n[1].f));
+ break;
+ case OPCODE_CLEAR_INDEX:
+ CALL_ClearIndex(ctx->Exec, ((GLfloat) n[1].ui));
+ break;
+ case OPCODE_CLEAR_STENCIL:
+ CALL_ClearStencil(ctx->Exec, (n[1].i));
+ break;
case OPCODE_CLIP_PLANE:
{
GLdouble eq[4];
@@ -5511,22 +5749,22 @@ execute_list( GLcontext *ctx, GLuint list )
eq[1] = n[3].f;
eq[2] = n[4].f;
eq[3] = n[5].f;
- CALL_ClipPlane(ctx->Exec, ( n[1].e, eq ));
+ CALL_ClipPlane(ctx->Exec, (n[1].e, eq));
}
break;
- case OPCODE_COLOR_MASK:
- CALL_ColorMask(ctx->Exec, ( n[1].b, n[2].b, n[3].b, n[4].b ));
- break;
- case OPCODE_COLOR_MATERIAL:
- CALL_ColorMaterial(ctx->Exec, ( n[1].e, n[2].e ));
- break;
+ case OPCODE_COLOR_MASK:
+ CALL_ColorMask(ctx->Exec, (n[1].b, n[2].b, n[3].b, n[4].b));
+ break;
+ case OPCODE_COLOR_MATERIAL:
+ CALL_ColorMaterial(ctx->Exec, (n[1].e, n[2].e));
+ break;
case OPCODE_COLOR_TABLE:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_ColorTable(ctx->Exec, ( n[1].e, n[2].e, n[3].i, n[4].e,
- n[5].e, n[6].data ));
- ctx->Unpack = save; /* restore */
+ CALL_ColorTable(ctx->Exec, (n[1].e, n[2].e, n[3].i, n[4].e,
+ n[5].e, n[6].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_COLOR_TABLE_PARAMETER_FV:
@@ -5536,7 +5774,8 @@ execute_list( GLcontext *ctx, GLuint list )
params[1] = n[4].f;
params[2] = n[5].f;
params[3] = n[6].f;
- CALL_ColorTableParameterfv(ctx->Exec, ( n[1].e, n[2].e, params ));
+ CALL_ColorTableParameterfv(ctx->Exec,
+ (n[1].e, n[2].e, params));
}
break;
case OPCODE_COLOR_TABLE_PARAMETER_IV:
@@ -5546,38 +5785,41 @@ execute_list( GLcontext *ctx, GLuint list )
params[1] = n[4].i;
params[2] = n[5].i;
params[3] = n[6].i;
- CALL_ColorTableParameteriv(ctx->Exec, ( n[1].e, n[2].e, params ));
+ CALL_ColorTableParameteriv(ctx->Exec,
+ (n[1].e, n[2].e, params));
}
break;
case OPCODE_COLOR_SUB_TABLE:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_ColorSubTable(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].e, n[5].e, n[6].data ));
- ctx->Unpack = save; /* restore */
+ CALL_ColorSubTable(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].e, n[5].e, n[6].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_CONVOLUTION_FILTER_1D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_ConvolutionFilter1D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].e, n[5].e, n[6].data ));
- ctx->Unpack = save; /* restore */
+ CALL_ConvolutionFilter1D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].e, n[5].e,
+ n[6].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_CONVOLUTION_FILTER_2D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_ConvolutionFilter2D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].e, n[6].e, n[7].data ));
- ctx->Unpack = save; /* restore */
+ CALL_ConvolutionFilter2D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].e, n[6].e,
+ n[7].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_CONVOLUTION_PARAMETER_I:
- CALL_ConvolutionParameteri(ctx->Exec, ( n[1].e, n[2].e, n[3].i ));
+ CALL_ConvolutionParameteri(ctx->Exec, (n[1].e, n[2].e, n[3].i));
break;
case OPCODE_CONVOLUTION_PARAMETER_IV:
{
@@ -5586,11 +5828,12 @@ execute_list( GLcontext *ctx, GLuint list )
params[1] = n[4].i;
params[2] = n[5].i;
params[3] = n[6].i;
- CALL_ConvolutionParameteriv(ctx->Exec, ( n[1].e, n[2].e, params ));
+ CALL_ConvolutionParameteriv(ctx->Exec,
+ (n[1].e, n[2].e, params));
}
break;
case OPCODE_CONVOLUTION_PARAMETER_F:
- CALL_ConvolutionParameterf(ctx->Exec, ( n[1].e, n[2].e, n[3].f ));
+ CALL_ConvolutionParameterf(ctx->Exec, (n[1].e, n[2].e, n[3].f));
break;
case OPCODE_CONVOLUTION_PARAMETER_FV:
{
@@ -5599,168 +5842,175 @@ execute_list( GLcontext *ctx, GLuint list )
params[1] = n[4].f;
params[2] = n[5].f;
params[3] = n[6].f;
- CALL_ConvolutionParameterfv(ctx->Exec, ( n[1].e, n[2].e, params ));
+ CALL_ConvolutionParameterfv(ctx->Exec,
+ (n[1].e, n[2].e, params));
}
break;
case OPCODE_COPY_COLOR_SUB_TABLE:
- CALL_CopyColorSubTable(ctx->Exec, ( n[1].e, n[2].i,
- n[3].i, n[4].i, n[5].i ));
+ CALL_CopyColorSubTable(ctx->Exec, (n[1].e, n[2].i,
+ n[3].i, n[4].i, n[5].i));
break;
case OPCODE_COPY_COLOR_TABLE:
- CALL_CopyColorSubTable(ctx->Exec, ( n[1].e, n[2].i,
- n[3].i, n[4].i, n[5].i ));
+ CALL_CopyColorSubTable(ctx->Exec, (n[1].e, n[2].i,
+ n[3].i, n[4].i, n[5].i));
+ break;
+ case OPCODE_COPY_PIXELS:
+ CALL_CopyPixels(ctx->Exec, (n[1].i, n[2].i,
+ (GLsizei) n[3].i, (GLsizei) n[4].i,
+ n[5].e));
break;
- case OPCODE_COPY_PIXELS:
- CALL_CopyPixels(ctx->Exec, ( n[1].i, n[2].i,
- (GLsizei) n[3].i, (GLsizei) n[4].i, n[5].e ));
- break;
case OPCODE_COPY_TEX_IMAGE1D:
- CALL_CopyTexImage1D(ctx->Exec, ( n[1].e, n[2].i, n[3].e, n[4].i,
- n[5].i, n[6].i, n[7].i ));
+ CALL_CopyTexImage1D(ctx->Exec, (n[1].e, n[2].i, n[3].e, n[4].i,
+ n[5].i, n[6].i, n[7].i));
break;
case OPCODE_COPY_TEX_IMAGE2D:
- CALL_CopyTexImage2D(ctx->Exec, ( n[1].e, n[2].i, n[3].e, n[4].i,
- n[5].i, n[6].i, n[7].i, n[8].i ));
+ CALL_CopyTexImage2D(ctx->Exec, (n[1].e, n[2].i, n[3].e, n[4].i,
+ n[5].i, n[6].i, n[7].i, n[8].i));
break;
case OPCODE_COPY_TEX_SUB_IMAGE1D:
- CALL_CopyTexSubImage1D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].i, n[6].i ));
+ CALL_CopyTexSubImage1D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].i, n[6].i));
break;
case OPCODE_COPY_TEX_SUB_IMAGE2D:
- CALL_CopyTexSubImage2D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].i, n[6].i, n[7].i, n[8].i ));
+ CALL_CopyTexSubImage2D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].i, n[6].i, n[7].i,
+ n[8].i));
break;
case OPCODE_COPY_TEX_SUB_IMAGE3D:
- CALL_CopyTexSubImage3D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].i, n[6].i, n[7].i, n[8].i , n[9].i));
- break;
- case OPCODE_CULL_FACE:
- CALL_CullFace(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_DEPTH_FUNC:
- CALL_DepthFunc(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_DEPTH_MASK:
- CALL_DepthMask(ctx->Exec, ( n[1].b ));
- break;
- case OPCODE_DEPTH_RANGE:
- CALL_DepthRange(ctx->Exec, ( (GLclampd) n[1].f, (GLclampd) n[2].f ));
- break;
- case OPCODE_DISABLE:
- CALL_Disable(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_DRAW_BUFFER:
- CALL_DrawBuffer(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_DRAW_PIXELS:
+ CALL_CopyTexSubImage3D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].i, n[6].i, n[7].i,
+ n[8].i, n[9].i));
+ break;
+ case OPCODE_CULL_FACE:
+ CALL_CullFace(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_DEPTH_FUNC:
+ CALL_DepthFunc(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_DEPTH_MASK:
+ CALL_DepthMask(ctx->Exec, (n[1].b));
+ break;
+ case OPCODE_DEPTH_RANGE:
+ CALL_DepthRange(ctx->Exec,
+ ((GLclampd) n[1].f, (GLclampd) n[2].f));
+ break;
+ case OPCODE_DISABLE:
+ CALL_Disable(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_DRAW_BUFFER:
+ CALL_DrawBuffer(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_DRAW_PIXELS:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_DrawPixels(ctx->Exec, ( n[1].i, n[2].i, n[3].e, n[4].e,
- n[5].data ));
- ctx->Unpack = save; /* restore */
+ CALL_DrawPixels(ctx->Exec, (n[1].i, n[2].i, n[3].e, n[4].e,
+ n[5].data));
+ ctx->Unpack = save; /* restore */
}
- break;
- case OPCODE_ENABLE:
- CALL_Enable(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_EVALMESH1:
- CALL_EvalMesh1(ctx->Exec, ( n[1].e, n[2].i, n[3].i ));
- break;
- case OPCODE_EVALMESH2:
- CALL_EvalMesh2(ctx->Exec, ( n[1].e, n[2].i, n[3].i, n[4].i, n[5].i ));
- break;
- case OPCODE_FOG:
- {
- GLfloat p[4];
- p[0] = n[2].f;
- p[1] = n[3].f;
- p[2] = n[4].f;
- p[3] = n[5].f;
- CALL_Fogfv(ctx->Exec, ( n[1].e, p ));
- }
- break;
- case OPCODE_FRONT_FACE:
- CALL_FrontFace(ctx->Exec, ( n[1].e ));
- break;
+ break;
+ case OPCODE_ENABLE:
+ CALL_Enable(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_EVALMESH1:
+ CALL_EvalMesh1(ctx->Exec, (n[1].e, n[2].i, n[3].i));
+ break;
+ case OPCODE_EVALMESH2:
+ CALL_EvalMesh2(ctx->Exec,
+ (n[1].e, n[2].i, n[3].i, n[4].i, n[5].i));
+ break;
+ case OPCODE_FOG:
+ {
+ GLfloat p[4];
+ p[0] = n[2].f;
+ p[1] = n[3].f;
+ p[2] = n[4].f;
+ p[3] = n[5].f;
+ CALL_Fogfv(ctx->Exec, (n[1].e, p));
+ }
+ break;
+ case OPCODE_FRONT_FACE:
+ CALL_FrontFace(ctx->Exec, (n[1].e));
+ break;
case OPCODE_FRUSTUM:
- CALL_Frustum(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ));
- break;
- case OPCODE_HINT:
- CALL_Hint(ctx->Exec, ( n[1].e, n[2].e ));
- break;
- case OPCODE_HISTOGRAM:
- CALL_Histogram(ctx->Exec, ( n[1].e, n[2].i, n[3].e, n[4].b ));
- break;
- case OPCODE_INDEX_MASK:
- CALL_IndexMask(ctx->Exec, ( n[1].ui ));
- break;
- case OPCODE_INIT_NAMES:
- CALL_InitNames(ctx->Exec, ());
- break;
+ CALL_Frustum(ctx->Exec,
+ (n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f));
+ break;
+ case OPCODE_HINT:
+ CALL_Hint(ctx->Exec, (n[1].e, n[2].e));
+ break;
+ case OPCODE_HISTOGRAM:
+ CALL_Histogram(ctx->Exec, (n[1].e, n[2].i, n[3].e, n[4].b));
+ break;
+ case OPCODE_INDEX_MASK:
+ CALL_IndexMask(ctx->Exec, (n[1].ui));
+ break;
+ case OPCODE_INIT_NAMES:
+ CALL_InitNames(ctx->Exec, ());
+ break;
case OPCODE_LIGHT:
- {
- GLfloat p[4];
- p[0] = n[3].f;
- p[1] = n[4].f;
- p[2] = n[5].f;
- p[3] = n[6].f;
- CALL_Lightfv(ctx->Exec, ( n[1].e, n[2].e, p ));
- }
- break;
+ {
+ GLfloat p[4];
+ p[0] = n[3].f;
+ p[1] = n[4].f;
+ p[2] = n[5].f;
+ p[3] = n[6].f;
+ CALL_Lightfv(ctx->Exec, (n[1].e, n[2].e, p));
+ }
+ break;
case OPCODE_LIGHT_MODEL:
- {
- GLfloat p[4];
- p[0] = n[2].f;
- p[1] = n[3].f;
- p[2] = n[4].f;
- p[3] = n[5].f;
- CALL_LightModelfv(ctx->Exec, ( n[1].e, p ));
- }
- break;
- case OPCODE_LINE_STIPPLE:
- CALL_LineStipple(ctx->Exec, ( n[1].i, n[2].us ));
- break;
- case OPCODE_LINE_WIDTH:
- CALL_LineWidth(ctx->Exec, ( n[1].f ));
- break;
- case OPCODE_LIST_BASE:
- CALL_ListBase(ctx->Exec, ( n[1].ui ));
- break;
- case OPCODE_LOAD_IDENTITY:
+ {
+ GLfloat p[4];
+ p[0] = n[2].f;
+ p[1] = n[3].f;
+ p[2] = n[4].f;
+ p[3] = n[5].f;
+ CALL_LightModelfv(ctx->Exec, (n[1].e, p));
+ }
+ break;
+ case OPCODE_LINE_STIPPLE:
+ CALL_LineStipple(ctx->Exec, (n[1].i, n[2].us));
+ break;
+ case OPCODE_LINE_WIDTH:
+ CALL_LineWidth(ctx->Exec, (n[1].f));
+ break;
+ case OPCODE_LIST_BASE:
+ CALL_ListBase(ctx->Exec, (n[1].ui));
+ break;
+ case OPCODE_LOAD_IDENTITY:
CALL_LoadIdentity(ctx->Exec, ());
break;
- case OPCODE_LOAD_MATRIX:
- if (sizeof(Node)==sizeof(GLfloat)) {
- CALL_LoadMatrixf(ctx->Exec, ( &n[1].f ));
- }
- else {
- GLfloat m[16];
- GLuint i;
- for (i=0;i<16;i++) {
- m[i] = n[1+i].f;
- }
- CALL_LoadMatrixf(ctx->Exec, ( m ));
- }
- break;
- case OPCODE_LOAD_NAME:
- CALL_LoadName(ctx->Exec, ( n[1].ui ));
- break;
- case OPCODE_LOGIC_OP:
- CALL_LogicOp(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_MAP1:
+ case OPCODE_LOAD_MATRIX:
+ if (sizeof(Node) == sizeof(GLfloat)) {
+ CALL_LoadMatrixf(ctx->Exec, (&n[1].f));
+ }
+ else {
+ GLfloat m[16];
+ GLuint i;
+ for (i = 0; i < 16; i++) {
+ m[i] = n[1 + i].f;
+ }
+ CALL_LoadMatrixf(ctx->Exec, (m));
+ }
+ break;
+ case OPCODE_LOAD_NAME:
+ CALL_LoadName(ctx->Exec, (n[1].ui));
+ break;
+ case OPCODE_LOGIC_OP:
+ CALL_LogicOp(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_MAP1:
{
GLenum target = n[1].e;
GLint ustride = _mesa_evaluator_components(target);
GLint uorder = n[5].i;
GLfloat u1 = n[2].f;
GLfloat u2 = n[3].f;
- CALL_Map1f(ctx->Exec, ( target, u1, u2, ustride, uorder,
- (GLfloat *) n[6].data ));
+ CALL_Map1f(ctx->Exec, (target, u1, u2, ustride, uorder,
+ (GLfloat *) n[6].data));
}
- break;
- case OPCODE_MAP2:
+ break;
+ case OPCODE_MAP2:
{
GLenum target = n[1].e;
GLfloat u1 = n[2].f;
@@ -5771,135 +6021,140 @@ execute_list( GLcontext *ctx, GLuint list )
GLint vstride = n[7].i;
GLint uorder = n[8].i;
GLint vorder = n[9].i;
- CALL_Map2f(ctx->Exec, ( target, u1, u2, ustride, uorder,
- v1, v2, vstride, vorder,
- (GLfloat *) n[10].data ));
+ CALL_Map2f(ctx->Exec, (target, u1, u2, ustride, uorder,
+ v1, v2, vstride, vorder,
+ (GLfloat *) n[10].data));
}
- break;
- case OPCODE_MAPGRID1:
- CALL_MapGrid1f(ctx->Exec, ( n[1].i, n[2].f, n[3].f ));
- break;
- case OPCODE_MAPGRID2:
- CALL_MapGrid2f(ctx->Exec, ( n[1].i, n[2].f, n[3].f, n[4].i, n[5].f, n[6].f));
- break;
+ break;
+ case OPCODE_MAPGRID1:
+ CALL_MapGrid1f(ctx->Exec, (n[1].i, n[2].f, n[3].f));
+ break;
+ case OPCODE_MAPGRID2:
+ CALL_MapGrid2f(ctx->Exec,
+ (n[1].i, n[2].f, n[3].f, n[4].i, n[5].f, n[6].f));
+ break;
case OPCODE_MATRIX_MODE:
- CALL_MatrixMode(ctx->Exec, ( n[1].e ));
+ CALL_MatrixMode(ctx->Exec, (n[1].e));
break;
case OPCODE_MIN_MAX:
CALL_Minmax(ctx->Exec, (n[1].e, n[2].e, n[3].b));
break;
- case OPCODE_MULT_MATRIX:
- if (sizeof(Node)==sizeof(GLfloat)) {
- CALL_MultMatrixf(ctx->Exec, ( &n[1].f ));
- }
- else {
- GLfloat m[16];
- GLuint i;
- for (i=0;i<16;i++) {
- m[i] = n[1+i].f;
- }
- CALL_MultMatrixf(ctx->Exec, ( m ));
- }
- break;
+ case OPCODE_MULT_MATRIX:
+ if (sizeof(Node) == sizeof(GLfloat)) {
+ CALL_MultMatrixf(ctx->Exec, (&n[1].f));
+ }
+ else {
+ GLfloat m[16];
+ GLuint i;
+ for (i = 0; i < 16; i++) {
+ m[i] = n[1 + i].f;
+ }
+ CALL_MultMatrixf(ctx->Exec, (m));
+ }
+ break;
case OPCODE_ORTHO:
- CALL_Ortho(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ));
- break;
- case OPCODE_PASSTHROUGH:
- CALL_PassThrough(ctx->Exec, ( n[1].f ));
- break;
- case OPCODE_PIXEL_MAP:
- CALL_PixelMapfv(ctx->Exec, ( n[1].e, n[2].i, (GLfloat *) n[3].data ));
- break;
- case OPCODE_PIXEL_TRANSFER:
- CALL_PixelTransferf(ctx->Exec, ( n[1].e, n[2].f ));
- break;
- case OPCODE_PIXEL_ZOOM:
- CALL_PixelZoom(ctx->Exec, ( n[1].f, n[2].f ));
- break;
- case OPCODE_POINT_SIZE:
- CALL_PointSize(ctx->Exec, ( n[1].f ));
- break;
- case OPCODE_POINT_PARAMETERS:
- {
- GLfloat params[3];
- params[0] = n[2].f;
- params[1] = n[3].f;
- params[2] = n[4].f;
- CALL_PointParameterfvEXT(ctx->Exec, ( n[1].e, params ));
- }
- break;
- case OPCODE_POLYGON_MODE:
- CALL_PolygonMode(ctx->Exec, ( n[1].e, n[2].e ));
- break;
- case OPCODE_POLYGON_STIPPLE:
- CALL_PolygonStipple(ctx->Exec, ( (GLubyte *) n[1].data ));
- break;
- case OPCODE_POLYGON_OFFSET:
- CALL_PolygonOffset(ctx->Exec, ( n[1].f, n[2].f ));
- break;
- case OPCODE_POP_ATTRIB:
- CALL_PopAttrib(ctx->Exec, ());
- break;
- case OPCODE_POP_MATRIX:
- CALL_PopMatrix(ctx->Exec, ());
- break;
- case OPCODE_POP_NAME:
- CALL_PopName(ctx->Exec, ());
- break;
- case OPCODE_PRIORITIZE_TEXTURE:
- CALL_PrioritizeTextures(ctx->Exec, ( 1, &n[1].ui, &n[2].f ));
- break;
- case OPCODE_PUSH_ATTRIB:
- CALL_PushAttrib(ctx->Exec, ( n[1].bf ));
- break;
- case OPCODE_PUSH_MATRIX:
- CALL_PushMatrix(ctx->Exec, ());
- break;
- case OPCODE_PUSH_NAME:
- CALL_PushName(ctx->Exec, ( n[1].ui ));
- break;
- case OPCODE_RASTER_POS:
- CALL_RasterPos4f(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f ));
- break;
- case OPCODE_READ_BUFFER:
- CALL_ReadBuffer(ctx->Exec, ( n[1].e ));
- break;
+ CALL_Ortho(ctx->Exec,
+ (n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f));
+ break;
+ case OPCODE_PASSTHROUGH:
+ CALL_PassThrough(ctx->Exec, (n[1].f));
+ break;
+ case OPCODE_PIXEL_MAP:
+ CALL_PixelMapfv(ctx->Exec,
+ (n[1].e, n[2].i, (GLfloat *) n[3].data));
+ break;
+ case OPCODE_PIXEL_TRANSFER:
+ CALL_PixelTransferf(ctx->Exec, (n[1].e, n[2].f));
+ break;
+ case OPCODE_PIXEL_ZOOM:
+ CALL_PixelZoom(ctx->Exec, (n[1].f, n[2].f));
+ break;
+ case OPCODE_POINT_SIZE:
+ CALL_PointSize(ctx->Exec, (n[1].f));
+ break;
+ case OPCODE_POINT_PARAMETERS:
+ {
+ GLfloat params[3];
+ params[0] = n[2].f;
+ params[1] = n[3].f;
+ params[2] = n[4].f;
+ CALL_PointParameterfvEXT(ctx->Exec, (n[1].e, params));
+ }
+ break;
+ case OPCODE_POLYGON_MODE:
+ CALL_PolygonMode(ctx->Exec, (n[1].e, n[2].e));
+ break;
+ case OPCODE_POLYGON_STIPPLE:
+ CALL_PolygonStipple(ctx->Exec, ((GLubyte *) n[1].data));
+ break;
+ case OPCODE_POLYGON_OFFSET:
+ CALL_PolygonOffset(ctx->Exec, (n[1].f, n[2].f));
+ break;
+ case OPCODE_POP_ATTRIB:
+ CALL_PopAttrib(ctx->Exec, ());
+ break;
+ case OPCODE_POP_MATRIX:
+ CALL_PopMatrix(ctx->Exec, ());
+ break;
+ case OPCODE_POP_NAME:
+ CALL_PopName(ctx->Exec, ());
+ break;
+ case OPCODE_PRIORITIZE_TEXTURE:
+ CALL_PrioritizeTextures(ctx->Exec, (1, &n[1].ui, &n[2].f));
+ break;
+ case OPCODE_PUSH_ATTRIB:
+ CALL_PushAttrib(ctx->Exec, (n[1].bf));
+ break;
+ case OPCODE_PUSH_MATRIX:
+ CALL_PushMatrix(ctx->Exec, ());
+ break;
+ case OPCODE_PUSH_NAME:
+ CALL_PushName(ctx->Exec, (n[1].ui));
+ break;
+ case OPCODE_RASTER_POS:
+ CALL_RasterPos4f(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_READ_BUFFER:
+ CALL_ReadBuffer(ctx->Exec, (n[1].e));
+ break;
case OPCODE_RESET_HISTOGRAM:
- CALL_ResetHistogram(ctx->Exec, ( n[1].e ));
+ CALL_ResetHistogram(ctx->Exec, (n[1].e));
break;
case OPCODE_RESET_MIN_MAX:
- CALL_ResetMinmax(ctx->Exec, ( n[1].e ));
+ CALL_ResetMinmax(ctx->Exec, (n[1].e));
break;
case OPCODE_ROTATE:
- CALL_Rotatef(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f ));
+ CALL_Rotatef(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
break;
case OPCODE_SCALE:
- CALL_Scalef(ctx->Exec, ( n[1].f, n[2].f, n[3].f ));
- break;
- case OPCODE_SCISSOR:
- CALL_Scissor(ctx->Exec, ( n[1].i, n[2].i, n[3].i, n[4].i ));
- break;
- case OPCODE_SHADE_MODEL:
- CALL_ShadeModel(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_STENCIL_FUNC:
- CALL_StencilFunc(ctx->Exec, ( n[1].e, n[2].i, n[3].ui ));
- break;
- case OPCODE_STENCIL_MASK:
- CALL_StencilMask(ctx->Exec, ( n[1].ui ));
- break;
- case OPCODE_STENCIL_OP:
- CALL_StencilOp(ctx->Exec, ( n[1].e, n[2].e, n[3].e ));
- break;
- case OPCODE_STENCIL_FUNC_SEPARATE:
- CALL_StencilFuncSeparate(ctx->Exec, ( n[1].e, n[2].e, n[3].i, n[4].ui ));
- break;
- case OPCODE_STENCIL_MASK_SEPARATE:
- CALL_StencilMaskSeparate(ctx->Exec, ( n[1].e, n[2].ui ));
- break;
- case OPCODE_STENCIL_OP_SEPARATE:
- CALL_StencilOpSeparate(ctx->Exec, ( n[1].e, n[2].e, n[3].e, n[4].e ));
- break;
+ CALL_Scalef(ctx->Exec, (n[1].f, n[2].f, n[3].f));
+ break;
+ case OPCODE_SCISSOR:
+ CALL_Scissor(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));
+ break;
+ case OPCODE_SHADE_MODEL:
+ CALL_ShadeModel(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_STENCIL_FUNC:
+ CALL_StencilFunc(ctx->Exec, (n[1].e, n[2].i, n[3].ui));
+ break;
+ case OPCODE_STENCIL_MASK:
+ CALL_StencilMask(ctx->Exec, (n[1].ui));
+ break;
+ case OPCODE_STENCIL_OP:
+ CALL_StencilOp(ctx->Exec, (n[1].e, n[2].e, n[3].e));
+ break;
+ case OPCODE_STENCIL_FUNC_SEPARATE:
+ CALL_StencilFuncSeparate(ctx->Exec,
+ (n[1].e, n[2].e, n[3].i, n[4].ui));
+ break;
+ case OPCODE_STENCIL_MASK_SEPARATE:
+ CALL_StencilMaskSeparate(ctx->Exec, (n[1].e, n[2].ui));
+ break;
+ case OPCODE_STENCIL_OP_SEPARATE:
+ CALL_StencilOpSeparate(ctx->Exec,
+ (n[1].e, n[2].e, n[3].e, n[4].e));
+ break;
case OPCODE_TEXENV:
{
GLfloat params[4];
@@ -5907,7 +6162,7 @@ execute_list( GLcontext *ctx, GLuint list )
params[1] = n[4].f;
params[2] = n[5].f;
params[3] = n[6].f;
- CALL_TexEnvfv(ctx->Exec, ( n[1].e, n[2].e, params ));
+ CALL_TexEnvfv(ctx->Exec, (n[1].e, n[2].e, params));
}
break;
case OPCODE_TEXGEN:
@@ -5917,7 +6172,7 @@ execute_list( GLcontext *ctx, GLuint list )
params[1] = n[4].f;
params[2] = n[5].f;
params[3] = n[6].f;
- CALL_TexGenfv(ctx->Exec, ( n[1].e, n[2].e, params ));
+ CALL_TexGenfv(ctx->Exec, (n[1].e, n[2].e, params));
}
break;
case OPCODE_TEXPARAMETER:
@@ -5927,138 +6182,144 @@ execute_list( GLcontext *ctx, GLuint list )
params[1] = n[4].f;
params[2] = n[5].f;
params[3] = n[6].f;
- CALL_TexParameterfv(ctx->Exec, ( n[1].e, n[2].e, params ));
+ CALL_TexParameterfv(ctx->Exec, (n[1].e, n[2].e, params));
}
break;
- case OPCODE_TEX_IMAGE1D:
+ case OPCODE_TEX_IMAGE1D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_TexImage1D(ctx->Exec, (
- n[1].e, /* target */
- n[2].i, /* level */
- n[3].i, /* components */
- n[4].i, /* width */
- n[5].e, /* border */
- n[6].e, /* format */
- n[7].e, /* type */
- n[8].data ));
- ctx->Unpack = save; /* restore */
+ CALL_TexImage1D(ctx->Exec, (n[1].e, /* target */
+ n[2].i, /* level */
+ n[3].i, /* components */
+ n[4].i, /* width */
+ n[5].e, /* border */
+ n[6].e, /* format */
+ n[7].e, /* type */
+ n[8].data));
+ ctx->Unpack = save; /* restore */
}
- break;
- case OPCODE_TEX_IMAGE2D:
+ break;
+ case OPCODE_TEX_IMAGE2D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_TexImage2D(ctx->Exec, (
- n[1].e, /* target */
- n[2].i, /* level */
- n[3].i, /* components */
- n[4].i, /* width */
- n[5].i, /* height */
- n[6].e, /* border */
- n[7].e, /* format */
- n[8].e, /* type */
- n[9].data ));
- ctx->Unpack = save; /* restore */
+ CALL_TexImage2D(ctx->Exec, (n[1].e, /* target */
+ n[2].i, /* level */
+ n[3].i, /* components */
+ n[4].i, /* width */
+ n[5].i, /* height */
+ n[6].e, /* border */
+ n[7].e, /* format */
+ n[8].e, /* type */
+ n[9].data));
+ ctx->Unpack = save; /* restore */
}
- break;
+ break;
case OPCODE_TEX_IMAGE3D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_TexImage3D(ctx->Exec, (
- n[1].e, /* target */
- n[2].i, /* level */
- n[3].i, /* components */
- n[4].i, /* width */
- n[5].i, /* height */
- n[6].i, /* depth */
- n[7].e, /* border */
- n[8].e, /* format */
- n[9].e, /* type */
- n[10].data ));
- ctx->Unpack = save; /* restore */
+ CALL_TexImage3D(ctx->Exec, (n[1].e, /* target */
+ n[2].i, /* level */
+ n[3].i, /* components */
+ n[4].i, /* width */
+ n[5].i, /* height */
+ n[6].i, /* depth */
+ n[7].e, /* border */
+ n[8].e, /* format */
+ n[9].e, /* type */
+ n[10].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_TEX_SUB_IMAGE1D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_TexSubImage1D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].e,
- n[6].e, n[7].data ));
- ctx->Unpack = save; /* restore */
+ CALL_TexSubImage1D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].e,
+ n[6].e, n[7].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_TEX_SUB_IMAGE2D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_TexSubImage2D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].e,
- n[6].i, n[7].e, n[8].e, n[9].data ));
- ctx->Unpack = save; /* restore */
+ CALL_TexSubImage2D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].e,
+ n[6].i, n[7].e, n[8].e,
+ n[9].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_TEX_SUB_IMAGE3D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = ctx->DefaultPacking;
- CALL_TexSubImage3D(ctx->Exec, ( n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].i, n[6].i, n[7].i,
- n[8].i, n[9].e, n[10].e,
- n[11].data ));
- ctx->Unpack = save; /* restore */
+ CALL_TexSubImage3D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].i, n[6].i, n[7].i,
+ n[8].i, n[9].e, n[10].e,
+ n[11].data));
+ ctx->Unpack = save; /* restore */
}
break;
case OPCODE_TRANSLATE:
- CALL_Translatef(ctx->Exec, ( n[1].f, n[2].f, n[3].f ));
- break;
- case OPCODE_VIEWPORT:
- CALL_Viewport(ctx->Exec, (n[1].i, n[2].i,
- (GLsizei) n[3].i, (GLsizei) n[4].i));
- break;
- case OPCODE_WINDOW_POS:
- CALL_WindowPos4fMESA(ctx->Exec, ( n[1].f, n[2].f, n[3].f, n[4].f ));
- break;
- case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */
- CALL_ActiveTextureARB(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */
+ CALL_Translatef(ctx->Exec, (n[1].f, n[2].f, n[3].f));
+ break;
+ case OPCODE_VIEWPORT:
+ CALL_Viewport(ctx->Exec, (n[1].i, n[2].i,
+ (GLsizei) n[3].i, (GLsizei) n[4].i));
+ break;
+ case OPCODE_WINDOW_POS:
+ CALL_WindowPos4fMESA(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */
+ CALL_ActiveTextureARB(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */
CALL_CompressedTexImage1DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e,
- n[4].i, n[5].i, n[6].i, n[7].data));
+ n[4].i, n[5].i, n[6].i,
+ n[7].data));
break;
- case OPCODE_COMPRESSED_TEX_IMAGE_2D: /* GL_ARB_texture_compression */
+ case OPCODE_COMPRESSED_TEX_IMAGE_2D: /* GL_ARB_texture_compression */
CALL_CompressedTexImage2DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e,
- n[4].i, n[5].i, n[6].i, n[7].i, n[8].data));
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].data));
break;
- case OPCODE_COMPRESSED_TEX_IMAGE_3D: /* GL_ARB_texture_compression */
+ case OPCODE_COMPRESSED_TEX_IMAGE_3D: /* GL_ARB_texture_compression */
CALL_CompressedTexImage3DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e,
- n[4].i, n[5].i, n[6].i, n[7].i, n[8].i, n[9].data));
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i,
+ n[9].data));
break;
- case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: /* GL_ARB_texture_compress */
- CALL_CompressedTexSubImage1DARB(ctx->Exec, (n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].e, n[6].i, n[7].data));
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: /* GL_ARB_texture_compress */
+ CALL_CompressedTexSubImage1DARB(ctx->Exec,
+ (n[1].e, n[2].i, n[3].i, n[4].i,
+ n[5].e, n[6].i, n[7].data));
break;
- case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: /* GL_ARB_texture_compress */
- CALL_CompressedTexSubImage2DARB(ctx->Exec, (n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].i, n[6].i, n[7].e, n[8].i, n[9].data));
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: /* GL_ARB_texture_compress */
+ CALL_CompressedTexSubImage2DARB(ctx->Exec,
+ (n[1].e, n[2].i, n[3].i, n[4].i,
+ n[5].i, n[6].i, n[7].e, n[8].i,
+ n[9].data));
break;
- case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: /* GL_ARB_texture_compress */
- CALL_CompressedTexSubImage3DARB(ctx->Exec, (n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].i, n[6].i, n[7].i, n[8].i,
- n[9].e, n[10].i, n[11].data));
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: /* GL_ARB_texture_compress */
+ CALL_CompressedTexSubImage3DARB(ctx->Exec,
+ (n[1].e, n[2].i, n[3].i, 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 */
+ case OPCODE_SAMPLE_COVERAGE: /* GL_ARB_multisample */
CALL_SampleCoverageARB(ctx->Exec, (n[1].f, n[2].b));
break;
- case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */
- CALL_WindowPos3fMESA(ctx->Exec, ( n[1].f, n[2].f, n[3].f ));
- break;
+ case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */
+ CALL_WindowPos3fMESA(ctx->Exec, (n[1].f, n[2].f, n[3].f));
+ break;
#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
- case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */
- CALL_BindProgramNV(ctx->Exec, ( n[1].e, n[2].ui ));
+ case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */
+ CALL_BindProgramNV(ctx->Exec, (n[1].e, n[2].ui));
break;
#endif
#if FEATURE_NV_vertex_program
@@ -6074,15 +6335,15 @@ execute_list( GLcontext *ctx, GLuint list )
break;
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
CALL_RequestResidentProgramsNV(ctx->Exec, (n[1].ui,
- (GLuint *) n[2].data));
+ (GLuint *) n[2].data));
break;
case OPCODE_LOAD_PROGRAM_NV:
CALL_LoadProgramNV(ctx->Exec, (n[1].e, n[2].ui, n[3].i,
- (const GLubyte *) n[4].data));
+ (const GLubyte *) n[4].data));
break;
case OPCODE_PROGRAM_PARAMETER4F_NV:
CALL_ProgramParameter4fNV(ctx->Exec, (n[1].e, n[2].ui, n[3].f,
- n[4].f, n[5].f, n[6].f));
+ n[4].f, n[5].f, n[6].f));
break;
case OPCODE_TRACK_MATRIX_NV:
CALL_TrackMatrixNV(ctx->Exec, (n[1].e, n[2].ui, n[3].e, n[4].e));
@@ -6091,13 +6352,15 @@ execute_list( GLcontext *ctx, GLuint list )
#if FEATURE_NV_fragment_program
case OPCODE_PROGRAM_LOCAL_PARAMETER_ARB:
- CALL_ProgramLocalParameter4fARB(ctx->Exec, (n[1].e, n[2].ui, n[3].f,
- n[4].f, n[5].f, n[6].f));
+ CALL_ProgramLocalParameter4fARB(ctx->Exec,
+ (n[1].e, n[2].ui, n[3].f, n[4].f,
+ n[5].f, n[6].f));
break;
case OPCODE_PROGRAM_NAMED_PARAMETER_NV:
CALL_ProgramNamedParameter4fNV(ctx->Exec, (n[1].ui, n[2].i,
- (const GLubyte *) n[3].data,
- n[4].f, n[5].f, n[6].f, n[7].f));
+ (const GLubyte *) n[3].
+ data, n[4].f, n[5].f,
+ n[6].f, n[7].f));
break;
#endif
@@ -6109,11 +6372,13 @@ execute_list( GLcontext *ctx, GLuint list )
break;
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
case OPCODE_PROGRAM_STRING_ARB:
- CALL_ProgramStringARB(ctx->Exec, (n[1].e, n[2].e, n[3].i, n[4].data));
+ CALL_ProgramStringARB(ctx->Exec,
+ (n[1].e, n[2].e, n[3].i, n[4].data));
break;
case OPCODE_PROGRAM_ENV_PARAMETER_ARB:
CALL_ProgramEnvParameter4fARB(ctx->Exec, (n[1].e, n[2].ui, n[3].f,
- n[4].f, n[5].f, n[6].f));
+ n[4].f, n[5].f,
+ n[6].f));
break;
#endif
#if FEATURE_ARB_occlusion_query
@@ -6125,221 +6390,216 @@ execute_list( GLcontext *ctx, GLuint list )
break;
#endif
case OPCODE_DRAW_BUFFERS_ARB:
- {
- GLenum buffers[MAX_DRAW_BUFFERS];
- GLint i, count = MIN2(n[1].i, MAX_DRAW_BUFFERS);
- for (i = 0; i < count; i++)
- buffers[i] = n[2 + i].e;
- CALL_DrawBuffersARB(ctx->Exec, (n[1].i, buffers));
- }
+ {
+ GLenum buffers[MAX_DRAW_BUFFERS];
+ GLint i, count = MIN2(n[1].i, MAX_DRAW_BUFFERS);
+ for (i = 0; i < count; i++)
+ buffers[i] = n[2 + i].e;
+ CALL_DrawBuffersARB(ctx->Exec, (n[1].i, buffers));
+ }
break;
#if FEATURE_ATI_fragment_shader
- case OPCODE_BIND_FRAGMENT_SHADER_ATI:
- CALL_BindFragmentShaderATI(ctx->Exec, (n[1].i));
- break;
- case OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI:
- {
- GLfloat values[4];
- GLuint i, dst = n[1].ui;
-
- for (i = 0; i < 4; i++)
- values[i] = n[1+i].f;
- CALL_SetFragmentShaderConstantATI(ctx->Exec, (dst, values));
- }
- break;
+ case OPCODE_BIND_FRAGMENT_SHADER_ATI:
+ CALL_BindFragmentShaderATI(ctx->Exec, (n[1].i));
+ break;
+ case OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI:
+ {
+ GLfloat values[4];
+ GLuint i, dst = n[1].ui;
+
+ for (i = 0; i < 4; i++)
+ values[i] = n[1 + i].f;
+ CALL_SetFragmentShaderConstantATI(ctx->Exec, (dst, values));
+ }
+ break;
#endif
- case OPCODE_ATTR_1F_NV:
- CALL_VertexAttrib1fNV(ctx->Exec, (n[1].e, n[2].f));
- break;
- case OPCODE_ATTR_2F_NV:
- /* Really shouldn't have to do this - the Node structure
- * is convenient, but it would be better to store the data
- * packed appropriately so that it can be sent directly
- * on. With x86_64 becoming common, this will start to
- * matter more.
- */
- if (sizeof(Node)==sizeof(GLfloat))
- CALL_VertexAttrib2fvNV(ctx->Exec, (n[1].e, &n[2].f));
- else
- CALL_VertexAttrib2fNV(ctx->Exec, (n[1].e, n[2].f, n[3].f));
- break;
- case OPCODE_ATTR_3F_NV:
- if (sizeof(Node)==sizeof(GLfloat))
- CALL_VertexAttrib3fvNV(ctx->Exec, (n[1].e, &n[2].f));
- else
- CALL_VertexAttrib3fNV(ctx->Exec, (n[1].e, n[2].f, n[3].f,
- n[4].f));
- break;
- case OPCODE_ATTR_4F_NV:
- if (sizeof(Node)==sizeof(GLfloat))
- CALL_VertexAttrib4fvNV(ctx->Exec, (n[1].e, &n[2].f));
- else
- CALL_VertexAttrib4fNV(ctx->Exec, (n[1].e, n[2].f, n[3].f,
- n[4].f, n[5].f));
- break;
- case OPCODE_ATTR_1F_ARB:
- CALL_VertexAttrib1fARB(ctx->Exec, (n[1].e, n[2].f));
- break;
- case OPCODE_ATTR_2F_ARB:
- /* Really shouldn't have to do this - the Node structure
- * is convenient, but it would be better to store the data
- * packed appropriately so that it can be sent directly
- * on. With x86_64 becoming common, this will start to
- * matter more.
- */
- if (sizeof(Node)==sizeof(GLfloat))
- CALL_VertexAttrib2fvARB(ctx->Exec, (n[1].e, &n[2].f));
- else
- CALL_VertexAttrib2fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f));
- break;
- case OPCODE_ATTR_3F_ARB:
- if (sizeof(Node)==sizeof(GLfloat))
- CALL_VertexAttrib3fvARB(ctx->Exec, (n[1].e, &n[2].f));
- else
- CALL_VertexAttrib3fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f,
- n[4].f));
- break;
- case OPCODE_ATTR_4F_ARB:
- if (sizeof(Node)==sizeof(GLfloat))
- CALL_VertexAttrib4fvARB(ctx->Exec, (n[1].e, &n[2].f));
- else
- CALL_VertexAttrib4fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f,
- n[4].f, n[5].f));
- break;
- case OPCODE_MATERIAL:
- if (sizeof(Node)==sizeof(GLfloat))
- CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, &n[3].f));
- else {
- GLfloat f[4];
- f[0] = n[3].f;
- f[1] = n[4].f;
- f[2] = n[5].f;
- f[3] = n[6].f;
- CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, f));
- }
- break;
- case OPCODE_INDEX:
- CALL_Indexi(ctx->Exec, (n[1].i));
- break;
- case OPCODE_EDGEFLAG:
- CALL_EdgeFlag(ctx->Exec, (n[1].b));
- break;
- case OPCODE_BEGIN:
- CALL_Begin(ctx->Exec, (n[1].e));
- break;
- case OPCODE_END:
- CALL_End(ctx->Exec, ());
- break;
- case OPCODE_RECTF:
- CALL_Rectf(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
- break;
- case OPCODE_EVAL_C1:
- CALL_EvalCoord1f(ctx->Exec, (n[1].f));
- break;
- case OPCODE_EVAL_C2:
- CALL_EvalCoord2f(ctx->Exec, (n[1].f, n[2].f));
- break;
- case OPCODE_EVAL_P1:
- CALL_EvalPoint1(ctx->Exec, (n[1].i));
- break;
- case OPCODE_EVAL_P2:
- CALL_EvalPoint2(ctx->Exec, (n[1].i, n[2].i));
- break;
-
-
-
-
- case OPCODE_CONTINUE:
- n = (Node *) n[1].next;
- break;
- case OPCODE_END_OF_LIST:
- done = GL_TRUE;
- break;
- default:
+ case OPCODE_ATTR_1F_NV:
+ CALL_VertexAttrib1fNV(ctx->Exec, (n[1].e, n[2].f));
+ break;
+ case OPCODE_ATTR_2F_NV:
+ /* Really shouldn't have to do this - the Node structure
+ * is convenient, but it would be better to store the data
+ * packed appropriately so that it can be sent directly
+ * on. With x86_64 becoming common, this will start to
+ * matter more.
+ */
+ if (sizeof(Node) == sizeof(GLfloat))
+ CALL_VertexAttrib2fvNV(ctx->Exec, (n[1].e, &n[2].f));
+ else
+ CALL_VertexAttrib2fNV(ctx->Exec, (n[1].e, n[2].f, n[3].f));
+ break;
+ case OPCODE_ATTR_3F_NV:
+ if (sizeof(Node) == sizeof(GLfloat))
+ CALL_VertexAttrib3fvNV(ctx->Exec, (n[1].e, &n[2].f));
+ else
+ CALL_VertexAttrib3fNV(ctx->Exec, (n[1].e, n[2].f, n[3].f,
+ n[4].f));
+ break;
+ case OPCODE_ATTR_4F_NV:
+ if (sizeof(Node) == sizeof(GLfloat))
+ CALL_VertexAttrib4fvNV(ctx->Exec, (n[1].e, &n[2].f));
+ else
+ CALL_VertexAttrib4fNV(ctx->Exec, (n[1].e, n[2].f, n[3].f,
+ n[4].f, n[5].f));
+ break;
+ case OPCODE_ATTR_1F_ARB:
+ CALL_VertexAttrib1fARB(ctx->Exec, (n[1].e, n[2].f));
+ break;
+ case OPCODE_ATTR_2F_ARB:
+ /* Really shouldn't have to do this - the Node structure
+ * is convenient, but it would be better to store the data
+ * packed appropriately so that it can be sent directly
+ * on. With x86_64 becoming common, this will start to
+ * matter more.
+ */
+ if (sizeof(Node) == sizeof(GLfloat))
+ CALL_VertexAttrib2fvARB(ctx->Exec, (n[1].e, &n[2].f));
+ else
+ CALL_VertexAttrib2fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f));
+ break;
+ case OPCODE_ATTR_3F_ARB:
+ if (sizeof(Node) == sizeof(GLfloat))
+ CALL_VertexAttrib3fvARB(ctx->Exec, (n[1].e, &n[2].f));
+ else
+ CALL_VertexAttrib3fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f,
+ n[4].f));
+ break;
+ case OPCODE_ATTR_4F_ARB:
+ if (sizeof(Node) == sizeof(GLfloat))
+ CALL_VertexAttrib4fvARB(ctx->Exec, (n[1].e, &n[2].f));
+ else
+ CALL_VertexAttrib4fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f,
+ n[4].f, n[5].f));
+ break;
+ case OPCODE_MATERIAL:
+ if (sizeof(Node) == sizeof(GLfloat))
+ CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, &n[3].f));
+ else {
+ GLfloat f[4];
+ f[0] = n[3].f;
+ f[1] = n[4].f;
+ f[2] = n[5].f;
+ f[3] = n[6].f;
+ CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, f));
+ }
+ break;
+ case OPCODE_INDEX:
+ CALL_Indexi(ctx->Exec, (n[1].i));
+ break;
+ case OPCODE_EDGEFLAG:
+ CALL_EdgeFlag(ctx->Exec, (n[1].b));
+ break;
+ case OPCODE_BEGIN:
+ CALL_Begin(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_END:
+ CALL_End(ctx->Exec, ());
+ break;
+ case OPCODE_RECTF:
+ CALL_Rectf(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_EVAL_C1:
+ CALL_EvalCoord1f(ctx->Exec, (n[1].f));
+ break;
+ case OPCODE_EVAL_C2:
+ CALL_EvalCoord2f(ctx->Exec, (n[1].f, n[2].f));
+ break;
+ case OPCODE_EVAL_P1:
+ CALL_EvalPoint1(ctx->Exec, (n[1].i));
+ break;
+ case OPCODE_EVAL_P2:
+ CALL_EvalPoint2(ctx->Exec, (n[1].i, n[2].i));
+ break;
+
+
+
+
+ case OPCODE_CONTINUE:
+ n = (Node *) n[1].next;
+ break;
+ case OPCODE_END_OF_LIST:
+ done = GL_TRUE;
+ break;
+ default:
{
char msg[1000];
- _mesa_sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode);
+ _mesa_sprintf(msg, "Error in execute_list: opcode=%d",
+ (int) opcode);
_mesa_problem(ctx, msg);
}
done = GL_TRUE;
- }
+ }
- /* increment n to point to next compiled command */
- if (opcode!=OPCODE_CONTINUE) {
- n += InstSize[opcode];
- }
+ /* increment n to point to next compiled command */
+ if (opcode != OPCODE_CONTINUE) {
+ n += InstSize[opcode];
+ }
}
}
if (ctx->Driver.EndCallList)
- ctx->Driver.EndCallList( ctx );
+ ctx->Driver.EndCallList(ctx);
ctx->ListState.CallStack[ctx->ListState.CallDepth--] = NULL;
}
-
-
/**********************************************************************/
/* GL functions */
/**********************************************************************/
-
-
-
-/*
+/**
* Test if a display list number is valid.
*/
GLboolean GLAPIENTRY
-_mesa_IsList( GLuint list )
+_mesa_IsList(GLuint list)
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
return islist(ctx, list);
}
-/*
+/**
* Delete a sequence of consecutive display lists.
*/
void GLAPIENTRY
-_mesa_DeleteLists( GLuint list, GLsizei range )
+_mesa_DeleteLists(GLuint list, GLsizei range)
{
GET_CURRENT_CONTEXT(ctx);
GLuint i;
- FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (range<0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glDeleteLists" );
+ if (range < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteLists");
return;
}
- for (i=list;i<list+range;i++) {
- _mesa_destroy_list( ctx, i );
+ for (i = list; i < list + range; i++) {
+ _mesa_destroy_list(ctx, i);
}
}
-
-/*
+/**
* Return a display list number, n, such that lists n through n+range-1
* are free.
*/
GLuint GLAPIENTRY
-_mesa_GenLists(GLsizei range )
+_mesa_GenLists(GLsizei range)
{
GET_CURRENT_CONTEXT(ctx);
GLuint base;
- FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
- if (range<0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glGenLists" );
+ if (range < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGenLists");
return 0;
}
- if (range==0) {
+ if (range == 0) {
return 0;
}
@@ -6352,8 +6612,9 @@ _mesa_GenLists(GLsizei range )
if (base) {
/* reserve the list IDs by with empty/dummy lists */
GLint i;
- for (i=0; i<range; i++) {
- _mesa_HashInsert(ctx->Shared->DisplayList, base+i, make_list(base+i, 1));
+ for (i = 0; i < range; i++) {
+ _mesa_HashInsert(ctx->Shared->DisplayList, base + i,
+ make_list(base + i, 1));
}
}
@@ -6363,36 +6624,35 @@ _mesa_GenLists(GLsizei range )
}
-
-/*
+/**
* Begin a new display list.
*/
void GLAPIENTRY
-_mesa_NewList( GLuint list, GLenum mode )
+_mesa_NewList(GLuint list, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
- FLUSH_CURRENT(ctx, 0); /* must be called before assert */
+ FLUSH_CURRENT(ctx, 0); /* must be called before assert */
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (MESA_VERBOSE&VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glNewList %u %s\n", list,
_mesa_lookup_enum_by_nr(mode));
- if (list==0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glNewList" );
+ if (list == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glNewList");
return;
}
- if (mode!=GL_COMPILE && mode!=GL_COMPILE_AND_EXECUTE) {
- _mesa_error( ctx, GL_INVALID_ENUM, "glNewList" );
+ if (mode != GL_COMPILE && mode != GL_COMPILE_AND_EXECUTE) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glNewList");
return;
}
if (ctx->ListState.CurrentListPtr) {
/* already compiling a display list */
- _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" );
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glNewList");
return;
}
@@ -6401,7 +6661,7 @@ _mesa_NewList( GLuint list, GLenum mode )
/* Allocate new display list */
ctx->ListState.CurrentListNum = list;
- ctx->ListState.CurrentList = make_list( list, BLOCK_SIZE );
+ ctx->ListState.CurrentList = make_list(list, BLOCK_SIZE);
ctx->ListState.CurrentBlock = ctx->ListState.CurrentList->node;
ctx->ListState.CurrentListPtr = ctx->ListState.CurrentBlock;
ctx->ListState.CurrentPos = 0;
@@ -6413,50 +6673,50 @@ _mesa_NewList( GLuint list, GLenum mode )
for (i = 0; i < MAT_ATTRIB_MAX; i++)
ctx->ListState.ActiveMaterialSize[i] = 0;
-
+
ctx->ListState.ActiveIndex = 0;
ctx->ListState.ActiveEdgeFlag = 0;
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
- ctx->Driver.NewList( ctx, list, mode );
+ ctx->Driver.NewList(ctx, list, mode);
ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch( ctx->CurrentDispatch );
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
-
-/*
+/**
* End definition of current display list.
*/
void GLAPIENTRY
-_mesa_EndList( void )
+_mesa_EndList(void)
{
GET_CURRENT_CONTEXT(ctx);
SAVE_FLUSH_VERTICES(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (MESA_VERBOSE&VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glEndList\n");
/* Check that a list is under construction */
if (!ctx->ListState.CurrentListPtr) {
- _mesa_error( ctx, GL_INVALID_OPERATION, "glEndList" );
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glEndList");
return;
}
- (void) ALLOC_INSTRUCTION( ctx, OPCODE_END_OF_LIST, 0 );
+ (void) ALLOC_INSTRUCTION(ctx, OPCODE_END_OF_LIST, 0);
/* Destroy old list, if any */
_mesa_destroy_list(ctx, ctx->ListState.CurrentListNum);
/* Install the list */
- _mesa_HashInsert(ctx->Shared->DisplayList, ctx->ListState.CurrentListNum, ctx->ListState.CurrentList);
+ _mesa_HashInsert(ctx->Shared->DisplayList, ctx->ListState.CurrentListNum,
+ ctx->ListState.CurrentList);
if (MESA_VERBOSE & VERBOSE_DISPLAY_LIST)
mesa_print_display_list(ctx->ListState.CurrentListNum);
- ctx->Driver.EndList( ctx );
+ ctx->Driver.EndList(ctx);
ctx->ListState.CurrentList = NULL;
ctx->ListState.CurrentListNum = 0;
@@ -6465,13 +6725,12 @@ _mesa_EndList( void )
ctx->CompileFlag = GL_FALSE;
ctx->CurrentDispatch = ctx->Exec;
- _glapi_set_dispatch( ctx->CurrentDispatch );
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
-
void GLAPIENTRY
-_mesa_CallList( GLuint list )
+_mesa_CallList(GLuint list)
{
GLboolean save_compile_flag;
GET_CURRENT_CONTEXT(ctx);
@@ -6494,23 +6753,22 @@ _mesa_CallList( GLuint list )
ctx->CompileFlag = GL_FALSE;
}
- execute_list( ctx, list );
+ execute_list(ctx, list);
ctx->CompileFlag = save_compile_flag;
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch( ctx->CurrentDispatch );
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
}
-
-/*
+/**
* Execute glCallLists: call multiple display lists.
*/
void GLAPIENTRY
-_mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists )
+_mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
{
GET_CURRENT_CONTEXT(ctx);
GLuint list;
@@ -6521,21 +6779,21 @@ _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists )
_mesa_debug(ctx, "glCallLists %d\n", n);
switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- case GL_2_BYTES:
- case GL_3_BYTES:
- case GL_4_BYTES:
- /* OK */
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glCallLists(type)");
- return;
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ case GL_2_BYTES:
+ case GL_3_BYTES:
+ case GL_4_BYTES:
+ /* OK */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glCallLists(type)");
+ return;
}
/* Save the CompileFlag status, turn it off, execute display list,
@@ -6544,9 +6802,9 @@ _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists )
save_compile_flag = ctx->CompileFlag;
ctx->CompileFlag = GL_FALSE;
- for (i=0;i<n;i++) {
- list = translate_id( i, type, lists );
- execute_list( ctx, ctx->List.ListBase + list );
+ for (i = 0; i < n; i++) {
+ list = translate_id(i, type, lists);
+ execute_list(ctx, ctx->List.ListBase + list);
}
ctx->CompileFlag = save_compile_flag;
@@ -6554,20 +6812,19 @@ _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists )
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch( ctx->CurrentDispatch );
+ _glapi_set_dispatch(ctx->CurrentDispatch);
}
}
-
-/*
+/**
* Set the offset added to list numbers in glCallLists.
*/
void GLAPIENTRY
-_mesa_ListBase( GLuint base )
+_mesa_ListBase(GLuint base)
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0); /* must be called before assert */
+ FLUSH_VERTICES(ctx, 0); /* must be called before assert */
ASSERT_OUTSIDE_BEGIN_END(ctx);
ctx->List.ListBase = base;
}
@@ -6575,658 +6832,732 @@ _mesa_ListBase( GLuint base )
/* Can no longer assume ctx->Exec->Func is equal to _mesa_Func.
*/
-static void GLAPIENTRY exec_Finish( void )
+static void GLAPIENTRY
+exec_Finish(void)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
CALL_Finish(ctx->Exec, ());
}
-static void GLAPIENTRY exec_Flush( void )
+static void GLAPIENTRY
+exec_Flush(void)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_Flush(ctx->Exec, ( ));
+ CALL_Flush(ctx->Exec, ());
}
-static void GLAPIENTRY exec_GetBooleanv( GLenum pname, GLboolean *params )
+static void GLAPIENTRY
+exec_GetBooleanv(GLenum pname, GLboolean *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetBooleanv(ctx->Exec, ( pname, params ));
+ CALL_GetBooleanv(ctx->Exec, (pname, params));
}
-static void GLAPIENTRY exec_GetClipPlane( GLenum plane, GLdouble *equation )
+static void GLAPIENTRY
+exec_GetClipPlane(GLenum plane, GLdouble * equation)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetClipPlane(ctx->Exec, ( plane, equation ));
+ CALL_GetClipPlane(ctx->Exec, (plane, equation));
}
-static void GLAPIENTRY exec_GetDoublev( GLenum pname, GLdouble *params )
+static void GLAPIENTRY
+exec_GetDoublev(GLenum pname, GLdouble *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetDoublev(ctx->Exec, ( pname, params ));
+ CALL_GetDoublev(ctx->Exec, (pname, params));
}
-static GLenum GLAPIENTRY exec_GetError( void )
+static GLenum GLAPIENTRY
+exec_GetError(void)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- return CALL_GetError(ctx->Exec, ( ));
+ return CALL_GetError(ctx->Exec, ());
}
-static void GLAPIENTRY exec_GetFloatv( GLenum pname, GLfloat *params )
+static void GLAPIENTRY
+exec_GetFloatv(GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetFloatv(ctx->Exec, ( pname, params ));
+ CALL_GetFloatv(ctx->Exec, (pname, params));
}
-static void GLAPIENTRY exec_GetIntegerv( GLenum pname, GLint *params )
+static void GLAPIENTRY
+exec_GetIntegerv(GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetIntegerv(ctx->Exec, ( pname, params ));
+ CALL_GetIntegerv(ctx->Exec, (pname, params));
}
-static void GLAPIENTRY exec_GetLightfv( GLenum light, GLenum pname, GLfloat *params )
+static void GLAPIENTRY
+exec_GetLightfv(GLenum light, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetLightfv(ctx->Exec, ( light, pname, params ));
+ CALL_GetLightfv(ctx->Exec, (light, pname, params));
}
-static void GLAPIENTRY exec_GetLightiv( GLenum light, GLenum pname, GLint *params )
+static void GLAPIENTRY
+exec_GetLightiv(GLenum light, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetLightiv(ctx->Exec, ( light, pname, params ));
+ CALL_GetLightiv(ctx->Exec, (light, pname, params));
}
-static void GLAPIENTRY exec_GetMapdv( GLenum target, GLenum query, GLdouble *v )
+static void GLAPIENTRY
+exec_GetMapdv(GLenum target, GLenum query, GLdouble * v)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMapdv(ctx->Exec, ( target, query, v ));
+ CALL_GetMapdv(ctx->Exec, (target, query, v));
}
-static void GLAPIENTRY exec_GetMapfv( GLenum target, GLenum query, GLfloat *v )
+static void GLAPIENTRY
+exec_GetMapfv(GLenum target, GLenum query, GLfloat * v)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMapfv(ctx->Exec, ( target, query, v ));
+ CALL_GetMapfv(ctx->Exec, (target, query, v));
}
-static void GLAPIENTRY exec_GetMapiv( GLenum target, GLenum query, GLint *v )
+static void GLAPIENTRY
+exec_GetMapiv(GLenum target, GLenum query, GLint * v)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMapiv(ctx->Exec, ( target, query, v ));
+ CALL_GetMapiv(ctx->Exec, (target, query, v));
}
-static void GLAPIENTRY exec_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params )
+static void GLAPIENTRY
+exec_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMaterialfv(ctx->Exec, ( face, pname, params ));
+ CALL_GetMaterialfv(ctx->Exec, (face, pname, params));
}
-static void GLAPIENTRY exec_GetMaterialiv( GLenum face, GLenum pname, GLint *params )
+static void GLAPIENTRY
+exec_GetMaterialiv(GLenum face, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMaterialiv(ctx->Exec, ( face, pname, params ));
+ CALL_GetMaterialiv(ctx->Exec, (face, pname, params));
}
-static void GLAPIENTRY exec_GetPixelMapfv( GLenum map, GLfloat *values )
+static void GLAPIENTRY
+exec_GetPixelMapfv(GLenum map, GLfloat *values)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetPixelMapfv(ctx->Exec, ( map, values ));
+ CALL_GetPixelMapfv(ctx->Exec, (map, values));
}
-static void GLAPIENTRY exec_GetPixelMapuiv( GLenum map, GLuint *values )
+static void GLAPIENTRY
+exec_GetPixelMapuiv(GLenum map, GLuint *values)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetPixelMapuiv(ctx->Exec, ( map, values ));
+ CALL_GetPixelMapuiv(ctx->Exec, (map, values));
}
-static void GLAPIENTRY exec_GetPixelMapusv( GLenum map, GLushort *values )
+static void GLAPIENTRY
+exec_GetPixelMapusv(GLenum map, GLushort *values)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetPixelMapusv(ctx->Exec, ( map, values ));
+ CALL_GetPixelMapusv(ctx->Exec, (map, values));
}
-static void GLAPIENTRY exec_GetPolygonStipple( GLubyte *dest )
+static void GLAPIENTRY
+exec_GetPolygonStipple(GLubyte * dest)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetPolygonStipple(ctx->Exec, ( dest ));
+ CALL_GetPolygonStipple(ctx->Exec, (dest));
}
-static const GLubyte * GLAPIENTRY exec_GetString( GLenum name )
+static const GLubyte *GLAPIENTRY
+exec_GetString(GLenum name)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- return CALL_GetString(ctx->Exec, ( name ));
+ return CALL_GetString(ctx->Exec, (name));
}
-static void GLAPIENTRY exec_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
+static void GLAPIENTRY
+exec_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexEnvfv(ctx->Exec, ( target, pname, params ));
+ CALL_GetTexEnvfv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
+static void GLAPIENTRY
+exec_GetTexEnviv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexEnviv(ctx->Exec, ( target, pname, params ));
+ CALL_GetTexEnviv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
+static void GLAPIENTRY
+exec_GetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexGendv(ctx->Exec, ( coord, pname, params ));
+ CALL_GetTexGendv(ctx->Exec, (coord, pname, params));
}
-static void GLAPIENTRY exec_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
+static void GLAPIENTRY
+exec_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexGenfv(ctx->Exec, ( coord, pname, params ));
+ CALL_GetTexGenfv(ctx->Exec, (coord, pname, params));
}
-static void GLAPIENTRY exec_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
+static void GLAPIENTRY
+exec_GetTexGeniv(GLenum coord, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexGeniv(ctx->Exec, ( coord, pname, params ));
+ CALL_GetTexGeniv(ctx->Exec, (coord, pname, params));
}
-static void GLAPIENTRY exec_GetTexImage( GLenum target, GLint level, GLenum format,
- GLenum type, GLvoid *pixels )
+static void GLAPIENTRY
+exec_GetTexImage(GLenum target, GLint level, GLenum format,
+ GLenum type, GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexImage(ctx->Exec, ( target, level, format, type, pixels ));
+ CALL_GetTexImage(ctx->Exec, (target, level, format, type, pixels));
}
-static void GLAPIENTRY exec_GetTexLevelParameterfv( GLenum target, GLint level,
- GLenum pname, GLfloat *params )
+static void GLAPIENTRY
+exec_GetTexLevelParameterfv(GLenum target, GLint level,
+ GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexLevelParameterfv(ctx->Exec, ( target, level, pname, params ));
+ CALL_GetTexLevelParameterfv(ctx->Exec, (target, level, pname, params));
}
-static void GLAPIENTRY exec_GetTexLevelParameteriv( GLenum target, GLint level,
- GLenum pname, GLint *params )
+static void GLAPIENTRY
+exec_GetTexLevelParameteriv(GLenum target, GLint level,
+ GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexLevelParameteriv(ctx->Exec, ( target, level, pname, params ));
+ CALL_GetTexLevelParameteriv(ctx->Exec, (target, level, pname, params));
}
-static void GLAPIENTRY exec_GetTexParameterfv( GLenum target, GLenum pname,
- GLfloat *params )
+static void GLAPIENTRY
+exec_GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexParameterfv(ctx->Exec, ( target, pname, params ));
+ CALL_GetTexParameterfv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
+static void GLAPIENTRY
+exec_GetTexParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetTexParameteriv(ctx->Exec, ( target, pname, params ));
+ CALL_GetTexParameteriv(ctx->Exec, (target, pname, params));
}
-static GLboolean GLAPIENTRY exec_IsEnabled( GLenum cap )
+static GLboolean GLAPIENTRY
+exec_IsEnabled(GLenum cap)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- return CALL_IsEnabled(ctx->Exec, ( cap ));
+ return CALL_IsEnabled(ctx->Exec, (cap));
}
-static void GLAPIENTRY exec_PixelStoref( GLenum pname, GLfloat param )
+static void GLAPIENTRY
+exec_PixelStoref(GLenum pname, GLfloat param)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_PixelStoref(ctx->Exec, ( pname, param ));
+ CALL_PixelStoref(ctx->Exec, (pname, param));
}
-static void GLAPIENTRY exec_PixelStorei( GLenum pname, GLint param )
+static void GLAPIENTRY
+exec_PixelStorei(GLenum pname, GLint param)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_PixelStorei(ctx->Exec, ( pname, param ));
+ CALL_PixelStorei(ctx->Exec, (pname, param));
}
-static void GLAPIENTRY exec_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
- GLenum format, GLenum type, GLvoid *pixels )
+static void GLAPIENTRY
+exec_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
+ GLenum format, GLenum type, GLvoid * pixels)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_ReadPixels(ctx->Exec, ( x, y, width, height, format, type, pixels ));
+ CALL_ReadPixels(ctx->Exec, (x, y, width, height, format, type, pixels));
}
-static GLint GLAPIENTRY exec_RenderMode( GLenum mode )
+static GLint GLAPIENTRY
+exec_RenderMode(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- return CALL_RenderMode(ctx->Exec, ( mode ));
+ return CALL_RenderMode(ctx->Exec, (mode));
}
-static void GLAPIENTRY exec_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
+static void GLAPIENTRY
+exec_FeedbackBuffer(GLsizei size, GLenum type, GLfloat * buffer)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_FeedbackBuffer(ctx->Exec, ( size, type, buffer ));
+ CALL_FeedbackBuffer(ctx->Exec, (size, type, buffer));
}
-static void GLAPIENTRY exec_SelectBuffer( GLsizei size, GLuint *buffer )
+static void GLAPIENTRY
+exec_SelectBuffer(GLsizei size, GLuint * buffer)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_SelectBuffer(ctx->Exec, ( size, buffer ));
+ CALL_SelectBuffer(ctx->Exec, (size, buffer));
}
-static GLboolean GLAPIENTRY exec_AreTexturesResident(GLsizei n, const GLuint *texName,
- GLboolean *residences)
+static GLboolean GLAPIENTRY
+exec_AreTexturesResident(GLsizei n, const GLuint * texName,
+ GLboolean * residences)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- return CALL_AreTexturesResident(ctx->Exec, ( n, texName, residences));
+ return CALL_AreTexturesResident(ctx->Exec, (n, texName, residences));
}
-static void GLAPIENTRY exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr)
+static void GLAPIENTRY
+exec_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_ColorPointer(ctx->Exec, ( size, type, stride, ptr));
+ CALL_ColorPointer(ctx->Exec, (size, type, stride, ptr));
}
-static void GLAPIENTRY exec_DeleteTextures( GLsizei n, const GLuint *texName)
+static void GLAPIENTRY
+exec_DeleteTextures(GLsizei n, const GLuint * texName)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_DeleteTextures(ctx->Exec, ( n, texName));
+ CALL_DeleteTextures(ctx->Exec, (n, texName));
}
-static void GLAPIENTRY exec_DisableClientState( GLenum cap )
+static void GLAPIENTRY
+exec_DisableClientState(GLenum cap)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_DisableClientState(ctx->Exec, ( cap ));
+ CALL_DisableClientState(ctx->Exec, (cap));
}
-static void GLAPIENTRY exec_EdgeFlagPointer(GLsizei stride, const GLvoid *vptr)
+static void GLAPIENTRY
+exec_EdgeFlagPointer(GLsizei stride, const GLvoid * vptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_EdgeFlagPointer(ctx->Exec, ( stride, vptr));
+ CALL_EdgeFlagPointer(ctx->Exec, (stride, vptr));
}
-static void GLAPIENTRY exec_EnableClientState( GLenum cap )
+static void GLAPIENTRY
+exec_EnableClientState(GLenum cap)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_EnableClientState(ctx->Exec, ( cap ));
+ CALL_EnableClientState(ctx->Exec, (cap));
}
-static void GLAPIENTRY exec_GenTextures( GLsizei n, GLuint *texName )
+static void GLAPIENTRY
+exec_GenTextures(GLsizei n, GLuint * texName)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GenTextures(ctx->Exec, ( n, texName ));
+ CALL_GenTextures(ctx->Exec, (n, texName));
}
-static void GLAPIENTRY exec_GetPointerv( GLenum pname, GLvoid **params )
+static void GLAPIENTRY
+exec_GetPointerv(GLenum pname, GLvoid **params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetPointerv(ctx->Exec, ( pname, params ));
+ CALL_GetPointerv(ctx->Exec, (pname, params));
}
-static void GLAPIENTRY exec_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
+static void GLAPIENTRY
+exec_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_IndexPointer(ctx->Exec, ( type, stride, ptr));
+ CALL_IndexPointer(ctx->Exec, (type, stride, ptr));
}
-static void GLAPIENTRY exec_InterleavedArrays(GLenum format, GLsizei stride,
- const GLvoid *pointer)
+static void GLAPIENTRY
+exec_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid * pointer)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_InterleavedArrays(ctx->Exec, ( format, stride, pointer));
+ CALL_InterleavedArrays(ctx->Exec, (format, stride, pointer));
}
-static GLboolean GLAPIENTRY exec_IsTexture( GLuint texture )
+static GLboolean GLAPIENTRY
+exec_IsTexture(GLuint texture)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- return CALL_IsTexture(ctx->Exec, ( texture ));
+ return CALL_IsTexture(ctx->Exec, (texture));
}
-static void GLAPIENTRY exec_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
+static void GLAPIENTRY
+exec_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_NormalPointer(ctx->Exec, ( type, stride, ptr ));
+ CALL_NormalPointer(ctx->Exec, (type, stride, ptr));
}
-static void GLAPIENTRY exec_PopClientAttrib(void)
+static void GLAPIENTRY
+exec_PopClientAttrib(void)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
CALL_PopClientAttrib(ctx->Exec, ());
}
-static void GLAPIENTRY exec_PushClientAttrib(GLbitfield mask)
+static void GLAPIENTRY
+exec_PushClientAttrib(GLbitfield mask)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_PushClientAttrib(ctx->Exec, ( mask));
+ CALL_PushClientAttrib(ctx->Exec, (mask));
}
-static void GLAPIENTRY exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr)
+static void GLAPIENTRY
+exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_TexCoordPointer(ctx->Exec, ( size, type, stride, ptr));
+ CALL_TexCoordPointer(ctx->Exec, (size, type, stride, ptr));
}
-static void GLAPIENTRY exec_GetCompressedTexImageARB(GLenum target, GLint level,
- GLvoid *img)
+static void GLAPIENTRY
+exec_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid * img)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetCompressedTexImageARB(ctx->Exec, ( target, level, img));
+ CALL_GetCompressedTexImageARB(ctx->Exec, (target, level, img));
}
-static void GLAPIENTRY exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr)
+static void GLAPIENTRY
+exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
+ const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_VertexPointer(ctx->Exec, ( size, type, stride, ptr));
+ CALL_VertexPointer(ctx->Exec, (size, type, stride, ptr));
}
-static void GLAPIENTRY exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
- GLint x, GLint y, GLsizei width)
+static void GLAPIENTRY
+exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
+ GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_CopyConvolutionFilter1D(ctx->Exec, ( target, internalFormat, x, y, width));
+ CALL_CopyConvolutionFilter1D(ctx->Exec,
+ (target, internalFormat, x, y, width));
}
-static void GLAPIENTRY exec_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat,
- GLint x, GLint y, GLsizei width,
- GLsizei height)
+static void GLAPIENTRY
+exec_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat,
+ GLint x, GLint y, GLsizei width, GLsizei height)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_CopyConvolutionFilter2D(ctx->Exec, ( target, internalFormat, x, y, width,
- height));
+ CALL_CopyConvolutionFilter2D(ctx->Exec,
+ (target, internalFormat, x, y, width,
+ height));
}
-static void GLAPIENTRY exec_GetColorTable( GLenum target, GLenum format,
- GLenum type, GLvoid *data )
+static void GLAPIENTRY
+exec_GetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * data)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetColorTable(ctx->Exec, ( target, format, type, data ));
+ CALL_GetColorTable(ctx->Exec, (target, format, type, data));
}
-static void GLAPIENTRY exec_GetColorTableParameterfv( GLenum target, GLenum pname,
- GLfloat *params )
+static void GLAPIENTRY
+exec_GetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetColorTableParameterfv(ctx->Exec, ( target, pname, params ));
+ CALL_GetColorTableParameterfv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetColorTableParameteriv( GLenum target, GLenum pname,
- GLint *params )
+static void GLAPIENTRY
+exec_GetColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetColorTableParameteriv(ctx->Exec, ( target, pname, params ));
+ CALL_GetColorTableParameteriv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
- GLvoid *image)
+static void GLAPIENTRY
+exec_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
+ GLvoid * image)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetConvolutionFilter(ctx->Exec, ( target, format, type, image));
+ CALL_GetConvolutionFilter(ctx->Exec, (target, format, type, image));
}
-static void GLAPIENTRY exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
- GLfloat *params)
+static void GLAPIENTRY
+exec_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetConvolutionParameterfv(ctx->Exec, ( target, pname, params));
+ CALL_GetConvolutionParameterfv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetConvolutionParameteriv(GLenum target, GLenum pname,
- GLint *params)
+static void GLAPIENTRY
+exec_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetConvolutionParameteriv(ctx->Exec, ( target, pname, params));
+ CALL_GetConvolutionParameteriv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
- GLenum type, GLvoid *values)
+static void GLAPIENTRY
+exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
+ GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetHistogram(ctx->Exec, ( target, reset, format, type, values));
+ CALL_GetHistogram(ctx->Exec, (target, reset, format, type, values));
}
-static void GLAPIENTRY exec_GetHistogramParameterfv(GLenum target, GLenum pname,
- GLfloat *params)
+static void GLAPIENTRY
+exec_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetHistogramParameterfv(ctx->Exec, ( target, pname, params));
+ CALL_GetHistogramParameterfv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetHistogramParameteriv(GLenum target, GLenum pname,
- GLint *params)
+static void GLAPIENTRY
+exec_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetHistogramParameteriv(ctx->Exec, ( target, pname, params));
+ CALL_GetHistogramParameteriv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
- GLenum type, GLvoid *values)
+static void GLAPIENTRY
+exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
+ GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMinmax(ctx->Exec, ( target, reset, format, type, values));
+ CALL_GetMinmax(ctx->Exec, (target, reset, format, type, values));
}
-static void GLAPIENTRY exec_GetMinmaxParameterfv(GLenum target, GLenum pname,
- GLfloat *params)
+static void GLAPIENTRY
+exec_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMinmaxParameterfv(ctx->Exec, ( target, pname, params));
+ CALL_GetMinmaxParameterfv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetMinmaxParameteriv(GLenum target, GLenum pname,
- GLint *params)
+static void GLAPIENTRY
+exec_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetMinmaxParameteriv(ctx->Exec, ( target, pname, params));
+ CALL_GetMinmaxParameteriv(ctx->Exec, (target, pname, params));
}
-static void GLAPIENTRY exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
- GLvoid *row, GLvoid *column, GLvoid *span)
+static void GLAPIENTRY
+exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
+ GLvoid *row, GLvoid *column, GLvoid *span)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_GetSeparableFilter(ctx->Exec, ( target, format, type, row, column, span));
+ CALL_GetSeparableFilter(ctx->Exec,
+ (target, format, type, row, column, span));
}
-static void GLAPIENTRY exec_SeparableFilter2D(GLenum target, GLenum internalFormat,
- GLsizei width, GLsizei height, GLenum format,
- GLenum type, const GLvoid *row,
- const GLvoid *column)
+static void GLAPIENTRY
+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);
- CALL_SeparableFilter2D(ctx->Exec, ( target, internalFormat, width, height, format,
- type, row, column));
+ CALL_SeparableFilter2D(ctx->Exec,
+ (target, internalFormat, width, height, format,
+ type, row, column));
}
-static void GLAPIENTRY exec_ColorPointerEXT(GLint size, GLenum type, GLsizei stride,
- GLsizei count, const GLvoid *ptr)
+static void GLAPIENTRY
+exec_ColorPointerEXT(GLint size, GLenum type, GLsizei stride,
+ GLsizei count, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_ColorPointerEXT(ctx->Exec, ( size, type, stride, count, ptr));
+ CALL_ColorPointerEXT(ctx->Exec, (size, type, stride, count, ptr));
}
-static void GLAPIENTRY exec_EdgeFlagPointerEXT(GLsizei stride, GLsizei count,
- const GLboolean *ptr)
+static void GLAPIENTRY
+exec_EdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_EdgeFlagPointerEXT(ctx->Exec, ( stride, count, ptr));
+ CALL_EdgeFlagPointerEXT(ctx->Exec, (stride, count, ptr));
}
-static void GLAPIENTRY exec_IndexPointerEXT(GLenum type, GLsizei stride, GLsizei count,
- const GLvoid *ptr)
+static void GLAPIENTRY
+exec_IndexPointerEXT(GLenum type, GLsizei stride, GLsizei count,
+ const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_IndexPointerEXT(ctx->Exec, ( type, stride, count, ptr));
+ CALL_IndexPointerEXT(ctx->Exec, (type, stride, count, ptr));
}
-static void GLAPIENTRY exec_NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count,
- const GLvoid *ptr)
+static void GLAPIENTRY
+exec_NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count,
+ const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_NormalPointerEXT(ctx->Exec, ( type, stride, count, ptr));
+ CALL_NormalPointerEXT(ctx->Exec, (type, stride, count, ptr));
}
-static void GLAPIENTRY exec_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
- GLsizei count, const GLvoid *ptr)
+static void GLAPIENTRY
+exec_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
+ GLsizei count, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_TexCoordPointerEXT(ctx->Exec, ( size, type, stride, count, ptr));
+ CALL_TexCoordPointerEXT(ctx->Exec, (size, type, stride, count, ptr));
}
-static void GLAPIENTRY exec_VertexPointerEXT(GLint size, GLenum type, GLsizei stride,
- GLsizei count, const GLvoid *ptr)
+static void GLAPIENTRY
+exec_VertexPointerEXT(GLint size, GLenum type, GLsizei stride,
+ GLsizei count, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_VertexPointerEXT(ctx->Exec, ( size, type, stride, count, ptr));
+ CALL_VertexPointerEXT(ctx->Exec, (size, type, stride, count, ptr));
}
-static void GLAPIENTRY exec_LockArraysEXT(GLint first, GLsizei count)
+static void GLAPIENTRY
+exec_LockArraysEXT(GLint first, GLsizei count)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_LockArraysEXT(ctx->Exec, ( first, count));
+ CALL_LockArraysEXT(ctx->Exec, (first, count));
}
-static void GLAPIENTRY exec_UnlockArraysEXT( void )
+static void GLAPIENTRY
+exec_UnlockArraysEXT(void)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_UnlockArraysEXT(ctx->Exec, ( ));
+ CALL_UnlockArraysEXT(ctx->Exec, ());
}
-static void GLAPIENTRY exec_ClientActiveTextureARB( GLenum target )
+static void GLAPIENTRY
+exec_ClientActiveTextureARB(GLenum target)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
CALL_ClientActiveTextureARB(ctx->Exec, (target));
}
-static void GLAPIENTRY exec_SecondaryColorPointerEXT(GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr)
+static void GLAPIENTRY
+exec_SecondaryColorPointerEXT(GLint size, GLenum type,
+ GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_SecondaryColorPointerEXT(ctx->Exec, ( size, type, stride, ptr));
+ CALL_SecondaryColorPointerEXT(ctx->Exec, (size, type, stride, ptr));
}
-static void GLAPIENTRY exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
- const GLvoid *ptr)
+static void GLAPIENTRY
+exec_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_FogCoordPointerEXT(ctx->Exec, ( type, stride, ptr));
+ CALL_FogCoordPointerEXT(ctx->Exec, (type, stride, ptr));
}
/* GL_EXT_multi_draw_arrays */
-static void GLAPIENTRY exec_MultiDrawArraysEXT(GLenum mode, GLint *first,
- GLsizei *count, GLsizei primcount)
+static void GLAPIENTRY
+exec_MultiDrawArraysEXT(GLenum mode, GLint * first,
+ GLsizei * count, GLsizei primcount)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_MultiDrawArraysEXT(ctx->Exec, ( mode, first, count, primcount ));
+ CALL_MultiDrawArraysEXT(ctx->Exec, (mode, first, count, primcount));
}
/* GL_EXT_multi_draw_arrays */
-static void GLAPIENTRY exec_MultiDrawElementsEXT(GLenum mode, const GLsizei *count,
- GLenum type, const GLvoid **indices,
- GLsizei primcount)
+static void GLAPIENTRY
+exec_MultiDrawElementsEXT(GLenum mode, const GLsizei * count,
+ GLenum type, const GLvoid ** indices,
+ GLsizei primcount)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_MultiDrawElementsEXT(ctx->Exec, (mode, count, type, indices, primcount));
+ CALL_MultiDrawElementsEXT(ctx->Exec,
+ (mode, count, type, indices, primcount));
}
/* GL_IBM_multimode_draw_arrays */
-static void GLAPIENTRY exec_MultiModeDrawArraysIBM(const GLenum *mode, const GLint *first,
- const GLsizei *count, GLsizei primcount,
- GLint modestride)
+static void GLAPIENTRY
+exec_MultiModeDrawArraysIBM(const GLenum * mode, const GLint * first,
+ const GLsizei * count, GLsizei primcount,
+ GLint modestride)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_MultiModeDrawArraysIBM(ctx->Exec, (mode, first, count, primcount, modestride));
+ CALL_MultiModeDrawArraysIBM(ctx->Exec,
+ (mode, first, count, primcount, modestride));
}
/* GL_IBM_multimode_draw_arrays */
-static void GLAPIENTRY exec_MultiModeDrawElementsIBM(const GLenum *mode,
- const GLsizei *count,
- GLenum type,
- const GLvoid * const *indices,
- GLsizei primcount, GLint modestride)
+static void GLAPIENTRY
+exec_MultiModeDrawElementsIBM(const GLenum * mode,
+ const GLsizei * count,
+ GLenum type,
+ const GLvoid * const *indices,
+ GLsizei primcount, GLint modestride)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
- CALL_MultiModeDrawElementsIBM(ctx->Exec, (mode, count, type, indices, primcount,
- modestride));
+ CALL_MultiModeDrawElementsIBM(ctx->Exec,
+ (mode, count, type, indices, primcount,
+ modestride));
}
-
/**
* Setup the given dispatch table to point to Mesa's display list
* building functions.
@@ -7236,15 +7567,15 @@ static void GLAPIENTRY exec_MultiModeDrawElementsIBM(const GLenum *mode,
* struct.
*/
void
-_mesa_init_dlist_table( struct _glapi_table *table )
+_mesa_init_dlist_table(struct _glapi_table *table)
{
- _mesa_loopback_init_api_table( table );
+ _mesa_loopback_init_api_table(table);
/* GL 1.0 */
SET_Accum(table, save_Accum);
SET_AlphaFunc(table, save_AlphaFunc);
SET_Bitmap(table, save_Bitmap);
- SET_BlendFunc(table, _mesa_BlendFunc); /* loops-back to BlendFuncSeparate */
+ SET_BlendFunc(table, _mesa_BlendFunc); /* loops-back to BlendFuncSeparate */
SET_CallList(table, _mesa_save_CallList);
SET_CallLists(table, _mesa_save_CallLists);
SET_Clear(table, save_Clear);
@@ -7642,14 +7973,18 @@ _mesa_init_dlist_table( struct _glapi_table *table )
SET_ProgramNamedParameter4dNV(table, save_ProgramNamedParameter4dNV);
SET_ProgramNamedParameter4fvNV(table, save_ProgramNamedParameter4fvNV);
SET_ProgramNamedParameter4dvNV(table, save_ProgramNamedParameter4dvNV);
- SET_GetProgramNamedParameterfvNV(table, _mesa_GetProgramNamedParameterfvNV);
- SET_GetProgramNamedParameterdvNV(table, _mesa_GetProgramNamedParameterdvNV);
+ SET_GetProgramNamedParameterfvNV(table,
+ _mesa_GetProgramNamedParameterfvNV);
+ SET_GetProgramNamedParameterdvNV(table,
+ _mesa_GetProgramNamedParameterdvNV);
SET_ProgramLocalParameter4dARB(table, save_ProgramLocalParameter4dARB);
SET_ProgramLocalParameter4dvARB(table, save_ProgramLocalParameter4dvARB);
SET_ProgramLocalParameter4fARB(table, save_ProgramLocalParameter4fARB);
SET_ProgramLocalParameter4fvARB(table, save_ProgramLocalParameter4fvARB);
- SET_GetProgramLocalParameterdvARB(table, _mesa_GetProgramLocalParameterdvARB);
- SET_GetProgramLocalParameterfvARB(table, _mesa_GetProgramLocalParameterfvARB);
+ SET_GetProgramLocalParameterdvARB(table,
+ _mesa_GetProgramLocalParameterdvARB);
+ SET_GetProgramLocalParameterfvARB(table,
+ _mesa_GetProgramLocalParameterfvARB);
#endif
/* 262. GL_NV_point_sprite */
@@ -7716,8 +8051,10 @@ _mesa_init_dlist_table( struct _glapi_table *table )
SET_ProgramLocalParameter4fvARB(table, save_ProgramLocalParameter4fvARB);
SET_GetProgramEnvParameterdvARB(table, _mesa_GetProgramEnvParameterdvARB);
SET_GetProgramEnvParameterfvARB(table, _mesa_GetProgramEnvParameterfvARB);
- SET_GetProgramLocalParameterdvARB(table, _mesa_GetProgramLocalParameterdvARB);
- SET_GetProgramLocalParameterfvARB(table, _mesa_GetProgramLocalParameterfvARB);
+ SET_GetProgramLocalParameterdvARB(table,
+ _mesa_GetProgramLocalParameterdvARB);
+ SET_GetProgramLocalParameterfvARB(table,
+ _mesa_GetProgramLocalParameterfvARB);
SET_GetProgramivARB(table, _mesa_GetProgramivARB);
SET_GetProgramStringARB(table, _mesa_GetProgramStringARB);
#endif
@@ -7756,20 +8093,19 @@ _mesa_init_dlist_table( struct _glapi_table *table )
-/***
- *** Debugging code
- ***/
-static const char *enum_string( GLenum k )
+static const char *
+enum_string(GLenum k)
{
- return _mesa_lookup_enum_by_nr( k );
+ return _mesa_lookup_enum_by_nr(k);
}
-/*
+/**
* Print the commands in a display list. For debugging only.
* TODO: many commands aren't handled yet.
*/
-static void GLAPIENTRY print_list( GLcontext *ctx, GLuint list )
+static void GLAPIENTRY
+print_list(GLcontext *ctx, GLuint list)
{
struct mesa_display_list *dlist;
Node *n;
@@ -7780,13 +8116,15 @@ static void GLAPIENTRY print_list( GLcontext *ctx, GLuint list )
return;
}
- dlist = (struct mesa_display_list *) _mesa_HashLookup(ctx->Shared->DisplayList, list);
+ dlist =
+ (struct mesa_display_list *) _mesa_HashLookup(ctx->Shared->DisplayList,
+ list);
if (!dlist)
return;
n = dlist->node;
-
- _mesa_printf("START-LIST %u, address %p\n", list, (void*)n );
+
+ _mesa_printf("START-LIST %u, address %p\n", list, (void *) n);
done = n ? GL_FALSE : GL_TRUE;
while (!done) {
@@ -7795,256 +8133,255 @@ static void GLAPIENTRY print_list( GLcontext *ctx, GLuint list )
if (i >= 0 && i < (GLint) ctx->ListExt.NumOpcodes) {
/* this is a driver-extended opcode */
- ctx->ListExt.Opcode[i].Print(ctx, &n[1]);
- n += ctx->ListExt.Opcode[i].Size;
+ ctx->ListExt.Opcode[i].Print(ctx, &n[1]);
+ n += ctx->ListExt.Opcode[i].Size;
}
else {
- switch (opcode) {
+ switch (opcode) {
case OPCODE_ACCUM:
- _mesa_printf("Accum %s %g\n", enum_string(n[1].e), n[2].f );
- break;
- case OPCODE_BITMAP:
+ _mesa_printf("Accum %s %g\n", enum_string(n[1].e), n[2].f);
+ break;
+ case OPCODE_BITMAP:
_mesa_printf("Bitmap %d %d %g %g %g %g %p\n", n[1].i, n[2].i,
- n[3].f, n[4].f, n[5].f, n[6].f, (void *) n[7].data );
- break;
+ n[3].f, n[4].f, n[5].f, n[6].f, (void *) n[7].data);
+ break;
case OPCODE_CALL_LIST:
- _mesa_printf("CallList %d\n", (int) n[1].ui );
+ _mesa_printf("CallList %d\n", (int) n[1].ui);
break;
case OPCODE_CALL_LIST_OFFSET:
_mesa_printf("CallList %d + offset %u = %u\n", (int) n[1].ui,
- ctx->List.ListBase, ctx->List.ListBase + n[1].ui );
+ ctx->List.ListBase, ctx->List.ListBase + n[1].ui);
break;
case OPCODE_COLOR_TABLE_PARAMETER_FV:
_mesa_printf("ColorTableParameterfv %s %s %f %f %f %f\n",
- enum_string(n[1].e), enum_string(n[2].e),
- n[3].f, n[4].f, n[5].f, n[6].f);
+ enum_string(n[1].e), enum_string(n[2].e),
+ n[3].f, n[4].f, n[5].f, n[6].f);
break;
case OPCODE_COLOR_TABLE_PARAMETER_IV:
_mesa_printf("ColorTableParameteriv %s %s %d %d %d %d\n",
- enum_string(n[1].e), enum_string(n[2].e),
- n[3].i, n[4].i, n[5].i, n[6].i);
+ enum_string(n[1].e), enum_string(n[2].e),
+ n[3].i, n[4].i, n[5].i, n[6].i);
break;
- case OPCODE_DISABLE:
+ case OPCODE_DISABLE:
_mesa_printf("Disable %s\n", enum_string(n[1].e));
- break;
- case OPCODE_ENABLE:
+ break;
+ case OPCODE_ENABLE:
_mesa_printf("Enable %s\n", enum_string(n[1].e));
- break;
+ break;
case OPCODE_FRUSTUM:
_mesa_printf("Frustum %g %g %g %g %g %g\n",
- n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f );
+ n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f);
+ break;
+ case OPCODE_LINE_STIPPLE:
+ _mesa_printf("LineStipple %d %x\n", n[1].i, (int) n[2].us);
break;
- case OPCODE_LINE_STIPPLE:
- _mesa_printf("LineStipple %d %x\n", n[1].i, (int) n[2].us );
- break;
- case OPCODE_LOAD_IDENTITY:
+ case OPCODE_LOAD_IDENTITY:
_mesa_printf("LoadIdentity\n");
- break;
- case OPCODE_LOAD_MATRIX:
+ break;
+ case OPCODE_LOAD_MATRIX:
_mesa_printf("LoadMatrix\n");
_mesa_printf(" %8f %8f %8f %8f\n",
- n[1].f, n[5].f, n[9].f, n[13].f);
+ n[1].f, n[5].f, n[9].f, n[13].f);
_mesa_printf(" %8f %8f %8f %8f\n",
n[2].f, n[6].f, n[10].f, n[14].f);
_mesa_printf(" %8f %8f %8f %8f\n",
n[3].f, n[7].f, n[11].f, n[15].f);
_mesa_printf(" %8f %8f %8f %8f\n",
n[4].f, n[8].f, n[12].f, n[16].f);
- break;
- case OPCODE_MULT_MATRIX:
+ break;
+ case OPCODE_MULT_MATRIX:
_mesa_printf("MultMatrix (or Rotate)\n");
_mesa_printf(" %8f %8f %8f %8f\n",
- n[1].f, n[5].f, n[9].f, n[13].f);
+ n[1].f, n[5].f, n[9].f, n[13].f);
_mesa_printf(" %8f %8f %8f %8f\n",
n[2].f, n[6].f, n[10].f, n[14].f);
_mesa_printf(" %8f %8f %8f %8f\n",
n[3].f, n[7].f, n[11].f, n[15].f);
_mesa_printf(" %8f %8f %8f %8f\n",
n[4].f, n[8].f, n[12].f, n[16].f);
- break;
+ break;
case OPCODE_ORTHO:
_mesa_printf("Ortho %g %g %g %g %g %g\n",
- n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f );
+ n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f);
break;
- case OPCODE_POP_ATTRIB:
+ case OPCODE_POP_ATTRIB:
_mesa_printf("PopAttrib\n");
- break;
- case OPCODE_POP_MATRIX:
+ break;
+ case OPCODE_POP_MATRIX:
_mesa_printf("PopMatrix\n");
- break;
- case OPCODE_POP_NAME:
+ break;
+ case OPCODE_POP_NAME:
_mesa_printf("PopName\n");
- break;
- case OPCODE_PUSH_ATTRIB:
- _mesa_printf("PushAttrib %x\n", n[1].bf );
- break;
- case OPCODE_PUSH_MATRIX:
+ break;
+ case OPCODE_PUSH_ATTRIB:
+ _mesa_printf("PushAttrib %x\n", n[1].bf);
+ break;
+ case OPCODE_PUSH_MATRIX:
_mesa_printf("PushMatrix\n");
- break;
- case OPCODE_PUSH_NAME:
- _mesa_printf("PushName %d\n", (int) n[1].ui );
- break;
- case OPCODE_RASTER_POS:
+ break;
+ case OPCODE_PUSH_NAME:
+ _mesa_printf("PushName %d\n", (int) n[1].ui);
+ break;
+ case OPCODE_RASTER_POS:
_mesa_printf("RasterPos %g %g %g %g\n",
- n[1].f, n[2].f,n[3].f,n[4].f);
- break;
+ n[1].f, n[2].f, n[3].f, n[4].f);
+ break;
case OPCODE_ROTATE:
_mesa_printf("Rotate %g %g %g %g\n",
- n[1].f, n[2].f, n[3].f, n[4].f );
+ n[1].f, n[2].f, n[3].f, n[4].f);
break;
case OPCODE_SCALE:
- _mesa_printf("Scale %g %g %g\n", n[1].f, n[2].f, n[3].f );
+ _mesa_printf("Scale %g %g %g\n", n[1].f, n[2].f, n[3].f);
break;
case OPCODE_TRANSLATE:
- _mesa_printf("Translate %g %g %g\n", n[1].f, n[2].f, n[3].f );
+ _mesa_printf("Translate %g %g %g\n", n[1].f, n[2].f, n[3].f);
break;
case OPCODE_BIND_TEXTURE:
- _mesa_printf("BindTexture %s %d\n",
+ _mesa_printf("BindTexture %s %d\n",
_mesa_lookup_enum_by_nr(n[1].ui), n[2].ui);
- break;
+ break;
case OPCODE_SHADE_MODEL:
- _mesa_printf("ShadeModel %s\n",
- _mesa_lookup_enum_by_nr(n[1].ui));
- break;
- case OPCODE_MAP1:
- _mesa_printf("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:
- _mesa_printf("Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n",
+ _mesa_printf("ShadeModel %s\n", _mesa_lookup_enum_by_nr(n[1].ui));
+ break;
+ case OPCODE_MAP1:
+ _mesa_printf("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:
+ _mesa_printf("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:
- _mesa_printf("MapGrid1 %d %.3f %.3f\n",
- n[1].i, n[2].f, n[3].f);
- break;
- case OPCODE_MAPGRID2:
- _mesa_printf("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:
- _mesa_printf("EvalMesh1 %d %d\n", n[1].i, n[2].i);
- break;
- case OPCODE_EVALMESH2:
- _mesa_printf("EvalMesh2 %d %d %d %d\n",
+ break;
+ case OPCODE_MAPGRID1:
+ _mesa_printf("MapGrid1 %d %.3f %.3f\n", n[1].i, n[2].f, n[3].f);
+ break;
+ case OPCODE_MAPGRID2:
+ _mesa_printf("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:
+ _mesa_printf("EvalMesh1 %d %d\n", n[1].i, n[2].i);
+ break;
+ case OPCODE_EVALMESH2:
+ _mesa_printf("EvalMesh2 %d %d %d %d\n",
n[1].i, n[2].i, n[3].i, n[4].i);
- break;
-
- case OPCODE_ATTR_1F_NV:
- _mesa_printf("ATTR_1F_NV attr %d: %f\n",
- n[1].i, n[2].f);
- break;
- case OPCODE_ATTR_2F_NV:
- _mesa_printf("ATTR_2F_NV attr %d: %f %f\n",
- n[1].i, n[2].f, n[3].f);
- break;
- case OPCODE_ATTR_3F_NV:
- _mesa_printf("ATTR_3F_NV attr %d: %f %f %f\n",
- n[1].i, n[2].f, n[3].f, n[4].f);
- break;
- case OPCODE_ATTR_4F_NV:
- _mesa_printf("ATTR_4F_NV attr %d: %f %f %f %f\n",
- n[1].i, n[2].f, n[3].f, n[4].f, n[5].f);
- break;
- case OPCODE_ATTR_1F_ARB:
- _mesa_printf("ATTR_1F_ARB attr %d: %f\n",
- n[1].i, n[2].f);
- break;
- case OPCODE_ATTR_2F_ARB:
- _mesa_printf("ATTR_2F_ARB attr %d: %f %f\n",
- n[1].i, n[2].f, n[3].f);
- break;
- case OPCODE_ATTR_3F_ARB:
- _mesa_printf("ATTR_3F_ARB attr %d: %f %f %f\n",
- n[1].i, n[2].f, n[3].f, n[4].f);
- break;
- case OPCODE_ATTR_4F_ARB:
- _mesa_printf("ATTR_4F_ARB attr %d: %f %f %f %f\n",
- n[1].i, n[2].f, n[3].f, n[4].f, n[5].f);
- break;
-
- case OPCODE_MATERIAL:
- _mesa_printf("MATERIAL %x %x: %f %f %f %f\n",
- n[1].i, n[2].i, n[3].f, n[4].f, n[5].f, n[6].f);
- break;
- case OPCODE_INDEX:
- _mesa_printf("INDEX: %f\n", n[1].f);
- break;
- case OPCODE_EDGEFLAG:
- _mesa_printf("EDGEFLAG: %d\n", n[1].i);
- break;
- case OPCODE_BEGIN:
- _mesa_printf("BEGIN %x\n", n[1].i);
- break;
- case OPCODE_END:
- _mesa_printf("END\n");
- break;
- case OPCODE_RECTF:
- _mesa_printf("RECTF %f %f %f %f\n", n[1].f, n[2].f, n[3].f, n[4].f);
- break;
- case OPCODE_EVAL_C1:
- _mesa_printf("EVAL_C1 %f\n", n[1].f);
- break;
- case OPCODE_EVAL_C2:
- _mesa_printf("EVAL_C2 %f %f\n", n[1].f, n[2].f);
- break;
- case OPCODE_EVAL_P1:
- _mesa_printf("EVAL_P1 %d\n", n[1].i);
- break;
- case OPCODE_EVAL_P2:
- _mesa_printf("EVAL_P2 %d %d\n", n[1].i, n[2].i);
- break;
-
-
-
- /*
- * meta opcodes/commands
- */
+ break;
+
+ case OPCODE_ATTR_1F_NV:
+ _mesa_printf("ATTR_1F_NV attr %d: %f\n", n[1].i, n[2].f);
+ break;
+ case OPCODE_ATTR_2F_NV:
+ _mesa_printf("ATTR_2F_NV attr %d: %f %f\n",
+ n[1].i, n[2].f, n[3].f);
+ break;
+ case OPCODE_ATTR_3F_NV:
+ _mesa_printf("ATTR_3F_NV attr %d: %f %f %f\n",
+ n[1].i, n[2].f, n[3].f, n[4].f);
+ break;
+ case OPCODE_ATTR_4F_NV:
+ _mesa_printf("ATTR_4F_NV attr %d: %f %f %f %f\n",
+ n[1].i, n[2].f, n[3].f, n[4].f, n[5].f);
+ break;
+ case OPCODE_ATTR_1F_ARB:
+ _mesa_printf("ATTR_1F_ARB attr %d: %f\n", n[1].i, n[2].f);
+ break;
+ case OPCODE_ATTR_2F_ARB:
+ _mesa_printf("ATTR_2F_ARB attr %d: %f %f\n",
+ n[1].i, n[2].f, n[3].f);
+ break;
+ case OPCODE_ATTR_3F_ARB:
+ _mesa_printf("ATTR_3F_ARB attr %d: %f %f %f\n",
+ n[1].i, n[2].f, n[3].f, n[4].f);
+ break;
+ case OPCODE_ATTR_4F_ARB:
+ _mesa_printf("ATTR_4F_ARB attr %d: %f %f %f %f\n",
+ n[1].i, n[2].f, n[3].f, n[4].f, n[5].f);
+ break;
+
+ case OPCODE_MATERIAL:
+ _mesa_printf("MATERIAL %x %x: %f %f %f %f\n",
+ n[1].i, n[2].i, n[3].f, n[4].f, n[5].f, n[6].f);
+ break;
+ case OPCODE_INDEX:
+ _mesa_printf("INDEX: %f\n", n[1].f);
+ break;
+ case OPCODE_EDGEFLAG:
+ _mesa_printf("EDGEFLAG: %d\n", n[1].i);
+ break;
+ case OPCODE_BEGIN:
+ _mesa_printf("BEGIN %x\n", n[1].i);
+ break;
+ case OPCODE_END:
+ _mesa_printf("END\n");
+ break;
+ case OPCODE_RECTF:
+ _mesa_printf("RECTF %f %f %f %f\n", n[1].f, n[2].f, n[3].f,
+ n[4].f);
+ break;
+ case OPCODE_EVAL_C1:
+ _mesa_printf("EVAL_C1 %f\n", n[1].f);
+ break;
+ case OPCODE_EVAL_C2:
+ _mesa_printf("EVAL_C2 %f %f\n", n[1].f, n[2].f);
+ break;
+ case OPCODE_EVAL_P1:
+ _mesa_printf("EVAL_P1 %d\n", n[1].i);
+ break;
+ case OPCODE_EVAL_P2:
+ _mesa_printf("EVAL_P2 %d %d\n", n[1].i, n[2].i);
+ break;
+
+
+
+ /*
+ * meta opcodes/commands
+ */
case OPCODE_ERROR:
_mesa_printf("Error: %s %s\n",
- enum_string(n[1].e), (const char *)n[2].data );
+ enum_string(n[1].e), (const char *) n[2].data);
break;
- case OPCODE_CONTINUE:
+ case OPCODE_CONTINUE:
_mesa_printf("DISPLAY-LIST-CONTINUE\n");
- n = (Node *) n[1].next;
- break;
- case OPCODE_END_OF_LIST:
+ n = (Node *) n[1].next;
+ break;
+ case OPCODE_END_OF_LIST:
_mesa_printf("END-LIST %u\n", list);
- done = GL_TRUE;
- break;
+ done = GL_TRUE;
+ break;
default:
if (opcode < 0 || opcode > OPCODE_END_OF_LIST) {
- _mesa_printf("ERROR IN DISPLAY LIST: opcode = %d, address = %p\n",
- opcode, (void*) n);
+ _mesa_printf
+ ("ERROR IN DISPLAY LIST: opcode = %d, address = %p\n",
+ opcode, (void *) n);
return;
}
else {
- _mesa_printf("command %d, %u operands\n", opcode, InstSize[opcode]);
+ _mesa_printf("command %d, %u operands\n", opcode,
+ InstSize[opcode]);
}
- }
- /* increment n to point to next compiled command */
- if (opcode!=OPCODE_CONTINUE) {
- n += InstSize[opcode];
- }
+ }
+ /* increment n to point to next compiled command */
+ if (opcode != OPCODE_CONTINUE) {
+ n += InstSize[opcode];
+ }
}
}
}
-/*
+/**
* Clients may call this function to help debug display list problems.
* This function is _ONLY_FOR_DEBUGGING_PURPOSES_. It may be removed,
* changed, or break in the future without notice.
*/
-void mesa_print_display_list( GLuint list )
+void
+mesa_print_display_list(GLuint list)
{
GET_CURRENT_CONTEXT(ctx);
- print_list( ctx, list );
+ print_list(ctx, list);
}
@@ -8052,10 +8389,10 @@ void mesa_print_display_list( GLuint list )
/***** Initialization *****/
/**********************************************************************/
-
-void _mesa_save_vtxfmt_init( GLvertexformat *vfmt )
+void
+_mesa_save_vtxfmt_init(GLvertexformat * vfmt)
{
- vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */
+ vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */
vfmt->Begin = save_Begin;
vfmt->CallList = _mesa_save_CallList;
vfmt->CallLists = _mesa_save_CallLists;
@@ -8164,5 +8501,5 @@ _mesa_init_display_list(GLcontext *ctx)
/* Display List group */
ctx->List.ListBase = 0;
- _mesa_save_vtxfmt_init( &ctx->ListState.ListVtxfmt );
+ _mesa_save_vtxfmt_init(&ctx->ListState.ListVtxfmt);
}