#define _gloffset_VertexAttribs4ubvNV 641
#define _gloffset_PointParameteriNV 642
#define _gloffset_PointParameterivNV 643
+#define _gloffset_MultiDrawArraysEXT 644
+#define _gloffset_MultiDrawElementsEXT 645
#endif
void (*VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 641 */
void (*PointParameteriNV)(GLenum pname, GLint params); /* 642 */
void (*PointParameterivNV)(GLenum pname, const GLint * params); /* 643 */
+ void (*MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 644 */
+ void (*MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 645 */
};
#endif
}
/* No dispatch for TextureNormalEXT() */
-/* No dispatch for MultiDrawArraysEXT() */
-/* No dispatch for MultiDrawElementsEXT() */
+KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount)
+{
+ DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (void *) first, (void *) count, primcount));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount)
+{
+ DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (void *) count, type, (void *) indices, primcount));
+}
+
KEYWORD1 void KEYWORD2 NAME(FogCoordfEXT)(GLfloat coord)
{
DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordfEXT(%f);\n", coord));
TABLE_ENTRY(VertexAttribs4ubvNV),
TABLE_ENTRY(PointParameteriNV),
TABLE_ENTRY(PointParameterivNV),
+ TABLE_ENTRY(MultiDrawArraysEXT),
+ TABLE_ENTRY(MultiDrawElementsEXT),
/* A whole bunch of no-op functions. These might be called
* when someone tries to call a dynamically-registered
* extension function without a current rendering context.
-/* $Id: dlist.c,v 1.91 2002/06/29 19:48:15 brianp Exp $ */
+/* $Id: dlist.c,v 1.92 2002/06/30 15:47:00 brianp Exp $ */
/*
* Mesa 3-D graphics library
ctx->Exec->FogCoordPointerEXT( type, stride, ptr);
}
+/* GL_EXT_multi_draw_arrays */
+static void exec_MultiDrawArraysEXT(GLenum mode, GLint *first,
+ GLsizei *count, GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->MultiDrawArraysEXT( mode, first, count, primcount );
+}
+
+/* GL_EXT_multi_draw_arrays */
+static void exec_MultiDrawElementsEXT(GLenum mode, const GLsizei *count,
+ GLenum type, const GLvoid **indices,
+ GLsizei primcount)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->Exec->MultiDrawElementsEXT(mode, count, type, indices, primcount);
+}
+
+
/*
* Assign all the pointers in <table> to point to Mesa's display list
/* 145. GL_EXT_secondary_color */
table->SecondaryColorPointerEXT = exec_SecondaryColorPointerEXT;
+ /* 148. GL_EXT_multi_draw_arrays */
+ table->MultiDrawArraysEXT = exec_MultiDrawArraysEXT;
+ table->MultiDrawElementsEXT = exec_MultiDrawElementsEXT;
+
/* 149. GL_EXT_fog_coord */
table->FogCoordPointerEXT = exec_FogCoordPointerEXT;
{ "glSecondaryColor3usEXT", (GLvoid *) glSecondaryColor3usEXT, _gloffset_SecondaryColor3usEXT },
{ "glSecondaryColor3usvEXT", (GLvoid *) glSecondaryColor3usvEXT, _gloffset_SecondaryColor3usvEXT },
{ "glSecondaryColorPointerEXT", (GLvoid *) glSecondaryColorPointerEXT, _gloffset_SecondaryColorPointerEXT },
+ { "glMultiDrawArraysEXT", (GLvoid *) glMultiDrawArraysEXT, _gloffset_MultiDrawArraysEXT },
+ { "glMultiDrawElementsEXT", (GLvoid *) glMultiDrawElementsEXT, _gloffset_MultiDrawElementsEXT },
{ "glFogCoordfEXT", (GLvoid *) glFogCoordfEXT, _gloffset_FogCoordfEXT },
{ "glFogCoordfvEXT", (GLvoid *) glFogCoordfvEXT, _gloffset_FogCoordfvEXT },
{ "glFogCoorddEXT", (GLvoid *) glFogCoorddEXT, _gloffset_FogCoorddEXT },
-/* $Id: state.c,v 1.87 2002/06/25 02:31:37 brianp Exp $ */
+/* $Id: state.c,v 1.88 2002/06/30 15:47:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
exec->LockArraysEXT = _mesa_LockArraysEXT;
exec->UnlockArraysEXT = _mesa_UnlockArraysEXT;
+ /* 148. GL_EXT_multi_draw_arrays */
+ exec->MultiDrawArraysEXT = _mesa_MultiDrawArraysEXT;
+ exec->MultiDrawElementsEXT = _mesa_MultiDrawElementsEXT;
+
/* 173. GL_INGR_blend_func_separate */
exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT;
-/* $Id: varray.c,v 1.45 2002/06/15 02:38:16 brianp Exp $ */
+/* $Id: varray.c,v 1.46 2002/06/30 15:47:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
if (ctx->Driver.UnlockArraysEXT)
ctx->Driver.UnlockArraysEXT( ctx );
}
+
+
+
+/* GL_EXT_multi_draw_arrays */
+/* Somebody forgot to spec the first and count parameters as const! <sigh> */
+void
+_mesa_MultiDrawArraysEXT( GLenum mode, GLint *first,
+ GLsizei *count, GLsizei primcount )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint i;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ for (i = 0; i < primcount; i++) {
+ if (count[i] > 0) {
+ (ctx->Exec->DrawArrays)(mode, first[i], count[i]);
+ }
+ }
+}
+
+
+/* GL_EXT_multi_draw_arrays */
+void
+_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
+ const GLvoid **indices, GLsizei primcount )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint i;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ for (i = 0; i < primcount; i++) {
+ if (count[i] > 0) {
+ (ctx->Exec->DrawElements)(mode, count[i], type, indices[i]);
+ }
+ }
+}
-/* $Id: varray.h,v 1.13 2002/01/11 17:25:35 brianp Exp $ */
+/* $Id: varray.h,v 1.14 2002/06/30 15:47:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
_mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer);
+extern void
+_mesa_MultiDrawArraysEXT( GLenum mode, GLint *first,
+ GLsizei *count, GLsizei primcount );
+
+extern void
+_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
+ const GLvoid **indices, GLsizei primcount );
+
+
#endif
jmpl %g3, %g0
nop
+.globl glMultiDrawArraysEXT
+.type glMultiDrawArraysEXT,#function
+glMultiDrawArraysEXT:
+#ifdef __sparc_v9__
+ sethi %hi(0x00000000), %g2
+ sethi %hi(0x00000000), %g1
+ or %g2, %lo(0x00000000), %g2
+ or %g1, %lo(0x00000000), %g1
+ sllx %g2, 32, %g2
+ ldx [%g1 + %g2], %g1
+ sethi %hi(8 * _gloffset_MultiDrawArraysEXT), %g2
+ or %g2, %lo(8 * _gloffset_MultiDrawArraysEXT), %g2
+ ldx [%g1 + %g2], %g3
+#else
+ sethi %hi(0x00000000), %g1
+ ld [%g1 + %lo(0x00000000)], %g1
+ ld [%g1 + (4 * _gloffset_MultiDrawArraysEXT)], %g3
+#endif
+ jmpl %g3, %g0
+ nop
+
+.globl glMultiDrawElementsEXT
+.type glMultiDrawElementsEXT,#function
+glMultiDrawElementsEXT:
+#ifdef __sparc_v9__
+ sethi %hi(0x00000000), %g2
+ sethi %hi(0x00000000), %g1
+ or %g2, %lo(0x00000000), %g2
+ or %g1, %lo(0x00000000), %g1
+ sllx %g2, 32, %g2
+ ldx [%g1 + %g2], %g1
+ sethi %hi(8 * _gloffset_MultiDrawElementsEXT), %g2
+ or %g2, %lo(8 * _gloffset_MultiDrawElementsEXT), %g2
+ ldx [%g1 + %g2], %g3
+#else
+ sethi %hi(0x00000000), %g1
+ ld [%g1 + %lo(0x00000000)], %g1
+ ld [%g1 + (4 * _gloffset_MultiDrawElementsEXT)], %g3
+#endif
+ jmpl %g3, %g0
+ nop
+
.globl glFogCoordfEXT
.type glFogCoordfEXT,#function
glFogCoordfEXT:
MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX)
JMP(GL_OFFSET(_gloffset_SecondaryColorPointerEXT))
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(MultiDrawArraysEXT))
+GL_PREFIX(MultiDrawArraysEXT):
+ MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX)
+ JMP(GL_OFFSET(_gloffset_MultiDrawArraysEXT))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(MultiDrawElementsEXT))
+GL_PREFIX(MultiDrawElementsEXT):
+ MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX)
+ JMP(GL_OFFSET(_gloffset_MultiDrawElementsEXT))
+
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(FogCoordfEXT))
GL_PREFIX(FogCoordfEXT):