#include "api_arrayelt.h"
#include "api_exec.h"
#include "api_loopback.h"
-#include "api_validate.h"
+#include "draw_validate.h"
#include "atifragshader.h"
#include "config.h"
#include "bufferobj.h"
* Checks if dd_function_table::SaveNeedFlush is marked to flush
* stored (save) vertices, and calls vbo_save_SaveFlushVertices if so.
*/
-#define SAVE_FLUSH_VERTICES(ctx) \
-do { \
- if (ctx->Driver.SaveNeedFlush) \
- vbo_save_SaveFlushVertices(ctx); \
-} while (0)
+#define SAVE_FLUSH_VERTICES(ctx) \
+ do { \
+ if (ctx->Driver.SaveNeedFlush) \
+ vbo_save_SaveFlushVertices(ctx); \
+ } while (0)
/**
* Macro to assert that the API call was made outside the
* glBegin()/glEnd() pair, with return value.
- *
+ *
* \param ctx GL context.
* \param retval value to return value in case the assertion fails.
*/
-#define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval) \
-do { \
- if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) { \
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
- return retval; \
- } \
-} while (0)
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval) \
+ do { \
+ if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) { \
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
+ return retval; \
+ } \
+ } while (0)
/**
* Macro to assert that the API call was made outside the
* glBegin()/glEnd() pair.
- *
+ *
* \param ctx GL context.
*/
-#define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx) \
-do { \
- if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) { \
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
- return; \
- } \
-} while (0)
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx) \
+ do { \
+ if (ctx->Driver.CurrentSavePrimitive <= PRIM_MAX) { \
+ _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glBegin/End" ); \
+ return; \
+ } \
+ } while (0)
/**
* Macro to assert that the API call was made outside the
* glBegin()/glEnd() pair and flush the vertices.
- *
+ *
* \param ctx GL context.
*/
-#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx) \
-do { \
- ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx); \
- SAVE_FLUSH_VERTICES(ctx); \
-} while (0)
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx) \
+ do { \
+ ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx); \
+ SAVE_FLUSH_VERTICES(ctx); \
+ } while (0)
/**
* Macro to assert that the API call was made outside the
* glBegin()/glEnd() pair and flush the vertices, with return value.
- *
+ *
* \param ctx GL context.
* \param retval value to return value in case the assertion fails.
*/
-#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, retval)\
-do { \
- ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval); \
- SAVE_FLUSH_VERTICES(ctx); \
-} while (0)
-
+#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, retval) \
+ do { \
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval); \
+ SAVE_FLUSH_VERTICES(ctx); \
+ } while (0)
/**
OPCODE_TRANSLATE,
OPCODE_VIEWPORT,
OPCODE_WINDOW_POS,
+ /* ARB_viewport_array */
+ OPCODE_VIEWPORT_ARRAY_V,
+ OPCODE_VIEWPORT_INDEXED_F,
+ OPCODE_VIEWPORT_INDEXED_FV,
+ OPCODE_SCISSOR_ARRAY_V,
+ OPCODE_SCISSOR_INDEXED,
+ OPCODE_SCISSOR_INDEXED_V,
+ OPCODE_DEPTH_ARRAY_V,
+ OPCODE_DEPTH_INDEXED,
/* GL_ARB_multitexture */
OPCODE_ACTIVE_TEXTURE,
/* GL_ARB_texture_compression */
OPCODE_STENCIL_FUNC_SEPARATE,
OPCODE_STENCIL_OP_SEPARATE,
OPCODE_STENCIL_MASK_SEPARATE,
-
+ /* GL_NV_primitive_restart */
+ OPCODE_PRIMITIVE_RESTART_NV,
/* GL_ARB_shader_objects */
OPCODE_USE_PROGRAM,
OPCODE_UNIFORM_1F,
OPCODE_UNIFORM_3UIV,
OPCODE_UNIFORM_4UIV,
+ /* GL_ARB_gpu_shader_fp64 */
+ OPCODE_UNIFORM_1D,
+ OPCODE_UNIFORM_2D,
+ OPCODE_UNIFORM_3D,
+ OPCODE_UNIFORM_4D,
+ OPCODE_UNIFORM_1DV,
+ OPCODE_UNIFORM_2DV,
+ OPCODE_UNIFORM_3DV,
+ OPCODE_UNIFORM_4DV,
+ OPCODE_UNIFORM_MATRIX22D,
+ OPCODE_UNIFORM_MATRIX33D,
+ OPCODE_UNIFORM_MATRIX44D,
+ OPCODE_UNIFORM_MATRIX23D,
+ OPCODE_UNIFORM_MATRIX32D,
+ OPCODE_UNIFORM_MATRIX24D,
+ OPCODE_UNIFORM_MATRIX42D,
+ OPCODE_UNIFORM_MATRIX34D,
+ OPCODE_UNIFORM_MATRIX43D,
+
+ /* OpenGL 4.0 / GL_ARB_tessellation_shader */
+ OPCODE_PATCH_PARAMETER_I,
+ OPCODE_PATCH_PARAMETER_FV_INNER,
+ OPCODE_PATCH_PARAMETER_FV_OUTER,
+
/* OpenGL 4.2 / GL_ARB_separate_shader_objects */
OPCODE_USE_PROGRAM_STAGES,
OPCODE_PROGRAM_UNIFORM_1F,
OPCODE_PROGRAM_UNIFORM_2FV,
OPCODE_PROGRAM_UNIFORM_3FV,
OPCODE_PROGRAM_UNIFORM_4FV,
+ OPCODE_PROGRAM_UNIFORM_1D,
+ OPCODE_PROGRAM_UNIFORM_2D,
+ OPCODE_PROGRAM_UNIFORM_3D,
+ OPCODE_PROGRAM_UNIFORM_4D,
+ OPCODE_PROGRAM_UNIFORM_1DV,
+ OPCODE_PROGRAM_UNIFORM_2DV,
+ OPCODE_PROGRAM_UNIFORM_3DV,
+ OPCODE_PROGRAM_UNIFORM_4DV,
OPCODE_PROGRAM_UNIFORM_1I,
OPCODE_PROGRAM_UNIFORM_2I,
OPCODE_PROGRAM_UNIFORM_3I,
OPCODE_PROGRAM_UNIFORM_MATRIX42F,
OPCODE_PROGRAM_UNIFORM_MATRIX34F,
OPCODE_PROGRAM_UNIFORM_MATRIX43F,
+ OPCODE_PROGRAM_UNIFORM_MATRIX22D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX33D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX44D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX23D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX32D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX24D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX42D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX34D,
+ OPCODE_PROGRAM_UNIFORM_MATRIX43D,
/* GL_ARB_clip_control */
OPCODE_CLIP_CONTROL,
OPCODE_ATTR_2F_ARB,
OPCODE_ATTR_3F_ARB,
OPCODE_ATTR_4F_ARB,
+ OPCODE_ATTR_1D,
+ OPCODE_ATTR_2D,
+ OPCODE_ATTR_3D,
+ OPCODE_ATTR_4D,
OPCODE_MATERIAL,
OPCODE_BEGIN,
OPCODE_END,
OPCODE_SAMPLER_PARAMETERIIV,
OPCODE_SAMPLER_PARAMETERUIV,
+ /* ARB_compute_shader */
+ OPCODE_DISPATCH_COMPUTE,
+
/* GL_ARB_sync */
OPCODE_WAIT_SYNC,
/* ARB_uniform_buffer_object */
OPCODE_UNIFORM_BLOCK_BINDING,
+ /* ARB_shader_subroutines */
+ OPCODE_UNIFORM_SUBROUTINES,
+
/* EXT_polygon_offset_clamp */
OPCODE_POLYGON_OFFSET_CLAMP,
/* EXT_window_rectangles */
OPCODE_WINDOW_RECTANGLES,
+ /* NV_conservative_raster */
+ OPCODE_SUBPIXEL_PRECISION_BIAS,
+
+ /* NV_conservative_raster_dilate */
+ OPCODE_CONSERVATIVE_RASTER_PARAMETER_F,
+
+ /* NV_conservative_raster_pre_snap_triangles */
+ OPCODE_CONSERVATIVE_RASTER_PARAMETER_I,
+
+ /* EXT_direct_state_access */
+ OPCODE_MATRIX_LOAD,
+ OPCODE_MATRIX_MULT,
+ OPCODE_MATRIX_ROTATE,
+ OPCODE_MATRIX_SCALE,
+ OPCODE_MATRIX_TRANSLATE,
+ OPCODE_MATRIX_LOAD_IDENTITY,
+ OPCODE_MATRIX_ORTHO,
+ OPCODE_MATRIX_FRUSTUM,
+ OPCODE_MATRIX_PUSH,
+ OPCODE_MATRIX_POP,
+ OPCODE_TEXTUREPARAMETER_F,
+ OPCODE_TEXTUREPARAMETER_I,
+ OPCODE_TEXTURE_IMAGE1D,
+ OPCODE_TEXTURE_IMAGE2D,
+ OPCODE_TEXTURE_IMAGE3D,
+ OPCODE_TEXTURE_SUB_IMAGE1D,
+ OPCODE_TEXTURE_SUB_IMAGE2D,
+ OPCODE_TEXTURE_SUB_IMAGE3D,
+ OPCODE_COPY_TEXTURE_IMAGE1D,
+ OPCODE_COPY_TEXTURE_IMAGE2D,
+ OPCODE_COPY_TEXTURE_SUB_IMAGE1D,
+ OPCODE_COPY_TEXTURE_SUB_IMAGE2D,
+ OPCODE_COPY_TEXTURE_SUB_IMAGE3D,
+ OPCODE_BIND_MULTITEXTURE,
+ OPCODE_MULTITEXPARAMETER_F,
+ OPCODE_MULTITEXPARAMETER_I,
+ OPCODE_MULTITEX_IMAGE1D,
+ OPCODE_MULTITEX_IMAGE2D,
+ OPCODE_MULTITEX_IMAGE3D,
+ OPCODE_MULTITEX_SUB_IMAGE1D,
+ OPCODE_MULTITEX_SUB_IMAGE2D,
+ OPCODE_MULTITEX_SUB_IMAGE3D,
+ OPCODE_COPY_MULTITEX_IMAGE1D,
+ OPCODE_COPY_MULTITEX_IMAGE2D,
+ OPCODE_COPY_MULTITEX_SUB_IMAGE1D,
+ OPCODE_COPY_MULTITEX_SUB_IMAGE2D,
+ OPCODE_COPY_MULTITEX_SUB_IMAGE3D,
+ OPCODE_MULTITEXENV,
+ OPCODE_COMPRESSED_TEXTURE_IMAGE_1D,
+ OPCODE_COMPRESSED_TEXTURE_IMAGE_2D,
+ OPCODE_COMPRESSED_TEXTURE_IMAGE_3D,
+ OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_1D,
+ OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D,
+ OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_3D,
+ OPCODE_COMPRESSED_MULTITEX_IMAGE_1D,
+ OPCODE_COMPRESSED_MULTITEX_IMAGE_2D,
+ OPCODE_COMPRESSED_MULTITEX_IMAGE_3D,
+ OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_1D,
+ OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_2D,
+ OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_3D,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
};
+union float64_pair
+{
+ GLdouble d;
+ GLuint uint32[2];
+};
+
+
+#define ASSIGN_DOUBLE_TO_NODES(n, idx, value) \
+ do { \
+ union float64_pair tmp; \
+ tmp.d = value; \
+ n[idx].ui = tmp.uint32[0]; \
+ n[idx+1].ui = tmp.uint32[1]; \
+ } while (0)
+
+
/**
* How many nodes to allocate at a time. Note that bulk vertex data
* from glBegin/glVertex/glEnd primitives will typically wind up in
ctx->Driver.DeleteTexture(ctx, atlas->texObj);
}
free(atlas->glyphs);
+ free(atlas);
}
goto out_of_memory;
}
- _mesa_init_teximage_fields(ctx, atlas->texImage,
- atlas->texWidth, atlas->texHeight, 1, 0,
- GL_ALPHA, MESA_FORMAT_A_UNORM8);
+ if (ctx->Const.BitmapUsesRed)
+ _mesa_init_teximage_fields(ctx, atlas->texImage,
+ atlas->texWidth, atlas->texHeight, 1, 0,
+ GL_RED, MESA_FORMAT_R_UNORM8);
+ else
+ _mesa_init_teximage_fields(ctx, atlas->texImage,
+ atlas->texWidth, atlas->texHeight, 1, 0,
+ GL_ALPHA, MESA_FORMAT_A_UNORM8);
/* alloc image storage */
if (!ctx->Driver.AllocTextureImageBuffer(ctx, atlas->texImage)) {
dlist->Name = name;
dlist->Head = malloc(sizeof(Node) * count);
dlist->Head[0].opcode = OPCODE_END_OF_LIST;
+ /* All InstSize[] entries must be non-zero */
+ InstSize[OPCODE_END_OF_LIST] = 1;
return dlist;
}
/* for some commands, we need to free malloc'd memory */
case OPCODE_MAP1:
free(get_pointer(&n[6]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_MAP2:
free(get_pointer(&n[10]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_CALL_LISTS:
free(get_pointer(&n[3]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_DRAW_PIXELS:
free(get_pointer(&n[5]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_BITMAP:
free(get_pointer(&n[7]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_POLYGON_STIPPLE:
free(get_pointer(&n[1]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_TEX_IMAGE1D:
free(get_pointer(&n[8]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_TEX_IMAGE2D:
free(get_pointer(&n[9]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_TEX_IMAGE3D:
free(get_pointer(&n[10]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_TEX_SUB_IMAGE1D:
free(get_pointer(&n[7]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_TEX_SUB_IMAGE2D:
free(get_pointer(&n[9]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_TEX_SUB_IMAGE3D:
free(get_pointer(&n[11]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_COMPRESSED_TEX_IMAGE_1D:
free(get_pointer(&n[7]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_COMPRESSED_TEX_IMAGE_2D:
free(get_pointer(&n[8]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_COMPRESSED_TEX_IMAGE_3D:
free(get_pointer(&n[9]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D:
free(get_pointer(&n[7]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D:
free(get_pointer(&n[9]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D:
free(get_pointer(&n[11]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_PROGRAM_STRING_ARB:
free(get_pointer(&n[4])); /* program string */
- n += InstSize[n[0].opcode];
break;
case OPCODE_UNIFORM_1FV:
case OPCODE_UNIFORM_2FV:
case OPCODE_UNIFORM_3FV:
case OPCODE_UNIFORM_4FV:
+ case OPCODE_UNIFORM_1DV:
+ case OPCODE_UNIFORM_2DV:
+ case OPCODE_UNIFORM_3DV:
+ case OPCODE_UNIFORM_4DV:
case OPCODE_UNIFORM_1IV:
case OPCODE_UNIFORM_2IV:
case OPCODE_UNIFORM_3IV:
case OPCODE_UNIFORM_3UIV:
case OPCODE_UNIFORM_4UIV:
free(get_pointer(&n[3]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_UNIFORM_MATRIX22:
case OPCODE_UNIFORM_MATRIX33:
case OPCODE_UNIFORM_MATRIX32:
case OPCODE_UNIFORM_MATRIX34:
case OPCODE_UNIFORM_MATRIX43:
+ case OPCODE_UNIFORM_MATRIX22D:
+ case OPCODE_UNIFORM_MATRIX33D:
+ case OPCODE_UNIFORM_MATRIX44D:
+ case OPCODE_UNIFORM_MATRIX24D:
+ case OPCODE_UNIFORM_MATRIX42D:
+ case OPCODE_UNIFORM_MATRIX23D:
+ case OPCODE_UNIFORM_MATRIX32D:
+ case OPCODE_UNIFORM_MATRIX34D:
+ case OPCODE_UNIFORM_MATRIX43D:
free(get_pointer(&n[4]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_PROGRAM_UNIFORM_1FV:
case OPCODE_PROGRAM_UNIFORM_2FV:
case OPCODE_PROGRAM_UNIFORM_3FV:
case OPCODE_PROGRAM_UNIFORM_4FV:
+ case OPCODE_PROGRAM_UNIFORM_1DV:
+ case OPCODE_PROGRAM_UNIFORM_2DV:
+ case OPCODE_PROGRAM_UNIFORM_3DV:
+ case OPCODE_PROGRAM_UNIFORM_4DV:
case OPCODE_PROGRAM_UNIFORM_1IV:
case OPCODE_PROGRAM_UNIFORM_2IV:
case OPCODE_PROGRAM_UNIFORM_3IV:
case OPCODE_PROGRAM_UNIFORM_3UIV:
case OPCODE_PROGRAM_UNIFORM_4UIV:
free(get_pointer(&n[4]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_PROGRAM_UNIFORM_MATRIX22F:
case OPCODE_PROGRAM_UNIFORM_MATRIX33F:
case OPCODE_PROGRAM_UNIFORM_MATRIX32F:
case OPCODE_PROGRAM_UNIFORM_MATRIX34F:
case OPCODE_PROGRAM_UNIFORM_MATRIX43F:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX22D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX33D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX44D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX24D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX42D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX23D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX32D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX34D:
+ case OPCODE_PROGRAM_UNIFORM_MATRIX43D:
free(get_pointer(&n[5]));
- n += InstSize[n[0].opcode];
break;
case OPCODE_PIXEL_MAP:
free(get_pointer(&n[3]));
- n += InstSize[n[0].opcode];
break;
+ case OPCODE_VIEWPORT_ARRAY_V:
+ case OPCODE_SCISSOR_ARRAY_V:
+ case OPCODE_DEPTH_ARRAY_V:
+ case OPCODE_UNIFORM_SUBROUTINES:
case OPCODE_WINDOW_RECTANGLES:
free(get_pointer(&n[3]));
- n += InstSize[n[0].opcode];
break;
+ case OPCODE_TEXTURE_IMAGE1D:
+ case OPCODE_MULTITEX_IMAGE1D:
+ free(get_pointer(&n[9]));
+ break;
+ case OPCODE_TEXTURE_IMAGE2D:
+ case OPCODE_MULTITEX_IMAGE2D:
+ free(get_pointer(&n[10]));
+ break;
+ case OPCODE_TEXTURE_IMAGE3D:
+ case OPCODE_MULTITEX_IMAGE3D:
+ free(get_pointer(&n[11]));
+ break;
+ case OPCODE_TEXTURE_SUB_IMAGE1D:
+ case OPCODE_MULTITEX_SUB_IMAGE1D:
+ case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_1D:
+ case OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_1D:
+ free(get_pointer(&n[8]));
+ break;
+ case OPCODE_TEXTURE_SUB_IMAGE2D:
+ case OPCODE_MULTITEX_SUB_IMAGE2D:
+ case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D:
+ case OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_2D:
+ free(get_pointer(&n[10]));
+ break;
+ case OPCODE_TEXTURE_SUB_IMAGE3D:
+ case OPCODE_MULTITEX_SUB_IMAGE3D:
+ case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_3D:
+ case OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_3D:
+ free(get_pointer(&n[12]));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_IMAGE_1D:
+ case OPCODE_COMPRESSED_MULTITEX_IMAGE_1D:
+ free(get_pointer(&n[8]));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_IMAGE_2D:
+ case OPCODE_COMPRESSED_MULTITEX_IMAGE_2D:
+ free(get_pointer(&n[9]));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_IMAGE_3D:
+ case OPCODE_COMPRESSED_MULTITEX_IMAGE_3D:
+ free(get_pointer(&n[10]));
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) get_pointer(&n[1]);
free(block);
done = GL_TRUE;
break;
default:
- /* Most frequent case */
- n += InstSize[n[0].opcode];
- break;
+ /* just increment 'n' pointer, below */
+ ;
+ }
+
+ if (opcode != OPCODE_CONTINUE) {
+ assert(InstSize[opcode] > 0);
+ n += InstSize[opcode];
}
}
}
map = (GLubyte *)
ctx->Driver.MapBufferRange(ctx, 0, unpack->BufferObj->Size,
- GL_MAP_READ_BIT, unpack->BufferObj,
+ GL_MAP_READ_BIT, unpack->BufferObj,
MAP_INTERNAL);
if (!map) {
/* unable to map src buffer! */
GLuint nopNode;
Node *n;
+ assert(bytes <= BLOCK_SIZE * sizeof(Node));
+
if (opcode < OPCODE_EXT_0) {
if (InstSize[opcode] == 0) {
/* save instruction size now */
/* GL_ARB_draw_instanced. */
static void GLAPIENTRY
-save_DrawArraysInstancedARB(GLenum mode,
- GLint first,
- GLsizei count,
- GLsizei primcount)
+save_DrawArraysInstancedARB(UNUSED GLenum mode,
+ UNUSED GLint first,
+ UNUSED GLsizei count,
+ UNUSED GLsizei primcount)
{
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawArraysInstanced() during display list compile");
+ "glDrawArraysInstanced() during display list compile");
}
static void GLAPIENTRY
-save_DrawElementsInstancedARB(GLenum mode,
- GLsizei count,
- GLenum type,
- const GLvoid *indices,
- GLsizei primcount)
+save_DrawElementsInstancedARB(UNUSED GLenum mode,
+ UNUSED GLsizei count,
+ UNUSED GLenum type,
+ UNUSED const GLvoid *indices,
+ UNUSED GLsizei primcount)
{
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawElementsInstanced() during display list compile");
+ "glDrawElementsInstanced() during display list compile");
}
static void GLAPIENTRY
-save_DrawElementsInstancedBaseVertexARB(GLenum mode,
- GLsizei count,
- GLenum type,
- const GLvoid *indices,
- GLsizei primcount,
- GLint basevertex)
+save_DrawElementsInstancedBaseVertexARB(UNUSED GLenum mode,
+ UNUSED GLsizei count,
+ UNUSED GLenum type,
+ UNUSED const GLvoid *indices,
+ UNUSED GLsizei primcount,
+ UNUSED GLint basevertex)
{
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawElementsInstancedBaseVertex() during display list compile");
+ "glDrawElementsInstancedBaseVertex() during display list compile");
}
/* GL_ARB_base_instance. */
static void GLAPIENTRY
-save_DrawArraysInstancedBaseInstance(GLenum mode,
- GLint first,
- GLsizei count,
- GLsizei primcount,
- GLuint baseinstance)
+save_DrawArraysInstancedBaseInstance(UNUSED GLenum mode,
+ UNUSED GLint first,
+ UNUSED GLsizei count,
+ UNUSED GLsizei primcount,
+ UNUSED GLuint baseinstance)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawArraysInstancedBaseInstance() during display list compile");
+}
+
+static void APIENTRY
+save_DrawElementsInstancedBaseInstance(UNUSED GLenum mode,
+ UNUSED GLsizei count,
+ UNUSED GLenum type,
+ UNUSED const void *indices,
+ UNUSED GLsizei primcount,
+ UNUSED GLuint baseinstance)
{
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawArraysInstancedBaseInstance() during display list compile");
+ "glDrawElementsInstancedBaseInstance() during display list compile");
}
static void APIENTRY
-save_DrawElementsInstancedBaseInstance(GLenum mode,
- GLsizei count,
- GLenum type,
- const void *indices,
- GLsizei primcount,
- GLuint baseinstance)
+save_DrawElementsInstancedBaseVertexBaseInstance(UNUSED GLenum mode,
+ UNUSED GLsizei count,
+ UNUSED GLenum type,
+ UNUSED const void *indices,
+ UNUSED GLsizei primcount,
+ UNUSED GLint basevertex,
+ UNUSED GLuint baseinstance)
{
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawElementsInstancedBaseInstance() during display list compile");
+ "glDrawElementsInstancedBaseVertexBaseInstance() during display list compile");
}
static void APIENTRY
-save_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
- GLsizei count,
- GLenum type,
- const void *indices,
- GLsizei primcount,
- GLint basevertex,
- GLuint baseinstance)
+save_DrawArraysIndirect(UNUSED GLenum mode,
+ UNUSED const void *indirect)
{
GET_CURRENT_CONTEXT(ctx);
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawElementsInstancedBaseVertexBaseInstance() during display list compile");
+ "glDrawArraysIndirect() during display list compile");
}
+static void APIENTRY
+save_DrawElementsIndirect(UNUSED GLenum mode,
+ UNUSED GLenum type,
+ UNUSED const void *indirect)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawElementsIndirect() during display list compile");
+}
+
+static void APIENTRY
+save_MultiDrawArraysIndirect(UNUSED GLenum mode,
+ UNUSED const void *indirect,
+ UNUSED GLsizei primcount,
+ UNUSED GLsizei stride)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glMultiDrawArraysIndirect() during display list compile");
+}
+
+static void APIENTRY
+save_MultiDrawElementsIndirect(UNUSED GLenum mode,
+ UNUSED GLenum type,
+ UNUSED const void *indirect,
+ UNUSED GLsizei primcount,
+ UNUSED GLsizei stride)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glMultiDrawElementsIndirect() during display list compile");
+}
/**
* While building a display list we cache some OpenGL state.
n[1].i = num;
n[2].e = type;
save_pointer(&n[3], lists_copy);
- };
+ }
/* After this, we don't know what state we're in. Invalidate all
* cached information previously gathered:
case GL_FOG_START:
case GL_FOG_END:
case GL_FOG_INDEX:
+ case GL_FOG_COORDINATE_SOURCE:
p[0] = (GLfloat) *params;
p[1] = 0.0f;
p[2] = 0.0f;
}
+static void GLAPIENTRY
+save_PatchParameteri(GLenum pname, const GLint value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PATCH_PARAMETER_I, 2);
+ if (n) {
+ n[1].e = pname;
+ n[2].i = value;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_PatchParameteri(ctx->Exec, (pname, value));
+ }
+}
+
+
+static void GLAPIENTRY
+save_PatchParameterfv(GLenum pname, const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (pname == GL_PATCH_DEFAULT_OUTER_LEVEL) {
+ n = alloc_instruction(ctx, OPCODE_PATCH_PARAMETER_FV_OUTER, 5);
+ } else {
+ assert(pname == GL_PATCH_DEFAULT_INNER_LEVEL);
+ n = alloc_instruction(ctx, OPCODE_PATCH_PARAMETER_FV_INNER, 3);
+ }
+ if (n) {
+ n[1].e = pname;
+ if (pname == GL_PATCH_DEFAULT_OUTER_LEVEL) {
+ n[2].f = params[0];
+ n[3].f = params[1];
+ n[4].f = params[2];
+ n[5].f = params[3];
+ } else {
+ n[2].f = params[0];
+ n[3].f = params[1];
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_PatchParameterfv(ctx->Exec, (pname, params));
+ }
+}
+
+
static void GLAPIENTRY
save_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values)
{
}
-static void GLAPIENTRY
-save_PolygonOffsetEXT(GLfloat factor, GLfloat bias)
-{
- GET_CURRENT_CONTEXT(ctx);
- /* XXX mult by DepthMaxF here??? */
- save_PolygonOffset(factor, ctx->DrawBuffer->_DepthMaxF * bias);
-}
-
static void GLAPIENTRY
save_PolygonOffsetClampEXT(GLfloat factor, GLfloat units, GLfloat clamp)
{
}
}
+static void GLAPIENTRY
+save_ViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat width,
+ GLfloat height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_VIEWPORT_INDEXED_F, 5);
+ if (n) {
+ n[1].ui = index;
+ n[2].f = x;
+ n[3].f = y;
+ n[4].f = width;
+ n[5].f = height;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ViewportIndexedf(ctx->Exec, (index, x, y, width, height));
+ }
+}
+
+static void GLAPIENTRY
+save_ViewportIndexedfv(GLuint index, const GLfloat *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_VIEWPORT_INDEXED_FV, 5);
+ if (n) {
+ n[1].ui = index;
+ n[2].f = v[0];
+ n[3].f = v[1];
+ n[4].f = v[2];
+ n[5].f = v[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ViewportIndexedfv(ctx->Exec, (index, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ViewportArrayv(GLuint first, GLsizei count, const GLfloat *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_VIEWPORT_ARRAY_V, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = first;
+ n[2].si = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ViewportArrayv(ctx->Exec, (first, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width,
+ GLsizei height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_SCISSOR_INDEXED, 5);
+ if (n) {
+ n[1].ui = index;
+ n[2].i = left;
+ n[3].i = bottom;
+ n[4].si = width;
+ n[5].si = height;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ScissorIndexed(ctx->Exec, (index, left, bottom, width, height));
+ }
+}
+
+static void GLAPIENTRY
+save_ScissorIndexedv(GLuint index, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_SCISSOR_INDEXED_V, 5);
+ if (n) {
+ n[1].ui = index;
+ n[2].i = v[0];
+ n[3].i = v[1];
+ n[4].si = v[2];
+ n[5].si = v[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ScissorIndexedv(ctx->Exec, (index, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ScissorArrayv(GLuint first, GLsizei count, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_SCISSOR_ARRAY_V, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = first;
+ n[2].si = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLint)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ScissorArrayv(ctx->Exec, (first, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_DepthRangeIndexed(GLuint index, GLclampd n, GLclampd f)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *node;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ node = alloc_instruction(ctx, OPCODE_DEPTH_INDEXED, 3);
+ if (node) {
+ node[1].ui = index;
+ /* Mesa stores these as floats internally so we deliberately convert
+ * them to a float here.
+ */
+ node[2].f = n;
+ node[3].f = f;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DepthRangeIndexed(ctx->Exec, (index, n, f));
+ }
+}
+
+static void GLAPIENTRY
+save_DepthRangeArrayv(GLuint first, GLsizei count, const GLclampd *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DEPTH_ARRAY_V, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = first;
+ n[2].si = count;
+ save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLclampd)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DepthRangeArrayv(ctx->Exec, (first, count, v));
+ }
+}
static void GLAPIENTRY
save_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
static void GLAPIENTRY
save_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
- const GLfloat * params)
+ const GLfloat * params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
const GLfloat * p = params;
for (i = 0 ; i < count ; i++) {
- n = alloc_instruction(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6);
- if (n) {
- n[1].e = target;
- n[2].ui = index;
- n[3].f = p[0];
- n[4].f = p[1];
- n[5].f = p[2];
- n[6].f = p[3];
- p += 4;
- }
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6);
+ if (n) {
+ n[1].e = target;
+ n[2].ui = index;
+ n[3].f = p[0];
+ n[4].f = p[1];
+ n[5].f = p[2];
+ n[6].f = p[3];
+ p += 4;
+ }
}
}
static void GLAPIENTRY
save_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
- const GLfloat *params)
+ const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
const GLfloat * p = params;
for (i = 0 ; i < count ; i++) {
- n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
- if (n) {
- n[1].e = target;
- n[2].ui = index;
- n[3].f = p[0];
- n[4].f = p[1];
- n[5].f = p[2];
- n[6].f = p[3];
- p += 4;
- }
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
+ if (n) {
+ n[1].e = target;
+ n[2].ui = index;
+ n[3].f = p[0];
+ n[4].f = p[1];
+ n[5].f = p[2];
+ n[6].f = p[3];
+ p += 4;
+ }
}
}
_mesa_compile_error(ctx, GL_INVALID_ENUM, "glMaterial(pname)");
return;
}
-
+
if (ctx->ExecuteFlag) {
CALL_Materialfv(ctx->Exec, (face, pname, param));
}
_mesa_compile_error(ctx, GL_INVALID_OPERATION, "recursive glBegin");
}
else {
- Node *n;
-
ctx->Driver.CurrentSavePrimitive = mode;
- /* Give the driver an opportunity to hook in an optimized
- * display list compiler.
- */
- if (vbo_save_NotifyBegin(ctx, mode))
- return;
-
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_BEGIN, 1);
- if (n) {
- n[1].e = mode;
- }
-
- if (ctx->ExecuteFlag) {
- CALL_Begin(ctx->Exec, (mode));
- }
+ vbo_save_NotifyBegin(ctx, mode, false);
}
}
}
static void GLAPIENTRY
-save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
- GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
- GLbitfield mask, GLenum filter)
+save_VertexAttribL1d(GLuint index, GLdouble x)
{
GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_BLIT_FRAMEBUFFER, 10);
- if (n) {
- n[1].i = srcX0;
- n[2].i = srcY0;
- n[3].i = srcX1;
- n[4].i = srcY1;
- n[5].i = dstX0;
- n[6].i = dstY0;
- n[7].i = dstX1;
- n[8].i = dstY1;
- n[9].i = mask;
- n[10].e = filter;
- }
- if (ctx->ExecuteFlag) {
- CALL_BlitFramebuffer(ctx->Exec, (srcX0, srcY0, srcX1, srcY1,
- dstX0, dstY0, dstX1, dstY1,
- mask, filter));
+
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS) {
+ Node *n;
+ SAVE_FLUSH_VERTICES(ctx);
+ n = alloc_instruction(ctx, OPCODE_ATTR_1D, 3);
+ if (n) {
+ n[1].ui = index;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ }
+
+ ctx->ListState.ActiveAttribSize[index] = 1;
+ memcpy(ctx->ListState.CurrentAttrib[index], &n[2], sizeof(GLdouble));
+
+ if (ctx->ExecuteFlag) {
+ CALL_VertexAttribL1d(ctx->Exec, (index, x));
+ }
+ } else {
+ index_error();
}
}
+static void GLAPIENTRY
+save_VertexAttribL1dv(GLuint index, const GLdouble *v)
+{
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ save_VertexAttribL1d(index, v[0]);
+ else
+ index_error();
+}
-/** GL_EXT_provoking_vertex */
static void GLAPIENTRY
-save_ProvokingVertexEXT(GLenum mode)
+save_VertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
{
GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROVOKING_VERTEX, 1);
- if (n) {
+
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS) {
+ Node *n;
+ SAVE_FLUSH_VERTICES(ctx);
+ n = alloc_instruction(ctx, OPCODE_ATTR_2D, 5);
+ if (n) {
+ n[1].ui = index;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 4, y);
+ }
+
+ ctx->ListState.ActiveAttribSize[index] = 2;
+ memcpy(ctx->ListState.CurrentAttrib[index], &n[2],
+ 2 * sizeof(GLdouble));
+
+ if (ctx->ExecuteFlag) {
+ CALL_VertexAttribL2d(ctx->Exec, (index, x, y));
+ }
+ } else {
+ index_error();
+ }
+}
+
+static void GLAPIENTRY
+save_VertexAttribL2dv(GLuint index, const GLdouble *v)
+{
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ save_VertexAttribL2d(index, v[0], v[1]);
+ else
+ index_error();
+}
+
+static void GLAPIENTRY
+save_VertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS) {
+ Node *n;
+ SAVE_FLUSH_VERTICES(ctx);
+ n = alloc_instruction(ctx, OPCODE_ATTR_3D, 7);
+ if (n) {
+ n[1].ui = index;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 4, y);
+ ASSIGN_DOUBLE_TO_NODES(n, 6, z);
+ }
+
+ ctx->ListState.ActiveAttribSize[index] = 3;
+ memcpy(ctx->ListState.CurrentAttrib[index], &n[2],
+ 3 * sizeof(GLdouble));
+
+ if (ctx->ExecuteFlag) {
+ CALL_VertexAttribL3d(ctx->Exec, (index, x, y, z));
+ }
+ } else {
+ index_error();
+ }
+}
+
+static void GLAPIENTRY
+save_VertexAttribL3dv(GLuint index, const GLdouble *v)
+{
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ save_VertexAttribL3d(index, v[0], v[1], v[2]);
+ else
+ index_error();
+}
+
+static void GLAPIENTRY
+save_VertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z,
+ GLdouble w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS) {
+ Node *n;
+ SAVE_FLUSH_VERTICES(ctx);
+ n = alloc_instruction(ctx, OPCODE_ATTR_4D, 9);
+ if (n) {
+ n[1].ui = index;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 4, y);
+ ASSIGN_DOUBLE_TO_NODES(n, 6, z);
+ ASSIGN_DOUBLE_TO_NODES(n, 8, w);
+ }
+
+ ctx->ListState.ActiveAttribSize[index] = 4;
+ memcpy(ctx->ListState.CurrentAttrib[index], &n[2],
+ 4 * sizeof(GLdouble));
+
+ if (ctx->ExecuteFlag) {
+ CALL_VertexAttribL4d(ctx->Exec, (index, x, y, z, w));
+ }
+ } else {
+ index_error();
+ }
+}
+
+static void GLAPIENTRY
+save_VertexAttribL4dv(GLuint index, const GLdouble *v)
+{
+ if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ save_VertexAttribL4d(index, v[0], v[1], v[2], v[3]);
+ else
+ index_error();
+}
+
+static void GLAPIENTRY
+save_PrimitiveRestartNV(void)
+{
+ /* Note: this is used when outside a glBegin/End pair in a display list */
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ (void) alloc_instruction(ctx, OPCODE_PRIMITIVE_RESTART_NV, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_PrimitiveRestartNV(ctx->Exec, ());
+ }
+}
+
+
+static void GLAPIENTRY
+save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BLIT_FRAMEBUFFER, 10);
+ if (n) {
+ n[1].i = srcX0;
+ n[2].i = srcY0;
+ n[3].i = srcX1;
+ n[4].i = srcY1;
+ n[5].i = dstX0;
+ n[6].i = dstY0;
+ n[7].i = dstX1;
+ n[8].i = dstY1;
+ n[9].i = mask;
+ n[10].e = filter;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BlitFramebuffer(ctx->Exec, (srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter));
+ }
+}
+
+
+/** GL_EXT_provoking_vertex */
+static void GLAPIENTRY
+save_ProvokingVertexEXT(GLenum mode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROVOKING_VERTEX, 1);
+ if (n) {
n[1].e = mode;
}
if (ctx->ExecuteFlag) {
}
}
+static void GLAPIENTRY
+save_DispatchCompute(GLuint num_groups_x, GLuint num_groups_y,
+ GLuint num_groups_z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DISPATCH_COMPUTE, 3);
+ if (n) {
+ n[1].ui = num_groups_x;
+ n[2].ui = num_groups_y;
+ n[3].ui = num_groups_z;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DispatchCompute(ctx->Exec, (num_groups_x, num_groups_y,
+ num_groups_z));
+ }
+}
+
+static void GLAPIENTRY
+save_DispatchComputeIndirect(GLintptr indirect)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDispatchComputeIndirect() during display list compile");
+}
+
static void GLAPIENTRY
save_UseProgram(GLuint program)
{
}
+static void GLAPIENTRY
+save_Uniform1d(GLint location, GLdouble x)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1D, 3);
+ if (n) {
+ n[1].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1d(ctx->Exec, (location, x));
+ }
+}
+
+
+static void GLAPIENTRY
+save_Uniform2d(GLint location, GLdouble x, GLdouble y)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2D, 5);
+ if (n) {
+ n[1].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 4, y);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2d(ctx->Exec, (location, x, y));
+ }
+}
+
+
+static void GLAPIENTRY
+save_Uniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3D, 7);
+ if (n) {
+ n[1].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 4, y);
+ ASSIGN_DOUBLE_TO_NODES(n, 6, z);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3d(ctx->Exec, (location, x, y, z));
+ }
+}
+
+
+static void GLAPIENTRY
+save_Uniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4D, 9);
+ if (n) {
+ n[1].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 4, y);
+ ASSIGN_DOUBLE_TO_NODES(n, 6, z);
+ ASSIGN_DOUBLE_TO_NODES(n, 8, w);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4d(ctx->Exec, (location, x, y, z, w));
+ }
+}
+
+
+static void GLAPIENTRY
+save_Uniform1dv(GLint location, GLsizei count, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1DV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1dv(ctx->Exec, (location, count, v));
+ }
+}
+
+
+static void GLAPIENTRY
+save_Uniform2dv(GLint location, GLsizei count, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2DV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2dv(ctx->Exec, (location, count, v));
+ }
+}
+
+
+static void GLAPIENTRY
+save_Uniform3dv(GLint location, GLsizei count, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3DV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3dv(ctx->Exec, (location, count, v));
+ }
+}
+
+
+static void GLAPIENTRY
+save_Uniform4dv(GLint location, GLsizei count, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4DV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4dv(ctx->Exec, (location, count, v));
+ }
+}
+
+
static void GLAPIENTRY
save_Uniform1iARB(GLint location, GLint x)
{
n[2].i = x;
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform1ui(ctx->Exec, (location, x));*/
+ CALL_Uniform1ui(ctx->Exec, (location, x));
}
}
n[3].i = y;
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform2ui(ctx->Exec, (location, x, y));*/
+ CALL_Uniform2ui(ctx->Exec, (location, x, y));
}
}
n[4].i = z;
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform3ui(ctx->Exec, (location, x, y, z));*/
+ CALL_Uniform3ui(ctx->Exec, (location, x, y, z));
}
}
n[5].i = w;
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform4ui(ctx->Exec, (location, x, y, z, w));*/
+ CALL_Uniform4ui(ctx->Exec, (location, x, y, z, w));
}
}
save_pointer(&n[3], memdup(v, count * 1 * sizeof(*v)));
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform1uiv(ctx->Exec, (location, count, v));*/
+ CALL_Uniform1uiv(ctx->Exec, (location, count, v));
}
}
save_pointer(&n[3], memdup(v, count * 2 * sizeof(*v)));
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform2uiv(ctx->Exec, (location, count, v));*/
+ CALL_Uniform2uiv(ctx->Exec, (location, count, v));
}
}
save_pointer(&n[3], memdup(v, count * 3 * sizeof(*v)));
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform3uiv(ctx->Exec, (location, count, v));*/
+ CALL_Uniform3uiv(ctx->Exec, (location, count, v));
}
}
save_pointer(&n[3], memdup(v, count * 4 * sizeof(*v)));
}
if (ctx->ExecuteFlag) {
- /*CALL_Uniform4uiv(ctx->Exec, (location, count, v));*/
+ CALL_Uniform4uiv(ctx->Exec, (location, count, v));
}
}
}
}
+
static void GLAPIENTRY
-save_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
+save_UniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_USE_PROGRAM_STAGES, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX22D, 3 + POINTER_DWORDS);
if (n) {
- n[1].ui = pipeline;
- n[2].ui = stages;
- n[3].ui = program;
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 2 * 2 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_UseProgramStages(ctx->Exec, (pipeline, stages, program));
+ CALL_UniformMatrix2dv(ctx->Exec, (location, count, transpose, m));
}
}
static void GLAPIENTRY
-save_ProgramUniform1f(GLuint program, GLint location, GLfloat x)
+save_UniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1F, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33D, 3 + POINTER_DWORDS);
if (n) {
- n[1].ui = program;
- n[2].i = location;
- n[3].f = x;
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 3 * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix3dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+static void GLAPIENTRY
+save_UniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX44D, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 4 * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix4dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+
+static void GLAPIENTRY
+save_UniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23D, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 2 * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix2x3dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+
+static void GLAPIENTRY
+save_UniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX32D, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 3 * 2 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix3x2dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+
+static void GLAPIENTRY
+save_UniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24D, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 2 * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix2x4dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+static void GLAPIENTRY
+save_UniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42D, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 4 * 2 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix4x2dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+
+static void GLAPIENTRY
+save_UniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34D, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 3 * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix3x4dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+
+static void GLAPIENTRY
+save_UniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose,
+ const GLdouble *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43D, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 4 * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix4x3dv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+
+static void GLAPIENTRY
+save_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_USE_PROGRAM_STAGES, 3);
+ if (n) {
+ n[1].ui = pipeline;
+ n[2].ui = stages;
+ n[3].ui = program;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UseProgramStages(ctx->Exec, (pipeline, stages, program));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform1f(GLuint program, GLint location, GLfloat x)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1F, 3);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].f = x;
}
if (ctx->ExecuteFlag) {
CALL_ProgramUniform1f(ctx->Exec, (program, location, x));
}
}
+static void GLAPIENTRY
+save_ProgramUniform1d(GLuint program, GLint location, GLdouble x)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1D, 4);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 3, x);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform1d(ctx->Exec, (program, location, x));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform2d(GLuint program, GLint location, GLdouble x, GLdouble y)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2D, 6);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 3, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 5, y);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform2d(ctx->Exec, (program, location, x, y));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform3d(GLuint program, GLint location,
+ GLdouble x, GLdouble y, GLdouble z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3D, 8);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 3, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 5, y);
+ ASSIGN_DOUBLE_TO_NODES(n, 7, z);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform3d(ctx->Exec, (program, location, x, y, z));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform4d(GLuint program, GLint location,
+ GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4D, 10);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 3, x);
+ ASSIGN_DOUBLE_TO_NODES(n, 5, y);
+ ASSIGN_DOUBLE_TO_NODES(n, 7, z);
+ ASSIGN_DOUBLE_TO_NODES(n, 9, w);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform4d(ctx->Exec, (program, location, x, y, z, w));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform1dv(GLuint program, GLint location, GLsizei count,
+ const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1DV, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform1dv(ctx->Exec, (program, location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform2dv(GLuint program, GLint location, GLsizei count,
+ const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2DV, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 2 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform2dv(ctx->Exec, (program, location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform3dv(GLuint program, GLint location, GLsizei count,
+ const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3DV, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform3dv(ctx->Exec, (program, location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniform4dv(GLuint program, GLint location, GLsizei count,
+ const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4DV, 3 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniform4dv(ctx->Exec, (program, location, count, v));
+ }
+}
+
static void GLAPIENTRY
save_ProgramUniform1i(GLuint program, GLint location, GLint x)
{
}
static void GLAPIENTRY
-save_ClipControl(GLenum origin, GLenum depth)
+save_ProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_CLIP_CONTROL, 2);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX22D,
+ 4 + POINTER_DWORDS);
if (n) {
- n[1].e = origin;
- n[2].e = depth;
- }
- if (ctx->ExecuteFlag) {
- CALL_ClipControl(ctx->Exec, (origin, depth));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 2 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix2dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX23D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix2x3dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX24D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix2x4dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX32D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 2 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix3x2dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX33D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix3dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX34D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix3x4dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX42D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 2 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix4x2dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX43D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 3 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix4x3dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLdouble *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX44D,
+ 4 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 4 * sizeof(GLdouble)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ProgramUniformMatrix4dv(ctx->Exec,
+ (program, location, count, transpose, v));
+ }
+}
+
+static void GLAPIENTRY
+save_ClipControl(GLenum origin, GLenum depth)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLIP_CONTROL, 2);
+ if (n) {
+ n[1].e = origin;
+ n[2].e = depth;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ClipControl(ctx->Exec, (origin, depth));
}
}
}
static void GLAPIENTRY
-save_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
+save_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERIIV, 6);
+ if (n) {
+ n[1].ui = sampler;
+ n[2].e = pname;
+ n[3].i = params[0];
+ if (pname == GL_TEXTURE_BORDER_COLOR) {
+ n[4].i = params[1];
+ n[5].i = params[2];
+ n[6].i = params[3];
+ }
+ else {
+ n[4].i = n[5].i = n[6].i = 0;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_SamplerParameterIiv(ctx->Exec, (sampler, pname, params));
+ }
+}
+
+static void GLAPIENTRY
+save_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERUIV, 6);
+ if (n) {
+ n[1].ui = sampler;
+ n[2].e = pname;
+ n[3].ui = params[0];
+ if (pname == GL_TEXTURE_BORDER_COLOR) {
+ n[4].ui = params[1];
+ n[5].ui = params[2];
+ n[6].ui = params[3];
+ }
+ else {
+ n[4].ui = n[5].ui = n[6].ui = 0;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_SamplerParameterIuiv(ctx->Exec, (sampler, pname, params));
+ }
+}
+
+static void GLAPIENTRY
+save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_WAIT_SYNC, 4);
+ if (n) {
+ union uint64_pair p;
+ p.uint64 = timeout;
+ n[1].bf = flags;
+ n[2].ui = p.uint32[0];
+ n[3].ui = p.uint32[1];
+ save_pointer(&n[4], sync);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_WaitSync(ctx->Exec, (sync, flags, timeout));
+ }
+}
+
+
+/** GL_NV_conditional_render */
+static void GLAPIENTRY
+save_BeginConditionalRender(GLuint queryId, GLenum mode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BEGIN_CONDITIONAL_RENDER, 2);
+ if (n) {
+ n[1].i = queryId;
+ n[2].e = mode;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BeginConditionalRender(ctx->Exec, (queryId, mode));
+ }
+}
+
+static void GLAPIENTRY
+save_EndConditionalRender(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ alloc_instruction(ctx, OPCODE_END_CONDITIONAL_RENDER, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_EndConditionalRender(ctx->Exec, ());
+ }
+}
+
+static void GLAPIENTRY
+save_UniformBlockBinding(GLuint prog, GLuint index, GLuint binding)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_BLOCK_BINDING, 3);
+ if (n) {
+ n[1].ui = prog;
+ n[2].ui = index;
+ n[3].ui = binding;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformBlockBinding(ctx->Exec, (prog, index, binding));
+ }
+}
+
+static void GLAPIENTRY
+save_UniformSubroutinesuiv(GLenum shadertype, GLsizei count,
+ const GLuint *indices)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_SUBROUTINES, 2 + POINTER_DWORDS);
+ if (n) {
+ GLint *indices_copy = NULL;
+
+ if (count > 0)
+ indices_copy = memdup(indices, sizeof(GLuint) * 4 * count);
+ n[1].e = shadertype;
+ n[2].si = count;
+ save_pointer(&n[3], indices_copy);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformSubroutinesuiv(ctx->Exec, (shadertype, count, indices));
+ }
+}
+
+/** GL_EXT_window_rectangles */
+static void GLAPIENTRY
+save_WindowRectanglesEXT(GLenum mode, GLsizei count, const GLint *box)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_WINDOW_RECTANGLES, 2 + POINTER_DWORDS);
+ if (n) {
+ GLint *box_copy = NULL;
+
+ if (count > 0)
+ box_copy = memdup(box, sizeof(GLint) * 4 * count);
+ n[1].e = mode;
+ n[2].si = count;
+ save_pointer(&n[3], box_copy);
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_WindowRectanglesEXT(ctx->Exec, (mode, count, box));
+ }
+}
+
+
+/** GL_NV_conservative_raster */
+static void GLAPIENTRY
+save_SubpixelPrecisionBiasNV(GLuint xbits, GLuint ybits)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_SUBPIXEL_PRECISION_BIAS, 2);
+ if (n) {
+ n[1].ui = xbits;
+ n[2].ui = ybits;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_SubpixelPrecisionBiasNV(ctx->Exec, (xbits, ybits));
+ }
+}
+
+/** GL_NV_conservative_raster_dilate */
+static void GLAPIENTRY
+save_ConservativeRasterParameterfNV(GLenum pname, GLfloat param)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CONSERVATIVE_RASTER_PARAMETER_F, 2);
+ if (n) {
+ n[1].e = pname;
+ n[2].f = param;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ConservativeRasterParameterfNV(ctx->Exec, (pname, param));
+ }
+}
+
+/** GL_NV_conservative_raster_pre_snap_triangles */
+static void GLAPIENTRY
+save_ConservativeRasterParameteriNV(GLenum pname, GLint param)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CONSERVATIVE_RASTER_PARAMETER_I, 2);
+ if (n) {
+ n[1].e = pname;
+ n[2].i = param;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ConservativeRasterParameteriNV(ctx->Exec, (pname, param));
+ }
+}
+
+/** GL_EXT_direct_state_access */
+
+static void GLAPIENTRY
+save_MatrixLoadfEXT(GLenum matrixMode, const GLfloat *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_LOAD, 17);
+ if (n) {
+ n[1].e = matrixMode;
+ for (unsigned i = 0; i < 16; i++) {
+ n[2 + i].f = m[i];
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixLoadfEXT(ctx->Exec, (matrixMode, m));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixLoaddEXT(GLenum matrixMode, const GLdouble *m)
+{
+ GLfloat f[16];
+ for (unsigned i = 0; i < 16; i++) {
+ f[i] = (GLfloat) m[i];
+ }
+ save_MatrixLoadfEXT(matrixMode, f);
+}
+
+static void GLAPIENTRY
+save_MatrixMultfEXT(GLenum matrixMode, const GLfloat * m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_MULT, 17);
+ if (n) {
+ n[1].e = matrixMode;
+ for (unsigned i = 0; i < 16; i++) {
+ n[2 + i].f = m[i];
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixMultfEXT(ctx->Exec, (matrixMode, m));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixMultdEXT(GLenum matrixMode, const GLdouble * m)
+{
+ GLfloat f[16];
+ for (unsigned i = 0; i < 16; i++) {
+ f[i] = (GLfloat) m[i];
+ }
+ save_MatrixMultfEXT(matrixMode, f);
+}
+
+static void GLAPIENTRY
+save_MatrixRotatefEXT(GLenum matrixMode, 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_MATRIX_ROTATE, 5);
+ if (n) {
+ n[1].e = matrixMode;
+ n[2].f = angle;
+ n[3].f = x;
+ n[4].f = y;
+ n[5].f = z;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixRotatefEXT(ctx->Exec, (matrixMode, angle, x, y, z));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixRotatedEXT(GLenum matrixMode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
+{
+ save_MatrixRotatefEXT(matrixMode, (GLfloat) angle, (GLfloat) x, (GLfloat) y, (GLfloat) z);
+}
+
+static void GLAPIENTRY
+save_MatrixScalefEXT(GLenum matrixMode, 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_MATRIX_SCALE, 4);
+ if (n) {
+ n[1].e = matrixMode;
+ n[2].f = x;
+ n[3].f = y;
+ n[4].f = z;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixScalefEXT(ctx->Exec, (matrixMode, x, y, z));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixScaledEXT(GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z)
+{
+ save_MatrixScalefEXT(matrixMode, (GLfloat) x, (GLfloat) y, (GLfloat) z);
+}
+
+static void GLAPIENTRY
+save_MatrixTranslatefEXT(GLenum matrixMode, 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_MATRIX_TRANSLATE, 4);
+ if (n) {
+ n[1].e = matrixMode;
+ n[2].f = x;
+ n[3].f = y;
+ n[4].f = z;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixTranslatefEXT(ctx->Exec, (matrixMode, x, y, z));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixTranslatedEXT(GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z)
+{
+ save_MatrixTranslatefEXT(matrixMode, (GLfloat) x, (GLfloat) y, (GLfloat) z);
+}
+
+static void GLAPIENTRY
+save_MatrixLoadIdentityEXT(GLenum matrixMode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_LOAD_IDENTITY, 1);
+ if (n) {
+ n[1].e = matrixMode;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixLoadIdentityEXT(ctx->Exec, (matrixMode));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixOrthoEXT(GLenum matrixMode, 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_MATRIX_ORTHO, 7);
+ if (n) {
+ n[1].e = matrixMode;
+ n[2].f = (GLfloat) left;
+ n[3].f = (GLfloat) right;
+ n[4].f = (GLfloat) bottom;
+ n[5].f = (GLfloat) top;
+ n[6].f = (GLfloat) nearval;
+ n[7].f = (GLfloat) farval;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixOrthoEXT(ctx->Exec, (matrixMode, left, right, bottom, top, nearval, farval));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MatrixFrustumEXT(GLenum matrixMode, 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_MATRIX_FRUSTUM, 7);
+ if (n) {
+ n[1].e = matrixMode;
+ n[2].f = (GLfloat) left;
+ n[3].f = (GLfloat) right;
+ n[4].f = (GLfloat) bottom;
+ n[5].f = (GLfloat) top;
+ n[6].f = (GLfloat) nearval;
+ n[7].f = (GLfloat) farval;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixFrustumEXT(ctx->Exec, (matrixMode, left, right, bottom, top, nearval, farval));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixPushEXT(GLenum matrixMode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node* n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_PUSH, 1);
+ if (n) {
+ n[1].e = matrixMode;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixPushEXT(ctx->Exec, (matrixMode));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixPopEXT(GLenum matrixMode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node* n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_POP, 1);
+ if (n) {
+ n[1].e = matrixMode;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MatrixPopEXT(ctx->Exec, (matrixMode));
+ }
+}
+
+static void GLAPIENTRY
+save_MatrixLoadTransposefEXT(GLenum matrixMode, const GLfloat m[16])
+{
+ GLfloat tm[16];
+ _math_transposef(tm, m);
+ save_MatrixLoadfEXT(matrixMode, tm);
+}
+
+static void GLAPIENTRY
+save_MatrixLoadTransposedEXT(GLenum matrixMode, const GLdouble m[16])
+{
+ GLfloat tm[16];
+ _math_transposefd(tm, m);
+ save_MatrixLoadfEXT(matrixMode, tm);
+}
+
+static void GLAPIENTRY
+save_MatrixMultTransposefEXT(GLenum matrixMode, const GLfloat m[16])
+{
+ GLfloat tm[16];
+ _math_transposef(tm, m);
+ save_MatrixMultfEXT(matrixMode, tm);
+}
+
+static void GLAPIENTRY
+save_MatrixMultTransposedEXT(GLenum matrixMode, const GLdouble m[16])
+{
+ GLfloat tm[16];
+ _math_transposefd(tm, m);
+ save_MatrixMultfEXT(matrixMode, tm);
+}
+
+static void GLAPIENTRY
+save_TextureParameterfvEXT(GLuint texture, 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_TEXTUREPARAMETER_F, 7);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].e = pname;
+ n[4].f = params[0];
+ n[5].f = params[1];
+ n[6].f = params[2];
+ n[7].f = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureParameterfvEXT(ctx->Exec, (texture, target, pname, params));
+ }
+}
+
+
+static void GLAPIENTRY
+save_TextureParameterfEXT(GLuint texture, GLenum target, GLenum pname, GLfloat param)
+{
+ GLfloat parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_TextureParameterfvEXT(texture, target, pname, parray);
+}
+
+static void GLAPIENTRY
+save_TextureParameterivEXT(GLuint texture, 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_TEXTUREPARAMETER_I, 7);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].e = pname;
+ n[4].i = params[0];
+ n[5].i = params[1];
+ n[6].i = params[2];
+ n[7].i = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureParameterivEXT(ctx->Exec, (texture, target, pname, params));
+ }
+}
+
+static void GLAPIENTRY
+save_TextureParameteriEXT(GLuint texture, GLenum target, GLenum pname, GLint param)
+{
+ GLint fparam[4];
+ fparam[0] = param;
+ fparam[1] = fparam[2] = fparam[3] = 0;
+ save_TextureParameterivEXT(texture, target, pname, fparam);
+}
+
+static void GLAPIENTRY
+save_TextureImage1DEXT(GLuint texture, 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_TextureImage1DEXT(ctx->Exec, (texture, target, level, components, width,
+ border, format, type, pixels));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_IMAGE1D, 8 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = components;
+ n[5].i = (GLint) width;
+ n[6].i = border;
+ n[7].e = format;
+ n[8].e = type;
+ save_pointer(&n[9],
+ unpack_image(ctx, 1, width, 1, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureImage1DEXT(ctx->Exec, (texture, target, level, components, width,
+ border, format, type, pixels));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_TextureImage2DEXT(GLuint texture, 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_TextureImage2DEXT(ctx->Exec, (texture, target, level, components, width,
+ height, border, format, type, pixels));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_IMAGE2D, 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = components;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = border;
+ n[8].e = format;
+ n[9].e = type;
+ save_pointer(&n[10],
+ unpack_image(ctx, 2, width, height, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureImage2DEXT(ctx->Exec, (texture, target, level, components, width,
+ height, border, format, type, pixels));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_TextureImage3DEXT(GLuint texture, 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_TextureImage3DEXT(ctx->Exec, (texture, target, level, internalFormat, width,
+ height, depth, border, format, type,
+ pixels));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_IMAGE3D, 10 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = (GLint) internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = (GLint) depth;
+ n[8].i = border;
+ n[9].e = format;
+ n[10].e = type;
+ save_pointer(&n[11],
+ unpack_image(ctx, 3, width, height, depth, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureImage3DEXT(ctx->Exec, (texture, target, level, internalFormat,
+ width, height, depth, border, format,
+ type, pixels));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_TextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid * pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE1D, 7 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = (GLint) width;
+ n[6].e = format;
+ n[7].e = type;
+ save_pointer(&n[8],
+ unpack_image(ctx, 1, width, 1, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureSubImage1DEXT(ctx->Exec, (texture, target, level, xoffset, width,
+ format, type, pixels));
+ }
+}
+
+
+static void GLAPIENTRY
+save_TextureSubImage2DEXT(GLuint texture, 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;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE2D, 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = (GLint) width;
+ n[7].i = (GLint) height;
+ n[8].e = format;
+ n[9].e = type;
+ save_pointer(&n[10],
+ unpack_image(ctx, 2, width, height, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureSubImage2DEXT(ctx->Exec, (texture, target, level, xoffset, yoffset,
+ width, height, format, type, pixels));
+ }
+}
+
+
+static void GLAPIENTRY
+save_TextureSubImage3DEXT(GLuint texture, 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;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE3D, 11 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = zoffset;
+ n[7].i = (GLint) width;
+ n[8].i = (GLint) height;
+ n[9].i = (GLint) depth;
+ n[10].e = format;
+ n[11].e = type;
+ save_pointer(&n[12],
+ unpack_image(ctx, 3, width, height, depth, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TextureSubImage3DEXT(ctx->Exec, (texture, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth, format, type,
+ pixels));
+ }
+}
+
+static void GLAPIENTRY
+save_CopyTextureImage1DEXT(GLuint texture, 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_TEXTURE_IMAGE1D, 8);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalformat;
+ n[5].i = x;
+ n[6].i = y;
+ n[7].i = width;
+ n[8].i = border;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyTextureImage1DEXT(ctx->Exec, (texture, target, level,
+ internalformat, x, y,
+ width, border));
+ }
+}
+
+static void GLAPIENTRY
+save_CopyTextureImage2DEXT(GLuint texture, 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_TEXTURE_IMAGE2D, 9);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalformat;
+ n[5].i = x;
+ n[6].i = y;
+ n[7].i = width;
+ n[8].i = height;
+ n[9].i = border;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyTextureImage2DEXT(ctx->Exec, (texture, target, level,
+ internalformat, x, y,
+ width, height, border));
+ }
+}
+
+static void GLAPIENTRY
+save_CopyTextureSubImage1DEXT(GLuint texture, 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_TEXTURE_SUB_IMAGE1D, 7);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = x;
+ n[6].i = y;
+ n[7].i = width;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyTextureSubImage1DEXT(ctx->Exec,
+ (texture, target, level, xoffset, x, y, width));
+ }
+}
+
+static void GLAPIENTRY
+save_CopyTextureSubImage2DEXT(GLuint texture, 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_TEXTURE_SUB_IMAGE2D, 9);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = x;
+ n[7].i = y;
+ n[8].i = width;
+ n[9].i = height;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyTextureSubImage2DEXT(ctx->Exec, (texture, target, level,
+ xoffset, yoffset,
+ x, y, width, height));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CopyTextureSubImage3DEXT(GLuint texture, 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_TEXTURE_SUB_IMAGE3D, 10);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = zoffset;
+ n[7].i = x;
+ n[8].i = y;
+ n[9].i = width;
+ n[10].i = height;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyTextureSubImage3DEXT(ctx->Exec, (texture, target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height));
+ }
+}
+
+
+static void GLAPIENTRY
+save_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BIND_MULTITEXTURE, 3);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].ui = texture;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BindMultiTextureEXT(ctx->Exec, (texunit, target, texture));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexParameterfvEXT(GLenum texunit, 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_MULTITEXPARAMETER_F, 7);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].e = pname;
+ n[4].f = params[0];
+ n[5].f = params[1];
+ n[6].f = params[2];
+ n[7].f = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexParameterfvEXT(ctx->Exec, (texunit, target, pname, params));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexParameterfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param)
+{
+ GLfloat parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_MultiTexParameterfvEXT(texunit, target, pname, parray);
+}
+
+static void GLAPIENTRY
+save_MultiTexParameterivEXT(GLenum texunit, 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_MULTITEXPARAMETER_I, 7);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].e = pname;
+ n[4].i = params[0];
+ n[5].i = params[1];
+ n[6].i = params[2];
+ n[7].i = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexParameterivEXT(ctx->Exec, (texunit, target, pname, params));
+ }
+}
+
+static void GLAPIENTRY
+save_MultiTexParameteriEXT(GLenum texunit, GLenum target, GLenum pname, GLint param)
+{
+ GLint fparam[4];
+ fparam[0] = param;
+ fparam[1] = fparam[2] = fparam[3] = 0;
+ save_MultiTexParameterivEXT(texunit, target, pname, fparam);
+}
+
+
+static void GLAPIENTRY
+save_MultiTexImage1DEXT(GLenum texunit, 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_MultiTexImage1DEXT(ctx->Exec, (texunit, target, level, components, width,
+ border, format, type, pixels));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_IMAGE1D, 8 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = components;
+ n[5].i = (GLint) width;
+ n[6].i = border;
+ n[7].e = format;
+ n[8].e = type;
+ save_pointer(&n[9],
+ unpack_image(ctx, 1, width, 1, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexImage1DEXT(ctx->Exec, (texunit, target, level, components, width,
+ border, format, type, pixels));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexImage2DEXT(GLenum texunit, 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_MultiTexImage2DEXT(ctx->Exec, (texunit, target, level, components, width,
+ height, border, format, type, pixels));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_IMAGE2D, 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = components;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = border;
+ n[8].e = format;
+ n[9].e = type;
+ save_pointer(&n[10],
+ unpack_image(ctx, 2, width, height, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexImage2DEXT(ctx->Exec, (texunit, target, level, components, width,
+ height, border, format, type, pixels));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexImage3DEXT(GLenum texunit, 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_MultiTexImage3DEXT(ctx->Exec, (texunit, target, level, internalFormat, width,
+ height, depth, border, format, type,
+ pixels));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_IMAGE3D, 10 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = (GLint) internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = (GLint) depth;
+ n[8].i = border;
+ n[9].e = format;
+ n[10].e = type;
+ save_pointer(&n[11],
+ unpack_image(ctx, 3, width, height, depth, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexImage3DEXT(ctx->Exec, (texunit, target, level, internalFormat,
+ width, height, depth, border, format,
+ type, pixels));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid * pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE1D, 7 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = (GLint) width;
+ n[6].e = format;
+ n[7].e = type;
+ save_pointer(&n[8],
+ unpack_image(ctx, 1, width, 1, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexSubImage1DEXT(ctx->Exec, (texunit, target, level, xoffset, width,
+ format, type, pixels));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexSubImage2DEXT(GLenum texunit, 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;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE2D, 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = (GLint) width;
+ n[7].i = (GLint) height;
+ n[8].e = format;
+ n[9].e = type;
+ save_pointer(&n[10],
+ unpack_image(ctx, 2, width, height, 1, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexSubImage2DEXT(ctx->Exec, (texunit, target, level, xoffset, yoffset,
+ width, height, format, type, pixels));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexSubImage3DEXT(GLenum texunit, 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;
+
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE3D, 11 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = zoffset;
+ n[7].i = (GLint) width;
+ n[8].i = (GLint) height;
+ n[9].i = (GLint) depth;
+ n[10].e = format;
+ n[11].e = type;
+ save_pointer(&n[12],
+ unpack_image(ctx, 3, width, height, depth, format, type,
+ pixels, &ctx->Unpack));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexSubImage3DEXT(ctx->Exec, (texunit, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth, format, type,
+ pixels));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CopyMultiTexImage1DEXT(GLenum texunit, 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_MULTITEX_IMAGE1D, 8);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalformat;
+ n[5].i = x;
+ n[6].i = y;
+ n[7].i = width;
+ n[8].i = border;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyMultiTexImage1DEXT(ctx->Exec, (texunit, target, level,
+ internalformat, x, y,
+ width, border));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CopyMultiTexImage2DEXT(GLenum texunit, 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_MULTITEX_IMAGE2D, 9);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalformat;
+ n[5].i = x;
+ n[6].i = y;
+ n[7].i = width;
+ n[8].i = height;
+ n[9].i = border;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyMultiTexImage2DEXT(ctx->Exec, (texunit, target, level,
+ internalformat, x, y,
+ width, height, border));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CopyMultiTexSubImage1DEXT(GLenum texunit, 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_MULTITEX_SUB_IMAGE1D, 7);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = x;
+ n[6].i = y;
+ n[7].i = width;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyMultiTexSubImage1DEXT(ctx->Exec,
+ (texunit, target, level, xoffset, x, y, width));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CopyMultiTexSubImage2DEXT(GLenum texunit, 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_MULTITEX_SUB_IMAGE2D, 9);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = x;
+ n[7].i = y;
+ n[8].i = width;
+ n[9].i = height;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyMultiTexSubImage2DEXT(ctx->Exec, (texunit, target, level,
+ xoffset, yoffset,
+ x, y, width, height));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CopyMultiTexSubImage3DEXT(GLenum texunit, 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_MULTITEX_SUB_IMAGE3D, 10);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = zoffset;
+ n[7].i = x;
+ n[8].i = y;
+ n[9].i = width;
+ n[10].i = height;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CopyMultiTexSubImage3DEXT(ctx->Exec, (texunit, target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexEnvfvEXT(GLenum texunit, 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_MULTITEXENV, 7);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].e = pname;
+ if (pname == GL_TEXTURE_ENV_COLOR) {
+ n[4].f = params[0];
+ n[5].f = params[1];
+ n[6].f = params[2];
+ n[7].f = params[3];
+ }
+ else {
+ n[4].f = params[0];
+ n[5].f = n[6].f = n[7].f = 0.0F;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_MultiTexEnvfvEXT(ctx->Exec, (texunit, target, pname, params));
+ }
+}
+
+
+static void GLAPIENTRY
+save_MultiTexEnvfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param)
+{
+ GLfloat parray[4];
+ parray[0] = (GLfloat) param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_MultiTexEnvfvEXT(texunit, target, pname, parray);
+}
+
+
+static void GLAPIENTRY
+save_MultiTexEnviEXT(GLenum texunit, GLenum target, GLenum pname, GLint param)
+{
+ GLfloat p[4];
+ p[0] = (GLfloat) param;
+ p[1] = p[2] = p[3] = 0.0F;
+ save_MultiTexEnvfvEXT(texunit, target, pname, p);
+}
+
+
+static void GLAPIENTRY
+save_MultiTexEnvivEXT(GLenum texunit, 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]);
+ }
+ else {
+ p[0] = (GLfloat) param[0];
+ p[1] = p[2] = p[3] = 0.0F;
+ }
+ save_MultiTexEnvfvEXT(texunit, target, pname, p);
+}
+
+
+static void GLAPIENTRY
+save_CompressedTextureImage1DEXT(GLuint texture, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLint border, GLsizei imageSize,
+ const GLvoid * data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (target == GL_PROXY_TEXTURE_1D) {
+ /* don't compile, execute immediately */
+ CALL_CompressedTextureImage1DEXT(ctx->Exec, (texture, target, level,
+ internalFormat, width,
+ border, imageSize,
+ data));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_IMAGE_1D,
+ 7 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = border;
+ n[7].i = imageSize;
+ save_pointer(&n[8],
+ copy_data(data, imageSize, "glCompressedTextureImage1DEXT"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedTextureImage1DEXT(ctx->Exec,
+ (texture, target, level, internalFormat,
+ width, border, imageSize, data));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_CompressedTextureImage2DEXT(GLuint texture, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLint border, GLsizei imageSize,
+ const GLvoid * data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (target == GL_PROXY_TEXTURE_2D) {
+ /* don't compile, execute immediately */
+ CALL_CompressedTextureImage2DEXT(ctx->Exec, (texture, target, level,
+ internalFormat, width, height,
+ border, imageSize, data));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_IMAGE_2D,
+ 8 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = border;
+ n[8].i = imageSize;
+ save_pointer(&n[9],
+ copy_data(data, imageSize, "glCompressedTextureImage2DEXT"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedTextureImage2DEXT(ctx->Exec,
+ (texture, target, level, internalFormat,
+ width, height, border, imageSize, data));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_CompressedTextureImage3DEXT(GLuint texture, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize, const GLvoid * data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (target == GL_PROXY_TEXTURE_3D) {
+ /* don't compile, execute immediately */
+ CALL_CompressedTextureImage3DEXT(ctx->Exec, (texture, target, level,
+ internalFormat, width,
+ height, depth, border,
+ imageSize, data));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_IMAGE_3D,
+ 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = (GLint) depth;
+ n[8].i = border;
+ n[9].i = imageSize;
+ save_pointer(&n[10],
+ copy_data(data, imageSize, "glCompressedTextureImage3DEXT"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedTextureImage3DEXT(ctx->Exec,
+ (texture, target, level, internalFormat,
+ width, height, depth, border, imageSize,
+ data));
+ }
+ }
+}
+
+
+static void GLAPIENTRY
+save_CompressedTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid * data)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_1D,
+ 7 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = (GLint) width;
+ n[6].e = format;
+ n[7].i = imageSize;
+ save_pointer(&n[8],
+ copy_data(data, imageSize, "glCompressedTextureSubImage1DEXT"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedTextureSubImage1DEXT(ctx->Exec, (texture, target, level, xoffset,
+ width, format, imageSize, data));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CompressedTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width, GLsizei height,
+ GLenum format, GLsizei imageSize,
+ const GLvoid * data)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D,
+ 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = (GLint) width;
+ n[7].i = (GLint) height;
+ n[8].e = format;
+ n[9].i = imageSize;
+ save_pointer(&n[10],
+ copy_data(data, imageSize, "glCompressedTextureSubImage2DEXT"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedTextureSubImage2DEXT(ctx->Exec,
+ (texture, target, level, xoffset, yoffset,
+ width, height, format, imageSize, data));
+ }
+}
+
+
+static void GLAPIENTRY
+save_CompressedTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth, GLenum format,
+ GLsizei imageSize, const GLvoid * data)
{
Node *n;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERIIV, 6);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_3D,
+ 11 + POINTER_DWORDS);
if (n) {
- n[1].ui = sampler;
- n[2].e = pname;
- n[3].i = params[0];
- if (pname == GL_TEXTURE_BORDER_COLOR) {
- n[4].i = params[1];
- n[5].i = params[2];
- n[6].i = params[3];
- }
- else {
- n[4].i = n[5].i = n[6].i = 0;
- }
+ n[1].ui = texture;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = zoffset;
+ n[7].i = (GLint) width;
+ n[8].i = (GLint) height;
+ n[9].i = (GLint) depth;
+ n[10].e = format;
+ n[11].i = imageSize;
+ save_pointer(&n[12],
+ copy_data(data, imageSize, "glCompressedTextureSubImage3DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_SamplerParameterIiv(ctx->Exec, (sampler, pname, params));
+ CALL_CompressedTextureSubImage3DEXT(ctx->Exec,
+ (texture, target, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data));
}
}
+
static void GLAPIENTRY
-save_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
+save_CompressedMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLint border, GLsizei imageSize,
+ const GLvoid * data)
{
- Node *n;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERUIV, 6);
- if (n) {
- n[1].ui = sampler;
- n[2].e = pname;
- n[3].ui = params[0];
- if (pname == GL_TEXTURE_BORDER_COLOR) {
- n[4].ui = params[1];
- n[5].ui = params[2];
- n[6].ui = params[3];
+ if (target == GL_PROXY_TEXTURE_1D) {
+ /* don't compile, execute immediately */
+ CALL_CompressedMultiTexImage1DEXT(ctx->Exec, (texunit, target, level,
+ internalFormat, width,
+ border, imageSize,
+ data));
+ }
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_IMAGE_1D,
+ 7 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = border;
+ n[7].i = imageSize;
+ save_pointer(&n[8],
+ copy_data(data, imageSize, "glCompressedMultiTexImage1DEXT"));
}
- else {
- n[4].ui = n[5].ui = n[6].ui = 0;
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedMultiTexImage1DEXT(ctx->Exec,
+ (texunit, target, level, internalFormat,
+ width, border, imageSize, data));
}
}
- if (ctx->ExecuteFlag) {
- CALL_SamplerParameterIuiv(ctx->Exec, (sampler, pname, params));
- }
}
+
static void GLAPIENTRY
-save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+save_CompressedMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLint border, GLsizei imageSize,
+ const GLvoid * data)
{
- Node *n;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_WAIT_SYNC, 4);
- if (n) {
- union uint64_pair p;
- p.uint64 = timeout;
- n[1].bf = flags;
- n[2].ui = p.uint32[0];
- n[3].ui = p.uint32[1];
- save_pointer(&n[4], sync);
+ if (target == GL_PROXY_TEXTURE_2D) {
+ /* don't compile, execute immediately */
+ CALL_CompressedMultiTexImage2DEXT(ctx->Exec, (texunit, target, level,
+ internalFormat, width, height,
+ border, imageSize, data));
}
- if (ctx->ExecuteFlag) {
- CALL_WaitSync(ctx->Exec, (sync, flags, timeout));
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_IMAGE_2D,
+ 8 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = border;
+ n[8].i = imageSize;
+ save_pointer(&n[9],
+ copy_data(data, imageSize, "glCompressedMultiTexImage2DEXT"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedMultiTexImage2DEXT(ctx->Exec,
+ (texunit, target, level, internalFormat,
+ width, height, border, imageSize, data));
+ }
}
}
-/** GL_NV_conditional_render */
static void GLAPIENTRY
-save_BeginConditionalRender(GLuint queryId, GLenum mode)
+save_CompressedMultiTexImage3DEXT(GLenum texunit, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize, const GLvoid * data)
{
GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_BEGIN_CONDITIONAL_RENDER, 2);
- if (n) {
- n[1].i = queryId;
- n[2].e = mode;
+ if (target == GL_PROXY_TEXTURE_3D) {
+ /* don't compile, execute immediately */
+ CALL_CompressedMultiTexImage3DEXT(ctx->Exec, (texunit, target, level,
+ internalFormat, width,
+ height, depth, border,
+ imageSize, data));
}
- if (ctx->ExecuteFlag) {
- CALL_BeginConditionalRender(ctx->Exec, (queryId, mode));
+ else {
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_IMAGE_3D,
+ 9 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].e = internalFormat;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].i = (GLint) depth;
+ n[8].i = border;
+ n[9].i = imageSize;
+ save_pointer(&n[10],
+ copy_data(data, imageSize, "glCompressedMultiTexImage3DEXT"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedMultiTexImage3DEXT(ctx->Exec,
+ (texunit, target, level, internalFormat,
+ width, height, depth, border, imageSize,
+ data));
+ }
}
}
+
static void GLAPIENTRY
-save_EndConditionalRender(void)
+save_CompressedMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid * data)
{
+ Node *n;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- alloc_instruction(ctx, OPCODE_END_CONDITIONAL_RENDER, 0);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_1D,
+ 7 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = (GLint) width;
+ n[6].e = format;
+ n[7].i = imageSize;
+ save_pointer(&n[8],
+ copy_data(data, imageSize, "glCompressedMultiTexSubImage1DEXT"));
+ }
if (ctx->ExecuteFlag) {
- CALL_EndConditionalRender(ctx->Exec, ());
+ CALL_CompressedMultiTexSubImage1DEXT(ctx->Exec, (texunit, target, level, xoffset,
+ width, format, imageSize, data));
}
}
+
static void GLAPIENTRY
-save_UniformBlockBinding(GLuint prog, GLuint index, GLuint binding)
+save_CompressedMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width, GLsizei height,
+ GLenum format, GLsizei imageSize,
+ const GLvoid * data)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_BLOCK_BINDING, 3);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_2D,
+ 9 + POINTER_DWORDS);
if (n) {
- n[1].ui = prog;
- n[2].ui = index;
- n[3].ui = binding;
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = (GLint) width;
+ n[7].i = (GLint) height;
+ n[8].e = format;
+ n[9].i = imageSize;
+ save_pointer(&n[10],
+ copy_data(data, imageSize, "glCompressedMultiTexSubImage2DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_UniformBlockBinding(ctx->Exec, (prog, index, binding));
+ CALL_CompressedMultiTexSubImage2DEXT(ctx->Exec,
+ (texunit, target, level, xoffset, yoffset,
+ width, height, format, imageSize, data));
}
}
-/** GL_EXT_window_rectangles */
+
static void GLAPIENTRY
-save_WindowRectanglesEXT(GLenum mode, GLsizei count, const GLint *box)
+save_CompressedMultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth, GLenum format,
+ GLsizei imageSize, const GLvoid * data)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_WINDOW_RECTANGLES, 2 + POINTER_DWORDS);
- if (n) {
- GLint *box_copy = NULL;
- if (count > 0)
- box_copy = memdup(box, sizeof(GLint) * 4 * count);
- n[1].e = mode;
- n[2].si = count;
- save_pointer(&n[3], box_copy);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_3D,
+ 11 + POINTER_DWORDS);
+ if (n) {
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].i = level;
+ n[4].i = xoffset;
+ n[5].i = yoffset;
+ n[6].i = zoffset;
+ n[7].i = (GLint) width;
+ n[8].i = (GLint) height;
+ n[9].i = (GLint) depth;
+ n[10].e = format;
+ n[11].i = imageSize;
+ save_pointer(&n[12],
+ copy_data(data, imageSize, "glCompressedMultiTexSubImage3DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_WindowRectanglesEXT(ctx->Exec, (mode, count, box));
+ CALL_CompressedMultiTexSubImage3DEXT(ctx->Exec,
+ (texunit, target, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data));
}
}
+
/**
* Save an error-generating command into display list.
*
case OPCODE_PASSTHROUGH:
CALL_PassThrough(ctx->Exec, (n[1].f));
break;
+ case OPCODE_PATCH_PARAMETER_I:
+ CALL_PatchParameteri(ctx->Exec, (n[1].e, n[2].i));
+ break;
+ case OPCODE_PATCH_PARAMETER_FV_INNER:
+ {
+ GLfloat params[2];
+ params[0] = n[2].f;
+ params[1] = n[3].f;
+ CALL_PatchParameterfv(ctx->Exec, (n[1].e, params));
+ }
+ break;
+ case OPCODE_PATCH_PARAMETER_FV_OUTER:
+ {
+ GLfloat params[4];
+ params[0] = n[2].f;
+ params[1] = n[3].f;
+ params[2] = n[4].f;
+ params[3] = n[5].f;
+ CALL_PatchParameterfv(ctx->Exec, (n[1].e, params));
+ }
+ break;
case OPCODE_PIXEL_MAP:
CALL_PixelMapfv(ctx->Exec,
(n[1].e, n[2].i, get_pointer(&n[3])));
case OPCODE_WINDOW_POS:
CALL_WindowPos4fMESA(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
break;
+ case OPCODE_VIEWPORT_ARRAY_V:
+ CALL_ViewportArrayv(ctx->Exec, (n[1].ui, n[2].si,
+ get_pointer(&n[3])));
+ break;
+ case OPCODE_VIEWPORT_INDEXED_F:
+ CALL_ViewportIndexedf(ctx->Exec, (n[1].ui, n[2].f, n[3].f, n[4].f,
+ n[5].f));
+ break;
+ case OPCODE_VIEWPORT_INDEXED_FV: {
+ GLfloat v[4];
+ v[0] = n[2].f;
+ v[1] = n[3].f;
+ v[2] = n[4].f;
+ v[3] = n[5].f;
+ CALL_ViewportIndexedfv(ctx->Exec, (n[1].ui, v));
+ break;
+ }
+ case OPCODE_SCISSOR_ARRAY_V:
+ CALL_ScissorArrayv(ctx->Exec, (n[1].ui, n[2].si,
+ get_pointer(&n[3])));
+ break;
+ case OPCODE_SCISSOR_INDEXED:
+ CALL_ScissorIndexed(ctx->Exec, (n[1].ui, n[2].i, n[3].i, n[4].si,
+ n[5].si));
+ break;
+ case OPCODE_SCISSOR_INDEXED_V: {
+ GLint v[4];
+ v[0] = n[2].i;
+ v[1] = n[3].i;
+ v[2] = n[4].si;
+ v[3] = n[5].si;
+ CALL_ScissorIndexedv(ctx->Exec, (n[1].ui, v));
+ break;
+ }
+ case OPCODE_DEPTH_ARRAY_V:
+ CALL_DepthRangeArrayv(ctx->Exec, (n[1].ui, n[2].si,
+ get_pointer(&n[3])));
+ break;
+ case OPCODE_DEPTH_INDEXED:
+ CALL_DepthRangeIndexed(ctx->Exec, (n[1].ui, n[2].f, n[3].f));
+ break;
case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */
CALL_ActiveTexture(ctx->Exec, (n[1].e));
break;
case OPCODE_ACTIVE_STENCIL_FACE_EXT:
CALL_ActiveStencilFaceEXT(ctx->Exec, (n[1].e));
break;
- case OPCODE_DEPTH_BOUNDS_EXT:
- CALL_DepthBoundsEXT(ctx->Exec, (n[1].f, n[2].f));
+ case OPCODE_DEPTH_BOUNDS_EXT:
+ CALL_DepthBoundsEXT(ctx->Exec, (n[1].f, n[2].f));
+ break;
+ case OPCODE_PROGRAM_STRING_ARB:
+ CALL_ProgramStringARB(ctx->Exec,
+ (n[1].e, n[2].e, n[3].i,
+ get_pointer(&n[4])));
+ 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));
+ break;
+ case OPCODE_BEGIN_QUERY_ARB:
+ CALL_BeginQuery(ctx->Exec, (n[1].e, n[2].ui));
+ break;
+ case OPCODE_END_QUERY_ARB:
+ CALL_EndQuery(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_QUERY_COUNTER:
+ CALL_QueryCounter(ctx->Exec, (n[1].ui, n[2].e));
+ break;
+ case OPCODE_BEGIN_QUERY_INDEXED:
+ CALL_BeginQueryIndexed(ctx->Exec, (n[1].e, n[2].ui, n[3].ui));
+ break;
+ case OPCODE_END_QUERY_INDEXED:
+ CALL_EndQueryIndexed(ctx->Exec, (n[1].e, n[2].ui));
+ break;
+ 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_DrawBuffers(ctx->Exec, (n[1].i, buffers));
+ }
+ break;
+ case OPCODE_BLIT_FRAMEBUFFER:
+ CALL_BlitFramebuffer(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i,
+ n[5].i, n[6].i, n[7].i, n[8].i,
+ n[9].i, n[10].e));
+ break;
+ case OPCODE_PRIMITIVE_RESTART_NV:
+ CALL_PrimitiveRestartNV(ctx->Exec, ());
+ break;
+
+ case OPCODE_USE_PROGRAM:
+ CALL_UseProgram(ctx->Exec, (n[1].ui));
+ break;
+ case OPCODE_UNIFORM_1F:
+ CALL_Uniform1f(ctx->Exec, (n[1].i, n[2].f));
+ break;
+ case OPCODE_UNIFORM_2F:
+ CALL_Uniform2f(ctx->Exec, (n[1].i, n[2].f, n[3].f));
+ break;
+ case OPCODE_UNIFORM_3F:
+ CALL_Uniform3f(ctx->Exec, (n[1].i, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_UNIFORM_4F:
+ CALL_Uniform4f(ctx->Exec,
+ (n[1].i, n[2].f, n[3].f, n[4].f, n[5].f));
+ break;
+ case OPCODE_UNIFORM_1FV:
+ CALL_Uniform1fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_2FV:
+ CALL_Uniform2fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_3FV:
+ CALL_Uniform3fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_4FV:
+ CALL_Uniform4fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_1D: {
+ union float64_pair x;
+
+ x.uint32[0] = n[2].ui;
+ x.uint32[1] = n[3].ui;
+
+ CALL_Uniform1d(ctx->Exec, (n[1].i, x.d));
+ break;
+ }
+ case OPCODE_UNIFORM_2D: {
+ union float64_pair x;
+ union float64_pair y;
+
+ x.uint32[0] = n[2].ui;
+ x.uint32[1] = n[3].ui;
+ y.uint32[0] = n[4].ui;
+ y.uint32[1] = n[5].ui;
+
+ CALL_Uniform2d(ctx->Exec, (n[1].i, x.d, y.d));
+ break;
+ }
+ case OPCODE_UNIFORM_3D: {
+ union float64_pair x;
+ union float64_pair y;
+ union float64_pair z;
+
+ x.uint32[0] = n[2].ui;
+ x.uint32[1] = n[3].ui;
+ y.uint32[0] = n[4].ui;
+ y.uint32[1] = n[5].ui;
+ z.uint32[0] = n[6].ui;
+ z.uint32[1] = n[7].ui;
+
+ CALL_Uniform3d(ctx->Exec, (n[1].i, x.d, y.d, z.d));
+ break;
+ }
+ case OPCODE_UNIFORM_4D: {
+ union float64_pair x;
+ union float64_pair y;
+ union float64_pair z;
+ union float64_pair w;
+
+ x.uint32[0] = n[2].ui;
+ x.uint32[1] = n[3].ui;
+ y.uint32[0] = n[4].ui;
+ y.uint32[1] = n[5].ui;
+ z.uint32[0] = n[6].ui;
+ z.uint32[1] = n[7].ui;
+ w.uint32[0] = n[8].ui;
+ w.uint32[1] = n[9].ui;
+
+ CALL_Uniform4d(ctx->Exec, (n[1].i, x.d, y.d, z.d, w.d));
+ break;
+ }
+ case OPCODE_UNIFORM_1DV:
+ CALL_Uniform1dv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_2DV:
+ CALL_Uniform2dv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_3DV:
+ CALL_Uniform3dv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_4DV:
+ CALL_Uniform4dv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_1I:
+ CALL_Uniform1i(ctx->Exec, (n[1].i, n[2].i));
+ break;
+ case OPCODE_UNIFORM_2I:
+ CALL_Uniform2i(ctx->Exec, (n[1].i, n[2].i, n[3].i));
+ break;
+ case OPCODE_UNIFORM_3I:
+ CALL_Uniform3i(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));
+ break;
+ case OPCODE_UNIFORM_4I:
+ CALL_Uniform4i(ctx->Exec,
+ (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i));
+ break;
+ case OPCODE_UNIFORM_1IV:
+ CALL_Uniform1iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_2IV:
+ CALL_Uniform2iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_3IV:
+ CALL_Uniform3iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_4IV:
+ CALL_Uniform4iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_1UI:
+ CALL_Uniform1ui(ctx->Exec, (n[1].i, n[2].i));
+ break;
+ case OPCODE_UNIFORM_2UI:
+ CALL_Uniform2ui(ctx->Exec, (n[1].i, n[2].i, n[3].i));
+ break;
+ case OPCODE_UNIFORM_3UI:
+ CALL_Uniform3ui(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));
+ break;
+ case OPCODE_UNIFORM_4UI:
+ CALL_Uniform4ui(ctx->Exec,
+ (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i));
+ break;
+ case OPCODE_UNIFORM_1UIV:
+ CALL_Uniform1uiv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_2UIV:
+ CALL_Uniform2uiv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_3UIV:
+ CALL_Uniform3uiv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_4UIV:
+ CALL_Uniform4uiv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_MATRIX22:
+ CALL_UniformMatrix2fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- case OPCODE_PROGRAM_STRING_ARB:
- CALL_ProgramStringARB(ctx->Exec,
- (n[1].e, n[2].e, n[3].i,
- get_pointer(&n[4])));
+ case OPCODE_UNIFORM_MATRIX33:
+ CALL_UniformMatrix3fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
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));
+ case OPCODE_UNIFORM_MATRIX44:
+ CALL_UniformMatrix4fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- case OPCODE_BEGIN_QUERY_ARB:
- CALL_BeginQuery(ctx->Exec, (n[1].e, n[2].ui));
+ case OPCODE_UNIFORM_MATRIX23:
+ CALL_UniformMatrix2x3fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- case OPCODE_END_QUERY_ARB:
- CALL_EndQuery(ctx->Exec, (n[1].e));
+ case OPCODE_UNIFORM_MATRIX32:
+ CALL_UniformMatrix3x2fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- case OPCODE_QUERY_COUNTER:
- CALL_QueryCounter(ctx->Exec, (n[1].ui, n[2].e));
+ case OPCODE_UNIFORM_MATRIX24:
+ CALL_UniformMatrix2x4fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- case OPCODE_BEGIN_QUERY_INDEXED:
- CALL_BeginQueryIndexed(ctx->Exec, (n[1].e, n[2].ui, n[3].ui));
+ case OPCODE_UNIFORM_MATRIX42:
+ CALL_UniformMatrix4x2fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- case OPCODE_END_QUERY_INDEXED:
- CALL_EndQueryIndexed(ctx->Exec, (n[1].e, n[2].ui));
+ case OPCODE_UNIFORM_MATRIX34:
+ CALL_UniformMatrix3x4fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- 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_DrawBuffers(ctx->Exec, (n[1].i, buffers));
- }
+ case OPCODE_UNIFORM_MATRIX43:
+ CALL_UniformMatrix4x3fv(ctx->Exec,
+ (n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
- case OPCODE_BLIT_FRAMEBUFFER:
- CALL_BlitFramebuffer(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i,
- n[5].i, n[6].i, n[7].i, n[8].i,
- n[9].i, n[10].e));
- break;
- case OPCODE_USE_PROGRAM:
- CALL_UseProgram(ctx->Exec, (n[1].ui));
- break;
- case OPCODE_UNIFORM_1F:
- CALL_Uniform1f(ctx->Exec, (n[1].i, n[2].f));
- break;
- case OPCODE_UNIFORM_2F:
- CALL_Uniform2f(ctx->Exec, (n[1].i, n[2].f, n[3].f));
- break;
- case OPCODE_UNIFORM_3F:
- CALL_Uniform3f(ctx->Exec, (n[1].i, n[2].f, n[3].f, n[4].f));
- break;
- case OPCODE_UNIFORM_4F:
- CALL_Uniform4f(ctx->Exec,
- (n[1].i, n[2].f, n[3].f, n[4].f, n[5].f));
- break;
- case OPCODE_UNIFORM_1FV:
- CALL_Uniform1fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_2FV:
- CALL_Uniform2fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_3FV:
- CALL_Uniform3fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_4FV:
- CALL_Uniform4fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_1I:
- CALL_Uniform1i(ctx->Exec, (n[1].i, n[2].i));
- break;
- case OPCODE_UNIFORM_2I:
- CALL_Uniform2i(ctx->Exec, (n[1].i, n[2].i, n[3].i));
- break;
- case OPCODE_UNIFORM_3I:
- CALL_Uniform3i(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));
- break;
- case OPCODE_UNIFORM_4I:
- CALL_Uniform4i(ctx->Exec,
- (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i));
- break;
- case OPCODE_UNIFORM_1IV:
- CALL_Uniform1iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_2IV:
- CALL_Uniform2iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_3IV:
- CALL_Uniform3iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_4IV:
- CALL_Uniform4iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
- break;
- case OPCODE_UNIFORM_1UI:
- /*CALL_Uniform1uiARB(ctx->Exec, (n[1].i, n[2].i));*/
- break;
- case OPCODE_UNIFORM_2UI:
- /*CALL_Uniform2uiARB(ctx->Exec, (n[1].i, n[2].i, n[3].i));*/
- break;
- case OPCODE_UNIFORM_3UI:
- /*CALL_Uniform3uiARB(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));*/
- break;
- case OPCODE_UNIFORM_4UI:
- /*CALL_Uniform4uiARB(ctx->Exec,
- (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i));
- */
- break;
- case OPCODE_UNIFORM_1UIV:
- /*CALL_Uniform1uivARB(ctx->Exec, (n[1].i, n[2].i,
- get_pointer(&n[3])));*/
- break;
- case OPCODE_UNIFORM_2UIV:
- /*CALL_Uniform2uivARB(ctx->Exec, (n[1].i, n[2].i,
- get_pointer(&n[3])));*/
- break;
- case OPCODE_UNIFORM_3UIV:
- /*CALL_Uniform3uivARB(ctx->Exec, (n[1].i, n[2].i,
- get_pointer(&n[3])));*/
- break;
- case OPCODE_UNIFORM_4UIV:
- /*CALL_Uniform4uivARB(ctx->Exec, (n[1].i, n[2].i,
- get_pointer(&n[3])));*/
- break;
- case OPCODE_UNIFORM_MATRIX22:
- CALL_UniformMatrix2fv(ctx->Exec,
+ case OPCODE_UNIFORM_MATRIX22D:
+ CALL_UniformMatrix2dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX33:
- CALL_UniformMatrix3fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX33D:
+ CALL_UniformMatrix3dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX44:
- CALL_UniformMatrix4fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX44D:
+ CALL_UniformMatrix4dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX23:
- CALL_UniformMatrix2x3fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX23D:
+ CALL_UniformMatrix2x3dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX32:
- CALL_UniformMatrix3x2fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX32D:
+ CALL_UniformMatrix3x2dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX24:
- CALL_UniformMatrix2x4fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX24D:
+ CALL_UniformMatrix2x4dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX42:
- CALL_UniformMatrix4x2fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX42D:
+ CALL_UniformMatrix4x2dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX34:
- CALL_UniformMatrix3x4fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX34D:
+ CALL_UniformMatrix3x4dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
- case OPCODE_UNIFORM_MATRIX43:
- CALL_UniformMatrix4x3fv(ctx->Exec,
+ break;
+ case OPCODE_UNIFORM_MATRIX43D:
+ CALL_UniformMatrix4x3dv(ctx->Exec,
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
- break;
+ break;
- case OPCODE_USE_PROGRAM_STAGES:
- CALL_UseProgramStages(ctx->Exec, (n[1].ui, n[2].ui, n[3].ui));
- break;
+ case OPCODE_USE_PROGRAM_STAGES:
+ CALL_UseProgramStages(ctx->Exec, (n[1].ui, n[2].ui, n[3].ui));
+ break;
case OPCODE_PROGRAM_UNIFORM_1F:
CALL_ProgramUniform1f(ctx->Exec, (n[1].ui, n[2].i, n[3].f));
break;
CALL_ProgramUniform4fv(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
get_pointer(&n[4])));
break;
+ case OPCODE_PROGRAM_UNIFORM_1D: {
+ union float64_pair x;
+
+ x.uint32[0] = n[3].ui;
+ x.uint32[1] = n[4].ui;
+
+ CALL_ProgramUniform1d(ctx->Exec, (n[1].ui, n[2].i, x.d));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_2D: {
+ union float64_pair x;
+ union float64_pair y;
+
+ x.uint32[0] = n[3].ui;
+ x.uint32[1] = n[4].ui;
+ y.uint32[0] = n[5].ui;
+ y.uint32[1] = n[6].ui;
+
+ CALL_ProgramUniform2d(ctx->Exec, (n[1].ui, n[2].i, x.d, y.d));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_3D: {
+ union float64_pair x;
+ union float64_pair y;
+ union float64_pair z;
+
+ x.uint32[0] = n[3].ui;
+ x.uint32[1] = n[4].ui;
+ y.uint32[0] = n[5].ui;
+ y.uint32[1] = n[6].ui;
+ z.uint32[0] = n[7].ui;
+ z.uint32[1] = n[8].ui;
+
+ CALL_ProgramUniform3d(ctx->Exec, (n[1].ui, n[2].i,
+ x.d, y.d, z.d));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_4D: {
+ union float64_pair x;
+ union float64_pair y;
+ union float64_pair z;
+ union float64_pair w;
+
+ x.uint32[0] = n[3].ui;
+ x.uint32[1] = n[4].ui;
+ y.uint32[0] = n[5].ui;
+ y.uint32[1] = n[6].ui;
+ z.uint32[0] = n[7].ui;
+ z.uint32[1] = n[8].ui;
+ w.uint32[0] = n[9].ui;
+ w.uint32[1] = n[10].ui;
+
+ CALL_ProgramUniform4d(ctx->Exec, (n[1].ui, n[2].i,
+ x.d, y.d, z.d, w.d));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_1DV:
+ CALL_ProgramUniform1dv(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_2DV:
+ CALL_ProgramUniform2dv(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_3DV:
+ CALL_ProgramUniform3dv(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_4DV:
+ CALL_ProgramUniform4dv(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
case OPCODE_PROGRAM_UNIFORM_1I:
CALL_ProgramUniform1i(ctx->Exec, (n[1].ui, n[2].i, n[3].i));
break;
(n[1].ui, n[2].i, n[3].i, n[4].b,
get_pointer(&n[5])));
break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX22D:
+ CALL_ProgramUniformMatrix2dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX23D:
+ CALL_ProgramUniformMatrix2x3dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX24D:
+ CALL_ProgramUniformMatrix2x4dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX32D:
+ CALL_ProgramUniformMatrix3x2dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX33D:
+ CALL_ProgramUniformMatrix3dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX34D:
+ CALL_ProgramUniformMatrix3x4dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX42D:
+ CALL_ProgramUniformMatrix4x2dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX43D:
+ CALL_ProgramUniformMatrix4x3dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_MATRIX44D:
+ CALL_ProgramUniformMatrix4dv(ctx->Exec,
+ (n[1].ui, n[2].i, n[3].i, n[4].b,
+ get_pointer(&n[5])));
+ break;
case OPCODE_CLIP_CONTROL:
CALL_ClipControl(ctx->Exec, (n[1].e, n[2].e));
case OPCODE_ATTR_4F_ARB:
CALL_VertexAttrib4fvARB(ctx->Exec, (n[1].e, &n[2].f));
break;
+ case OPCODE_ATTR_1D: {
+ GLdouble *d = (GLdouble *) &n[2];
+ CALL_VertexAttribL1d(ctx->Exec, (n[1].ui, *d));
+ break;
+ }
+ case OPCODE_ATTR_2D: {
+ GLdouble *d = (GLdouble *) &n[2];
+ CALL_VertexAttribL2dv(ctx->Exec, (n[1].ui, d));
+ break;
+ }
+ case OPCODE_ATTR_3D: {
+ GLdouble *d = (GLdouble *) &n[2];
+ CALL_VertexAttribL3dv(ctx->Exec, (n[1].ui, d));
+ break;
+ }
+ case OPCODE_ATTR_4D: {
+ GLdouble *d = (GLdouble *) &n[2];
+ CALL_VertexAttribL4dv(ctx->Exec, (n[1].ui, d));
+ break;
+ }
case OPCODE_MATERIAL:
CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, &n[3].f));
break;
}
break;
+ /* ARB_compute_shader */
+ case OPCODE_DISPATCH_COMPUTE:
+ CALL_DispatchCompute(ctx->Exec, (n[1].ui, n[2].ui, n[3].ui));
+ break;
+
/* GL_ARB_sync */
case OPCODE_WAIT_SYNC:
{
CALL_UniformBlockBinding(ctx->Exec, (n[1].ui, n[2].ui, n[3].ui));
break;
+ case OPCODE_UNIFORM_SUBROUTINES:
+ CALL_UniformSubroutinesuiv(ctx->Exec, (n[1].e, n[2].si,
+ get_pointer(&n[3])));
+ break;
+
/* GL_EXT_window_rectangles */
case OPCODE_WINDOW_RECTANGLES:
CALL_WindowRectanglesEXT(
ctx->Exec, (n[1].e, n[2].si, get_pointer(&n[3])));
break;
+ /* GL_NV_conservative_raster */
+ case OPCODE_SUBPIXEL_PRECISION_BIAS:
+ CALL_SubpixelPrecisionBiasNV(ctx->Exec, (n[1].ui, n[2].ui));
+ break;
+
+ /* GL_NV_conservative_raster_dilate */
+ case OPCODE_CONSERVATIVE_RASTER_PARAMETER_F:
+ CALL_ConservativeRasterParameterfNV(ctx->Exec, (n[1].e, n[2].f));
+ break;
+
+ /* GL_NV_conservative_raster_pre_snap_triangles */
+ case OPCODE_CONSERVATIVE_RASTER_PARAMETER_I:
+ CALL_ConservativeRasterParameteriNV(ctx->Exec, (n[1].e, n[2].i));
+ break;
+
+ /* GL_EXT_direct_state_access */
+ case OPCODE_MATRIX_LOAD:
+ CALL_MatrixLoadfEXT(ctx->Exec, (n[1].e, &n[2].f));
+ break;
+ case OPCODE_MATRIX_MULT:
+ CALL_MatrixMultfEXT(ctx->Exec, (n[1].e, &n[2].f));
+ break;
+ case OPCODE_MATRIX_ROTATE:
+ CALL_MatrixRotatefEXT(ctx->Exec, (n[1].e, n[2].f, n[3].f, n[4].f, n[5].f));
+ break;
+ case OPCODE_MATRIX_SCALE:
+ CALL_MatrixScalefEXT(ctx->Exec, (n[1].e, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_MATRIX_TRANSLATE:
+ CALL_MatrixTranslatefEXT(ctx->Exec, (n[1].e, n[2].f, n[3].f, n[4].f));
+ break;
+ case OPCODE_MATRIX_LOAD_IDENTITY:
+ CALL_MatrixLoadIdentityEXT(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_MATRIX_ORTHO:
+ CALL_MatrixOrthoEXT(ctx->Exec, (n[1].e,
+ n[2].f, n[3].f, n[4].f,
+ n[5].f, n[6].f, n[7].f));
+ break;
+ case OPCODE_MATRIX_FRUSTUM:
+ CALL_MatrixFrustumEXT(ctx->Exec, (n[1].e,
+ n[2].f, n[3].f, n[4].f,
+ n[5].f, n[6].f, n[7].f));
+ break;
+ case OPCODE_MATRIX_PUSH:
+ CALL_MatrixPushEXT(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_MATRIX_POP:
+ CALL_MatrixPopEXT(ctx->Exec, (n[1].e));
+ break;
+ case OPCODE_TEXTUREPARAMETER_F:
+ {
+ GLfloat params[4];
+ params[0] = n[4].f;
+ params[1] = n[5].f;
+ params[2] = n[6].f;
+ params[3] = n[7].f;
+ CALL_TextureParameterfvEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].e, params));
+ }
+ break;
+ case OPCODE_TEXTUREPARAMETER_I:
+ {
+ GLint params[4];
+ params[0] = n[4].i;
+ params[1] = n[5].i;
+ params[2] = n[6].i;
+ params[3] = n[7].i;
+ CALL_TextureParameterivEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].e, params));
+ }
+ break;
+ case OPCODE_TEXTURE_IMAGE1D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_TextureImage1DEXT(ctx->Exec, (n[1].ui, /* texture */
+ n[2].e, /* target */
+ n[3].i, /* level */
+ n[4].i, /* components */
+ n[5].i, /* width */
+ n[6].e, /* border */
+ n[7].e, /* format */
+ n[8].e, /* type */
+ get_pointer(&n[9])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_TEXTURE_IMAGE2D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_TextureImage2DEXT(ctx->Exec, (n[1].ui, /* texture */
+ n[2].e, /* target */
+ n[3].i, /* level */
+ n[4].i, /* components */
+ n[5].i, /* width */
+ n[6].i, /* height */
+ n[7].e, /* border */
+ n[8].e, /* format */
+ n[9].e, /* type */
+ get_pointer(&n[10])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_TEXTURE_IMAGE3D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_TextureImage3DEXT(ctx->Exec, (n[1].ui, /* texture */
+ n[2].e, /* target */
+ n[3].i, /* level */
+ n[4].i, /* components */
+ n[5].i, /* width */
+ n[6].i, /* height */
+ n[7].i, /* depth */
+ n[8].e, /* border */
+ n[9].e, /* format */
+ n[10].e, /* type */
+ get_pointer(&n[11])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_TEXTURE_SUB_IMAGE1D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_TextureSubImage1DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].e,
+ n[7].e, get_pointer(&n[8])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_TEXTURE_SUB_IMAGE2D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_TextureSubImage2DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].e,
+ n[7].i, n[8].e, n[9].e,
+ get_pointer(&n[10])));
+ ctx->Unpack = save;
+ }
+ break;
+ case OPCODE_TEXTURE_SUB_IMAGE3D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_TextureSubImage3DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i,
+ n[10].e, n[11].e,
+ get_pointer(&n[12])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_COPY_TEXTURE_IMAGE1D:
+ CALL_CopyTextureImage1DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i));
+ break;
+ case OPCODE_COPY_TEXTURE_IMAGE2D:
+ CALL_CopyTextureImage2DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i));
+ break;
+ case OPCODE_COPY_TEXTURE_SUB_IMAGE1D:
+ CALL_CopyTextureSubImage1DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i));
+ break;
+ case OPCODE_COPY_TEXTURE_SUB_IMAGE2D:
+ CALL_CopyTextureSubImage2DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i));
+ break;
+ case OPCODE_COPY_TEXTURE_SUB_IMAGE3D:
+ CALL_CopyTextureSubImage3DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i,
+ n[10].i));
+ break;
+ case OPCODE_BIND_MULTITEXTURE:
+ CALL_BindMultiTextureEXT(ctx->Exec, (n[1].e, n[2].e, n[3].ui));
+ break;
+ case OPCODE_MULTITEXPARAMETER_F:
+ {
+ GLfloat params[4];
+ params[0] = n[4].f;
+ params[1] = n[5].f;
+ params[2] = n[6].f;
+ params[3] = n[7].f;
+ CALL_MultiTexParameterfvEXT(ctx->Exec, (n[1].e, n[2].e, n[3].e, params));
+ }
+ break;
+ case OPCODE_MULTITEXPARAMETER_I:
+ {
+ GLint params[4];
+ params[0] = n[4].i;
+ params[1] = n[5].i;
+ params[2] = n[6].i;
+ params[3] = n[7].i;
+ CALL_MultiTexParameterivEXT(ctx->Exec, (n[1].e, n[2].e, n[3].e, params));
+ }
+ break;
+ case OPCODE_MULTITEX_IMAGE1D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexImage1DEXT(ctx->Exec, (n[1].e, /* texture */
+ n[2].e, /* target */
+ n[3].i, /* level */
+ n[4].i, /* components */
+ n[5].i, /* width */
+ n[6].e, /* border */
+ n[7].e, /* format */
+ n[8].e, /* type */
+ get_pointer(&n[9])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_MULTITEX_IMAGE2D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexImage2DEXT(ctx->Exec, (n[1].e, /* texture */
+ n[2].e, /* target */
+ n[3].i, /* level */
+ n[4].i, /* components */
+ n[5].i, /* width */
+ n[6].i, /* height */
+ n[7].e, /* border */
+ n[8].e, /* format */
+ n[9].e, /* type */
+ get_pointer(&n[10])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_MULTITEX_IMAGE3D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexImage3DEXT(ctx->Exec, (n[1].e, /* texture */
+ n[2].e, /* target */
+ n[3].i, /* level */
+ n[4].i, /* components */
+ n[5].i, /* width */
+ n[6].i, /* height */
+ n[7].i, /* depth */
+ n[8].e, /* border */
+ n[9].e, /* format */
+ n[10].e, /* type */
+ get_pointer(&n[11])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_MULTITEX_SUB_IMAGE1D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexSubImage1DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].e,
+ n[7].e, get_pointer(&n[8])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_MULTITEX_SUB_IMAGE2D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexSubImage2DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].e,
+ n[7].i, n[8].e, n[9].e,
+ get_pointer(&n[10])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_MULTITEX_SUB_IMAGE3D:
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_MultiTexSubImage3DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i,
+ n[10].e, n[11].e,
+ get_pointer(&n[12])));
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_COPY_MULTITEX_IMAGE1D:
+ CALL_CopyMultiTexImage1DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i));
+ break;
+ case OPCODE_COPY_MULTITEX_IMAGE2D:
+ CALL_CopyMultiTexImage2DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i));
+ break;
+ case OPCODE_COPY_MULTITEX_SUB_IMAGE1D:
+ CALL_CopyMultiTexSubImage1DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i));
+ break;
+ case OPCODE_COPY_MULTITEX_SUB_IMAGE2D:
+ CALL_CopyMultiTexSubImage2DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i));
+ break;
+ case OPCODE_COPY_MULTITEX_SUB_IMAGE3D:
+ CALL_CopyMultiTexSubImage3DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].i, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i,
+ n[10].i));
+ break;
+ case OPCODE_MULTITEXENV:
+ {
+ GLfloat params[4];
+ params[0] = n[4].f;
+ params[1] = n[5].f;
+ params[2] = n[6].f;
+ params[3] = n[7].f;
+ CALL_MultiTexEnvfvEXT(ctx->Exec, (n[1].e, n[2].e, n[3].e, params));
+ }
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_IMAGE_1D:
+ CALL_CompressedTextureImage1DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, get_pointer(&n[8])));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_IMAGE_2D:
+ CALL_CompressedTextureImage2DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i,
+ get_pointer(&n[9])));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_IMAGE_3D:
+ CALL_CompressedTextureImage3DEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i,
+ get_pointer(&n[10])));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_1D:
+ CALL_CompressedTextureSubImage1DEXT(ctx->Exec,
+ (n[1].ui, n[2].e, n[3].i, n[4].i,
+ n[5].i, n[6].e, n[7].i,
+ get_pointer(&n[8])));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D:
+ CALL_CompressedTextureSubImage2DEXT(ctx->Exec,
+ (n[1].ui, n[2].e, n[3].i, n[4].i,
+ n[5].i, n[6].i, n[7].i, n[8].e,
+ n[9].i, get_pointer(&n[10])));
+ break;
+ case OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_3D:
+ CALL_CompressedTextureSubImage3DEXT(ctx->Exec,
+ (n[1].ui, n[2].e, n[3].i, n[4].i,
+ n[5].i, n[6].i, n[7].i, n[8].i,
+ n[9].i, n[10].e, n[11].i,
+ get_pointer(&n[12])));
+ break;
+ case OPCODE_COMPRESSED_MULTITEX_IMAGE_1D:
+ CALL_CompressedMultiTexImage1DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, get_pointer(&n[8])));
+ break;
+ case OPCODE_COMPRESSED_MULTITEX_IMAGE_2D:
+ CALL_CompressedMultiTexImage2DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i,
+ get_pointer(&n[9])));
+ break;
+ case OPCODE_COMPRESSED_MULTITEX_IMAGE_3D:
+ CALL_CompressedMultiTexImage3DEXT(ctx->Exec, (n[1].e, n[2].e, n[3].i,
+ n[4].e, n[5].i, n[6].i,
+ n[7].i, n[8].i, n[9].i,
+ get_pointer(&n[10])));
+ break;
+ case OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_1D:
+ CALL_CompressedMultiTexSubImage1DEXT(ctx->Exec,
+ (n[1].e, n[2].e, n[3].i, n[4].i,
+ n[5].i, n[6].e, n[7].i,
+ get_pointer(&n[8])));
+ break;
+ case OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_2D:
+ CALL_CompressedMultiTexSubImage2DEXT(ctx->Exec,
+ (n[1].e, n[2].e, n[3].i, n[4].i,
+ n[5].i, n[6].i, n[7].i, n[8].e,
+ n[9].i, get_pointer(&n[10])));
+ break;
+ case OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_3D:
+ CALL_CompressedMultiTexSubImage3DEXT(ctx->Exec,
+ (n[1].e, n[2].e, n[3].i, n[4].i,
+ n[5].i, n[6].i, n[7].i, n[8].i,
+ n[9].i, n[10].e, n[11].i,
+ get_pointer(&n[12])));
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) get_pointer(&n[1]);
break;
/* increment n to point to next compiled command */
if (opcode != OPCODE_CONTINUE) {
+ assert(InstSize[opcode] > 0);
n += InstSize[opcode];
}
}
vbo_save_NewList(ctx, name, mode);
- ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Save;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
/**
- * End definition of current display list.
+ * End definition of current display list.
*/
void GLAPIENTRY
_mesa_EndList(void)
_mesa_error(ctx, GL_INVALID_OPERATION, "glEndList");
return;
}
-
+
/* Call before emitting END_OF_LIST, in case the driver wants to
* emit opcodes itself.
*/
ctx->ExecuteFlag = GL_TRUE;
ctx->CompileFlag = GL_FALSE;
- ctx->CurrentDispatch = ctx->Exec;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Exec;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
- ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Save;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
}
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
- ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Save;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
}
SET_StencilMaskSeparate(table, save_StencilMaskSeparate);
SET_StencilOpSeparate(table, save_StencilOpSeparate);
- /* ATI_separate_stencil */
+ /* ATI_separate_stencil */
SET_StencilFuncSeparateATI(table, save_StencilFuncSeparateATI);
/* GL_ARB_imaging */
SET_BlendColorEXT(table, save_BlendColorEXT);
#endif
- /* 3. GL_EXT_polygon_offset */
- SET_PolygonOffsetEXT(table, save_PolygonOffsetEXT);
-
/* 6. GL_EXT_texture3d */
#if 0
SET_CopyTexSubImage3DEXT(table, save_CopyTexSubImage3D);
SET_PointParameterf(table, save_PointParameterfEXT);
SET_PointParameterfv(table, save_PointParameterfvEXT);
+ /* 91. GL_ARB_tessellation_shader */
+ SET_PatchParameteri(table, save_PatchParameteri);
+ SET_PatchParameterfv(table, save_PatchParameterfv);
+
+ /* 100. ARB_viewport_array */
+ SET_ViewportArrayv(table, save_ViewportArrayv);
+ SET_ViewportIndexedf(table, save_ViewportIndexedf);
+ SET_ViewportIndexedfv(table, save_ViewportIndexedfv);
+ SET_ScissorArrayv(table, save_ScissorArrayv);
+ SET_ScissorIndexed(table, save_ScissorIndexed);
+ SET_ScissorIndexedv(table, save_ScissorIndexedv);
+ SET_DepthRangeArrayv(table, save_DepthRangeArrayv);
+ SET_DepthRangeIndexed(table, save_DepthRangeIndexed);
+
+ /* 122. ARB_compute_shader */
+ SET_DispatchCompute(table, save_DispatchCompute);
+ SET_DispatchComputeIndirect(table, save_DispatchComputeIndirect);
+
/* 173. GL_EXT_blend_func_separate */
SET_BlendFuncSeparate(table, save_BlendFuncSeparateEXT);
SET_ClearBufferuiv(table, save_ClearBufferuiv);
SET_ClearBufferfv(table, save_ClearBufferfv);
SET_ClearBufferfi(table, save_ClearBufferfi);
-#if 0
SET_Uniform1ui(table, save_Uniform1ui);
SET_Uniform2ui(table, save_Uniform2ui);
SET_Uniform3ui(table, save_Uniform3ui);
SET_Uniform2uiv(table, save_Uniform2uiv);
SET_Uniform3uiv(table, save_Uniform3uiv);
SET_Uniform4uiv(table, save_Uniform4uiv);
-#else
- (void) save_Uniform1ui;
- (void) save_Uniform2ui;
- (void) save_Uniform3ui;
- (void) save_Uniform4ui;
- (void) save_Uniform1uiv;
- (void) save_Uniform2uiv;
- (void) save_Uniform3uiv;
- (void) save_Uniform4uiv;
-#endif
+
+ /* GL_ARB_gpu_shader_fp64 */
+ SET_Uniform1d(table, save_Uniform1d);
+ SET_Uniform2d(table, save_Uniform2d);
+ SET_Uniform3d(table, save_Uniform3d);
+ SET_Uniform4d(table, save_Uniform4d);
+ SET_Uniform1dv(table, save_Uniform1dv);
+ SET_Uniform2dv(table, save_Uniform2dv);
+ SET_Uniform3dv(table, save_Uniform3dv);
+ SET_Uniform4dv(table, save_Uniform4dv);
+ SET_UniformMatrix2dv(table, save_UniformMatrix2dv);
+ SET_UniformMatrix3dv(table, save_UniformMatrix3dv);
+ SET_UniformMatrix4dv(table, save_UniformMatrix4dv);
+ SET_UniformMatrix2x3dv(table, save_UniformMatrix2x3dv);
+ SET_UniformMatrix3x2dv(table, save_UniformMatrix3x2dv);
+ SET_UniformMatrix2x4dv(table, save_UniformMatrix2x4dv);
+ SET_UniformMatrix4x2dv(table, save_UniformMatrix4x2dv);
+ SET_UniformMatrix3x4dv(table, save_UniformMatrix3x4dv);
+ SET_UniformMatrix4x3dv(table, save_UniformMatrix4x3dv);
/* These are: */
SET_BeginTransformFeedback(table, save_BeginTransformFeedback);
/* GL_ARB_uniform_buffer_object */
SET_UniformBlockBinding(table, save_UniformBlockBinding);
+ /* GL_ARB_shader_subroutines */
+ SET_UniformSubroutinesuiv(table, save_UniformSubroutinesuiv);
+
/* GL_ARB_draw_instanced */
SET_DrawArraysInstancedARB(table, save_DrawArraysInstancedARB);
SET_DrawElementsInstancedARB(table, save_DrawElementsInstancedARB);
SET_DrawElementsInstancedBaseInstance(table, save_DrawElementsInstancedBaseInstance);
SET_DrawElementsInstancedBaseVertexBaseInstance(table, save_DrawElementsInstancedBaseVertexBaseInstance);
+ /* GL_ARB_draw_indirect / GL_ARB_multi_draw_indirect */
+ SET_DrawArraysIndirect(table, save_DrawArraysIndirect);
+ SET_DrawElementsIndirect(table, save_DrawElementsIndirect);
+ SET_MultiDrawArraysIndirect(table, save_MultiDrawArraysIndirect);
+ SET_MultiDrawElementsIndirect(table, save_MultiDrawElementsIndirect);
+
/* OpenGL 4.2 / GL_ARB_separate_shader_objects */
SET_UseProgramStages(table, save_UseProgramStages);
SET_ProgramUniform1f(table, save_ProgramUniform1f);
SET_ProgramUniform2fv(table, save_ProgramUniform2fv);
SET_ProgramUniform3fv(table, save_ProgramUniform3fv);
SET_ProgramUniform4fv(table, save_ProgramUniform4fv);
+ SET_ProgramUniform1d(table, save_ProgramUniform1d);
+ SET_ProgramUniform2d(table, save_ProgramUniform2d);
+ SET_ProgramUniform3d(table, save_ProgramUniform3d);
+ SET_ProgramUniform4d(table, save_ProgramUniform4d);
+ SET_ProgramUniform1dv(table, save_ProgramUniform1dv);
+ SET_ProgramUniform2dv(table, save_ProgramUniform2dv);
+ SET_ProgramUniform3dv(table, save_ProgramUniform3dv);
+ SET_ProgramUniform4dv(table, save_ProgramUniform4dv);
SET_ProgramUniform1i(table, save_ProgramUniform1i);
SET_ProgramUniform2i(table, save_ProgramUniform2i);
SET_ProgramUniform3i(table, save_ProgramUniform3i);
SET_ProgramUniformMatrix4x2fv(table, save_ProgramUniformMatrix4x2fv);
SET_ProgramUniformMatrix3x4fv(table, save_ProgramUniformMatrix3x4fv);
SET_ProgramUniformMatrix4x3fv(table, save_ProgramUniformMatrix4x3fv);
-
- /* GL_EXT_polygon_offset_clamp */
+ SET_ProgramUniformMatrix2dv(table, save_ProgramUniformMatrix2dv);
+ SET_ProgramUniformMatrix3dv(table, save_ProgramUniformMatrix3dv);
+ SET_ProgramUniformMatrix4dv(table, save_ProgramUniformMatrix4dv);
+ SET_ProgramUniformMatrix2x3dv(table, save_ProgramUniformMatrix2x3dv);
+ SET_ProgramUniformMatrix3x2dv(table, save_ProgramUniformMatrix3x2dv);
+ SET_ProgramUniformMatrix2x4dv(table, save_ProgramUniformMatrix2x4dv);
+ SET_ProgramUniformMatrix4x2dv(table, save_ProgramUniformMatrix4x2dv);
+ SET_ProgramUniformMatrix3x4dv(table, save_ProgramUniformMatrix3x4dv);
+ SET_ProgramUniformMatrix4x3dv(table, save_ProgramUniformMatrix4x3dv);
+
+ /* GL_{ARB,EXT}_polygon_offset_clamp */
SET_PolygonOffsetClampEXT(table, save_PolygonOffsetClampEXT);
/* GL_EXT_window_rectangles */
SET_WindowRectanglesEXT(table, save_WindowRectanglesEXT);
+
+ /* GL_NV_conservative_raster */
+ SET_SubpixelPrecisionBiasNV(table, save_SubpixelPrecisionBiasNV);
+
+ /* GL_NV_conservative_raster_dilate */
+ SET_ConservativeRasterParameterfNV(table, save_ConservativeRasterParameterfNV);
+
+ /* GL_NV_conservative_raster_pre_snap_triangles */
+ SET_ConservativeRasterParameteriNV(table, save_ConservativeRasterParameteriNV);
+
+ /* GL_EXT_direct_state_access */
+ SET_MatrixLoadfEXT(table, save_MatrixLoadfEXT);
+ SET_MatrixLoaddEXT(table, save_MatrixLoaddEXT);
+ SET_MatrixMultfEXT(table, save_MatrixMultfEXT);
+ SET_MatrixMultdEXT(table, save_MatrixMultdEXT);
+ SET_MatrixRotatefEXT(table, save_MatrixRotatefEXT);
+ SET_MatrixRotatedEXT(table, save_MatrixRotatedEXT);
+ SET_MatrixScalefEXT(table, save_MatrixScalefEXT);
+ SET_MatrixScaledEXT(table, save_MatrixScaledEXT);
+ SET_MatrixTranslatefEXT(table, save_MatrixTranslatefEXT);
+ SET_MatrixTranslatedEXT(table, save_MatrixTranslatedEXT);
+ SET_MatrixLoadIdentityEXT(table, save_MatrixLoadIdentityEXT);
+ SET_MatrixOrthoEXT(table, save_MatrixOrthoEXT);
+ SET_MatrixFrustumEXT(table, save_MatrixFrustumEXT);
+ SET_MatrixPushEXT(table, save_MatrixPushEXT);
+ SET_MatrixPopEXT(table, save_MatrixPopEXT);
+ SET_MatrixLoadTransposefEXT(table, save_MatrixLoadTransposefEXT);
+ SET_MatrixLoadTransposedEXT(table, save_MatrixLoadTransposedEXT);
+ SET_MatrixMultTransposefEXT(table, save_MatrixMultTransposefEXT);
+ SET_MatrixMultTransposedEXT(table, save_MatrixMultTransposedEXT);
+ SET_TextureParameteriEXT(table, save_TextureParameteriEXT);
+ SET_TextureParameterivEXT(table, save_TextureParameterivEXT);
+ SET_TextureParameterfEXT(table, save_TextureParameterfEXT);
+ SET_TextureParameterfvEXT(table, save_TextureParameterfvEXT);
+ SET_TextureImage1DEXT(table, save_TextureImage1DEXT);
+ SET_TextureImage2DEXT(table, save_TextureImage2DEXT);
+ SET_TextureImage3DEXT(table, save_TextureImage3DEXT);
+ SET_TextureSubImage1DEXT(table, save_TextureSubImage1DEXT);
+ SET_TextureSubImage2DEXT(table, save_TextureSubImage2DEXT);
+ SET_TextureSubImage3DEXT(table, save_TextureSubImage3DEXT);
+ SET_CopyTextureImage1DEXT(table, save_CopyTextureImage1DEXT);
+ SET_CopyTextureImage2DEXT(table, save_CopyTextureImage2DEXT);
+ SET_CopyTextureSubImage1DEXT(table, save_CopyTextureSubImage1DEXT);
+ SET_CopyTextureSubImage2DEXT(table, save_CopyTextureSubImage2DEXT);
+ SET_CopyTextureSubImage3DEXT(table, save_CopyTextureSubImage3DEXT);
+ SET_BindMultiTextureEXT(table, save_BindMultiTextureEXT);
+ SET_MultiTexParameteriEXT(table, save_MultiTexParameteriEXT);
+ SET_MultiTexParameterivEXT(table, save_MultiTexParameterivEXT);
+ SET_MultiTexParameterfEXT(table, save_MultiTexParameterfEXT);
+ SET_MultiTexParameterfvEXT(table, save_MultiTexParameterfvEXT);
+ SET_MultiTexImage1DEXT(table, save_MultiTexImage1DEXT);
+ SET_MultiTexImage2DEXT(table, save_MultiTexImage2DEXT);
+ SET_MultiTexImage3DEXT(table, save_MultiTexImage3DEXT);
+ SET_MultiTexSubImage1DEXT(table, save_MultiTexSubImage1DEXT);
+ SET_MultiTexSubImage2DEXT(table, save_MultiTexSubImage2DEXT);
+ SET_MultiTexSubImage3DEXT(table, save_MultiTexSubImage3DEXT);
+ SET_CopyMultiTexImage1DEXT(table, save_CopyMultiTexImage1DEXT);
+ SET_CopyMultiTexImage2DEXT(table, save_CopyMultiTexImage2DEXT);
+ SET_CopyMultiTexSubImage1DEXT(table, save_CopyMultiTexSubImage1DEXT);
+ SET_CopyMultiTexSubImage2DEXT(table, save_CopyMultiTexSubImage2DEXT);
+ SET_CopyMultiTexSubImage3DEXT(table, save_CopyMultiTexSubImage3DEXT);
+ SET_MultiTexEnvfEXT(table, save_MultiTexEnvfEXT);
+ SET_MultiTexEnvfvEXT(table, save_MultiTexEnvfvEXT);
+ SET_MultiTexEnviEXT(table, save_MultiTexEnviEXT);
+ SET_MultiTexEnvivEXT(table, save_MultiTexEnvivEXT);
+ SET_CompressedTextureImage1DEXT(table, save_CompressedTextureImage1DEXT);
+ SET_CompressedTextureImage2DEXT(table, save_CompressedTextureImage2DEXT);
+ SET_CompressedTextureImage3DEXT(table, save_CompressedTextureImage3DEXT);
+ SET_CompressedTextureSubImage1DEXT(table, save_CompressedTextureSubImage1DEXT);
+ SET_CompressedTextureSubImage2DEXT(table, save_CompressedTextureSubImage2DEXT);
+ SET_CompressedTextureSubImage3DEXT(table, save_CompressedTextureSubImage3DEXT);
+ SET_CompressedMultiTexImage1DEXT(table, save_CompressedMultiTexImage1DEXT);
+ SET_CompressedMultiTexImage2DEXT(table, save_CompressedMultiTexImage2DEXT);
+ SET_CompressedMultiTexImage3DEXT(table, save_CompressedMultiTexImage3DEXT);
+ SET_CompressedMultiTexSubImage1DEXT(table, save_CompressedMultiTexSubImage1DEXT);
+ SET_CompressedMultiTexSubImage2DEXT(table, save_CompressedMultiTexSubImage2DEXT);
+ SET_CompressedMultiTexSubImage3DEXT(table, save_CompressedMultiTexSubImage3DEXT);
}
}
/* increment n to point to next compiled command */
if (opcode != OPCODE_CONTINUE) {
+ assert(InstSize[opcode] > 0);
n += InstSize[opcode];
}
}
vfmt->VertexAttrib3fvARB = save_VertexAttrib3fvARB;
vfmt->VertexAttrib4fARB = save_VertexAttrib4fARB;
vfmt->VertexAttrib4fvARB = save_VertexAttrib4fvARB;
+ vfmt->VertexAttribL1d = save_VertexAttribL1d;
+ vfmt->VertexAttribL1dv = save_VertexAttribL1dv;
+ vfmt->VertexAttribL2d = save_VertexAttribL2d;
+ vfmt->VertexAttribL2dv = save_VertexAttribL2dv;
+ vfmt->VertexAttribL3d = save_VertexAttribL3d;
+ vfmt->VertexAttribL3dv = save_VertexAttribL3dv;
+ vfmt->VertexAttribL4d = save_VertexAttribL4d;
+ vfmt->VertexAttribL4dv = save_VertexAttribL4dv;
+
+ vfmt->PrimitiveRestartNV = save_PrimitiveRestartNV;
}