#include "c99_math.h"
#include "glheader.h"
-#include "imports.h"
+
#include "api_arrayelt.h"
#include "api_exec.h"
#include "api_loopback.h"
#include "main/dispatch.h"
#include "vbo/vbo.h"
+#include "vbo/vbo_util.h"
+#include "util/format_r11g11b10f.h"
+#include "util/u_memory.h"
#define USE_BITMAP_ATLAS 1
OPCODE_UNIFORM_MATRIX34D,
OPCODE_UNIFORM_MATRIX43D,
+ /* GL_ARB_gpu_shader_int64 */
+ OPCODE_UNIFORM_1I64,
+ OPCODE_UNIFORM_2I64,
+ OPCODE_UNIFORM_3I64,
+ OPCODE_UNIFORM_4I64,
+ OPCODE_UNIFORM_1I64V,
+ OPCODE_UNIFORM_2I64V,
+ OPCODE_UNIFORM_3I64V,
+ OPCODE_UNIFORM_4I64V,
+ OPCODE_UNIFORM_1UI64,
+ OPCODE_UNIFORM_2UI64,
+ OPCODE_UNIFORM_3UI64,
+ OPCODE_UNIFORM_4UI64,
+ OPCODE_UNIFORM_1UI64V,
+ OPCODE_UNIFORM_2UI64V,
+ OPCODE_UNIFORM_3UI64V,
+ OPCODE_UNIFORM_4UI64V,
+ OPCODE_PROGRAM_UNIFORM_1I64,
+ OPCODE_PROGRAM_UNIFORM_2I64,
+ OPCODE_PROGRAM_UNIFORM_3I64,
+ OPCODE_PROGRAM_UNIFORM_4I64,
+ OPCODE_PROGRAM_UNIFORM_1I64V,
+ OPCODE_PROGRAM_UNIFORM_2I64V,
+ OPCODE_PROGRAM_UNIFORM_3I64V,
+ OPCODE_PROGRAM_UNIFORM_4I64V,
+ OPCODE_PROGRAM_UNIFORM_1UI64,
+ OPCODE_PROGRAM_UNIFORM_2UI64,
+ OPCODE_PROGRAM_UNIFORM_3UI64,
+ OPCODE_PROGRAM_UNIFORM_4UI64,
+ OPCODE_PROGRAM_UNIFORM_1UI64V,
+ OPCODE_PROGRAM_UNIFORM_2UI64V,
+ OPCODE_PROGRAM_UNIFORM_3UI64V,
+ OPCODE_PROGRAM_UNIFORM_4UI64V,
+
/* OpenGL 4.0 / GL_ARB_tessellation_shader */
OPCODE_PATCH_PARAMETER_I,
OPCODE_PATCH_PARAMETER_FV_INNER,
OPCODE_ATTR_2F_ARB,
OPCODE_ATTR_3F_ARB,
OPCODE_ATTR_4F_ARB,
+ OPCODE_ATTR_1I,
+ OPCODE_ATTR_2I,
+ OPCODE_ATTR_3I,
+ OPCODE_ATTR_4I,
OPCODE_ATTR_1D,
OPCODE_ATTR_2D,
OPCODE_ATTR_3D,
OPCODE_ATTR_4D,
+ OPCODE_ATTR_1UI64,
OPCODE_MATERIAL,
OPCODE_BEGIN,
OPCODE_END,
OPCODE_MATRIX_POP,
OPCODE_TEXTUREPARAMETER_F,
OPCODE_TEXTUREPARAMETER_I,
+ OPCODE_TEXTUREPARAMETER_II,
+ OPCODE_TEXTUREPARAMETER_IUI,
OPCODE_TEXTURE_IMAGE1D,
OPCODE_TEXTURE_IMAGE2D,
OPCODE_TEXTURE_IMAGE3D,
OPCODE_BIND_MULTITEXTURE,
OPCODE_MULTITEXPARAMETER_F,
OPCODE_MULTITEXPARAMETER_I,
+ OPCODE_MULTITEXPARAMETER_II,
+ OPCODE_MULTITEXPARAMETER_IUI,
OPCODE_MULTITEX_IMAGE1D,
OPCODE_MULTITEX_IMAGE2D,
OPCODE_MULTITEX_IMAGE3D,
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,
+ OPCODE_NAMED_PROGRAM_STRING,
+ OPCODE_NAMED_PROGRAM_LOCAL_PARAMETER,
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
GLuint uint32[2];
};
+union int64_pair
+{
+ GLint64 int64;
+ GLint int32[2];
+};
#define ASSIGN_DOUBLE_TO_NODES(n, idx, value) \
do { \
n[idx+1].ui = tmp.uint32[1]; \
} while (0)
+#define ASSIGN_UINT64_TO_NODES(n, idx, value) \
+ do { \
+ union uint64_pair tmp; \
+ tmp.uint64 = value; \
+ n[idx].ui = tmp.uint32[0]; \
+ n[idx+1].ui = tmp.uint32[1]; \
+ } while (0)
+
+#define ASSIGN_INT64_TO_NODES(n, idx, value) \
+ do { \
+ union int64_pair tmp; \
+ tmp.int64 = value; \
+ n[idx].i = tmp.int32[0]; \
+ n[idx+1].i = tmp.int32[1]; \
+ } while (0)
/**
* How many nodes to allocate at a time. Note that bulk vertex data
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)) {
case OPCODE_UNIFORM_2UIV:
case OPCODE_UNIFORM_3UIV:
case OPCODE_UNIFORM_4UIV:
+ case OPCODE_UNIFORM_1I64V:
+ case OPCODE_UNIFORM_2I64V:
+ case OPCODE_UNIFORM_3I64V:
+ case OPCODE_UNIFORM_4I64V:
+ case OPCODE_UNIFORM_1UI64V:
+ case OPCODE_UNIFORM_2UI64V:
+ case OPCODE_UNIFORM_3UI64V:
+ case OPCODE_UNIFORM_4UI64V:
free(get_pointer(&n[3]));
break;
case OPCODE_UNIFORM_MATRIX22:
case OPCODE_PROGRAM_UNIFORM_2UIV:
case OPCODE_PROGRAM_UNIFORM_3UIV:
case OPCODE_PROGRAM_UNIFORM_4UIV:
+ case OPCODE_PROGRAM_UNIFORM_1I64V:
+ case OPCODE_PROGRAM_UNIFORM_2I64V:
+ case OPCODE_PROGRAM_UNIFORM_3I64V:
+ case OPCODE_PROGRAM_UNIFORM_4I64V:
+ case OPCODE_PROGRAM_UNIFORM_1UI64V:
+ case OPCODE_PROGRAM_UNIFORM_2UI64V:
+ case OPCODE_PROGRAM_UNIFORM_3UI64V:
+ case OPCODE_PROGRAM_UNIFORM_4UI64V:
free(get_pointer(&n[4]));
break;
case OPCODE_PROGRAM_UNIFORM_MATRIX22F:
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_NAMED_PROGRAM_STRING:
+ free(get_pointer(&n[5]));
+ break;
case OPCODE_CONTINUE:
n = (Node *) get_pointer(&n[1]);
free(block);
return NULL;
}
- if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+ if (!unpack->BufferObj) {
/* no PBO */
GLvoid *image;
}
}
-static void GLAPIENTRY
-save_Attr1fNV(GLenum attr, GLfloat x)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_1F_NV, 2);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 1;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib1fNV(ctx->Exec, (attr, x));
- }
-}
-
-static void GLAPIENTRY
-save_Attr2fNV(GLenum attr, GLfloat x, GLfloat y)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_2F_NV, 3);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- n[3].f = y;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 2;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, 0, 1);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib2fNV(ctx->Exec, (attr, x, y));
- }
-}
-
-static void GLAPIENTRY
-save_Attr3fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_3F_NV, 4);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 3;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, 1);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib3fNV(ctx->Exec, (attr, x, y, z));
- }
-}
-
-static void GLAPIENTRY
-save_Attr4fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_4F_NV, 5);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
- n[5].f = w;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 4;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, w);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib4fNV(ctx->Exec, (attr, x, y, z, w));
- }
-}
-
-
-static void GLAPIENTRY
-save_Attr1fARB(GLenum attr, GLfloat x)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_1F_ARB, 2);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 1;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib1fARB(ctx->Exec, (attr, x));
- }
-}
-
-static void GLAPIENTRY
-save_Attr2fARB(GLenum attr, GLfloat x, GLfloat y)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_2F_ARB, 3);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- n[3].f = y;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 2;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, 0, 1);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib2fARB(ctx->Exec, (attr, x, y));
- }
-}
-
-static void GLAPIENTRY
-save_Attr3fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_3F_ARB, 4);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 3;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, 1);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib3fARB(ctx->Exec, (attr, x, y, z));
- }
-}
-
-static void GLAPIENTRY
-save_Attr4fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = alloc_instruction(ctx, OPCODE_ATTR_4F_ARB, 5);
- if (n) {
- n[1].e = attr;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
- n[5].f = w;
- }
-
- assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
- ctx->ListState.ActiveAttribSize[attr] = 4;
- ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, w);
-
- if (ctx->ExecuteFlag) {
- CALL_VertexAttrib4fARB(ctx->Exec, (attr, x, y, z, w));
- }
-}
-
-
static void GLAPIENTRY
save_EvalCoord1f(GLfloat x)
{
}
}
-static void GLAPIENTRY
-save_Indexf(GLfloat x)
-{
- save_Attr1fNV(VERT_ATTRIB_COLOR_INDEX, x);
-}
-
-static void GLAPIENTRY
-save_Indexfv(const GLfloat * v)
-{
- save_Attr1fNV(VERT_ATTRIB_COLOR_INDEX, v[0]);
-}
-
-static void GLAPIENTRY
-save_EdgeFlag(GLboolean x)
-{
- save_Attr1fNV(VERT_ATTRIB_EDGEFLAG, x ? 1.0f : 0.0f);
-}
-
/**
* Compare 'count' elements of vectors 'a' and 'b'.
}
}
-
static void GLAPIENTRY
-save_Vertex2f(GLfloat x, GLfloat y)
+save_PrimitiveRestartNV(void)
{
- save_Attr2fNV(VERT_ATTRIB_POS, x, y);
+ /* 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_Vertex2fv(const GLfloat * v)
-{
- save_Attr2fNV(VERT_ATTRIB_POS, v[0], v[1]);
-}
static void GLAPIENTRY
-save_Vertex3f(GLfloat x, GLfloat y, GLfloat z)
+save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter)
{
- save_Attr3fNV(VERT_ATTRIB_POS, x, y, z);
+ 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));
+ }
}
-static void GLAPIENTRY
-save_Vertex3fv(const GLfloat * v)
-{
- save_Attr3fNV(VERT_ATTRIB_POS, v[0], v[1], v[2]);
-}
+/** GL_EXT_provoking_vertex */
static void GLAPIENTRY
-save_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+save_ProvokingVertexEXT(GLenum mode)
{
- save_Attr4fNV(VERT_ATTRIB_POS, x, y, z, w);
+ 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) {
+ /*CALL_ProvokingVertex(ctx->Exec, (mode));*/
+ _mesa_ProvokingVertex(mode);
+ }
}
-static void GLAPIENTRY
-save_Vertex4fv(const GLfloat * v)
-{
- save_Attr4fNV(VERT_ATTRIB_POS, v[0], v[1], v[2], v[3]);
-}
+/** GL_EXT_transform_feedback */
static void GLAPIENTRY
-save_TexCoord1f(GLfloat x)
+save_BeginTransformFeedback(GLenum mode)
{
- save_Attr1fNV(VERT_ATTRIB_TEX0, x);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BEGIN_TRANSFORM_FEEDBACK, 1);
+ if (n) {
+ n[1].e = mode;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BeginTransformFeedback(ctx->Exec, (mode));
+ }
}
-static void GLAPIENTRY
-save_TexCoord1fv(const GLfloat * v)
-{
- save_Attr1fNV(VERT_ATTRIB_TEX0, v[0]);
-}
+/** GL_EXT_transform_feedback */
static void GLAPIENTRY
-save_TexCoord2f(GLfloat x, GLfloat y)
+save_EndTransformFeedback(void)
{
- save_Attr2fNV(VERT_ATTRIB_TEX0, x, y);
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ (void) alloc_instruction(ctx, OPCODE_END_TRANSFORM_FEEDBACK, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_EndTransformFeedback(ctx->Exec, ());
+ }
}
static void GLAPIENTRY
-save_TexCoord2fv(const GLfloat * v)
+save_BindTransformFeedback(GLenum target, GLuint name)
{
- save_Attr2fNV(VERT_ATTRIB_TEX0, v[0], v[1]);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BIND_TRANSFORM_FEEDBACK, 2);
+ if (n) {
+ n[1].e = target;
+ n[2].ui = name;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BindTransformFeedback(ctx->Exec, (target, name));
+ }
}
static void GLAPIENTRY
-save_TexCoord3f(GLfloat x, GLfloat y, GLfloat z)
+save_PauseTransformFeedback(void)
{
- save_Attr3fNV(VERT_ATTRIB_TEX0, x, y, z);
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ (void) alloc_instruction(ctx, OPCODE_PAUSE_TRANSFORM_FEEDBACK, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_PauseTransformFeedback(ctx->Exec, ());
+ }
}
static void GLAPIENTRY
-save_TexCoord3fv(const GLfloat * v)
+save_ResumeTransformFeedback(void)
{
- save_Attr3fNV(VERT_ATTRIB_TEX0, v[0], v[1], v[2]);
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ (void) alloc_instruction(ctx, OPCODE_RESUME_TRANSFORM_FEEDBACK, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_ResumeTransformFeedback(ctx->Exec, ());
+ }
}
static void GLAPIENTRY
-save_TexCoord4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+save_DrawTransformFeedback(GLenum mode, GLuint name)
{
- save_Attr4fNV(VERT_ATTRIB_TEX0, x, y, z, w);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK, 2);
+ if (n) {
+ n[1].e = mode;
+ n[2].ui = name;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DrawTransformFeedback(ctx->Exec, (mode, name));
+ }
}
static void GLAPIENTRY
-save_TexCoord4fv(const GLfloat * v)
+save_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
{
- save_Attr4fNV(VERT_ATTRIB_TEX0, v[0], v[1], v[2], v[3]);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM, 3);
+ if (n) {
+ n[1].e = mode;
+ n[2].ui = name;
+ n[3].ui = stream;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DrawTransformFeedbackStream(ctx->Exec, (mode, name, stream));
+ }
}
static void GLAPIENTRY
-save_Normal3f(GLfloat x, GLfloat y, GLfloat z)
+save_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
+ GLsizei primcount)
{
- save_Attr3fNV(VERT_ATTRIB_NORMAL, x, y, z);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK_INSTANCED, 3);
+ if (n) {
+ n[1].e = mode;
+ n[2].ui = name;
+ n[3].si = primcount;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DrawTransformFeedbackInstanced(ctx->Exec, (mode, name, primcount));
+ }
}
static void GLAPIENTRY
-save_Normal3fv(const GLfloat * v)
+save_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
+ GLuint stream, GLsizei primcount)
{
- save_Attr3fNV(VERT_ATTRIB_NORMAL, v[0], v[1], v[2]);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM_INSTANCED, 4);
+ if (n) {
+ n[1].e = mode;
+ n[2].ui = name;
+ n[3].ui = stream;
+ n[4].si = primcount;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DrawTransformFeedbackStreamInstanced(ctx->Exec, (mode, name, stream,
+ primcount));
+ }
}
static void GLAPIENTRY
-save_FogCoordfEXT(GLfloat x)
+save_DispatchCompute(GLuint num_groups_x, GLuint num_groups_y,
+ GLuint num_groups_z)
{
- save_Attr1fNV(VERT_ATTRIB_FOG, x);
+ 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_FogCoordfvEXT(const GLfloat * v)
+save_DispatchComputeIndirect(GLintptr indirect)
{
- save_Attr1fNV(VERT_ATTRIB_FOG, v[0]);
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDispatchComputeIndirect() during display list compile");
}
-static void GLAPIENTRY
-save_Color3f(GLfloat x, GLfloat y, GLfloat z)
+static void ALWAYS_INLINE
+save_Attr32bit(struct gl_context *ctx, unsigned attr, unsigned size,
+ GLenum type, uint32_t x, uint32_t y, uint32_t z, uint32_t w)
{
- save_Attr3fNV(VERT_ATTRIB_COLOR0, x, y, z);
-}
+ Node *n;
+ SAVE_FLUSH_VERTICES(ctx);
+ unsigned base_op;
+ unsigned index = attr;
-static void GLAPIENTRY
-save_Color3fv(const GLfloat * v)
-{
- save_Attr3fNV(VERT_ATTRIB_COLOR0, v[0], v[1], v[2]);
+ /* We don't care about GL_INT vs GL_UNSIGNED_INT. The idea is to get W=1
+ * right for 3 or lower number of components, so only distinguish between
+ * FLOAT and INT.
+ */
+ if (type == GL_FLOAT) {
+ if (attr >= VERT_ATTRIB_GENERIC0) {
+ base_op = OPCODE_ATTR_1F_ARB;
+ attr -= VERT_ATTRIB_GENERIC0;
+ } else {
+ base_op = OPCODE_ATTR_1F_NV;
+ }
+ } else {
+ base_op = OPCODE_ATTR_1I;
+ attr -= VERT_ATTRIB_GENERIC0;
+ }
+
+ n = alloc_instruction(ctx, base_op + size - 1, 1 + size);
+ if (n) {
+ n[1].ui = attr;
+ n[2].ui = x;
+ if (size >= 2) n[3].ui = y;
+ if (size >= 3) n[4].ui = z;
+ if (size >= 4) n[5].ui = w;
+ }
+
+ ctx->ListState.ActiveAttribSize[index] = size;
+ ASSIGN_4V(ctx->ListState.CurrentAttrib[index], x, y, z, w);
+
+ if (ctx->ExecuteFlag) {
+ if (type == GL_FLOAT) {
+ if (base_op == OPCODE_ATTR_1F_NV) {
+ if (size == 4)
+ CALL_VertexAttrib4fNV(ctx->Exec, (attr, uif(x), uif(y), uif(z), uif(w)));
+ else if (size == 3)
+ CALL_VertexAttrib3fNV(ctx->Exec, (attr, uif(x), uif(y), uif(z)));
+ else if (size == 2)
+ CALL_VertexAttrib2fNV(ctx->Exec, (attr, uif(x), uif(y)));
+ else
+ CALL_VertexAttrib1fNV(ctx->Exec, (attr, uif(x)));
+ } else {
+ if (size == 4)
+ CALL_VertexAttrib4fARB(ctx->Exec, (attr, uif(x), uif(y), uif(z), uif(w)));
+ else if (size == 3)
+ CALL_VertexAttrib3fARB(ctx->Exec, (attr, uif(x), uif(y), uif(z)));
+ else if (size == 2)
+ CALL_VertexAttrib2fARB(ctx->Exec, (attr, uif(x), uif(y)));
+ else
+ CALL_VertexAttrib1fARB(ctx->Exec, (attr, uif(x)));
+ }
+ } else {
+ if (size == 4)
+ CALL_VertexAttribI4iEXT(ctx->Exec, (attr, x, y, z, w));
+ else if (size == 3)
+ CALL_VertexAttribI3iEXT(ctx->Exec, (attr, x, y, z));
+ else if (size == 2)
+ CALL_VertexAttribI2iEXT(ctx->Exec, (attr, x, y));
+ else
+ CALL_VertexAttribI1iEXT(ctx->Exec, (attr, x));
+ }
+ }
}
-static void GLAPIENTRY
-save_Color4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+static void ALWAYS_INLINE
+save_Attr64bit(struct gl_context *ctx, unsigned attr, unsigned size,
+ GLenum type, uint64_t x, uint64_t y, uint64_t z, uint64_t w)
{
- save_Attr4fNV(VERT_ATTRIB_COLOR0, x, y, z, w);
-}
+ Node *n;
+ SAVE_FLUSH_VERTICES(ctx);
+ unsigned base_op;
+ unsigned index = attr;
-static void GLAPIENTRY
-save_Color4fv(const GLfloat * v)
-{
- save_Attr4fNV(VERT_ATTRIB_COLOR0, v[0], v[1], v[2], v[3]);
-}
+ if (type == GL_DOUBLE) {
+ base_op = OPCODE_ATTR_1D;
+ } else {
+ base_op = OPCODE_ATTR_1UI64;
+ assert(size == 1);
+ }
-static void GLAPIENTRY
-save_SecondaryColor3fEXT(GLfloat x, GLfloat y, GLfloat z)
-{
- save_Attr3fNV(VERT_ATTRIB_COLOR1, x, y, z);
-}
+ attr -= VERT_ATTRIB_GENERIC0;
+ n = alloc_instruction(ctx, base_op + size - 1, 1 + size * 2);
+ if (n) {
+ n[1].ui = attr;
+ ASSIGN_UINT64_TO_NODES(n, 2, x);
+ if (size >= 2) ASSIGN_UINT64_TO_NODES(n, 4, y);
+ if (size >= 3) ASSIGN_UINT64_TO_NODES(n, 6, z);
+ if (size >= 4) ASSIGN_UINT64_TO_NODES(n, 8, w);
+ }
-static void GLAPIENTRY
-save_SecondaryColor3fvEXT(const GLfloat * v)
-{
- save_Attr3fNV(VERT_ATTRIB_COLOR1, v[0], v[1], v[2]);
-}
+ ctx->ListState.ActiveAttribSize[index] = size;
+ memcpy(ctx->ListState.CurrentAttrib[index], &n[2], size * sizeof(uint64_t));
+ if (ctx->ExecuteFlag) {
+ uint64_t v[] = {x, y, z, w};
+ if (type == GL_DOUBLE) {
+ if (size == 4)
+ CALL_VertexAttribL4dv(ctx->Exec, (attr, (GLdouble*)v));
+ else if (size == 3)
+ CALL_VertexAttribL3dv(ctx->Exec, (attr, (GLdouble*)v));
+ else if (size == 2)
+ CALL_VertexAttribL2dv(ctx->Exec, (attr, (GLdouble*)v));
+ else
+ CALL_VertexAttribL1d(ctx->Exec, (attr, UINT64_AS_DOUBLE(x)));
+ } else {
+ CALL_VertexAttribL1ui64ARB(ctx->Exec, (attr, x));
+ }
+ }
+}
-/* Just call the respective ATTR for texcoord
+/**
+ * If index=0, does glVertexAttrib*() alias glVertex() to emit a vertex?
+ * It depends on a few things, including whether we're inside or outside
+ * of glBegin/glEnd.
*/
-static void GLAPIENTRY
-save_MultiTexCoord1f(GLenum target, GLfloat x)
+static inline bool
+is_vertex_position(const struct gl_context *ctx, GLuint index)
{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr1fNV(attr, x);
+ return (index == 0 &&
+ _mesa_attr_zero_aliases_vertex(ctx) &&
+ _mesa_inside_dlist_begin_end(ctx));
}
-static void GLAPIENTRY
-save_MultiTexCoord1fv(GLenum target, const GLfloat * v)
-{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr1fNV(attr, v[0]);
-}
+/**
+ * This macro is used to implement all the glVertex, glColor, glTexCoord,
+ * glVertexAttrib, etc functions.
+ * \param A VBO_ATTRIB_x attribute index
+ * \param N attribute size (1..4)
+ * \param T type (GL_FLOAT, GL_DOUBLE, GL_INT, GL_UNSIGNED_INT)
+ * \param C cast type (uint32_t or uint64_t)
+ * \param V0, V1, v2, V3 attribute value
+ */
+#define ATTR_UNION(A, N, T, C, V0, V1, V2, V3) \
+do { \
+ if (sizeof(C) == 4) { \
+ save_Attr32bit(ctx, A, N, T, V0, V1, V2, V3); \
+ } else { \
+ save_Attr64bit(ctx, A, N, T, V0, V1, V2, V3); \
+ } \
+} while (0)
+
+#undef ERROR
+#define ERROR(err) _mesa_error(ctx, err, __func__)
+#define TAG(x) save_##x
+
+#define VBO_ATTRIB_POS VERT_ATTRIB_POS
+#define VBO_ATTRIB_NORMAL VERT_ATTRIB_NORMAL
+#define VBO_ATTRIB_COLOR0 VERT_ATTRIB_COLOR0
+#define VBO_ATTRIB_COLOR1 VERT_ATTRIB_COLOR1
+#define VBO_ATTRIB_FOG VERT_ATTRIB_FOG
+#define VBO_ATTRIB_COLOR_INDEX VERT_ATTRIB_COLOR_INDEX
+#define VBO_ATTRIB_EDGEFLAG VERT_ATTRIB_EDGEFLAG
+#define VBO_ATTRIB_TEX0 VERT_ATTRIB_TEX0
+#define VBO_ATTRIB_GENERIC0 VERT_ATTRIB_GENERIC0
+#define VBO_ATTRIB_MAX VERT_ATTRIB_MAX
+
+#include "vbo/vbo_attrib_tmp.h"
static void GLAPIENTRY
-save_MultiTexCoord2f(GLenum target, GLfloat x, GLfloat y)
+save_UseProgram(GLuint program)
{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr2fNV(attr, x, y);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_USE_PROGRAM, 1);
+ if (n) {
+ n[1].ui = program;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UseProgram(ctx->Exec, (program));
+ }
}
-static void GLAPIENTRY
-save_MultiTexCoord2fv(GLenum target, const GLfloat * v)
-{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr2fNV(attr, v[0], v[1]);
-}
static void GLAPIENTRY
-save_MultiTexCoord3f(GLenum target, GLfloat x, GLfloat y, GLfloat z)
+save_Uniform1fARB(GLint location, GLfloat x)
{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr3fNV(attr, x, y, z);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1F, 2);
+ if (n) {
+ n[1].i = location;
+ n[2].f = x;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1f(ctx->Exec, (location, x));
+ }
}
-static void GLAPIENTRY
-save_MultiTexCoord3fv(GLenum target, const GLfloat * v)
-{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr3fNV(attr, v[0], v[1], v[2]);
-}
static void GLAPIENTRY
-save_MultiTexCoord4f(GLenum target, GLfloat x, GLfloat y,
- GLfloat z, GLfloat w)
+save_Uniform2fARB(GLint location, GLfloat x, GLfloat y)
{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr4fNV(attr, x, y, z, w);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2F, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].f = x;
+ n[3].f = y;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2f(ctx->Exec, (location, x, y));
+ }
}
+
static void GLAPIENTRY
-save_MultiTexCoord4fv(GLenum target, const GLfloat * v)
+save_Uniform3fARB(GLint location, GLfloat x, GLfloat y, GLfloat z)
{
- GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0;
- save_Attr4fNV(attr, v[0], v[1], v[2], v[3]);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3F, 4);
+ if (n) {
+ n[1].i = location;
+ n[2].f = x;
+ n[3].f = y;
+ n[4].f = z;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3f(ctx->Exec, (location, x, y, z));
+ }
}
-/**
- * Record a GL_INVALID_VALUE error when an invalid vertex attribute
- * index is found.
- */
-static void
-index_error(void)
+static void GLAPIENTRY
+save_Uniform4fARB(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_error(ctx, GL_INVALID_VALUE, "VertexAttribf(index)");
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4F, 5);
+ if (n) {
+ n[1].i = location;
+ n[2].f = x;
+ n[3].f = y;
+ n[4].f = z;
+ n[5].f = w;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4f(ctx->Exec, (location, x, y, z, w));
+ }
}
-
static void GLAPIENTRY
-save_VertexAttrib1fARB(GLuint index, GLfloat x)
+save_Uniform1fvARB(GLint location, GLsizei count, const GLfloat *v)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr1fARB(index, x);
- else
- index_error();
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1FV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1fv(ctx->Exec, (location, count, v));
+ }
}
static void GLAPIENTRY
-save_VertexAttrib1fvARB(GLuint index, const GLfloat * v)
+save_Uniform2fvARB(GLint location, GLsizei count, const GLfloat *v)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr1fARB(index, v[0]);
- else
- index_error();
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2FV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2fv(ctx->Exec, (location, count, v));
+ }
}
static void GLAPIENTRY
-save_VertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
+save_Uniform3fvARB(GLint location, GLsizei count, const GLfloat *v)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr2fARB(index, x, y);
- else
- index_error();
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3FV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3fv(ctx->Exec, (location, count, v));
+ }
}
static void GLAPIENTRY
-save_VertexAttrib2fvARB(GLuint index, const GLfloat * v)
+save_Uniform4fvARB(GLint location, GLsizei count, const GLfloat *v)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr2fARB(index, v[0], v[1]);
- else
- index_error();
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4FV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4fv(ctx->Exec, (location, count, v));
+ }
}
+
static void GLAPIENTRY
-save_VertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+save_Uniform1d(GLint location, GLdouble x)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr3fARB(index, x, y, z);
- else
- index_error();
+ 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_VertexAttrib3fvARB(GLuint index, const GLfloat * v)
+save_Uniform2d(GLint location, GLdouble x, GLdouble y)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr3fARB(index, v[0], v[1], v[2]);
- else
- index_error();
+ 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_VertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z,
- GLfloat w)
+save_Uniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr4fARB(index, x, y, z, w);
- else
- index_error();
+ 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_VertexAttrib4fvARB(GLuint index, const GLfloat * v)
+save_Uniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_Attr4fARB(index, v[0], v[1], v[2], v[3]);
- else
- index_error();
+ 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_VertexAttribL1d(GLuint index, GLdouble x)
+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));
+ }
+}
- 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));
+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));
+ }
+}
+
- if (ctx->ExecuteFlag) {
- CALL_VertexAttribL1d(ctx->Exec, (index, x));
- }
- } else {
- index_error();
+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_VertexAttribL1dv(GLuint index, const GLdouble *v)
+save_Uniform4dv(GLint location, GLsizei count, const GLdouble *v)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_VertexAttribL1d(index, v[0]);
- else
- index_error();
+ 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)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1I, 2);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1i(ctx->Exec, (location, x));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform2iARB(GLint location, GLint x, GLint y)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2I, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2i(ctx->Exec, (location, x, y));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform3iARB(GLint location, GLint x, GLint y, GLint z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3I, 4);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ n[4].i = z;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3i(ctx->Exec, (location, x, y, z));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform4iARB(GLint location, GLint x, GLint y, GLint z, GLint w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4I, 5);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ n[4].i = z;
+ n[5].i = w;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4i(ctx->Exec, (location, x, y, z, w));
+ }
+}
+
+
+
+static void GLAPIENTRY
+save_Uniform1ivARB(GLint location, GLsizei count, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1IV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLint)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1iv(ctx->Exec, (location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform2ivARB(GLint location, GLsizei count, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2IV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLint)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2iv(ctx->Exec, (location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform3ivARB(GLint location, GLsizei count, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3IV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLint)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3iv(ctx->Exec, (location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform4ivARB(GLint location, GLsizei count, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4IV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4iv(ctx->Exec, (location, count, v));
+ }
+}
+
+
+
+static void GLAPIENTRY
+save_Uniform1ui(GLint location, GLuint x)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1UI, 2);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1ui(ctx->Exec, (location, x));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform2ui(GLint location, GLuint x, GLuint y)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2UI, 3);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2ui(ctx->Exec, (location, x, y));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform3ui(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3UI, 4);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ n[4].i = z;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3ui(ctx->Exec, (location, x, y, z));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform4ui(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4UI, 5);
+ if (n) {
+ n[1].i = location;
+ n[2].i = x;
+ n[3].i = y;
+ n[4].i = z;
+ n[5].i = w;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4ui(ctx->Exec, (location, x, y, z, w));
+ }
+}
+
+
+
+static void GLAPIENTRY
+save_Uniform1uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1UIV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 1 * sizeof(*v)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform1uiv(ctx->Exec, (location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform2uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2UIV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 2 * sizeof(*v)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform2uiv(ctx->Exec, (location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform3uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3UIV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 3 * sizeof(*v)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform3uiv(ctx->Exec, (location, count, v));
+ }
+}
+
+static void GLAPIENTRY
+save_Uniform4uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4UIV, 2 + POINTER_DWORDS);
+ if (n) {
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(*v)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_Uniform4uiv(ctx->Exec, (location, count, v));
+ }
+}
+
+
+
+static void GLAPIENTRY
+save_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX22, 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 * 2 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix2fv(ctx->Exec, (location, count, transpose, m));
+ }
+}
+
+static void GLAPIENTRY
+save_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33, 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 * 3 * sizeof(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix3fv(ctx->Exec, (location, count, transpose, m));
+ }
}
static void GLAPIENTRY
-save_VertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
+save_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
{
GET_CURRENT_CONTEXT(ctx);
-
- 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();
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX44, 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(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix4fv(ctx->Exec, (location, count, transpose, m));
}
}
-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)
+save_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
{
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();
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23, 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(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix2x3fv(ctx->Exec, (location, count, transpose, m));
}
}
static void GLAPIENTRY
-save_VertexAttribL3dv(GLuint index, const GLdouble *v)
+save_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_VertexAttribL3d(index, v[0], v[1], v[2]);
- else
- index_error();
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX32, 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(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix3x2fv(ctx->Exec, (location, count, transpose, m));
+ }
}
+
static void GLAPIENTRY
-save_VertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z,
- GLdouble w)
+save_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
{
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();
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24, 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(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix2x4fv(ctx->Exec, (location, count, transpose, m));
}
}
static void GLAPIENTRY
-save_VertexAttribL4dv(GLuint index, const GLdouble *v)
+save_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
{
- if (index < MAX_VERTEX_GENERIC_ATTRIBS)
- save_VertexAttribL4d(index, v[0], v[1], v[2], v[3]);
- else
- index_error();
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42, 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(GLfloat)));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UniformMatrix4x2fv(ctx->Exec, (location, count, transpose, m));
+ }
}
+
static void GLAPIENTRY
-save_PrimitiveRestartNV(void)
+save_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
{
- /* Note: this is used when outside a glBegin/End pair in a display list */
GET_CURRENT_CONTEXT(ctx);
+ Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) alloc_instruction(ctx, OPCODE_PRIMITIVE_RESTART_NV, 0);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34, 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(GLfloat)));
+ }
if (ctx->ExecuteFlag) {
- CALL_PrimitiveRestartNV(ctx->Exec, ());
+ CALL_UniformMatrix3x4fv(ctx->Exec, (location, count, transpose, m));
}
}
-
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_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat *m)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_BLIT_FRAMEBUFFER, 10);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43, 3 + POINTER_DWORDS);
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;
+ n[1].i = location;
+ n[2].i = count;
+ n[3].b = transpose;
+ save_pointer(&n[4], memdup(m, count * 4 * 3 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_BlitFramebuffer(ctx->Exec, (srcX0, srcY0, srcX1, srcY1,
- dstX0, dstY0, dstX1, dstY1,
- mask, filter));
+ CALL_UniformMatrix4x3fv(ctx->Exec, (location, count, transpose, m));
}
}
-/** GL_EXT_provoking_vertex */
static void GLAPIENTRY
-save_ProvokingVertexEXT(GLenum mode)
+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_PROVOKING_VERTEX, 1);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX22D, 3 + POINTER_DWORDS);
if (n) {
- n[1].e = mode;
+ 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_ProvokingVertex(ctx->Exec, (mode));*/
- _mesa_ProvokingVertex(mode);
+ CALL_UniformMatrix2dv(ctx->Exec, (location, count, transpose, m));
}
}
-
-/** GL_EXT_transform_feedback */
static void GLAPIENTRY
-save_BeginTransformFeedback(GLenum mode)
+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_BEGIN_TRANSFORM_FEEDBACK, 1);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33D, 3 + POINTER_DWORDS);
if (n) {
- n[1].e = mode;
+ 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_BeginTransformFeedback(ctx->Exec, (mode));
+ CALL_UniformMatrix3dv(ctx->Exec, (location, count, transpose, m));
}
}
-
-/** GL_EXT_transform_feedback */
static void GLAPIENTRY
-save_EndTransformFeedback(void)
+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);
- (void) alloc_instruction(ctx, OPCODE_END_TRANSFORM_FEEDBACK, 0);
+ 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_EndTransformFeedback(ctx->Exec, ());
+ CALL_UniformMatrix4dv(ctx->Exec, (location, count, transpose, m));
}
}
+
static void GLAPIENTRY
-save_BindTransformFeedback(GLenum target, GLuint name)
+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_BIND_TRANSFORM_FEEDBACK, 2);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23D, 3 + POINTER_DWORDS);
if (n) {
- n[1].e = target;
- n[2].ui = name;
+ 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_BindTransformFeedback(ctx->Exec, (target, name));
+ CALL_UniformMatrix2x3dv(ctx->Exec, (location, count, transpose, m));
}
}
+
static void GLAPIENTRY
-save_PauseTransformFeedback(void)
+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);
- (void) alloc_instruction(ctx, OPCODE_PAUSE_TRANSFORM_FEEDBACK, 0);
+ 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_PauseTransformFeedback(ctx->Exec, ());
+ CALL_UniformMatrix3x2dv(ctx->Exec, (location, count, transpose, m));
}
}
+
static void GLAPIENTRY
-save_ResumeTransformFeedback(void)
+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);
- (void) alloc_instruction(ctx, OPCODE_RESUME_TRANSFORM_FEEDBACK, 0);
+ 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_ResumeTransformFeedback(ctx->Exec, ());
+ CALL_UniformMatrix2x4dv(ctx->Exec, (location, count, transpose, m));
}
}
static void GLAPIENTRY
-save_DrawTransformFeedback(GLenum mode, GLuint name)
+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_DRAW_TRANSFORM_FEEDBACK, 2);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42D, 3 + POINTER_DWORDS);
if (n) {
- n[1].e = mode;
- n[2].ui = name;
+ 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_DrawTransformFeedback(ctx->Exec, (mode, name));
+ CALL_UniformMatrix4x2dv(ctx->Exec, (location, count, transpose, m));
}
}
+
static void GLAPIENTRY
-save_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
+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_DRAW_TRANSFORM_FEEDBACK_STREAM, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34D, 3 + POINTER_DWORDS);
if (n) {
- n[1].e = mode;
- n[2].ui = name;
- n[3].ui = stream;
+ 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_DrawTransformFeedbackStream(ctx->Exec, (mode, name, stream));
+ CALL_UniformMatrix3x4dv(ctx->Exec, (location, count, transpose, m));
}
}
+
static void GLAPIENTRY
-save_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
- GLsizei primcount)
+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_DRAW_TRANSFORM_FEEDBACK_INSTANCED, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43D, 3 + POINTER_DWORDS);
if (n) {
- n[1].e = mode;
- n[2].ui = name;
- n[3].si = primcount;
+ 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_DrawTransformFeedbackInstanced(ctx->Exec, (mode, name, primcount));
+ CALL_UniformMatrix4x3dv(ctx->Exec, (location, count, transpose, m));
}
}
static void GLAPIENTRY
-save_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
- GLuint stream, GLsizei primcount)
+save_Uniform1i64ARB(GLint location, GLint64 x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK_STREAM_INSTANCED, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1I64, 3);
if (n) {
- n[1].e = mode;
- n[2].ui = name;
- n[3].ui = stream;
- n[4].si = primcount;
+ n[1].i = location;
+ ASSIGN_INT64_TO_NODES(n, 2, x);
}
if (ctx->ExecuteFlag) {
- CALL_DrawTransformFeedbackStreamInstanced(ctx->Exec, (mode, name, stream,
- primcount));
+ CALL_Uniform1i64ARB(ctx->Exec, (location, x));
}
}
static void GLAPIENTRY
-save_DispatchCompute(GLuint num_groups_x, GLuint num_groups_y,
- GLuint num_groups_z)
+save_Uniform2i64ARB(GLint location, GLint64 x, GLint64 y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_DISPATCH_COMPUTE, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2I64, 5);
if (n) {
- n[1].ui = num_groups_x;
- n[2].ui = num_groups_y;
- n[3].ui = num_groups_z;
+ n[1].i = location;
+ ASSIGN_INT64_TO_NODES(n, 2, x);
+ ASSIGN_INT64_TO_NODES(n, 4, y);
}
if (ctx->ExecuteFlag) {
- CALL_DispatchCompute(ctx->Exec, (num_groups_x, num_groups_y,
- num_groups_z));
+ CALL_Uniform2i64ARB(ctx->Exec, (location, x, y));
}
}
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)
+save_Uniform3i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_USE_PROGRAM, 1);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3I64, 7);
if (n) {
- n[1].ui = program;
+ n[1].i = location;
+ ASSIGN_INT64_TO_NODES(n, 2, x);
+ ASSIGN_INT64_TO_NODES(n, 4, y);
+ ASSIGN_INT64_TO_NODES(n, 6, z);
}
if (ctx->ExecuteFlag) {
- CALL_UseProgram(ctx->Exec, (program));
+ CALL_Uniform3i64ARB(ctx->Exec, (location, x, y, z));
}
}
-
static void GLAPIENTRY
-save_Uniform1fARB(GLint location, GLfloat x)
+save_Uniform4i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_1F, 2);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4I64, 9);
if (n) {
n[1].i = location;
- n[2].f = x;
+ ASSIGN_INT64_TO_NODES(n, 2, x);
+ ASSIGN_INT64_TO_NODES(n, 4, y);
+ ASSIGN_INT64_TO_NODES(n, 6, z);
+ ASSIGN_INT64_TO_NODES(n, 8, w);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1f(ctx->Exec, (location, x));
+ CALL_Uniform4i64ARB(ctx->Exec, (location, x, y, z, w));
}
}
-
static void GLAPIENTRY
-save_Uniform2fARB(GLint location, GLfloat x, GLfloat y)
+save_Uniform1i64vARB(GLint location, GLsizei count, const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_2F, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1I64V, 2 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].f = x;
- n[3].f = y;
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2f(ctx->Exec, (location, x, y));
+ CALL_Uniform1i64vARB(ctx->Exec, (location, count, v));
}
}
-
static void GLAPIENTRY
-save_Uniform3fARB(GLint location, GLfloat x, GLfloat y, GLfloat z)
+save_Uniform2i64vARB(GLint location, GLsizei count, const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_3F, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2I64V, 2 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3f(ctx->Exec, (location, x, y, z));
+ CALL_Uniform2i64vARB(ctx->Exec, (location, count, v));
}
}
-
static void GLAPIENTRY
-save_Uniform4fARB(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+save_Uniform3i64vARB(GLint location, GLsizei count, const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4F, 5);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3I64V, 2 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
- n[5].f = w;
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4f(ctx->Exec, (location, x, y, z, w));
+ CALL_Uniform3i64vARB(ctx->Exec, (location, count, v));
}
}
-
static void GLAPIENTRY
-save_Uniform1fvARB(GLint location, GLsizei count, const GLfloat *v)
+save_Uniform4i64vARB(GLint location, GLsizei count, const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_1FV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4I64V, 2 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLfloat)));
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1fv(ctx->Exec, (location, count, v));
+ CALL_Uniform4i64vARB(ctx->Exec, (location, count, v));
}
}
static void GLAPIENTRY
-save_Uniform2fvARB(GLint location, GLsizei count, const GLfloat *v)
+save_Uniform1ui64ARB(GLint location, GLuint64 x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_2FV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1UI64, 3);
if (n) {
n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLfloat)));
+ ASSIGN_UINT64_TO_NODES(n, 2, x);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2fv(ctx->Exec, (location, count, v));
+ CALL_Uniform1ui64ARB(ctx->Exec, (location, x));
}
}
static void GLAPIENTRY
-save_Uniform3fvARB(GLint location, GLsizei count, const GLfloat *v)
+save_Uniform2ui64ARB(GLint location, GLuint64 x, GLuint64 y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_3FV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2UI64, 5);
if (n) {
n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLfloat)));
+ ASSIGN_UINT64_TO_NODES(n, 2, x);
+ ASSIGN_UINT64_TO_NODES(n, 4, y);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3fv(ctx->Exec, (location, count, v));
+ CALL_Uniform2ui64ARB(ctx->Exec, (location, x, y));
}
}
static void GLAPIENTRY
-save_Uniform4fvARB(GLint location, GLsizei count, const GLfloat *v)
+save_Uniform3ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4FV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3UI64, 7);
if (n) {
n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLfloat)));
+ ASSIGN_UINT64_TO_NODES(n, 2, x);
+ ASSIGN_UINT64_TO_NODES(n, 4, y);
+ ASSIGN_UINT64_TO_NODES(n, 6, z);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4fv(ctx->Exec, (location, count, v));
+ CALL_Uniform3ui64ARB(ctx->Exec, (location, x, y, z));
}
}
-
static void GLAPIENTRY
-save_Uniform1d(GLint location, GLdouble x)
+save_Uniform4ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_1D, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4UI64, 9);
if (n) {
n[1].i = location;
- ASSIGN_DOUBLE_TO_NODES(n, 2, x);
+ ASSIGN_UINT64_TO_NODES(n, 2, x);
+ ASSIGN_UINT64_TO_NODES(n, 4, y);
+ ASSIGN_UINT64_TO_NODES(n, 6, z);
+ ASSIGN_UINT64_TO_NODES(n, 8, w);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1d(ctx->Exec, (location, x));
+ CALL_Uniform4ui64ARB(ctx->Exec, (location, x, y, z, w));
}
}
-
static void GLAPIENTRY
-save_Uniform2d(GLint location, GLdouble x, GLdouble y)
+save_Uniform1ui64vARB(GLint location, GLsizei count, const GLuint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_2D, 5);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1UI64V, 2 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- ASSIGN_DOUBLE_TO_NODES(n, 2, x);
- ASSIGN_DOUBLE_TO_NODES(n, 4, y);
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2d(ctx->Exec, (location, x, y));
+ CALL_Uniform1ui64vARB(ctx->Exec, (location, count, v));
}
}
-
static void GLAPIENTRY
-save_Uniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
+save_Uniform2ui64vARB(GLint location, GLsizei count, const GLuint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_3D, 7);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2UI64V, 2 + POINTER_DWORDS);
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);
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3d(ctx->Exec, (location, x, y, z));
+ CALL_Uniform2ui64vARB(ctx->Exec, (location, count, v));
}
}
-
static void GLAPIENTRY
-save_Uniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+save_Uniform3ui64vARB(GLint location, GLsizei count, const GLuint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4D, 9);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3UI64V, 2 + POINTER_DWORDS);
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);
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4d(ctx->Exec, (location, x, y, z, w));
+ CALL_Uniform3ui64vARB(ctx->Exec, (location, count, v));
}
}
-
static void GLAPIENTRY
-save_Uniform1dv(GLint location, GLsizei count, const GLdouble *v)
+save_Uniform4ui64vARB(GLint location, GLsizei count, const GLuint64 *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);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4UI64V, 2 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLdouble)));
+ n[1].i = location;
+ n[2].i = count;
+ save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1dv(ctx->Exec, (location, count, v));
+ CALL_Uniform4ui64vARB(ctx->Exec, (location, count, v));
}
}
-
static void GLAPIENTRY
-save_Uniform2dv(GLint location, GLsizei count, const GLdouble *v)
+save_ProgramUniform1i64ARB(GLuint program, GLint location, GLint64 x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_2DV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1I64, 4);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLdouble)));
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_INT64_TO_NODES(n, 3, x);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2dv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform1i64ARB(ctx->Exec, (program, location, x));
}
}
-
static void GLAPIENTRY
-save_Uniform3dv(GLint location, GLsizei count, const GLdouble *v)
+save_ProgramUniform2i64ARB(GLuint program, GLint location, GLint64 x,
+ GLint64 y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_3DV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2I64, 6);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLdouble)));
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_INT64_TO_NODES(n, 3, x);
+ ASSIGN_INT64_TO_NODES(n, 5, y);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3dv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform2i64ARB(ctx->Exec, (program, location, x, y));
}
}
-
static void GLAPIENTRY
-save_Uniform4dv(GLint location, GLsizei count, const GLdouble *v)
+save_ProgramUniform3i64ARB(GLuint program, GLint location, GLint64 x,
+ GLint64 y, GLint64 z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4DV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3I64, 8);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLdouble)));
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_INT64_TO_NODES(n, 3, x);
+ ASSIGN_INT64_TO_NODES(n, 5, y);
+ ASSIGN_INT64_TO_NODES(n, 7, z);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4dv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform3i64ARB(ctx->Exec, (program, location, x, y, z));
}
}
-
static void GLAPIENTRY
-save_Uniform1iARB(GLint location, GLint x)
+save_ProgramUniform4i64ARB(GLuint program, GLint location, GLint64 x,
+ GLint64 y, GLint64 z, GLint64 w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_1I, 2);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4I64, 10);
if (n) {
- n[1].i = location;
- n[2].i = x;
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_INT64_TO_NODES(n, 3, x);
+ ASSIGN_INT64_TO_NODES(n, 5, y);
+ ASSIGN_INT64_TO_NODES(n, 7, z);
+ ASSIGN_INT64_TO_NODES(n, 9, w);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1i(ctx->Exec, (location, x));
+ CALL_ProgramUniform4i64ARB(ctx->Exec, (program, location, x, y, z, w));
}
}
static void GLAPIENTRY
-save_Uniform2iARB(GLint location, GLint x, GLint y)
+save_ProgramUniform1i64vARB(GLuint program, GLint location, GLsizei count,
+ const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_2I, 3);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1I64V, 3 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = x;
- n[3].i = y;
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2i(ctx->Exec, (location, x, y));
+ CALL_ProgramUniform1i64vARB(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_Uniform3iARB(GLint location, GLint x, GLint y, GLint z)
+save_ProgramUniform2i64vARB(GLuint program, GLint location, GLsizei count,
+ const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_3I, 4);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2I64V, 3 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = x;
- n[3].i = y;
- n[4].i = z;
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3i(ctx->Exec, (location, x, y, z));
+ CALL_ProgramUniform2i64vARB(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_Uniform4iARB(GLint location, GLint x, GLint y, GLint z, GLint w)
+save_ProgramUniform3i64vARB(GLuint program, GLint location, GLsizei count,
+ const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4I, 5);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3I64V, 3 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = x;
- n[3].i = y;
- n[4].i = z;
- n[5].i = w;
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4i(ctx->Exec, (location, x, y, z, w));
+ CALL_ProgramUniform3i64vARB(ctx->Exec, (program, location, count, v));
}
}
-
-
static void GLAPIENTRY
-save_Uniform1ivARB(GLint location, GLsizei count, const GLint *v)
+save_ProgramUniform4i64vARB(GLuint program, GLint location, GLsizei count,
+ const GLint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_1IV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4I64V, 3 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLint)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1iv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform4i64vARB(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_Uniform2ivARB(GLint location, GLsizei count, const GLint *v)
+save_ProgramUniform1ui64ARB(GLuint program, GLint location, GLuint64 x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_2IV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1UI64, 4);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLint)));
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_UINT64_TO_NODES(n, 3, x);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2iv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform1ui64ARB(ctx->Exec, (program, location, x));
}
}
static void GLAPIENTRY
-save_Uniform3ivARB(GLint location, GLsizei count, const GLint *v)
+save_ProgramUniform2ui64ARB(GLuint program, GLint location, GLuint64 x,
+ GLuint64 y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_3IV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2UI64, 6);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLint)));
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_UINT64_TO_NODES(n, 3, x);
+ ASSIGN_UINT64_TO_NODES(n, 5, y);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3iv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform2ui64ARB(ctx->Exec, (program, location, x, y));
}
}
static void GLAPIENTRY
-save_Uniform4ivARB(GLint location, GLsizei count, const GLint *v)
+save_ProgramUniform3ui64ARB(GLuint program, GLint location, GLuint64 x,
+ GLuint64 y, GLuint64 z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4IV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3UI64, 8);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_UINT64_TO_NODES(n, 3, x);
+ ASSIGN_UINT64_TO_NODES(n, 5, y);
+ ASSIGN_UINT64_TO_NODES(n, 7, z);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4iv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform3ui64ARB(ctx->Exec, (program, location, x, y, z));
}
}
-
-
static void GLAPIENTRY
-save_Uniform1ui(GLint location, GLuint x)
+save_ProgramUniform4ui64ARB(GLuint program, GLint location, GLuint64 x,
+ GLuint64 y, GLuint64 z, GLuint64 w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_1UI, 2);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4UI64, 10);
if (n) {
- n[1].i = location;
- n[2].i = x;
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_UINT64_TO_NODES(n, 3, x);
+ ASSIGN_UINT64_TO_NODES(n, 5, y);
+ ASSIGN_UINT64_TO_NODES(n, 7, z);
+ ASSIGN_UINT64_TO_NODES(n, 9, w);
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1ui(ctx->Exec, (location, x));
+ CALL_ProgramUniform4i64ARB(ctx->Exec, (program, location, x, y, z, w));
}
}
static void GLAPIENTRY
-save_Uniform2ui(GLint location, GLuint x, GLuint y)
+save_ProgramUniform1ui64vARB(GLuint program, GLint location, GLsizei count,
+ const GLuint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_2UI, 3);
- if (n) {
- n[1].i = location;
- n[2].i = x;
- n[3].i = y;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1UI64V,
+ 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(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2ui(ctx->Exec, (location, x, y));
+ CALL_ProgramUniform1ui64vARB(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_Uniform3ui(GLint location, GLuint x, GLuint y, GLuint z)
+save_ProgramUniform2ui64vARB(GLuint program, GLint location, GLsizei count,
+ const GLuint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_3UI, 4);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2UI64V,
+ 3 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = x;
- n[3].i = y;
- n[4].i = z;
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3ui(ctx->Exec, (location, x, y, z));
+ CALL_ProgramUniform2ui64vARB(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_Uniform4ui(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+save_ProgramUniform3ui64vARB(GLuint program, GLint location, GLsizei count,
+ const GLuint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4UI, 5);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3UI64V,
+ 3 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = x;
- n[3].i = y;
- n[4].i = z;
- n[5].i = w;
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4ui(ctx->Exec, (location, x, y, z, w));
+ CALL_ProgramUniform3ui64vARB(ctx->Exec, (program, location, count, v));
}
}
-
-
static void GLAPIENTRY
-save_Uniform1uiv(GLint location, GLsizei count, const GLuint *v)
+save_ProgramUniform4ui64vARB(GLuint program, GLint location, GLsizei count,
+ const GLuint64 *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_1UIV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4UI64V,
+ 3 + POINTER_DWORDS);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 1 * sizeof(*v)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLuint64)));
}
if (ctx->ExecuteFlag) {
- CALL_Uniform1uiv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform4ui64vARB(ctx->Exec, (program, location, count, v));
}
}
+
static void GLAPIENTRY
-save_Uniform2uiv(GLint location, GLsizei count, const GLuint *v)
+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_UNIFORM_2UIV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_USE_PROGRAM_STAGES, 3);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 2 * sizeof(*v)));
+ n[1].ui = pipeline;
+ n[2].ui = stages;
+ n[3].ui = program;
}
if (ctx->ExecuteFlag) {
- CALL_Uniform2uiv(ctx->Exec, (location, count, v));
+ CALL_UseProgramStages(ctx->Exec, (pipeline, stages, program));
}
}
static void GLAPIENTRY
-save_Uniform3uiv(GLint location, GLsizei count, const GLuint *v)
+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_UNIFORM_3UIV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1F, 3);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 3 * sizeof(*v)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].f = x;
}
if (ctx->ExecuteFlag) {
- CALL_Uniform3uiv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform1f(ctx->Exec, (program, location, x));
}
}
static void GLAPIENTRY
-save_Uniform4uiv(GLint location, GLsizei count, const GLuint *v)
+save_ProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_4UIV, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2F, 4);
if (n) {
- n[1].i = location;
- n[2].i = count;
- save_pointer(&n[3], memdup(v, count * 4 * sizeof(*v)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].f = x;
+ n[4].f = y;
}
if (ctx->ExecuteFlag) {
- CALL_Uniform4uiv(ctx->Exec, (location, count, v));
+ CALL_ProgramUniform2f(ctx->Exec, (program, location, x, y));
}
}
-
-
static void GLAPIENTRY
-save_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+save_ProgramUniform3f(GLuint program, GLint location,
+ 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_UNIFORM_MATRIX22, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3F, 5);
if (n) {
- n[1].i = location;
- n[2].i = count;
- n[3].b = transpose;
- save_pointer(&n[4], memdup(m, count * 2 * 2 * sizeof(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].f = x;
+ n[4].f = y;
+ n[5].f = z;
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix2fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform3f(ctx->Exec, (program, location, x, y, z));
}
}
static void GLAPIENTRY
-save_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+save_ProgramUniform4f(GLuint program, GLint location,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4F, 6);
if (n) {
- n[1].i = location;
- n[2].i = count;
- n[3].b = transpose;
- save_pointer(&n[4], memdup(m, count * 3 * 3 * sizeof(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].f = x;
+ n[4].f = y;
+ n[5].f = z;
+ n[6].f = w;
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix3fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform4f(ctx->Exec, (program, location, x, y, z, w));
}
}
static void GLAPIENTRY
-save_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+save_ProgramUniform1fv(GLuint program, GLint location, GLsizei count,
+ const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX44, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1FV, 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(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix4fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform1fv(ctx->Exec, (program, location, count, v));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+save_ProgramUniform2fv(GLuint program, GLint location, GLsizei count,
+ const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2FV, 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(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 2 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix2x3fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform2fv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+save_ProgramUniform3fv(GLuint program, GLint location, GLsizei count,
+ const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX32, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3FV, 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(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 3 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix3x2fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform3fv(ctx->Exec, (program, location, count, v));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+save_ProgramUniform4fv(GLuint program, GLint location, GLsizei count,
+ const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4FV, 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(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 4 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix2x4fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform4fv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+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_UNIFORM_MATRIX42, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1D, 4);
if (n) {
- n[1].i = location;
- n[2].i = count;
- n[3].b = transpose;
- save_pointer(&n[4], memdup(m, count * 4 * 2 * sizeof(GLfloat)));
+ n[1].ui = program;
+ n[2].i = location;
+ ASSIGN_DOUBLE_TO_NODES(n, 3, x);
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix4x2fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform1d(ctx->Exec, (program, location, x));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+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_UNIFORM_MATRIX34, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2D, 6);
if (n) {
- n[1].i = location;
- n[2].i = count;
- n[3].b = transpose;
- save_pointer(&n[4], memdup(m, count * 3 * 4 * sizeof(GLfloat)));
+ 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_UniformMatrix3x4fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform2d(ctx->Exec, (program, location, x, y));
}
}
static void GLAPIENTRY
-save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat *m)
+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_UNIFORM_MATRIX43, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3D, 8);
if (n) {
- n[1].i = location;
- n[2].i = count;
- n[3].b = transpose;
- save_pointer(&n[4], memdup(m, count * 4 * 3 * sizeof(GLfloat)));
+ 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_UniformMatrix4x3fv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform3d(ctx->Exec, (program, location, x, y, z));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+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_UNIFORM_MATRIX22D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4D, 10);
if (n) {
- n[1].i = location;
- n[2].i = count;
- n[3].b = transpose;
- save_pointer(&n[4], memdup(m, count * 2 * 2 * sizeof(GLdouble)));
+ 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_UniformMatrix2dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform4d(ctx->Exec, (program, location, x, y, z, w));
}
}
static void GLAPIENTRY
-save_UniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+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_UNIFORM_MATRIX33D, 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 * 3 * sizeof(GLdouble)));
+ 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_UniformMatrix3dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform1dv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_UniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+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_UNIFORM_MATRIX44D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2DV, 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)));
+ 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_UniformMatrix4dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform2dv(ctx->Exec, (program, location, count, v));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+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_UNIFORM_MATRIX23D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3DV, 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)));
+ 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_UniformMatrix2x3dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform3dv(ctx->Exec, (program, location, count, v));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+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_UNIFORM_MATRIX32D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4DV, 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)));
+ 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_UniformMatrix3x2dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform4dv(ctx->Exec, (program, location, count, v));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+save_ProgramUniform1i(GLuint program, GLint location, GLint x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1I, 3);
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)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = x;
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix2x4dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform1i(ctx->Exec, (program, location, x));
}
}
static void GLAPIENTRY
-save_UniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+save_ProgramUniform2i(GLuint program, GLint location, GLint x, GLint y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2I, 4);
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)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = x;
+ n[4].i = y;
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix4x2dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform2i(ctx->Exec, (program, location, x, y));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+save_ProgramUniform3i(GLuint program, GLint location,
+ GLint x, GLint y, GLint z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3I, 5);
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)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = x;
+ n[4].i = y;
+ n[5].i = z;
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix3x4dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform3i(ctx->Exec, (program, location, x, y, z));
}
}
-
static void GLAPIENTRY
-save_UniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose,
- const GLdouble *m)
+save_ProgramUniform4i(GLuint program, GLint location,
+ GLint x, GLint y, GLint z, GLint w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43D, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4I, 6);
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)));
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = x;
+ n[4].i = y;
+ n[5].i = z;
+ n[6].i = w;
}
if (ctx->ExecuteFlag) {
- CALL_UniformMatrix4x3dv(ctx->Exec, (location, count, transpose, m));
+ CALL_ProgramUniform4i(ctx->Exec, (program, location, x, y, z, w));
}
}
-
static void GLAPIENTRY
-save_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
+save_ProgramUniform1iv(GLuint program, GLint location, GLsizei count,
+ const GLint *v)
{
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_PROGRAM_UNIFORM_1IV, 3 + POINTER_DWORDS);
if (n) {
- n[1].ui = pipeline;
- n[2].ui = stages;
- n[3].ui = program;
+ n[1].ui = program;
+ n[2].i = location;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLint)));
}
if (ctx->ExecuteFlag) {
- CALL_UseProgramStages(ctx->Exec, (pipeline, stages, program));
+ CALL_ProgramUniform1iv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform1f(GLuint program, GLint location, GLfloat x)
+save_ProgramUniform2iv(GLuint program, GLint location, GLsizei count,
+ const GLint *v)
{
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_PROGRAM_UNIFORM_2IV, 3 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].f = x;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 2 * sizeof(GLint)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1f(ctx->Exec, (program, location, x));
+ CALL_ProgramUniform2iv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform2f(GLuint program, GLint location, GLfloat x, GLfloat y)
+save_ProgramUniform3iv(GLuint program, GLint location, GLsizei count,
+ const GLint *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2F, 4);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3IV, 3 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].f = x;
- n[4].f = y;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 3 * sizeof(GLint)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2f(ctx->Exec, (program, location, x, y));
+ CALL_ProgramUniform3iv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform3f(GLuint program, GLint location,
- GLfloat x, GLfloat y, GLfloat z)
+save_ProgramUniform4iv(GLuint program, GLint location, GLsizei count,
+ const GLint *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3F, 5);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4IV, 3 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].f = x;
- n[4].f = y;
- n[5].f = z;
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 4 * sizeof(GLint)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3f(ctx->Exec, (program, location, x, y, z));
+ CALL_ProgramUniform4iv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform4f(GLuint program, GLint location,
- GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+save_ProgramUniform1ui(GLuint program, GLint location, GLuint x)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4F, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1UI, 3);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].f = x;
- n[4].f = y;
- n[5].f = z;
- n[6].f = w;
+ n[3].ui = x;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4f(ctx->Exec, (program, location, x, y, z, w));
+ CALL_ProgramUniform1ui(ctx->Exec, (program, location, x));
}
}
static void GLAPIENTRY
-save_ProgramUniform1fv(GLuint program, GLint location, GLsizei count,
- const GLfloat *v)
+save_ProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1FV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2UI, 4);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].i = count;
- save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLfloat)));
+ n[3].ui = x;
+ n[4].ui = y;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1fv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniform2ui(ctx->Exec, (program, location, x, y));
}
}
static void GLAPIENTRY
-save_ProgramUniform2fv(GLuint program, GLint location, GLsizei count,
- const GLfloat *v)
+save_ProgramUniform3ui(GLuint program, GLint location,
+ GLuint x, GLuint y, GLuint z)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2FV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3UI, 5);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].i = count;
- save_pointer(&n[4], memdup(v, count * 2 * sizeof(GLfloat)));
+ n[3].ui = x;
+ n[4].ui = y;
+ n[5].ui = z;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2fv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniform3ui(ctx->Exec, (program, location, x, y, z));
}
}
static void GLAPIENTRY
-save_ProgramUniform3fv(GLuint program, GLint location, GLsizei count,
- const GLfloat *v)
+save_ProgramUniform4ui(GLuint program, GLint location,
+ GLuint x, GLuint y, GLuint z, GLuint w)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3FV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4UI, 6);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].i = count;
- save_pointer(&n[4], memdup(v, count * 3 * sizeof(GLfloat)));
+ n[3].ui = x;
+ n[4].ui = y;
+ n[5].ui = z;
+ n[6].ui = w;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3fv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniform4ui(ctx->Exec, (program, location, x, y, z, w));
}
}
static void GLAPIENTRY
-save_ProgramUniform4fv(GLuint program, GLint location, GLsizei count,
- const GLfloat *v)
+save_ProgramUniform1uiv(GLuint program, GLint location, GLsizei count,
+ const GLuint *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4FV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1UIV, 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(GLfloat)));
+ save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLuint)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4fv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniform1uiv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform1d(GLuint program, GLint location, GLdouble x)
+save_ProgramUniform2uiv(GLuint program, GLint location, GLsizei count,
+ const GLuint *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1D, 4);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2UIV, 3 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- ASSIGN_DOUBLE_TO_NODES(n, 3, x);
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 2 * sizeof(GLuint)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1d(ctx->Exec, (program, location, x));
+ CALL_ProgramUniform2uiv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform2d(GLuint program, GLint location, GLdouble x, GLdouble y)
+save_ProgramUniform3uiv(GLuint program, GLint location, GLsizei count,
+ const GLuint *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2D, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3UIV, 3 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- ASSIGN_DOUBLE_TO_NODES(n, 3, x);
- ASSIGN_DOUBLE_TO_NODES(n, 5, y);
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 3 * sizeof(GLuint)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2d(ctx->Exec, (program, location, x, y));
+ CALL_ProgramUniform3uiv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform3d(GLuint program, GLint location,
- GLdouble x, GLdouble y, GLdouble z)
+save_ProgramUniform4uiv(GLuint program, GLint location, GLsizei count,
+ const GLuint *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3D, 8);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4UIV, 3 + POINTER_DWORDS);
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);
+ n[3].i = count;
+ save_pointer(&n[4], memdup(v, count * 4 * sizeof(GLuint)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3d(ctx->Exec, (program, location, x, y, z));
+ CALL_ProgramUniform4uiv(ctx->Exec, (program, location, count, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform4d(GLuint program, GLint location,
- GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+save_ProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4D, 10);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX22F,
+ 4 + POINTER_DWORDS);
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);
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 2 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4d(ctx->Exec, (program, location, x, y, z, w));
+ CALL_ProgramUniformMatrix2fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform1dv(GLuint program, GLint location, GLsizei count,
- const GLdouble *v)
+save_ProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *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);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX23F,
+ 4 + 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)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 3 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1dv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix2x3fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform2dv(GLuint program, GLint location, GLsizei count,
- const GLdouble *v)
+save_ProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *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);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX24F,
+ 4 + 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)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 4 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2dv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix2x4fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform3dv(GLuint program, GLint location, GLsizei count,
- const GLdouble *v)
+save_ProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *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);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX32F,
+ 4 + 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)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 2 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3dv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix3x2fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform4dv(GLuint program, GLint location, GLsizei count,
- const GLdouble *v)
+save_ProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *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);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX33F,
+ 4 + 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)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 3 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4dv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix3fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform1i(GLuint program, GLint location, GLint x)
+save_ProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_1I, 3);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX34F,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].i = x;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 4 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1i(ctx->Exec, (program, location, x));
+ CALL_ProgramUniformMatrix3x4fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform2i(GLuint program, GLint location, GLint x, GLint y)
+save_ProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_2I, 4);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX42F,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].i = x;
- n[4].i = y;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 2 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2i(ctx->Exec, (program, location, x, y));
+ CALL_ProgramUniformMatrix4x2fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform3i(GLuint program, GLint location,
- GLint x, GLint y, GLint z)
+save_ProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3I, 5);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX43F,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].i = x;
- n[4].i = y;
- n[5].i = z;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 3 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3i(ctx->Exec, (program, location, x, y, z));
+ CALL_ProgramUniformMatrix4x3fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform4i(GLuint program, GLint location,
- GLint x, GLint y, GLint z, GLint w)
+save_ProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count,
+ GLboolean transpose, const GLfloat *v)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4I, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX44F,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].i = x;
- n[4].i = y;
- n[5].i = z;
- n[6].i = w;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 4 * sizeof(GLfloat)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4i(ctx->Exec, (program, location, x, y, z, w));
+ CALL_ProgramUniformMatrix4fv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform1iv(GLuint program, GLint location, GLsizei count,
- const GLint *v)
+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_PROGRAM_UNIFORM_1IV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX22D,
+ 4 + 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(GLint)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 2 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1iv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix2dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform2iv(GLuint program, GLint location, GLsizei count,
- const GLint *v)
+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_2IV, 3 + POINTER_DWORDS);
+ 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;
- save_pointer(&n[4], memdup(v, count * 2 * sizeof(GLint)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 3 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2iv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix2x3dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform3iv(GLuint program, GLint location, GLsizei count,
- const GLint *v)
+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_3IV, 3 + POINTER_DWORDS);
+ 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;
- save_pointer(&n[4], memdup(v, count * 3 * sizeof(GLint)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 2 * 4 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3iv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix2x4dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform4iv(GLuint program, GLint location, GLsizei count,
- const GLint *v)
+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_4IV, 3 + POINTER_DWORDS);
+ 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;
- save_pointer(&n[4], memdup(v, count * 4 * sizeof(GLint)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 2 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4iv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix3x2dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform1ui(GLuint program, GLint location, GLuint x)
+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_1UI, 3);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX33D,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].ui = x;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 3 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1ui(ctx->Exec, (program, location, x));
+ CALL_ProgramUniformMatrix3dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform2ui(GLuint program, GLint location, GLuint x, GLuint y)
+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_2UI, 4);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX34D,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].ui = x;
- n[4].ui = y;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 3 * 4 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2ui(ctx->Exec, (program, location, x, y));
+ CALL_ProgramUniformMatrix3x4dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform3ui(GLuint program, GLint location,
- GLuint x, GLuint y, GLuint z)
+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_3UI, 5);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX42D,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].ui = x;
- n[4].ui = y;
- n[5].ui = z;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 2 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3ui(ctx->Exec, (program, location, x, y, z));
+ CALL_ProgramUniformMatrix4x2dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform4ui(GLuint program, GLint location,
- GLuint x, GLuint y, GLuint z, GLuint w)
+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_4UI, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX43D,
+ 4 + POINTER_DWORDS);
if (n) {
n[1].ui = program;
n[2].i = location;
- n[3].ui = x;
- n[4].ui = y;
- n[5].ui = z;
- n[6].ui = w;
+ n[3].i = count;
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 3 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4ui(ctx->Exec, (program, location, x, y, z, w));
+ CALL_ProgramUniformMatrix4x3dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform1uiv(GLuint program, GLint location, GLsizei count,
- const GLuint *v)
+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_1UIV, 3 + POINTER_DWORDS);
+ 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;
- save_pointer(&n[4], memdup(v, count * 1 * sizeof(GLuint)));
+ n[4].b = transpose;
+ save_pointer(&n[5], memdup(v, count * 4 * 4 * sizeof(GLdouble)));
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform1uiv(ctx->Exec, (program, location, count, v));
+ CALL_ProgramUniformMatrix4dv(ctx->Exec,
+ (program, location, count, transpose, v));
}
}
static void GLAPIENTRY
-save_ProgramUniform2uiv(GLuint program, GLint location, GLsizei count,
- const GLuint *v)
+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_PROGRAM_UNIFORM_2UIV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_CLIP_CONTROL, 2);
if (n) {
- n[1].ui = program;
- n[2].i = location;
- n[3].i = count;
- save_pointer(&n[4], memdup(v, count * 2 * sizeof(GLuint)));
+ n[1].e = origin;
+ n[2].e = depth;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform2uiv(ctx->Exec, (program, location, count, v));
+ CALL_ClipControl(ctx->Exec, (origin, depth));
}
}
static void GLAPIENTRY
-save_ProgramUniform3uiv(GLuint program, GLint location, GLsizei count,
- const GLuint *v)
+save_ClampColorARB(GLenum target, GLenum clamp)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_3UIV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_CLAMP_COLOR, 2);
if (n) {
- n[1].ui = program;
- n[2].i = location;
- n[3].i = count;
- save_pointer(&n[4], memdup(v, count * 3 * sizeof(GLuint)));
+ n[1].e = target;
+ n[2].e = clamp;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform3uiv(ctx->Exec, (program, location, count, v));
+ CALL_ClampColor(ctx->Exec, (target, clamp));
}
}
+/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_ProgramUniform4uiv(GLuint program, GLint location, GLsizei count,
- const GLuint *v)
+save_ClearColorIi(GLint red, GLint green, GLint blue, GLint alpha)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_4UIV, 3 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_CLEARCOLOR_I, 4);
if (n) {
- n[1].ui = program;
- n[2].i = location;
- n[3].i = count;
- save_pointer(&n[4], memdup(v, count * 4 * sizeof(GLuint)));
+ n[1].i = red;
+ n[2].i = green;
+ n[3].i = blue;
+ n[4].i = alpha;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniform4uiv(ctx->Exec, (program, location, count, v));
+ CALL_ClearColorIiEXT(ctx->Exec, (red, green, blue, alpha));
}
}
+/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_ProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_ClearColorIui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX22F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_CLEARCOLOR_UI, 4);
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 * 2 * sizeof(GLfloat)));
+ n[1].ui = red;
+ n[2].ui = green;
+ n[3].ui = blue;
+ n[4].ui = alpha;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix2fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_ClearColorIuiEXT(ctx->Exec, (red, green, blue, alpha));
}
}
+/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_ProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_TexParameterIiv(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_PROGRAM_UNIFORM_MATRIX23F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_TEXPARAMETER_I, 6);
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(GLfloat)));
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].i = params[0];
+ n[4].i = params[1];
+ n[5].i = params[2];
+ n[6].i = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix2x3fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_TexParameterIiv(ctx->Exec, (target, pname, params));
}
}
+/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_ProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX24F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_TEXPARAMETER_UI, 6);
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(GLfloat)));
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].ui = params[0];
+ n[4].ui = params[1];
+ n[5].ui = params[2];
+ n[6].ui = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix2x4fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_TexParameterIuiv(ctx->Exec, (target, pname, params));
}
}
+/* GL_ARB_instanced_arrays */
static void GLAPIENTRY
-save_ProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_VertexAttribDivisor(GLuint index, GLuint divisor)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX32F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_VERTEX_ATTRIB_DIVISOR, 2);
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(GLfloat)));
+ n[1].ui = index;
+ n[2].ui = divisor;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix3x2fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_VertexAttribDivisor(ctx->Exec, (index, divisor));
}
}
+
+/* GL_NV_texture_barrier */
static void GLAPIENTRY
-save_ProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_TextureBarrierNV(void)
{
GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ alloc_instruction(ctx, OPCODE_TEXTURE_BARRIER_NV, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_TextureBarrierNV(ctx->Exec, ());
+ }
+}
+
+
+/* GL_ARB_sampler_objects */
+static void GLAPIENTRY
+save_BindSampler(GLuint unit, GLuint sampler)
+{
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX33F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_BIND_SAMPLER, 2);
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(GLfloat)));
+ n[1].ui = unit;
+ n[2].ui = sampler;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix3fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_BindSampler(ctx->Exec, (unit, sampler));
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX34F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERIV, 6);
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(GLfloat)));
+ 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_ProgramUniformMatrix3x4fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_SamplerParameteriv(ctx->Exec, (sampler, pname, params));
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+{
+ GLint parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0;
+ save_SamplerParameteriv(sampler, pname, parray);
+}
+
+static void GLAPIENTRY
+save_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX42F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERFV, 6);
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(GLfloat)));
+ n[1].ui = sampler;
+ n[2].e = pname;
+ n[3].f = params[0];
+ if (pname == GL_TEXTURE_BORDER_COLOR) {
+ n[4].f = params[1];
+ n[5].f = params[2];
+ n[6].f = params[3];
+ }
+ else {
+ n[4].f = n[5].f = n[6].f = 0.0F;
+ }
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix4x2fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_SamplerParameterfv(ctx->Exec, (sampler, pname, params));
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+ GLfloat parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_SamplerParameterfv(sampler, pname, parray);
+}
+
+static void GLAPIENTRY
+save_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX43F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERIIV, 6);
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(GLfloat)));
+ 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_ProgramUniformMatrix4x3fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_SamplerParameterIiv(ctx->Exec, (sampler, pname, params));
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *v)
+save_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX44F,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERUIV, 6);
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(GLfloat)));
+ 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_ProgramUniformMatrix4fv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_SamplerParameterIuiv(ctx->Exec, (sampler, pname, params));
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_PROGRAM_UNIFORM_MATRIX22D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_WAIT_SYNC, 4);
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 * 2 * sizeof(GLdouble)));
+ 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_ProgramUniformMatrix2dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_WaitSync(ctx->Exec, (sync, flags, timeout));
}
}
+
+/** GL_NV_conditional_render */
static void GLAPIENTRY
-save_ProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+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_PROGRAM_UNIFORM_MATRIX23D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_BEGIN_CONDITIONAL_RENDER, 2);
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)));
+ n[1].i = queryId;
+ n[2].e = mode;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix2x3dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_BeginConditionalRender(ctx->Exec, (queryId, mode));
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+save_EndConditionalRender(void)
{
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)));
- }
+ alloc_instruction(ctx, OPCODE_END_CONDITIONAL_RENDER, 0);
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix2x4dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_EndConditionalRender(ctx->Exec, ());
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+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_PROGRAM_UNIFORM_MATRIX32D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_BLOCK_BINDING, 3);
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)));
+ n[1].ui = prog;
+ n[2].ui = index;
+ n[3].ui = binding;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix3x2dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_UniformBlockBinding(ctx->Exec, (prog, index, binding));
}
}
static void GLAPIENTRY
-save_ProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+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_PROGRAM_UNIFORM_MATRIX33D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_SUBROUTINES, 2 + 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)));
+ 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_ProgramUniformMatrix3dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_UniformSubroutinesuiv(ctx->Exec, (shadertype, count, indices));
}
}
+/** GL_EXT_window_rectangles */
static void GLAPIENTRY
-save_ProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+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_PROGRAM_UNIFORM_MATRIX34D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_WINDOW_RECTANGLES, 2 + 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)));
+ 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_ProgramUniformMatrix3x4dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_WindowRectanglesEXT(ctx->Exec, (mode, count, box));
}
}
+
+/** GL_NV_conservative_raster */
static void GLAPIENTRY
-save_ProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+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_PROGRAM_UNIFORM_MATRIX42D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_SUBPIXEL_PRECISION_BIAS, 2);
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)));
+ n[1].ui = xbits;
+ n[2].ui = ybits;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix4x2dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_SubpixelPrecisionBiasNV(ctx->Exec, (xbits, ybits));
}
}
+/** GL_NV_conservative_raster_dilate */
static void GLAPIENTRY
-save_ProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+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_PROGRAM_UNIFORM_MATRIX43D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_CONSERVATIVE_RASTER_PARAMETER_F, 2);
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)));
+ n[1].e = pname;
+ n[2].f = param;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix4x3dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_ConservativeRasterParameterfNV(ctx->Exec, (pname, param));
}
}
+/** GL_NV_conservative_raster_pre_snap_triangles */
static void GLAPIENTRY
-save_ProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count,
- GLboolean transpose, const GLdouble *v)
+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_PROGRAM_UNIFORM_MATRIX44D,
- 4 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_CONSERVATIVE_RASTER_PARAMETER_I, 2);
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)));
+ n[1].e = pname;
+ n[2].i = param;
}
if (ctx->ExecuteFlag) {
- CALL_ProgramUniformMatrix4dv(ctx->Exec,
- (program, location, count, transpose, v));
+ CALL_ConservativeRasterParameteriNV(ctx->Exec, (pname, param));
}
}
+/** GL_EXT_direct_state_access */
+
static void GLAPIENTRY
-save_ClipControl(GLenum origin, GLenum depth)
+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_CLIP_CONTROL, 2);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_LOAD, 17);
if (n) {
- n[1].e = origin;
- n[2].e = depth;
+ n[1].e = matrixMode;
+ for (unsigned i = 0; i < 16; i++) {
+ n[2 + i].f = m[i];
+ }
}
if (ctx->ExecuteFlag) {
- CALL_ClipControl(ctx->Exec, (origin, depth));
+ CALL_MatrixLoadfEXT(ctx->Exec, (matrixMode, m));
}
}
static void GLAPIENTRY
-save_ClampColorARB(GLenum target, GLenum clamp)
+save_MatrixLoaddEXT(GLenum matrixMode, const GLdouble *m)
{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_CLAMP_COLOR, 2);
- if (n) {
- n[1].e = target;
- n[2].e = clamp;
- }
- if (ctx->ExecuteFlag) {
- CALL_ClampColor(ctx->Exec, (target, clamp));
+ GLfloat f[16];
+ for (unsigned i = 0; i < 16; i++) {
+ f[i] = (GLfloat) m[i];
}
+ save_MatrixLoadfEXT(matrixMode, f);
}
-/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_ClearColorIi(GLint red, GLint green, GLint blue, GLint alpha)
+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_CLEARCOLOR_I, 4);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_MULT, 17);
if (n) {
- n[1].i = red;
- n[2].i = green;
- n[3].i = blue;
- n[4].i = alpha;
+ n[1].e = matrixMode;
+ for (unsigned i = 0; i < 16; i++) {
+ n[2 + i].f = m[i];
+ }
}
if (ctx->ExecuteFlag) {
- CALL_ClearColorIiEXT(ctx->Exec, (red, green, blue, alpha));
+ 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);
}
-/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_ClearColorIui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+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_CLEARCOLOR_UI, 4);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_ROTATE, 5);
if (n) {
- n[1].ui = red;
- n[2].ui = green;
- n[3].ui = blue;
- n[4].ui = alpha;
+ n[1].e = matrixMode;
+ n[2].f = angle;
+ n[3].f = x;
+ n[4].f = y;
+ n[5].f = z;
}
if (ctx->ExecuteFlag) {
- CALL_ClearColorIuiEXT(ctx->Exec, (red, green, blue, alpha));
+ CALL_MatrixRotatefEXT(ctx->Exec, (matrixMode, angle, x, y, z));
}
}
-/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_TexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+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_TEXPARAMETER_I, 6);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_SCALE, 4);
if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].i = params[0];
- n[4].i = params[1];
- n[5].i = params[2];
- n[6].i = params[3];
+ n[1].e = matrixMode;
+ n[2].f = x;
+ n[3].f = y;
+ n[4].f = z;
}
if (ctx->ExecuteFlag) {
- CALL_TexParameterIiv(ctx->Exec, (target, pname, params));
+ CALL_MatrixScalefEXT(ctx->Exec, (matrixMode, x, y, z));
}
}
-/** GL_EXT_texture_integer */
static void GLAPIENTRY
-save_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+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_TEXPARAMETER_UI, 6);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_TRANSLATE, 4);
if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].ui = params[0];
- n[4].ui = params[1];
- n[5].ui = params[2];
- n[6].ui = params[3];
+ n[1].e = matrixMode;
+ n[2].f = x;
+ n[3].f = y;
+ n[4].f = z;
}
if (ctx->ExecuteFlag) {
- CALL_TexParameterIuiv(ctx->Exec, (target, pname, params));
+ CALL_MatrixTranslatefEXT(ctx->Exec, (matrixMode, x, y, z));
}
}
-/* GL_ARB_instanced_arrays */
static void GLAPIENTRY
-save_VertexAttribDivisor(GLuint index, GLuint divisor)
+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_VERTEX_ATTRIB_DIVISOR, 2);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_LOAD_IDENTITY, 1);
if (n) {
- n[1].ui = index;
- n[2].ui = divisor;
+ n[1].e = matrixMode;
}
if (ctx->ExecuteFlag) {
- CALL_VertexAttribDivisor(ctx->Exec, (index, divisor));
+ CALL_MatrixLoadIdentityEXT(ctx->Exec, (matrixMode));
}
}
-
-/* GL_NV_texture_barrier */
static void GLAPIENTRY
-save_TextureBarrierNV(void)
+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);
- alloc_instruction(ctx, OPCODE_TEXTURE_BARRIER_NV, 0);
+ 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_TextureBarrierNV(ctx->Exec, ());
+ CALL_MatrixOrthoEXT(ctx->Exec, (matrixMode, left, right, bottom, top, nearval, farval));
}
}
-/* GL_ARB_sampler_objects */
static void GLAPIENTRY
-save_BindSampler(GLuint unit, GLuint sampler)
+save_MatrixFrustumEXT(GLenum matrixMode, GLdouble left, GLdouble right,
+ GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
{
- Node *n;
GET_CURRENT_CONTEXT(ctx);
+ Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_BIND_SAMPLER, 2);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_FRUSTUM, 7);
if (n) {
- n[1].ui = unit;
- n[2].ui = sampler;
+ 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_BindSampler(ctx->Exec, (unit, sampler));
+ CALL_MatrixFrustumEXT(ctx->Exec, (matrixMode, left, right, bottom, top, nearval, farval));
}
}
static void GLAPIENTRY
-save_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params)
+save_MatrixPushEXT(GLenum matrixMode)
{
- Node *n;
GET_CURRENT_CONTEXT(ctx);
+ Node* n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERIV, 6);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_PUSH, 1);
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].e = matrixMode;
}
if (ctx->ExecuteFlag) {
- CALL_SamplerParameteriv(ctx->Exec, (sampler, pname, params));
+ CALL_MatrixPushEXT(ctx->Exec, (matrixMode));
}
}
static void GLAPIENTRY
-save_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
-{
- GLint parray[4];
- parray[0] = param;
- parray[1] = parray[2] = parray[3] = 0;
- save_SamplerParameteriv(sampler, pname, parray);
-}
-
-static void GLAPIENTRY
-save_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)
+save_MatrixPopEXT(GLenum matrixMode)
{
- Node *n;
GET_CURRENT_CONTEXT(ctx);
+ Node* n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERFV, 6);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_POP, 1);
if (n) {
- n[1].ui = sampler;
- n[2].e = pname;
- n[3].f = params[0];
- if (pname == GL_TEXTURE_BORDER_COLOR) {
- n[4].f = params[1];
- n[5].f = params[2];
- n[6].f = params[3];
- }
- else {
- n[4].f = n[5].f = n[6].f = 0.0F;
- }
+ n[1].e = matrixMode;
}
if (ctx->ExecuteFlag) {
- CALL_SamplerParameterfv(ctx->Exec, (sampler, pname, params));
+ CALL_MatrixPopEXT(ctx->Exec, (matrixMode));
}
}
static void GLAPIENTRY
-save_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+save_MatrixLoadTransposefEXT(GLenum matrixMode, const GLfloat m[16])
{
- GLfloat parray[4];
- parray[0] = param;
- parray[1] = parray[2] = parray[3] = 0.0F;
- save_SamplerParameterfv(sampler, pname, parray);
+ GLfloat tm[16];
+ _math_transposef(tm, m);
+ save_MatrixLoadfEXT(matrixMode, tm);
}
static void GLAPIENTRY
-save_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
+save_MatrixLoadTransposedEXT(GLenum matrixMode, const GLdouble m[16])
{
- 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));
- }
+ GLfloat tm[16];
+ _math_transposefd(tm, m);
+ save_MatrixLoadfEXT(matrixMode, tm);
}
static void GLAPIENTRY
-save_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
+save_MatrixMultTransposefEXT(GLenum matrixMode, const GLfloat m[16])
{
- 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));
- }
+ GLfloat tm[16];
+ _math_transposef(tm, m);
+ save_MatrixMultfEXT(matrixMode, tm);
}
static void GLAPIENTRY
-save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+save_MatrixMultTransposedEXT(GLenum matrixMode, const GLdouble m[16])
{
- 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));
- }
+ GLfloat tm[16];
+ _math_transposefd(tm, m);
+ save_MatrixMultfEXT(matrixMode, tm);
}
-
-/** GL_NV_conditional_render */
static void GLAPIENTRY
-save_BeginConditionalRender(GLuint queryId, GLenum mode)
+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_BEGIN_CONDITIONAL_RENDER, 2);
+ n = alloc_instruction(ctx, OPCODE_TEXTUREPARAMETER_F, 7);
if (n) {
- n[1].i = queryId;
- n[2].e = mode;
+ 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_BeginConditionalRender(ctx->Exec, (queryId, mode));
+ CALL_TextureParameterfvEXT(ctx->Exec, (texture, target, pname, params));
}
}
+
static void GLAPIENTRY
-save_EndConditionalRender(void)
+save_TextureParameterfEXT(GLuint texture, GLenum target, GLenum pname, GLfloat param)
{
- 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, ());
- }
+ GLfloat parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_TextureParameterfvEXT(texture, target, pname, parray);
}
static void GLAPIENTRY
-save_UniformBlockBinding(GLuint prog, GLuint index, GLuint binding)
+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_UNIFORM_BLOCK_BINDING, 3);
+ n = alloc_instruction(ctx, OPCODE_TEXTUREPARAMETER_I, 7);
if (n) {
- n[1].ui = prog;
- n[2].ui = index;
- n[3].ui = binding;
+ 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_UniformBlockBinding(ctx->Exec, (prog, index, binding));
+ CALL_TextureParameterivEXT(ctx->Exec, (texture, target, pname, params));
}
}
static void GLAPIENTRY
-save_UniformSubroutinesuiv(GLenum shadertype, GLsizei count,
- const GLuint *indices)
+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_TextureParameterIivEXT(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_UNIFORM_SUBROUTINES, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_TEXTUREPARAMETER_II, 7);
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);
+ 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_UniformSubroutinesuiv(ctx->Exec, (shadertype, count, indices));
+ CALL_TextureParameterIivEXT(ctx->Exec, (texture, target, pname, params));
}
}
-/** GL_EXT_window_rectangles */
static void GLAPIENTRY
-save_WindowRectanglesEXT(GLenum mode, GLsizei count, const GLint *box)
+save_TextureParameterIuivEXT(GLuint texture, GLenum target, GLenum pname, const GLuint* params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_WINDOW_RECTANGLES, 2 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_TEXTUREPARAMETER_IUI, 7);
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[1].ui = texture;
+ n[2].e = target;
+ n[3].e = pname;
+ n[4].ui = params[0];
+ n[5].ui = params[1];
+ n[6].ui = params[2];
+ n[7].ui = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_WindowRectanglesEXT(ctx->Exec, (mode, count, box));
+ CALL_TextureParameterIuivEXT(ctx->Exec, (texture, target, pname, params));
}
}
-/** GL_NV_conservative_raster */
static void GLAPIENTRY
-save_SubpixelPrecisionBiasNV(GLuint xbits, GLuint ybits)
+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);
- 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 (target == GL_PROXY_TEXTURE_1D) {
+ /* don't compile, execute immediately */
+ CALL_TextureImage1DEXT(ctx->Exec, (texture, target, level, components, width,
+ border, format, type, pixels));
}
- if (ctx->ExecuteFlag) {
- CALL_SubpixelPrecisionBiasNV(ctx->Exec, (xbits, ybits));
+ 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));
+ }
}
}
-/** GL_NV_conservative_raster_dilate */
+
static void GLAPIENTRY
-save_ConservativeRasterParameterfNV(GLenum pname, GLfloat param)
+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);
- 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 (target == GL_PROXY_TEXTURE_2D) {
+ /* don't compile, execute immediately */
+ CALL_TextureImage2DEXT(ctx->Exec, (texture, target, level, components, width,
+ height, border, format, type, pixels));
}
- if (ctx->ExecuteFlag) {
- CALL_ConservativeRasterParameterfNV(ctx->Exec, (pname, param));
+ 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));
+ }
}
}
-/** GL_NV_conservative_raster_pre_snap_triangles */
+
static void GLAPIENTRY
-save_ConservativeRasterParameteriNV(GLenum pname, GLint param)
+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);
- 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 (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));
}
- if (ctx->ExecuteFlag) {
- CALL_ConservativeRasterParameteriNV(ctx->Exec, (pname, param));
+ 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));
+ }
}
}
-/** GL_EXT_direct_state_access */
static void GLAPIENTRY
-save_MatrixLoadfEXT(GLenum matrixMode, const GLfloat *m)
+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_MATRIX_LOAD, 17);
+
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE1D, 7 + POINTER_DWORDS);
if (n) {
- n[1].e = matrixMode;
- for (unsigned i = 0; i < 16; i++) {
- n[2 + i].f = m[i];
- }
+ 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_MatrixLoadfEXT(ctx->Exec, (matrixMode, m));
+ CALL_TextureSubImage1DEXT(ctx->Exec, (texture, target, level, xoffset, width,
+ format, type, pixels));
}
}
-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)
+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_MATRIX_MULT, 17);
+
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE2D, 9 + POINTER_DWORDS);
if (n) {
- n[1].e = matrixMode;
- for (unsigned i = 0; i < 16; i++) {
- n[2 + i].f = m[i];
- }
+ 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_MatrixMultfEXT(ctx->Exec, (matrixMode, m));
+ CALL_TextureSubImage2DEXT(ctx->Exec, (texture, target, level, xoffset, yoffset,
+ width, height, format, type, pixels));
}
}
-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)
+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_MATRIX_ROTATE, 5);
+
+ n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE3D, 11 + POINTER_DWORDS);
if (n) {
- n[1].e = matrixMode;
- n[2].f = angle;
- n[3].f = x;
- n[4].f = y;
- n[5].f = z;
+ 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_MatrixRotatefEXT(ctx->Exec, (matrixMode, angle, x, y, z));
+ CALL_TextureSubImage3DEXT(ctx->Exec, (texture, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth, format, type,
+ pixels));
}
}
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)
+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_MATRIX_SCALE, 4);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEXTURE_IMAGE1D, 8);
if (n) {
- n[1].e = matrixMode;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
+ 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_MatrixScalefEXT(ctx->Exec, (matrixMode, x, y, z));
+ CALL_CopyTextureImage1DEXT(ctx->Exec, (texture, target, level,
+ internalformat, x, y,
+ width, border));
}
}
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)
+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_MATRIX_TRANSLATE, 4);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEXTURE_IMAGE2D, 9);
if (n) {
- n[1].e = matrixMode;
- n[2].f = x;
- n[3].f = y;
- n[4].f = z;
+ 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_MatrixTranslatefEXT(ctx->Exec, (matrixMode, x, y, z));
+ CALL_CopyTextureImage2DEXT(ctx->Exec, (texture, target, level,
+ internalformat, x, y,
+ width, height, border));
}
}
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)
+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_MATRIX_LOAD_IDENTITY, 1);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEXTURE_SUB_IMAGE1D, 7);
if (n) {
- n[1].e = matrixMode;
+ 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_MatrixLoadIdentityEXT(ctx->Exec, (matrixMode));
+ CALL_CopyTextureSubImage1DEXT(ctx->Exec,
+ (texture, target, level, xoffset, x, y, width));
}
}
static void GLAPIENTRY
-save_MatrixOrthoEXT(GLenum matrixMode, GLdouble left, GLdouble right,
- GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
+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_MATRIX_ORTHO, 7);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEXTURE_SUB_IMAGE2D, 9);
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;
+ 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_MatrixOrthoEXT(ctx->Exec, (matrixMode, left, right, bottom, top, nearval, farval));
+ CALL_CopyTextureSubImage2DEXT(ctx->Exec, (texture, target, level,
+ xoffset, yoffset,
+ x, y, width, height));
}
}
static void GLAPIENTRY
-save_MatrixFrustumEXT(GLenum matrixMode, GLdouble left, GLdouble right,
- GLdouble bottom, GLdouble top, GLdouble nearval, GLdouble farval)
+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_MATRIX_FRUSTUM, 7);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEXTURE_SUB_IMAGE3D, 10);
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;
+ 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_MatrixFrustumEXT(ctx->Exec, (matrixMode, left, right, bottom, top, nearval, farval));
+ CALL_CopyTextureSubImage3DEXT(ctx->Exec, (texture, target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height));
}
}
+
static void GLAPIENTRY
-save_MatrixPushEXT(GLenum matrixMode)
+save_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture)
{
GET_CURRENT_CONTEXT(ctx);
- Node* n;
+ Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_MATRIX_PUSH, 1);
+ n = alloc_instruction(ctx, OPCODE_BIND_MULTITEXTURE, 3);
if (n) {
- n[1].e = matrixMode;
+ n[1].e = texunit;
+ n[2].e = target;
+ n[3].ui = texture;
}
if (ctx->ExecuteFlag) {
- CALL_MatrixPushEXT(ctx->Exec, (matrixMode));
+ CALL_BindMultiTextureEXT(ctx->Exec, (texunit, target, texture));
}
}
+
static void GLAPIENTRY
-save_MatrixPopEXT(GLenum matrixMode)
+save_MultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname,
+ const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
- Node* n;
+ Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_MATRIX_POP, 1);
+ n = alloc_instruction(ctx, OPCODE_MULTITEXPARAMETER_F, 7);
if (n) {
- n[1].e = matrixMode;
+ 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_MatrixPopEXT(ctx->Exec, (matrixMode));
+ CALL_MultiTexParameterfvEXT(ctx->Exec, (texunit, target, pname, params));
}
}
-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])
+save_MultiTexParameterfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param)
{
- GLfloat tm[16];
- _math_transposef(tm, m);
- save_MatrixMultfEXT(matrixMode, tm);
+ GLfloat parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0.0F;
+ save_MultiTexParameterfvEXT(texunit, target, pname, parray);
}
static void GLAPIENTRY
-save_MatrixMultTransposedEXT(GLenum matrixMode, const GLdouble m[16])
+save_MultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint *params)
{
- GLfloat tm[16];
- _math_transposefd(tm, m);
- save_MatrixMultfEXT(matrixMode, tm);
+ 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_TextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname,
- const GLfloat *params)
+save_MultiTexParameterIivEXT(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_TEXTUREPARAMETER_F, 7);
+ n = alloc_instruction(ctx, OPCODE_MULTITEXPARAMETER_II, 7);
if (n) {
- n[1].ui = texture;
+ 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];
+ n[4].i = params[0];
+ n[5].i = params[1];
+ n[6].i = params[2];
+ n[7].i = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_TextureParameterfvEXT(ctx->Exec, (texture, target, pname, params));
+ CALL_MultiTexParameterIivEXT(ctx->Exec, (texunit, 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)
+save_MultiTexParameterIuivEXT(GLenum texunit, GLenum target, GLenum pname, const GLuint *params)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_TEXTUREPARAMETER_I, 7);
+ n = alloc_instruction(ctx, OPCODE_MULTITEXPARAMETER_IUI, 7);
if (n) {
- n[1].ui = texture;
+ 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];
+ n[4].ui = params[0];
+ n[5].ui = params[1];
+ n[6].ui = params[2];
+ n[7].ui = params[3];
}
if (ctx->ExecuteFlag) {
- CALL_TextureParameterivEXT(ctx->Exec, (texture, target, pname, params));
+ CALL_MultiTexParameterIuivEXT(ctx->Exec, (texunit, target, pname, params));
}
}
static void GLAPIENTRY
-save_TextureParameteriEXT(GLuint texture, GLenum target, GLenum pname, GLint param)
+save_MultiTexParameteriEXT(GLenum texunit, 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);
+ save_MultiTexParameterivEXT(texunit, 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)
+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_TextureImage1DEXT(ctx->Exec, (texture, target, level, components, width,
+ 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_TEXTURE_IMAGE1D, 8 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_IMAGE1D, 8 + POINTER_DWORDS);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = components;
pixels, &ctx->Unpack));
}
if (ctx->ExecuteFlag) {
- CALL_TextureImage1DEXT(ctx->Exec, (texture, target, level, components, width,
+ CALL_MultiTexImage1DEXT(ctx->Exec, (texunit, target, level, components, width,
border, format, type, pixels));
}
}
static void GLAPIENTRY
-save_TextureImage2DEXT(GLuint texture, GLenum target,
+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_TextureImage2DEXT(ctx->Exec, (texture, target, level, components, width,
+ 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_TEXTURE_IMAGE2D, 9 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_IMAGE2D, 9 + POINTER_DWORDS);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = components;
pixels, &ctx->Unpack));
}
if (ctx->ExecuteFlag) {
- CALL_TextureImage2DEXT(ctx->Exec, (texture, target, level, components, width,
+ CALL_MultiTexImage2DEXT(ctx->Exec, (texunit, target, level, components, width,
height, border, format, type, pixels));
}
}
static void GLAPIENTRY
-save_TextureImage3DEXT(GLuint texture, GLenum target,
+save_MultiTexImage3DEXT(GLenum texunit, GLenum target,
GLint level, GLint internalFormat,
GLsizei width, GLsizei height, GLsizei depth,
GLint border,
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_3D) {
/* don't compile, execute immediately */
- CALL_TextureImage3DEXT(ctx->Exec, (texture, target, level, internalFormat, width,
+ 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_TEXTURE_IMAGE3D, 10 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_IMAGE3D, 10 + POINTER_DWORDS);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = (GLint) internalFormat;
pixels, &ctx->Unpack));
}
if (ctx->ExecuteFlag) {
- CALL_TextureImage3DEXT(ctx->Exec, (texture, target, level, internalFormat,
+ CALL_MultiTexImage3DEXT(ctx->Exec, (texunit, target, level, internalFormat,
width, height, depth, border, format,
type, pixels));
}
static void GLAPIENTRY
-save_TextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset,
+save_MultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset,
GLsizei width, GLenum format, GLenum type,
const GLvoid * pixels)
{
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE1D, 7 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE1D, 7 + POINTER_DWORDS);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
pixels, &ctx->Unpack));
}
if (ctx->ExecuteFlag) {
- CALL_TextureSubImage1DEXT(ctx->Exec, (texture, target, level, xoffset, width,
+ CALL_MultiTexSubImage1DEXT(ctx->Exec, (texunit, target, level, xoffset, width,
format, type, pixels));
}
}
static void GLAPIENTRY
-save_TextureSubImage2DEXT(GLuint texture, GLenum target, GLint level,
+save_MultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type, const GLvoid * pixels)
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE2D, 9 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE2D, 9 + POINTER_DWORDS);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
pixels, &ctx->Unpack));
}
if (ctx->ExecuteFlag) {
- CALL_TextureSubImage2DEXT(ctx->Exec, (texture, target, level, xoffset, yoffset,
+ CALL_MultiTexSubImage2DEXT(ctx->Exec, (texunit, target, level, xoffset, yoffset,
width, height, format, type, pixels));
}
}
static void GLAPIENTRY
-save_TextureSubImage3DEXT(GLuint texture, GLenum target, GLint level,
+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)
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_TEXTURE_SUB_IMAGE3D, 11 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE3D, 11 + POINTER_DWORDS);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
pixels, &ctx->Unpack));
}
if (ctx->ExecuteFlag) {
- CALL_TextureSubImage3DEXT(ctx->Exec, (texture, target, level,
+ CALL_MultiTexSubImage3DEXT(ctx->Exec, (texunit, target, level,
xoffset, yoffset, zoffset,
width, height, depth, format, type,
pixels));
}
}
+
static void GLAPIENTRY
-save_CopyTextureImage1DEXT(GLuint texture, GLenum target, GLint level,
+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_TEXTURE_IMAGE1D, 8);
+ n = alloc_instruction(ctx, OPCODE_COPY_MULTITEX_IMAGE1D, 8);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].e = internalformat;
n[8].i = border;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTextureImage1DEXT(ctx->Exec, (texture, target, level,
+ CALL_CopyMultiTexImage1DEXT(ctx->Exec, (texunit, target, level,
internalformat, x, y,
width, border));
}
}
+
static void GLAPIENTRY
-save_CopyTextureImage2DEXT(GLuint texture, GLenum target, GLint level,
+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_TEXTURE_IMAGE2D, 9);
+ n = alloc_instruction(ctx, OPCODE_COPY_MULTITEX_IMAGE2D, 9);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].e = internalformat;
n[9].i = border;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTextureImage2DEXT(ctx->Exec, (texture, target, level,
+ CALL_CopyMultiTexImage2DEXT(ctx->Exec, (texunit, target, level,
internalformat, x, y,
width, height, border));
}
}
+
static void GLAPIENTRY
-save_CopyTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level,
+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_TEXTURE_SUB_IMAGE1D, 7);
+ n = alloc_instruction(ctx, OPCODE_COPY_MULTITEX_SUB_IMAGE1D, 7);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
n[7].i = width;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTextureSubImage1DEXT(ctx->Exec,
- (texture, target, level, xoffset, x, y, width));
+ CALL_CopyMultiTexSubImage1DEXT(ctx->Exec,
+ (texunit, target, level, xoffset, x, y, width));
}
}
+
static void GLAPIENTRY
-save_CopyTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level,
+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_TEXTURE_SUB_IMAGE2D, 9);
+ n = alloc_instruction(ctx, OPCODE_COPY_MULTITEX_SUB_IMAGE2D, 9);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
n[9].i = height;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTextureSubImage2DEXT(ctx->Exec, (texture, target, level,
+ CALL_CopyMultiTexSubImage2DEXT(ctx->Exec, (texunit, target, level,
xoffset, yoffset,
x, y, width, height));
}
static void GLAPIENTRY
-save_CopyTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level,
+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_TEXTURE_SUB_IMAGE3D, 10);
+ n = alloc_instruction(ctx, OPCODE_COPY_MULTITEX_SUB_IMAGE3D, 10);
if (n) {
- n[1].ui = texture;
+ n[1].e = texunit;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
n[10].i = height;
}
if (ctx->ExecuteFlag) {
- CALL_CopyTextureSubImage3DEXT(ctx->Exec, (texture, target, level,
+ CALL_CopyMultiTexSubImage3DEXT(ctx->Exec, (texunit, 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)
+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_MULTITEXPARAMETER_F, 7);
+ n = alloc_instruction(ctx, OPCODE_MULTITEXENV, 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 (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_MultiTexParameterfvEXT(ctx->Exec, (texunit, target, pname, params));
+ CALL_MultiTexEnvfvEXT(ctx->Exec, (texunit, target, pname, params));
}
}
static void GLAPIENTRY
-save_MultiTexParameterfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param)
+save_MultiTexEnvfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param)
{
GLfloat parray[4];
- parray[0] = param;
+ parray[0] = (GLfloat) param;
parray[1] = parray[2] = parray[3] = 0.0F;
- save_MultiTexParameterfvEXT(texunit, target, pname, parray);
+ save_MultiTexEnvfvEXT(texunit, target, pname, parray);
}
+
static void GLAPIENTRY
-save_MultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint *params)
+save_MultiTexEnviEXT(GLenum texunit, GLenum target, GLenum pname, GLint param)
{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_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));
- }
+ 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_MultiTexParameteriEXT(GLenum texunit, GLenum target, GLenum pname, GLint param)
+save_MultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint * param)
{
- GLint fparam[4];
- fparam[0] = param;
- fparam[1] = fparam[2] = fparam[3] = 0;
- save_MultiTexParameterivEXT(texunit, target, pname, fparam);
+ 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_MultiTexImage1DEXT(GLenum texunit, GLenum target,
- GLint level, GLint components,
- GLsizei width, GLint border,
- GLenum format, GLenum type, const GLvoid * pixels)
+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_MultiTexImage1DEXT(ctx->Exec, (texunit, target, level, components, width,
- border, format, type, pixels));
+ 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_MULTITEX_IMAGE1D, 8 + POINTER_DWORDS);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_IMAGE_1D,
+ 7 + POINTER_DWORDS);
if (n) {
- n[1].e = texunit;
+ 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));
+ 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_MultiTexImage1DEXT(ctx->Exec, (texunit, target, level, components, width,
- border, format, type, pixels));
+ CALL_CompressedTextureImage1DEXT(ctx->Exec,
+ (texture, target, level, internalFormat,
+ width, border, imageSize, data));
}
}
}
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)
+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_MultiTexImage2DEXT(ctx->Exec, (texunit, target, level, components, width,
- height, border, format, type, pixels));
+ 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_MULTITEX_IMAGE2D, 9 + POINTER_DWORDS);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_IMAGE_2D,
+ 8 + POINTER_DWORDS);
if (n) {
- n[1].e = texunit;
+ n[1].ui = texture;
n[2].e = target;
n[3].i = level;
- n[4].i = components;
+ n[4].e = internalFormat;
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));
+ n[8].i = imageSize;
+ save_pointer(&n[9],
+ copy_data(data, imageSize, "glCompressedTextureImage2DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_MultiTexImage2DEXT(ctx->Exec, (texunit, target, level, components, width,
- height, border, format, type, pixels));
+ CALL_CompressedTextureImage2DEXT(ctx->Exec,
+ (texture, target, level, internalFormat,
+ width, height, border, imageSize, data));
}
}
}
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)
+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_MultiTexImage3DEXT(ctx->Exec, (texunit, target, level, internalFormat, width,
- height, depth, border, format, type,
- pixels));
+ 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_MULTITEX_IMAGE3D, 10 + POINTER_DWORDS);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_IMAGE_3D,
+ 9 + POINTER_DWORDS);
if (n) {
- n[1].e = texunit;
+ n[1].ui = texture;
n[2].e = target;
n[3].i = level;
- n[4].i = (GLint) internalFormat;
+ 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].e = format;
- n[10].e = type;
- save_pointer(&n[11],
- unpack_image(ctx, 3, width, height, depth, format, type,
- pixels, &ctx->Unpack));
+ n[9].i = imageSize;
+ save_pointer(&n[10],
+ copy_data(data, imageSize, "glCompressedTextureImage3DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_MultiTexImage3DEXT(ctx->Exec, (texunit, target, level, internalFormat,
- width, height, depth, border, format,
- type, pixels));
+ CALL_CompressedTextureImage3DEXT(ctx->Exec,
+ (texture, target, level, internalFormat,
+ width, height, depth, border, imageSize,
+ data));
}
}
}
static void GLAPIENTRY
-save_MultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid * pixels)
+save_CompressedTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset,
+ GLsizei width, 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_MULTITEX_SUB_IMAGE1D, 7 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_1D,
+ 7 + POINTER_DWORDS);
if (n) {
- n[1].e = texunit;
+ 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;
+ n[7].i = imageSize;
save_pointer(&n[8],
- unpack_image(ctx, 1, width, 1, 1, format, type,
- pixels, &ctx->Unpack));
+ copy_data(data, imageSize, "glCompressedTextureSubImage1DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_MultiTexSubImage1DEXT(ctx->Exec, (texunit, target, level, xoffset, width,
- format, type, pixels));
+ CALL_CompressedTextureSubImage1DEXT(ctx->Exec, (texture, target, level, xoffset,
+ width, format, imageSize, data));
}
}
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)
+save_CompressedTextureSubImage2DEXT(GLuint texture, 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_MULTITEX_SUB_IMAGE2D, 9 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_2D,
+ 9 + POINTER_DWORDS);
if (n) {
- n[1].e = texunit;
+ n[1].ui = texture;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
n[6].i = (GLint) width;
n[7].i = (GLint) height;
n[8].e = format;
- n[9].e = type;
+ n[9].i = imageSize;
save_pointer(&n[10],
- unpack_image(ctx, 2, width, height, 1, format, type,
- pixels, &ctx->Unpack));
+ copy_data(data, imageSize, "glCompressedTextureSubImage2DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_MultiTexSubImage2DEXT(ctx->Exec, (texunit, target, level, xoffset, yoffset,
- width, height, format, type, pixels));
+ CALL_CompressedTextureSubImage2DEXT(ctx->Exec,
+ (texture, target, level, xoffset, yoffset,
+ width, height, format, imageSize, data));
}
}
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)
+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)
{
- GET_CURRENT_CONTEXT(ctx);
Node *n;
-
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_MULTITEX_SUB_IMAGE3D, 11 + POINTER_DWORDS);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEXTURE_SUB_IMAGE_3D,
+ 11 + POINTER_DWORDS);
if (n) {
- n[1].e = texunit;
+ n[1].ui = texture;
n[2].e = target;
n[3].i = level;
n[4].i = xoffset;
n[8].i = (GLint) height;
n[9].i = (GLint) depth;
n[10].e = format;
- n[11].e = type;
+ n[11].i = imageSize;
save_pointer(&n[12],
- unpack_image(ctx, 3, width, height, depth, format, type,
- pixels, &ctx->Unpack));
+ copy_data(data, imageSize, "glCompressedTextureSubImage3DEXT"));
}
if (ctx->ExecuteFlag) {
- CALL_MultiTexSubImage3DEXT(ctx->Exec, (texunit, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth, format, type,
- pixels));
+ CALL_CompressedTextureSubImage3DEXT(ctx->Exec,
+ (texture, target, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data));
}
}
static void GLAPIENTRY
-save_CopyMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level,
- GLenum internalformat, GLint x, GLint y,
- GLsizei width, GLint border)
+save_CompressedMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ 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_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 (target == GL_PROXY_TEXTURE_1D) {
+ /* don't compile, execute immediately */
+ CALL_CompressedMultiTexImage1DEXT(ctx->Exec, (texunit, target, level,
+ internalFormat, width,
+ border, imageSize,
+ data));
}
- if (ctx->ExecuteFlag) {
- CALL_CopyMultiTexImage1DEXT(ctx->Exec, (texunit, target, level,
- internalformat, x, y,
- width, border));
+ 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"));
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_CompressedMultiTexImage1DEXT(ctx->Exec,
+ (texunit, target, level, internalFormat,
+ width, border, imageSize, data));
+ }
}
}
static void GLAPIENTRY
-save_CopyMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level,
- GLenum internalformat,
- GLint x, GLint y, GLsizei width,
- GLsizei height, GLint border)
+save_CompressedMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, 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_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 (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_CopyMultiTexImage2DEXT(ctx->Exec, (texunit, target, level,
- internalformat, x, y,
- width, height, border));
+ 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));
+ }
}
}
static void GLAPIENTRY
-save_CopyMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level,
- GLint xoffset, GLint x, GLint y, GLsizei width)
+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);
+ 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));
+ }
+ 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_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);
- n = alloc_instruction(ctx, OPCODE_COPY_MULTITEX_SUB_IMAGE1D, 7);
+
+ 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 = x;
- n[6].i = y;
- n[7].i = width;
+ 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_CopyMultiTexSubImage1DEXT(ctx->Exec,
- (texunit, target, level, xoffset, x, y, width));
+ CALL_CompressedMultiTexSubImage1DEXT(ctx->Exec, (texunit, target, level, xoffset,
+ width, format, imageSize, data));
}
}
static void GLAPIENTRY
-save_CopyMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level,
- GLint xoffset, GLint yoffset,
- GLint x, GLint y, GLsizei width, GLint height)
+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_COPY_MULTITEX_SUB_IMAGE2D, 9);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_2D,
+ 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 = x;
- n[7].i = y;
- n[8].i = width;
- n[9].i = height;
+ 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_CopyMultiTexSubImage2DEXT(ctx->Exec, (texunit, target, level,
- xoffset, yoffset,
- x, y, width, height));
+ CALL_CompressedMultiTexSubImage2DEXT(ctx->Exec,
+ (texunit, target, level, xoffset, yoffset,
+ width, height, format, imageSize, data));
}
}
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)
+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_COPY_MULTITEX_SUB_IMAGE3D, 10);
+
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_MULTITEX_SUB_IMAGE_3D,
+ 11 + POINTER_DWORDS);
if (n) {
n[1].e = texunit;
n[2].e = target;
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;
+ 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_CopyMultiTexSubImage3DEXT(ctx->Exec, (texunit, target, level,
- xoffset, yoffset, zoffset,
- x, y, width, height));
+ CALL_CompressedMultiTexSubImage3DEXT(ctx->Exec,
+ (texunit, target, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data));
}
}
static void GLAPIENTRY
-save_MultiTexEnvfvEXT(GLenum texunit, GLenum target, GLenum pname, const GLfloat *params)
+save_NamedProgramStringEXT(GLuint program, GLenum target, GLenum format, GLsizei len,
+ const GLvoid * string)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
+
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_MULTITEXENV, 7);
+
+ n = alloc_instruction(ctx, OPCODE_NAMED_PROGRAM_STRING, 4 + POINTER_DWORDS);
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;
+ GLubyte *programCopy = malloc(len);
+ if (!programCopy) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glNamedProgramStringEXT");
+ return;
}
+ memcpy(programCopy, string, len);
+ n[1].ui = program;
+ n[2].e = target;
+ n[3].e = format;
+ n[4].i = len;
+ save_pointer(&n[5], programCopy);
}
if (ctx->ExecuteFlag) {
- CALL_MultiTexEnvfvEXT(ctx->Exec, (texunit, target, pname, params));
+ CALL_NamedProgramStringEXT(ctx->Exec, (program, target, format, len, string));
}
}
static void GLAPIENTRY
-save_MultiTexEnvfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param)
+save_NamedProgramLocalParameter4fEXT(GLuint program, GLenum target, GLuint index,
+ GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- GLfloat parray[4];
- parray[0] = (GLfloat) param;
- parray[1] = parray[2] = parray[3] = 0.0F;
- save_MultiTexEnvfvEXT(texunit, target, pname, parray);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_NAMED_PROGRAM_LOCAL_PARAMETER, 7);
+ if (n) {
+ n[1].ui = program;
+ n[2].e = target;
+ n[3].ui = index;
+ n[4].f = x;
+ n[5].f = y;
+ n[6].f = z;
+ n[7].f = w;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_NamedProgramLocalParameter4fEXT(ctx->Exec, (program, target, index, x, y, z, w));
+ }
}
static void GLAPIENTRY
-save_MultiTexEnviEXT(GLenum texunit, GLenum target, GLenum pname, GLint param)
+save_NamedProgramLocalParameter4fvEXT(GLuint program, GLenum target, GLuint index,
+ const GLfloat *params)
{
- GLfloat p[4];
- p[0] = (GLfloat) param;
- p[1] = p[2] = p[3] = 0.0F;
- save_MultiTexEnvfvEXT(texunit, target, pname, p);
+ save_NamedProgramLocalParameter4fEXT(program, target, index, params[0],
+ params[1], params[2], params[3]);
}
static void GLAPIENTRY
-save_MultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint * param)
+save_NamedProgramLocalParameter4dEXT(GLuint program, GLenum target, GLuint index,
+ GLdouble x, GLdouble y,
+ GLdouble z, GLdouble w)
{
- 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);
+ save_NamedProgramLocalParameter4fEXT(program, target, index, (GLfloat) x,
+ (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
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)
+save_NamedProgramLocalParameter4dvEXT(GLuint program, GLenum target, GLuint index,
+ const GLdouble *params)
{
- 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));
- }
+ save_NamedProgramLocalParameter4fEXT(program, target, index, (GLfloat) params[0],
+ (GLfloat) params[1], (GLfloat) params[2],
+ (GLfloat) params[3]);
}
(n[1].i, n[2].i, n[3].b, get_pointer(&n[4])));
break;
+ case OPCODE_UNIFORM_1I64: {
+ union int64_pair x;
+
+ x.int32[0] = n[2].i;
+ x.int32[1] = n[3].i;
+
+ CALL_Uniform1i64ARB(ctx->Exec, (n[1].i, x.int64));
+ break;
+ }
+ case OPCODE_UNIFORM_2I64: {
+ union int64_pair x;
+ union int64_pair y;
+
+ x.int32[0] = n[2].i;
+ x.int32[1] = n[3].i;
+ y.int32[0] = n[4].i;
+ y.int32[1] = n[5].i;
+
+ CALL_Uniform2i64ARB(ctx->Exec, (n[1].i, x.int64, y.int64));
+ break;
+ }
+ case OPCODE_UNIFORM_3I64: {
+ union int64_pair x;
+ union int64_pair y;
+ union int64_pair z;
+
+ x.int32[0] = n[2].i;
+ x.int32[1] = n[3].i;
+ y.int32[0] = n[4].i;
+ y.int32[1] = n[5].i;
+ z.int32[0] = n[6].i;
+ z.int32[1] = n[7].i;
+
+
+ CALL_Uniform3i64ARB(ctx->Exec, (n[1].i, x.int64, y.int64, z.int64));
+ break;
+ }
+ case OPCODE_UNIFORM_4I64: {
+ union int64_pair x;
+ union int64_pair y;
+ union int64_pair z;
+ union int64_pair w;
+
+ x.int32[0] = n[2].i;
+ x.int32[1] = n[3].i;
+ y.int32[0] = n[4].i;
+ y.int32[1] = n[5].i;
+ z.int32[0] = n[6].i;
+ z.int32[1] = n[7].i;
+ w.int32[0] = n[8].i;
+ w.int32[1] = n[9].i;
+
+ CALL_Uniform4i64ARB(ctx->Exec, (n[1].i, x.int64, y.int64, z.int64, w.int64));
+ break;
+ }
+ case OPCODE_UNIFORM_1I64V:
+ CALL_Uniform1i64vARB(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_2I64V:
+ CALL_Uniform2i64vARB(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_3I64V:
+ CALL_Uniform3i64vARB(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_4I64V:
+ CALL_Uniform4i64vARB(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_1UI64: {
+ union uint64_pair x;
+
+ x.uint32[0] = n[2].ui;
+ x.uint32[1] = n[3].ui;
+
+ CALL_Uniform1ui64ARB(ctx->Exec, (n[1].i, x.uint64));
+ break;
+ }
+ case OPCODE_UNIFORM_2UI64: {
+ union uint64_pair x;
+ union uint64_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_Uniform2ui64ARB(ctx->Exec, (n[1].i, x.uint64, y.uint64));
+ break;
+ }
+ case OPCODE_UNIFORM_3UI64: {
+ union uint64_pair x;
+ union uint64_pair y;
+ union uint64_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_Uniform3ui64ARB(ctx->Exec, (n[1].i, x.uint64, y.uint64,
+ z.uint64));
+ break;
+ }
+ case OPCODE_UNIFORM_4UI64: {
+ union uint64_pair x;
+ union uint64_pair y;
+ union uint64_pair z;
+ union uint64_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_Uniform4ui64ARB(ctx->Exec, (n[1].i, x.uint64, y.uint64,
+ z.uint64, w.uint64));
+ break;
+ }
+ case OPCODE_UNIFORM_1UI64V:
+ CALL_Uniform1ui64vARB(ctx->Exec, (n[1].i, n[2].i,
+ get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_2UI64V:
+ CALL_Uniform2ui64vARB(ctx->Exec, (n[1].i, n[2].i,
+ get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_3UI64V:
+ CALL_Uniform3ui64vARB(ctx->Exec, (n[1].i, n[2].i,
+ get_pointer(&n[3])));
+ break;
+ case OPCODE_UNIFORM_4UI64V:
+ CALL_Uniform4ui64vARB(ctx->Exec, (n[1].i, n[2].i,
+ get_pointer(&n[3])));
+ break;
+
+ case OPCODE_PROGRAM_UNIFORM_1I64: {
+ union int64_pair x;
+
+ x.int32[0] = n[3].i;
+ x.int32[1] = n[4].i;
+
+ CALL_ProgramUniform1i64ARB(ctx->Exec, (n[1].ui, n[2].i, x.int64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_2I64: {
+ union int64_pair x;
+ union int64_pair y;
+
+ x.int32[0] = n[3].i;
+ x.int32[1] = n[4].i;
+ y.int32[0] = n[5].i;
+ y.int32[1] = n[6].i;
+
+ CALL_ProgramUniform2i64ARB(ctx->Exec, (n[1].ui, n[2].i, x.int64,
+ y.int64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_3I64: {
+ union int64_pair x;
+ union int64_pair y;
+ union int64_pair z;
+
+ x.int32[0] = n[3].i;
+ x.int32[1] = n[4].i;
+ y.int32[0] = n[5].i;
+ y.int32[1] = n[6].i;
+ z.int32[0] = n[7].i;
+ z.int32[1] = n[8].i;
+
+ CALL_ProgramUniform3i64ARB(ctx->Exec, (n[1].ui, n[2].i, x.int64,
+ y.int64, z.int64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_4I64: {
+ union int64_pair x;
+ union int64_pair y;
+ union int64_pair z;
+ union int64_pair w;
+
+ x.int32[0] = n[3].i;
+ x.int32[1] = n[4].i;
+ y.int32[0] = n[5].i;
+ y.int32[1] = n[6].i;
+ z.int32[0] = n[7].i;
+ z.int32[1] = n[8].i;
+ w.int32[0] = n[9].i;
+ w.int32[1] = n[10].i;
+
+ CALL_ProgramUniform4i64ARB(ctx->Exec, (n[1].ui, n[2].i, x.int64,
+ y.int64, z.int64, w.int64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_1I64V:
+ CALL_ProgramUniform1i64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_2I64V:
+ CALL_ProgramUniform2i64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_3I64V:
+ CALL_ProgramUniform3i64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_4I64V:
+ CALL_ProgramUniform4i64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_1UI64: {
+ union uint64_pair x;
+
+ x.uint32[0] = n[3].ui;
+ x.uint32[1] = n[4].ui;
+
+ CALL_ProgramUniform1i64ARB(ctx->Exec, (n[1].ui, n[2].i, x.uint64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_2UI64: {
+ union uint64_pair x;
+ union uint64_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_ProgramUniform2ui64ARB(ctx->Exec, (n[1].ui, n[2].i, x.uint64,
+ y.uint64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_3UI64: {
+ union uint64_pair x;
+ union uint64_pair y;
+ union uint64_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_ProgramUniform3ui64ARB(ctx->Exec, (n[1].ui, n[2].i, x.uint64,
+ y.uint64, z.uint64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_4UI64: {
+ union uint64_pair x;
+ union uint64_pair y;
+ union uint64_pair z;
+ union uint64_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_ProgramUniform4ui64ARB(ctx->Exec, (n[1].ui, n[2].i, x.uint64,
+ y.uint64, z.uint64, w.uint64));
+ break;
+ }
+ case OPCODE_PROGRAM_UNIFORM_1UI64V:
+ CALL_ProgramUniform1ui64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_2UI64V:
+ CALL_ProgramUniform2ui64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_3UI64V:
+ CALL_ProgramUniform3ui64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+ case OPCODE_PROGRAM_UNIFORM_4UI64V:
+ CALL_ProgramUniform4ui64vARB(ctx->Exec, (n[1].ui, n[2].i, n[3].i,
+ get_pointer(&n[4])));
+ break;
+
case OPCODE_USE_PROGRAM_STAGES:
CALL_UseProgramStages(ctx->Exec, (n[1].ui, n[2].ui, n[3].ui));
break;
case OPCODE_ATTR_4F_ARB:
CALL_VertexAttrib4fvARB(ctx->Exec, (n[1].e, &n[2].f));
break;
+ case OPCODE_ATTR_1I:
+ CALL_VertexAttribI1iEXT(ctx->Exec, (n[1].e, n[2].i));
+ break;
+ case OPCODE_ATTR_2I:
+ CALL_VertexAttribI2ivEXT(ctx->Exec, (n[1].e, &n[2].i));
+ break;
+ case OPCODE_ATTR_3I:
+ CALL_VertexAttribI3ivEXT(ctx->Exec, (n[1].e, &n[2].i));
+ break;
+ case OPCODE_ATTR_4I:
+ CALL_VertexAttribI4ivEXT(ctx->Exec, (n[1].e, &n[2].i));
+ break;
case OPCODE_ATTR_1D: {
GLdouble *d = (GLdouble *) &n[2];
CALL_VertexAttribL1d(ctx->Exec, (n[1].ui, *d));
CALL_VertexAttribL4dv(ctx->Exec, (n[1].ui, d));
break;
}
+ case OPCODE_ATTR_1UI64: {
+ uint64_t *ui64 = (uint64_t *) &n[2];
+ CALL_VertexAttribL1ui64ARB(ctx->Exec, (n[1].ui, *ui64));
+ break;
+ }
case OPCODE_MATERIAL:
CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, &n[3].f));
break;
CALL_TextureParameterivEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].e, params));
}
break;
+ case OPCODE_TEXTUREPARAMETER_II:
+ {
+ GLint params[4];
+ params[0] = n[4].i;
+ params[1] = n[5].i;
+ params[2] = n[6].i;
+ params[3] = n[7].i;
+ CALL_TextureParameterIivEXT(ctx->Exec, (n[1].ui, n[2].e, n[3].e, params));
+ }
+ break;
+ case OPCODE_TEXTUREPARAMETER_IUI:
+ {
+ GLuint params[4];
+ params[0] = n[4].ui;
+ params[1] = n[5].ui;
+ params[2] = n[6].ui;
+ params[3] = n[7].ui;
+ CALL_TextureParameterIuivEXT(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;
CALL_MultiTexParameterivEXT(ctx->Exec, (n[1].e, n[2].e, n[3].e, params));
}
break;
+ case OPCODE_MULTITEXPARAMETER_II:
+ {
+ GLint params[4];
+ params[0] = n[4].i;
+ params[1] = n[5].i;
+ params[2] = n[6].i;
+ params[3] = n[7].i;
+ CALL_MultiTexParameterIivEXT(ctx->Exec, (n[1].e, n[2].e, n[3].e, params));
+ }
+ break;
+ case OPCODE_MULTITEXPARAMETER_IUI:
+ {
+ GLuint params[4];
+ params[0] = n[4].ui;
+ params[1] = n[5].ui;
+ params[2] = n[6].ui;
+ params[3] = n[7].ui;
+ CALL_MultiTexParameterIuivEXT(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;
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_NAMED_PROGRAM_STRING:
+ CALL_NamedProgramStringEXT(ctx->Exec,
+ (n[1].ui, n[2].e, n[3].e, n[4].i,
+ get_pointer(&n[5])));
+ break;
+ case OPCODE_NAMED_PROGRAM_LOCAL_PARAMETER:
+ CALL_NamedProgramLocalParameter4fEXT(ctx->Exec,
+ (n[1].ui, n[2].e, n[3].ui, n[4].f,
+ n[5].f, n[6].f, n[7].f));
+ break;
case OPCODE_CONTINUE:
n = (Node *) get_pointer(&n[1]);
default:
{
char msg[1000];
- _mesa_snprintf(msg, sizeof(msg), "Error in execute_list: opcode=%d",
+ snprintf(msg, sizeof(msg), "Error in execute_list: opcode=%d",
(int) opcode);
_mesa_problem(ctx, "%s", msg);
}
SET_UniformMatrix3x4dv(table, save_UniformMatrix3x4dv);
SET_UniformMatrix4x3dv(table, save_UniformMatrix4x3dv);
+ /* GL_ARB_gpu_shader_int64 */
+ SET_Uniform1i64ARB(table, save_Uniform1i64ARB);
+ SET_Uniform2i64ARB(table, save_Uniform2i64ARB);
+ SET_Uniform3i64ARB(table, save_Uniform3i64ARB);
+ SET_Uniform4i64ARB(table, save_Uniform4i64ARB);
+ SET_Uniform1i64vARB(table, save_Uniform1i64vARB);
+ SET_Uniform2i64vARB(table, save_Uniform2i64vARB);
+ SET_Uniform3i64vARB(table, save_Uniform3i64vARB);
+ SET_Uniform4i64vARB(table, save_Uniform4i64vARB);
+ SET_Uniform1ui64ARB(table, save_Uniform1ui64ARB);
+ SET_Uniform2ui64ARB(table, save_Uniform2ui64ARB);
+ SET_Uniform3ui64ARB(table, save_Uniform3ui64ARB);
+ SET_Uniform4ui64ARB(table, save_Uniform4ui64ARB);
+ SET_Uniform1ui64vARB(table, save_Uniform1ui64vARB);
+ SET_Uniform2ui64vARB(table, save_Uniform2ui64vARB);
+ SET_Uniform3ui64vARB(table, save_Uniform3ui64vARB);
+ SET_Uniform4ui64vARB(table, save_Uniform4ui64vARB);
+
+ SET_ProgramUniform1i64ARB(table, save_ProgramUniform1i64ARB);
+ SET_ProgramUniform2i64ARB(table, save_ProgramUniform2i64ARB);
+ SET_ProgramUniform3i64ARB(table, save_ProgramUniform3i64ARB);
+ SET_ProgramUniform4i64ARB(table, save_ProgramUniform4i64ARB);
+ SET_ProgramUniform1i64vARB(table, save_ProgramUniform1i64vARB);
+ SET_ProgramUniform2i64vARB(table, save_ProgramUniform2i64vARB);
+ SET_ProgramUniform3i64vARB(table, save_ProgramUniform3i64vARB);
+ SET_ProgramUniform4i64vARB(table, save_ProgramUniform4i64vARB);
+ SET_ProgramUniform1ui64ARB(table, save_ProgramUniform1ui64ARB);
+ SET_ProgramUniform2ui64ARB(table, save_ProgramUniform2ui64ARB);
+ SET_ProgramUniform3ui64ARB(table, save_ProgramUniform3ui64ARB);
+ SET_ProgramUniform4ui64ARB(table, save_ProgramUniform4ui64ARB);
+ SET_ProgramUniform1ui64vARB(table, save_ProgramUniform1ui64vARB);
+ SET_ProgramUniform2ui64vARB(table, save_ProgramUniform2ui64vARB);
+ SET_ProgramUniform3ui64vARB(table, save_ProgramUniform3ui64vARB);
+ SET_ProgramUniform4ui64vARB(table, save_ProgramUniform4ui64vARB);
+
/* These are: */
SET_BeginTransformFeedback(table, save_BeginTransformFeedback);
SET_EndTransformFeedback(table, save_EndTransformFeedback);
SET_TextureParameterivEXT(table, save_TextureParameterivEXT);
SET_TextureParameterfEXT(table, save_TextureParameterfEXT);
SET_TextureParameterfvEXT(table, save_TextureParameterfvEXT);
+ SET_TextureParameterIivEXT(table, save_TextureParameterIivEXT);
+ SET_TextureParameterIuivEXT(table, save_TextureParameterIuivEXT);
SET_TextureImage1DEXT(table, save_TextureImage1DEXT);
SET_TextureImage2DEXT(table, save_TextureImage2DEXT);
SET_TextureImage3DEXT(table, save_TextureImage3DEXT);
SET_BindMultiTextureEXT(table, save_BindMultiTextureEXT);
SET_MultiTexParameteriEXT(table, save_MultiTexParameteriEXT);
SET_MultiTexParameterivEXT(table, save_MultiTexParameterivEXT);
+ SET_MultiTexParameterIivEXT(table, save_MultiTexParameterIivEXT);
+ SET_MultiTexParameterIuivEXT(table, save_MultiTexParameterIuivEXT);
SET_MultiTexParameterfEXT(table, save_MultiTexParameterfEXT);
SET_MultiTexParameterfvEXT(table, save_MultiTexParameterfvEXT);
SET_MultiTexImage1DEXT(table, save_MultiTexImage1DEXT);
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);
+ SET_NamedProgramStringEXT(table, save_NamedProgramStringEXT);
+ SET_NamedProgramLocalParameter4dEXT(table, save_NamedProgramLocalParameter4dEXT);
+ SET_NamedProgramLocalParameter4dvEXT(table, save_NamedProgramLocalParameter4dvEXT);
+ SET_NamedProgramLocalParameter4fEXT(table, save_NamedProgramLocalParameter4fEXT);
+ SET_NamedProgramLocalParameter4fvEXT(table, save_NamedProgramLocalParameter4fvEXT);
}
/***** Initialization *****/
/**********************************************************************/
-static void
-save_vtxfmt_init(GLvertexformat * vfmt)
-{
- vfmt->ArrayElement = _ae_ArrayElement;
-
- vfmt->Begin = save_Begin;
-
- vfmt->CallList = save_CallList;
- vfmt->CallLists = save_CallLists;
-
- vfmt->Color3f = save_Color3f;
- vfmt->Color3fv = save_Color3fv;
- vfmt->Color4f = save_Color4f;
- vfmt->Color4fv = save_Color4fv;
- vfmt->EdgeFlag = save_EdgeFlag;
- vfmt->End = save_End;
-
- vfmt->EvalCoord1f = save_EvalCoord1f;
- vfmt->EvalCoord1fv = save_EvalCoord1fv;
- vfmt->EvalCoord2f = save_EvalCoord2f;
- vfmt->EvalCoord2fv = save_EvalCoord2fv;
- vfmt->EvalPoint1 = save_EvalPoint1;
- vfmt->EvalPoint2 = save_EvalPoint2;
-
- vfmt->FogCoordfEXT = save_FogCoordfEXT;
- vfmt->FogCoordfvEXT = save_FogCoordfvEXT;
- vfmt->Indexf = save_Indexf;
- vfmt->Indexfv = save_Indexfv;
- vfmt->Materialfv = save_Materialfv;
- vfmt->MultiTexCoord1fARB = save_MultiTexCoord1f;
- vfmt->MultiTexCoord1fvARB = save_MultiTexCoord1fv;
- vfmt->MultiTexCoord2fARB = save_MultiTexCoord2f;
- vfmt->MultiTexCoord2fvARB = save_MultiTexCoord2fv;
- vfmt->MultiTexCoord3fARB = save_MultiTexCoord3f;
- vfmt->MultiTexCoord3fvARB = save_MultiTexCoord3fv;
- vfmt->MultiTexCoord4fARB = save_MultiTexCoord4f;
- vfmt->MultiTexCoord4fvARB = save_MultiTexCoord4fv;
- vfmt->Normal3f = save_Normal3f;
- vfmt->Normal3fv = save_Normal3fv;
- vfmt->SecondaryColor3fEXT = save_SecondaryColor3fEXT;
- vfmt->SecondaryColor3fvEXT = save_SecondaryColor3fvEXT;
- vfmt->TexCoord1f = save_TexCoord1f;
- vfmt->TexCoord1fv = save_TexCoord1fv;
- vfmt->TexCoord2f = save_TexCoord2f;
- vfmt->TexCoord2fv = save_TexCoord2fv;
- vfmt->TexCoord3f = save_TexCoord3f;
- vfmt->TexCoord3fv = save_TexCoord3fv;
- vfmt->TexCoord4f = save_TexCoord4f;
- vfmt->TexCoord4fv = save_TexCoord4fv;
- vfmt->Vertex2f = save_Vertex2f;
- vfmt->Vertex2fv = save_Vertex2fv;
- vfmt->Vertex3f = save_Vertex3f;
- vfmt->Vertex3fv = save_Vertex3fv;
- vfmt->Vertex4f = save_Vertex4f;
- vfmt->Vertex4fv = save_Vertex4fv;
- vfmt->VertexAttrib1fARB = save_VertexAttrib1fARB;
- vfmt->VertexAttrib1fvARB = save_VertexAttrib1fvARB;
- vfmt->VertexAttrib2fARB = save_VertexAttrib2fARB;
- vfmt->VertexAttrib2fvARB = save_VertexAttrib2fvARB;
- vfmt->VertexAttrib3fARB = save_VertexAttrib3fARB;
- 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;
-}
-
-
void
_mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
const GLvertexformat *vfmt)
_mesa_init_display_list(struct gl_context *ctx)
{
static GLboolean tableInitialized = GL_FALSE;
+ GLvertexformat *vfmt = &ctx->ListState.ListVtxfmt;
/* zero-out the instruction size table, just once */
if (!tableInitialized) {
/* Display List group */
ctx->List.ListBase = 0;
- save_vtxfmt_init(&ctx->ListState.ListVtxfmt);
-
InstSize[OPCODE_NOP] = 1;
+
+#define NAME_AE(x) _ae_##x
+#define NAME_CALLLIST(x) save_##x
+#define NAME(x) save_##x
+#define NAME_ES(x) save_##x##ARB
+
+#include "vbo/vbo_init_tmp.h"
}