Added support for GL_IBM_multimode_draw_arrays.

Added non-static entrypoints and the name string for
GL_SUN_multi_draw_arrays (identical to GL_EXT_multi_draw_arrays).

Made add_newer_entrypoints (in src/mesa/main/context.c) table driven.
This reduced the size of context.o by about 3KB.
This commit is contained in:
Ian Romanick
2003-08-22 23:28:03 +00:00
parent 5df82c82bd
commit 3baefe663b
14 changed files with 345 additions and 166 deletions

View File

@@ -1,4 +1,4 @@
# $Id: APIspec,v 1.19 2003/08/19 01:07:26 brianp Exp $ # $Id: APIspec,v 1.20 2003/08/22 23:28:03 idr Exp $
# This file describes all the OpenGL functions. # This file describes all the OpenGL functions.
# We use a number of Python scripts to parse this file and # We use a number of Python scripts to parse this file and
@@ -6434,24 +6434,24 @@ offset 536
name MultiModeDrawArraysIBM name MultiModeDrawArraysIBM
return void return void
param mode GLenum param mode const GLenum *
param first const GLint * param first const GLint *
param count const GLsizei * param count const GLsizei *
param primcount GLsizei param primcount GLsizei
param modestride GLint param modestride GLint
category GL_IBM_multimode_draw_arrays category GL_IBM_multimode_draw_arrays
offset ? offset 708
name MultiModeDrawElementsIBM name MultiModeDrawElementsIBM
return void return void
param mode const GLenum * param mode const GLenum *
param count const GLsizei * param count const GLsizei *
param type GLenum param type GLenum
param indices const GLvoid ** param indices const GLvoid * const *
param primcount GLsizei param primcount GLsizei
param modestride GLint param modestride GLint
category GL_IBM_multimode_draw_arrays category GL_IBM_multimode_draw_arrays
offset ? offset 709
# GL_IBM_vertex_array_lists # GL_IBM_vertex_array_lists

View File

@@ -710,5 +710,7 @@
#define _gloffset_GetQueryivARB 705 #define _gloffset_GetQueryivARB 705
#define _gloffset_GetQueryObjectivARB 706 #define _gloffset_GetQueryObjectivARB 706
#define _gloffset_GetQueryObjectuivARB 707 #define _gloffset_GetQueryObjectuivARB 707
#define _gloffset_MultiModeDrawArraysIBM 708
#define _gloffset_MultiModeDrawElementsIBM 709
#endif #endif

View File

@@ -714,6 +714,8 @@ struct _glapi_table
void (*GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 705 */ void (*GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 705 */
void (*GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 706 */ void (*GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 706 */
void (*GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 707 */ void (*GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 707 */
void (*MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 708 */
void (*MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 709 */
}; };
#endif #endif

View File

@@ -4664,6 +4664,16 @@ KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuin
DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params)); DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params));
} }
KEYWORD1 void KEYWORD2 NAME(MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride)
{
DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride));
}
KEYWORD1 void KEYWORD2 NAME(MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride)
{
DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride));
}
/* /*
@@ -5385,6 +5395,8 @@ void *DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(GetQueryivARB), TABLE_ENTRY(GetQueryivARB),
TABLE_ENTRY(GetQueryObjectivARB), TABLE_ENTRY(GetQueryObjectivARB),
TABLE_ENTRY(GetQueryObjectuivARB), TABLE_ENTRY(GetQueryObjectuivARB),
TABLE_ENTRY(MultiModeDrawArraysIBM),
TABLE_ENTRY(MultiModeDrawElementsIBM),
/* A whole bunch of no-op functions. These might be called /* A whole bunch of no-op functions. These might be called
* when someone tries to call a dynamically-registered * when someone tries to call a dynamically-registered
* extension function without a current rendering context. * extension function without a current rendering context.

View File

@@ -898,5 +898,7 @@ static struct name_address_offset static_functions[] = {
{ "glGetQueryivARB", (GLvoid *) glGetQueryivARB, _gloffset_GetQueryivARB }, { "glGetQueryivARB", (GLvoid *) glGetQueryivARB, _gloffset_GetQueryivARB },
{ "glGetQueryObjectivARB", (GLvoid *) glGetQueryObjectivARB, _gloffset_GetQueryObjectivARB }, { "glGetQueryObjectivARB", (GLvoid *) glGetQueryObjectivARB, _gloffset_GetQueryObjectivARB },
{ "glGetQueryObjectuivARB", (GLvoid *) glGetQueryObjectuivARB, _gloffset_GetQueryObjectuivARB }, { "glGetQueryObjectuivARB", (GLvoid *) glGetQueryObjectuivARB, _gloffset_GetQueryObjectuivARB },
{ "glMultiModeDrawArraysIBM", (GLvoid *) glMultiModeDrawArraysIBM, _gloffset_MultiModeDrawArraysIBM },
{ "glMultiModeDrawElementsIBM", (GLvoid *) glMultiModeDrawElementsIBM, _gloffset_MultiModeDrawElementsIBM },
{ NULL, NULL } /* end of list marker */ { NULL, NULL } /* end of list marker */
}; };

View File

@@ -1134,175 +1134,191 @@ init_attrib_groups( GLcontext *ctx )
static void static void
add_newer_entrypoints(void) add_newer_entrypoints(void)
{ {
unsigned i;
static const struct {
const char * const name;
unsigned offset;
}
newer_entrypoints[] = {
/* GL_ARB_window_pos aliases with GL_MESA_window_pos */ /* GL_ARB_window_pos aliases with GL_MESA_window_pos */
_glapi_add_entrypoint("glWindowPos2dARB", 513); { "glWindowPos2dARB", 513 },
_glapi_add_entrypoint("glWindowPos2dvARB", 514); { "glWindowPos2dvARB", 514 },
_glapi_add_entrypoint("glWindowPos2fARB", 515); { "glWindowPos2fARB", 515 },
_glapi_add_entrypoint("glWindowPos2fvARB", 516); { "glWindowPos2fvARB", 516 },
_glapi_add_entrypoint("glWindowPos2iARB", 517); { "glWindowPos2iARB", 517 },
_glapi_add_entrypoint("glWindowPos2ivARB", 518); { "glWindowPos2ivARB", 518 },
_glapi_add_entrypoint("glWindowPos2sARB", 519); { "glWindowPos2sARB", 519 },
_glapi_add_entrypoint("glWindowPos2svARB", 520); { "glWindowPos2svARB", 520 },
_glapi_add_entrypoint("glWindowPos3dARB", 521); { "glWindowPos3dARB", 521 },
_glapi_add_entrypoint("glWindowPos3dvARB", 522); { "glWindowPos3dvARB", 522 },
_glapi_add_entrypoint("glWindowPos3fARB", 523); { "glWindowPos3fARB", 523 },
_glapi_add_entrypoint("glWindowPos3fvARB", 524); { "glWindowPos3fvARB", 524 },
_glapi_add_entrypoint("glWindowPos3iARB", 525); { "glWindowPos3iARB", 525 },
_glapi_add_entrypoint("glWindowPos3ivARB", 526); { "glWindowPos3ivARB", 526 },
_glapi_add_entrypoint("glWindowPos3sARB", 527); { "glWindowPos3sARB", 527 },
_glapi_add_entrypoint("glWindowPos3svARB", 528); { "glWindowPos3svARB", 528 },
#if FEATURE_NV_vertex_program #if FEATURE_NV_vertex_program
_glapi_add_entrypoint("glAreProgramsResidentNV", 578); { "glAreProgramsResidentNV", 578 },
_glapi_add_entrypoint("glBindProgramNV", 579); { "glBindProgramNV", 579 },
_glapi_add_entrypoint("glDeleteProgramsNV", 580); { "glDeleteProgramsNV", 580 },
_glapi_add_entrypoint("glExecuteProgramNV", 581); { "glExecuteProgramNV", 581 },
_glapi_add_entrypoint("glGenProgramsNV", 582); { "glGenProgramsNV", 582 },
_glapi_add_entrypoint("glGetProgramParameterdvNV", 583); { "glGetProgramParameterdvNV", 583 },
_glapi_add_entrypoint("glGetProgramParameterfvNV", 584); { "glGetProgramParameterfvNV", 584 },
_glapi_add_entrypoint("glGetProgramivNV", 585); { "glGetProgramivNV", 585 },
_glapi_add_entrypoint("glGetProgramStringNV", 586); { "glGetProgramStringNV", 586 },
_glapi_add_entrypoint("glGetTrackMatrixivNV", 587); { "glGetTrackMatrixivNV", 587 },
_glapi_add_entrypoint("glGetVertexAttribdvNV", 588); { "glGetVertexAttribdvNV", 588 },
_glapi_add_entrypoint("glGetVertexAttribfvNV", 589); { "glGetVertexAttribfvNV", 589 },
_glapi_add_entrypoint("glGetVertexAttribivNV", 590); { "glGetVertexAttribivNV", 590 },
_glapi_add_entrypoint("glGetVertexAttribPointervNV", 591); { "glGetVertexAttribPointervNV", 591 },
_glapi_add_entrypoint("glIsProgramNV", 592); { "glIsProgramNV", 592 },
_glapi_add_entrypoint("glLoadProgramNV", 593); { "glLoadProgramNV", 593 },
_glapi_add_entrypoint("glProgramParameter4dNV", 594); { "glProgramParameter4dNV", 594 },
_glapi_add_entrypoint("glProgramParameter4dvNV", 595); { "glProgramParameter4dvNV", 595 },
_glapi_add_entrypoint("glProgramParameter4fNV", 596); { "glProgramParameter4fNV", 596 },
_glapi_add_entrypoint("glProgramParameter4fvNV", 597); { "glProgramParameter4fvNV", 597 },
_glapi_add_entrypoint("glProgramParameters4dvNV", 598); { "glProgramParameters4dvNV", 598 },
_glapi_add_entrypoint("glProgramParameters4fvNV", 599); { "glProgramParameters4fvNV", 599 },
_glapi_add_entrypoint("glRequestResidentProgramsNV", 600); { "glRequestResidentProgramsNV", 600 },
_glapi_add_entrypoint("glTrackMatrixNV", 601); { "glTrackMatrixNV", 601 },
_glapi_add_entrypoint("glVertexAttribPointerNV", 602); { "glVertexAttribPointerNV", 602 },
_glapi_add_entrypoint("glVertexAttrib1dNV", 603); { "glVertexAttrib1dNV", 603 },
_glapi_add_entrypoint("glVertexAttrib1dvNV", 604); { "glVertexAttrib1dvNV", 604 },
_glapi_add_entrypoint("glVertexAttrib1fNV", 605); { "glVertexAttrib1fNV", 605 },
_glapi_add_entrypoint("glVertexAttrib1fvNV", 606); { "glVertexAttrib1fvNV", 606 },
_glapi_add_entrypoint("glVertexAttrib1sNV", 607); { "glVertexAttrib1sNV", 607 },
_glapi_add_entrypoint("glVertexAttrib1svNV", 608); { "glVertexAttrib1svNV", 608 },
_glapi_add_entrypoint("glVertexAttrib2dNV", 609); { "glVertexAttrib2dNV", 609 },
_glapi_add_entrypoint("glVertexAttrib2dvNV", 610); { "glVertexAttrib2dvNV", 610 },
_glapi_add_entrypoint("glVertexAttrib2fNV", 611); { "glVertexAttrib2fNV", 611 },
_glapi_add_entrypoint("glVertexAttrib2fvNV", 612); { "glVertexAttrib2fvNV", 612 },
_glapi_add_entrypoint("glVertexAttrib2sNV", 613); { "glVertexAttrib2sNV", 613 },
_glapi_add_entrypoint("glVertexAttrib2svNV", 614); { "glVertexAttrib2svNV", 614 },
_glapi_add_entrypoint("glVertexAttrib3dNV", 615); { "glVertexAttrib3dNV", 615 },
_glapi_add_entrypoint("glVertexAttrib3dvNV", 616); { "glVertexAttrib3dvNV", 616 },
_glapi_add_entrypoint("glVertexAttrib3fNV", 617); { "glVertexAttrib3fNV", 617 },
_glapi_add_entrypoint("glVertexAttrib3fvNV", 618); { "glVertexAttrib3fvNV", 618 },
_glapi_add_entrypoint("glVertexAttrib3sNV", 619); { "glVertexAttrib3sNV", 619 },
_glapi_add_entrypoint("glVertexAttrib3svNV", 620); { "glVertexAttrib3svNV", 620 },
_glapi_add_entrypoint("glVertexAttrib4dNV", 621); { "glVertexAttrib4dNV", 621 },
_glapi_add_entrypoint("glVertexAttrib4dvNV", 622); { "glVertexAttrib4dvNV", 622 },
_glapi_add_entrypoint("glVertexAttrib4fNV", 623); { "glVertexAttrib4fNV", 623 },
_glapi_add_entrypoint("glVertexAttrib4fvNV", 624); { "glVertexAttrib4fvNV", 624 },
_glapi_add_entrypoint("glVertexAttrib4sNV", 625); { "glVertexAttrib4sNV", 625 },
_glapi_add_entrypoint("glVertexAttrib4svNV", 626); { "glVertexAttrib4svNV", 626 },
_glapi_add_entrypoint("glVertexAttrib4ubNV", 627); { "glVertexAttrib4ubNV", 627 },
_glapi_add_entrypoint("glVertexAttrib4ubvNV", 628); { "glVertexAttrib4ubvNV", 628 },
_glapi_add_entrypoint("glVertexAttribs1dvNV", 629); { "glVertexAttribs1dvNV", 629 },
_glapi_add_entrypoint("glVertexAttribs1fvNV", 630); { "glVertexAttribs1fvNV", 630 },
_glapi_add_entrypoint("glVertexAttribs1svNV", 631); { "glVertexAttribs1svNV", 631 },
_glapi_add_entrypoint("glVertexAttribs2dvNV", 632); { "glVertexAttribs2dvNV", 632 },
_glapi_add_entrypoint("glVertexAttribs2fvNV", 633); { "glVertexAttribs2fvNV", 633 },
_glapi_add_entrypoint("glVertexAttribs2svNV", 634); { "glVertexAttribs2svNV", 634 },
_glapi_add_entrypoint("glVertexAttribs3dvNV", 635); { "glVertexAttribs3dvNV", 635 },
_glapi_add_entrypoint("glVertexAttribs3fvNV", 636); { "glVertexAttribs3fvNV", 636 },
_glapi_add_entrypoint("glVertexAttribs3svNV", 637); { "glVertexAttribs3svNV", 637 },
_glapi_add_entrypoint("glVertexAttribs4dvNV", 638); { "glVertexAttribs4dvNV", 638 },
_glapi_add_entrypoint("glVertexAttribs4fvNV", 639); { "glVertexAttribs4fvNV", 639 },
_glapi_add_entrypoint("glVertexAttribs4svNV", 640); { "glVertexAttribs4svNV", 640 },
_glapi_add_entrypoint("glVertexAttribs4ubvNV", 641); { "glVertexAttribs4ubvNV", 641 },
#endif #endif
_glapi_add_entrypoint("glPointParameteriNV", 642); { "glPointParameteriNV", 642 },
_glapi_add_entrypoint("glPointParameterivNV", 643); { "glPointParameterivNV", 643 },
_glapi_add_entrypoint("glMultiDrawArraysEXT", 644); { "glMultiDrawArraysEXT", 644 },
_glapi_add_entrypoint("glMultiDrawElementsEXT", 645); { "glMultiDrawElementsEXT", 645 },
_glapi_add_entrypoint("glActiveStencilFaceEXT", 646); { "glMultiDrawArraysSUN", _gloffset_MultiDrawArraysEXT },
{ "glMultiDrawElementsSUN", _gloffset_MultiDrawElementsEXT },
{ "glActiveStencilFaceEXT", 646 },
#if FEATURE_NV_fence #if FEATURE_NV_fence
_glapi_add_entrypoint("glDeleteFencesNV", 647); { "glDeleteFencesNV", 647 },
_glapi_add_entrypoint("glGenFencesNV", 648); { "glGenFencesNV", 648 },
_glapi_add_entrypoint("glIsFenceNV", 649); { "glIsFenceNV", 649 },
_glapi_add_entrypoint("glTestFenceNV", 650); { "glTestFenceNV", 650 },
_glapi_add_entrypoint("glGetFenceivNV", 651); { "glGetFenceivNV", 651 },
_glapi_add_entrypoint("glFinishFenceNV", 652); { "glFinishFenceNV", 652 },
_glapi_add_entrypoint("glSetFenceNV", 653); { "glSetFenceNV", 653 },
#endif #endif
#if FEATURE_NV_fragment_program #if FEATURE_NV_fragment_program
_glapi_add_entrypoint("glProgramNamedParameter4fNV", 682); { "glProgramNamedParameter4fNV", 682 },
_glapi_add_entrypoint("glProgramNamedParameter4dNV", 683); { "glProgramNamedParameter4dNV", 683 },
_glapi_add_entrypoint("glProgramNamedParameter4fvNV", 683); { "glProgramNamedParameter4fvNV", 683 },
_glapi_add_entrypoint("glProgramNamedParameter4dvNV", 684); { "glProgramNamedParameter4dvNV", 684 },
_glapi_add_entrypoint("glGetProgramNamedParameterfvNV", 685); { "glGetProgramNamedParameterfvNV", 685 },
_glapi_add_entrypoint("glGetProgramNamedParameterdvNV", 686); { "glGetProgramNamedParameterdvNV", 686 },
#endif #endif
#if FEATURE_ARB_vertex_program #if FEATURE_ARB_vertex_program
_glapi_add_entrypoint("glVertexAttrib1sARB", _gloffset_VertexAttrib1sNV); { "glVertexAttrib1sARB", _gloffset_VertexAttrib1sNV },
_glapi_add_entrypoint("glVertexAttrib1fARB", _gloffset_VertexAttrib1fNV); { "glVertexAttrib1fARB", _gloffset_VertexAttrib1fNV },
_glapi_add_entrypoint("glVertexAttrib1dARB", _gloffset_VertexAttrib1dNV); { "glVertexAttrib1dARB", _gloffset_VertexAttrib1dNV },
_glapi_add_entrypoint("glVertexAttrib2sARB", _gloffset_VertexAttrib2sNV); { "glVertexAttrib2sARB", _gloffset_VertexAttrib2sNV },
_glapi_add_entrypoint("glVertexAttrib2fARB", _gloffset_VertexAttrib2fNV); { "glVertexAttrib2fARB", _gloffset_VertexAttrib2fNV },
_glapi_add_entrypoint("glVertexAttrib2dARB", _gloffset_VertexAttrib2dNV); { "glVertexAttrib2dARB", _gloffset_VertexAttrib2dNV },
_glapi_add_entrypoint("glVertexAttrib3sARB", _gloffset_VertexAttrib3sNV); { "glVertexAttrib3sARB", _gloffset_VertexAttrib3sNV },
_glapi_add_entrypoint("glVertexAttrib3fARB", _gloffset_VertexAttrib3fNV); { "glVertexAttrib3fARB", _gloffset_VertexAttrib3fNV },
_glapi_add_entrypoint("glVertexAttrib3dARB", _gloffset_VertexAttrib3dNV); { "glVertexAttrib3dARB", _gloffset_VertexAttrib3dNV },
_glapi_add_entrypoint("glVertexAttrib4sARB", _gloffset_VertexAttrib4sNV); { "glVertexAttrib4sARB", _gloffset_VertexAttrib4sNV },
_glapi_add_entrypoint("glVertexAttrib4fARB", _gloffset_VertexAttrib4fNV); { "glVertexAttrib4fARB", _gloffset_VertexAttrib4fNV },
_glapi_add_entrypoint("glVertexAttrib4dARB", _gloffset_VertexAttrib4dNV); { "glVertexAttrib4dARB", _gloffset_VertexAttrib4dNV },
_glapi_add_entrypoint("glVertexAttrib4NubARB", _gloffset_VertexAttrib4ubNV); { "glVertexAttrib4NubARB", _gloffset_VertexAttrib4ubNV },
_glapi_add_entrypoint("glVertexAttrib1svARB", _gloffset_VertexAttrib1svNV); { "glVertexAttrib1svARB", _gloffset_VertexAttrib1svNV },
_glapi_add_entrypoint("glVertexAttrib1fvARB", _gloffset_VertexAttrib1fvNV); { "glVertexAttrib1fvARB", _gloffset_VertexAttrib1fvNV },
_glapi_add_entrypoint("glVertexAttrib1dvARB", _gloffset_VertexAttrib1dvNV); { "glVertexAttrib1dvARB", _gloffset_VertexAttrib1dvNV },
_glapi_add_entrypoint("glVertexAttrib2svARB", _gloffset_VertexAttrib2svNV); { "glVertexAttrib2svARB", _gloffset_VertexAttrib2svNV },
_glapi_add_entrypoint("glVertexAttrib2fvARB", _gloffset_VertexAttrib2fvNV); { "glVertexAttrib2fvARB", _gloffset_VertexAttrib2fvNV },
_glapi_add_entrypoint("glVertexAttrib2dvARB", _gloffset_VertexAttrib2dvNV); { "glVertexAttrib2dvARB", _gloffset_VertexAttrib2dvNV },
_glapi_add_entrypoint("glVertexAttrib3svARB", _gloffset_VertexAttrib3svNV); { "glVertexAttrib3svARB", _gloffset_VertexAttrib3svNV },
_glapi_add_entrypoint("glVertexAttrib3fvARB", _gloffset_VertexAttrib3fvNV); { "glVertexAttrib3fvARB", _gloffset_VertexAttrib3fvNV },
_glapi_add_entrypoint("glVertexAttrib3dvARB", _gloffset_VertexAttrib3dvNV); { "glVertexAttrib3dvARB", _gloffset_VertexAttrib3dvNV },
_glapi_add_entrypoint("glVertexAttrib4bvARB", _gloffset_VertexAttrib4bvARB); { "glVertexAttrib4bvARB", _gloffset_VertexAttrib4bvARB },
_glapi_add_entrypoint("glVertexAttrib4svARB", _gloffset_VertexAttrib4svNV); { "glVertexAttrib4svARB", _gloffset_VertexAttrib4svNV },
_glapi_add_entrypoint("glVertexAttrib4ivARB", _gloffset_VertexAttrib4ivARB); { "glVertexAttrib4ivARB", _gloffset_VertexAttrib4ivARB },
_glapi_add_entrypoint("glVertexAttrib4ubvARB", _gloffset_VertexAttrib4ubvARB); { "glVertexAttrib4ubvARB", _gloffset_VertexAttrib4ubvARB },
_glapi_add_entrypoint("glVertexAttrib4usvARB", _gloffset_VertexAttrib4usvARB); { "glVertexAttrib4usvARB", _gloffset_VertexAttrib4usvARB },
_glapi_add_entrypoint("glVertexAttrib4uivARB", _gloffset_VertexAttrib4uivARB); { "glVertexAttrib4uivARB", _gloffset_VertexAttrib4uivARB },
_glapi_add_entrypoint("glVertexAttrib4fvARB", _gloffset_VertexAttrib4fvNV); { "glVertexAttrib4fvARB", _gloffset_VertexAttrib4fvNV },
_glapi_add_entrypoint("glVertexAttrib4dvARB", _gloffset_VertexAttrib4dvNV); { "glVertexAttrib4dvARB", _gloffset_VertexAttrib4dvNV },
_glapi_add_entrypoint("glVertexAttrib4NbvARB", _gloffset_VertexAttrib4NbvARB); { "glVertexAttrib4NbvARB", _gloffset_VertexAttrib4NbvARB },
_glapi_add_entrypoint("glVertexAttrib4NsvARB", _gloffset_VertexAttrib4NsvARB); { "glVertexAttrib4NsvARB", _gloffset_VertexAttrib4NsvARB },
_glapi_add_entrypoint("glVertexAttrib4NivARB", _gloffset_VertexAttrib4NivARB); { "glVertexAttrib4NivARB", _gloffset_VertexAttrib4NivARB },
_glapi_add_entrypoint("glVertexAttrib4NubvARB", _gloffset_VertexAttrib4ubvNV); { "glVertexAttrib4NubvARB", _gloffset_VertexAttrib4ubvNV },
_glapi_add_entrypoint("glVertexAttrib4NusvARB", _gloffset_VertexAttrib4NusvARB); { "glVertexAttrib4NusvARB", _gloffset_VertexAttrib4NusvARB },
_glapi_add_entrypoint("glVertexAttrib4NuivARB", _gloffset_VertexAttrib4NuivARB); { "glVertexAttrib4NuivARB", _gloffset_VertexAttrib4NuivARB },
_glapi_add_entrypoint("glVertexAttribPointerARB", _gloffset_VertexAttribPointerARB); { "glVertexAttribPointerARB", _gloffset_VertexAttribPointerARB },
_glapi_add_entrypoint("glEnableVertexAttribArrayARB", _gloffset_EnableVertexAttribArrayARB); { "glEnableVertexAttribArrayARB", _gloffset_EnableVertexAttribArrayARB },
_glapi_add_entrypoint("glDisableVertexAttribArrayARB", _gloffset_DisableVertexAttribArrayARB); { "glDisableVertexAttribArrayARB", _gloffset_DisableVertexAttribArrayARB },
_glapi_add_entrypoint("glProgramStringARB", _gloffset_ProgramStringARB); { "glProgramStringARB", _gloffset_ProgramStringARB },
_glapi_add_entrypoint("glBindProgramARB", _gloffset_BindProgramNV); { "glBindProgramARB", _gloffset_BindProgramNV },
_glapi_add_entrypoint("glDeleteProgramsARB", _gloffset_DeleteProgramsNV); { "glDeleteProgramsARB", _gloffset_DeleteProgramsNV },
_glapi_add_entrypoint("glGenProgramsARB", _gloffset_GenProgramsNV); { "glGenProgramsARB", _gloffset_GenProgramsNV },
_glapi_add_entrypoint("glIsProgramARB", _gloffset_IsProgramNV); { "glIsProgramARB", _gloffset_IsProgramNV },
_glapi_add_entrypoint("glProgramEnvParameter4dARB", _gloffset_ProgramEnvParameter4dARB); { "glProgramEnvParameter4dARB", _gloffset_ProgramEnvParameter4dARB },
_glapi_add_entrypoint("glProgramEnvParameter4dvARB", _gloffset_ProgramEnvParameter4dvARB); { "glProgramEnvParameter4dvARB", _gloffset_ProgramEnvParameter4dvARB },
_glapi_add_entrypoint("glProgramEnvParameter4fARB", _gloffset_ProgramEnvParameter4fARB); { "glProgramEnvParameter4fARB", _gloffset_ProgramEnvParameter4fARB },
_glapi_add_entrypoint("glProgramEnvParameter4fvARB", _gloffset_ProgramEnvParameter4fvARB); { "glProgramEnvParameter4fvARB", _gloffset_ProgramEnvParameter4fvARB },
_glapi_add_entrypoint("glProgramLocalParameter4dARB", _gloffset_ProgramLocalParameter4dARB); { "glProgramLocalParameter4dARB", _gloffset_ProgramLocalParameter4dARB },
_glapi_add_entrypoint("glProgramLocalParameter4dvARB", _gloffset_ProgramLocalParameter4dvARB); { "glProgramLocalParameter4dvARB", _gloffset_ProgramLocalParameter4dvARB },
_glapi_add_entrypoint("glProgramLocalParameter4fARB", _gloffset_ProgramLocalParameter4fARB); { "glProgramLocalParameter4fARB", _gloffset_ProgramLocalParameter4fARB },
_glapi_add_entrypoint("glProgramLocalParameter4fvARB", _gloffset_ProgramLocalParameter4fvARB); { "glProgramLocalParameter4fvARB", _gloffset_ProgramLocalParameter4fvARB },
_glapi_add_entrypoint("glGetProgramEnvParameterdvARB", _gloffset_GetProgramEnvParameterdvARB); { "glGetProgramEnvParameterdvARB", _gloffset_GetProgramEnvParameterdvARB },
_glapi_add_entrypoint("glGetProgramEnvParameterfvARB", _gloffset_GetProgramEnvParameterfvARB); { "glGetProgramEnvParameterfvARB", _gloffset_GetProgramEnvParameterfvARB },
_glapi_add_entrypoint("glGetProgramLocalParameterdvARB", _gloffset_GetProgramLocalParameterdvARB); { "glGetProgramLocalParameterdvARB", _gloffset_GetProgramLocalParameterdvARB },
_glapi_add_entrypoint("glGetProgramLocalParameterfvARB", _gloffset_GetProgramLocalParameterfvARB); { "glGetProgramLocalParameterfvARB", _gloffset_GetProgramLocalParameterfvARB },
_glapi_add_entrypoint("glGetProgramivARB", _gloffset_GetProgramivARB); { "glGetProgramivARB", _gloffset_GetProgramivARB },
_glapi_add_entrypoint("glGetProgramStringARB", _gloffset_GetProgramStringARB); { "glGetProgramStringARB", _gloffset_GetProgramStringARB },
_glapi_add_entrypoint("glGetVertexAttribdvARB", _gloffset_GetVertexAttribdvNV); { "glGetVertexAttribdvARB", _gloffset_GetVertexAttribdvNV },
_glapi_add_entrypoint("glGetVertexAttribfvARB", _gloffset_GetVertexAttribfvNV); { "glGetVertexAttribfvARB", _gloffset_GetVertexAttribfvNV },
_glapi_add_entrypoint("glGetVertexAttribivARB", _gloffset_GetVertexAttribivNV); { "glGetVertexAttribivARB", _gloffset_GetVertexAttribivNV },
_glapi_add_entrypoint("glGetVertexAttribPointervARB", _gloffset_GetVertexAttribPointervNV); { "glGetVertexAttribPointervARB", _gloffset_GetVertexAttribPointervNV },
#endif #endif
{ "glMultiModeDrawArraysIBM", _gloffset_MultiModeDrawArraysIBM },
{ "glMultiModeDrawElementsIBM", _gloffset_MultiModeDrawElementsIBM },
};
for ( i = 0 ; i < Elements(newer_entrypoints) ; i++ ) {
_glapi_add_entrypoint( newer_entrypoints[i].name,
newer_entrypoints[i].offset );
}
} }

View File

@@ -6099,6 +6099,29 @@ static void exec_MultiDrawElementsEXT(GLenum mode, const GLsizei *count,
ctx->Exec->MultiDrawElementsEXT(mode, count, type, indices, primcount); ctx->Exec->MultiDrawElementsEXT(mode, count, type, indices, primcount);
} }
/* GL_IBM_multimode_draw_arrays */
static void exec_MultiModeDrawArraysIBM(const GLenum *mode, const GLint *first,
const GLsizei *count, GLsizei primcount,
GLint modestride)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
ctx->Exec->MultiModeDrawArraysIBM(mode, first, count, primcount, modestride);
}
/* GL_IBM_multimode_draw_arrays */
static void exec_MultiModeDrawElementsIBM(const GLenum *mode,
const GLsizei *count,
GLenum type,
const GLvoid * const *indices,
GLsizei primcount, GLint modestride)
{
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, 0);
ctx->Exec->MultiModeDrawElementsIBM(mode, count, type, indices, primcount,
modestride);
}
/* /*
@@ -6475,6 +6498,10 @@ _mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize )
table->WindowPos4sMESA = save_WindowPos4sMESA; table->WindowPos4sMESA = save_WindowPos4sMESA;
table->WindowPos4svMESA = save_WindowPos4svMESA; table->WindowPos4svMESA = save_WindowPos4svMESA;
/* 200. GL_IBM_multimode_draw_arrays */
table->MultiModeDrawArraysIBM = exec_MultiModeDrawArraysIBM;
table->MultiModeDrawElementsIBM = exec_MultiModeDrawElementsIBM;
#if FEATURE_NV_vertex_program #if FEATURE_NV_vertex_program
/* 233. GL_NV_vertex_program */ /* 233. GL_NV_vertex_program */
/* The following commands DO NOT go into display lists: /* The following commands DO NOT go into display lists:

View File

@@ -110,6 +110,7 @@ static const struct {
{ OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)}, { OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
{ OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)}, { OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)},
{ OFF, "GL_HP_occlusion_test", F(HP_occlusion_test) }, { OFF, "GL_HP_occlusion_test", F(HP_occlusion_test) },
{ OFF, "GL_IBM_multimode_draw_arrays", F(IBM_multimode_draw_arrays) },
{ ON, "GL_IBM_rasterpos_clip", F(IBM_rasterpos_clip) }, { ON, "GL_IBM_rasterpos_clip", F(IBM_rasterpos_clip) },
{ OFF, "GL_IBM_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)}, { OFF, "GL_IBM_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
{ OFF, "GL_INGR_blend_func_separate", F(EXT_blend_func_separate) }, { OFF, "GL_INGR_blend_func_separate", F(EXT_blend_func_separate) },
@@ -139,6 +140,7 @@ static const struct {
{ OFF, "GL_SGIX_pixel_texture", F(SGIX_pixel_texture) }, { OFF, "GL_SGIX_pixel_texture", F(SGIX_pixel_texture) },
{ OFF, "GL_SGIX_shadow", F(SGIX_shadow) }, { OFF, "GL_SGIX_shadow", F(SGIX_shadow) },
{ OFF, "GL_SGIX_shadow_ambient", F(SGIX_shadow_ambient) }, { OFF, "GL_SGIX_shadow_ambient", F(SGIX_shadow_ambient) },
{ OFF, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
}; };
@@ -181,6 +183,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.EXT_depth_bounds_test = GL_TRUE; ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
ctx->Extensions.EXT_fog_coord = GL_TRUE; ctx->Extensions.EXT_fog_coord = GL_TRUE;
ctx->Extensions.EXT_histogram = GL_TRUE; ctx->Extensions.EXT_histogram = GL_TRUE;
ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;
ctx->Extensions.EXT_paletted_texture = GL_TRUE; ctx->Extensions.EXT_paletted_texture = GL_TRUE;
ctx->Extensions.EXT_point_parameters = GL_TRUE; ctx->Extensions.EXT_point_parameters = GL_TRUE;
ctx->Extensions.EXT_shadow_funcs = GL_TRUE; ctx->Extensions.EXT_shadow_funcs = GL_TRUE;
@@ -193,6 +196,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
ctx->Extensions.EXT_texture_lod_bias = GL_TRUE; ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
ctx->Extensions.HP_occlusion_test = GL_TRUE; ctx->Extensions.HP_occlusion_test = GL_TRUE;
ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;
ctx->Extensions.MESA_pack_invert = GL_TRUE; ctx->Extensions.MESA_pack_invert = GL_TRUE;
#if FEATURE_MESA_program_debug #if FEATURE_MESA_program_debug
ctx->Extensions.MESA_program_debug = GL_TRUE; ctx->Extensions.MESA_program_debug = GL_TRUE;

View File

@@ -1781,6 +1781,7 @@ struct gl_extensions
GLboolean EXT_vertex_array_set; GLboolean EXT_vertex_array_set;
GLboolean HP_occlusion_test; GLboolean HP_occlusion_test;
GLboolean IBM_rasterpos_clip; GLboolean IBM_rasterpos_clip;
GLboolean IBM_multimode_draw_arrays;
GLboolean MESA_pack_invert; GLboolean MESA_pack_invert;
GLboolean MESA_packed_depth_stencil; GLboolean MESA_packed_depth_stencil;
GLboolean MESA_program_debug; GLboolean MESA_program_debug;

View File

@@ -536,6 +536,12 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize)
exec->WindowPos4svMESA = _mesa_WindowPos4svMESA; exec->WindowPos4svMESA = _mesa_WindowPos4svMESA;
#endif #endif
/* 200. GL_IBM_multimode_draw_arrays */
#if _HAVE_FULL_GL
exec->MultiModeDrawArraysIBM = _mesa_MultiModeDrawArraysIBM;
exec->MultiModeDrawElementsIBM = _mesa_MultiModeDrawElementsIBM;
#endif
/* 233. GL_NV_vertex_program */ /* 233. GL_NV_vertex_program */
#if FEATURE_NV_vertex_program #if FEATURE_NV_vertex_program
exec->BindProgramNV = _mesa_BindProgramNV; exec->BindProgramNV = _mesa_BindProgramNV;

View File

@@ -913,6 +913,46 @@ _mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
} }
/* GL_IBM_multimode_draw_arrays */
void
_mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first,
const GLsizei * count,
GLsizei primcount, GLint modestride )
{
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)( *(GLenum *) ((char *) mode + (i * modestride)),
first[i], count[i] );
}
}
}
/* GL_IBM_multimode_draw_arrays */
void
_mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
GLenum type, const GLvoid * const * indices,
GLsizei primcount, GLint modestride )
{
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)( *(GLenum *) ((char *) mode + (i * modestride)),
count[i], type, indices[i] );
}
}
}
/**********************************************************************/ /**********************************************************************/
/***** Initialization *****/ /***** Initialization *****/
/**********************************************************************/ /**********************************************************************/

View File

@@ -134,6 +134,19 @@ extern void
_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, _mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
const GLvoid **indices, GLsizei primcount ); const GLvoid **indices, GLsizei primcount );
extern void
_mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first,
const GLsizei * count,
GLsizei primcount, GLint modestride );
extern void
_mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
GLenum type, const GLvoid * const * indices,
GLsizei primcount, GLint modestride );
extern void extern void
_mesa_init_varray( GLcontext * ctx ); _mesa_init_varray( GLcontext * ctx );

View File

@@ -18791,6 +18791,48 @@ glGetQueryObjectuivARB:
sethi %hi(0x00000000), %g1 sethi %hi(0x00000000), %g1
ld [%g1 + %lo(0x00000000)], %g1 ld [%g1 + %lo(0x00000000)], %g1
ld [%g1 + (4 * _gloffset_GetQueryObjectuivARB)], %g3 ld [%g1 + (4 * _gloffset_GetQueryObjectuivARB)], %g3
#endif
jmpl %g3, %g0
nop
.globl glMultiModeDrawArraysIBM
.type glMultiModeDrawArraysIBM,#function
glMultiModeDrawArraysIBM:
#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_MultiModeDrawArraysIBM), %g2
or %g2, %lo(8 * _gloffset_MultiModeDrawArraysIBM), %g2
ldx [%g1 + %g2], %g3
#else
sethi %hi(0x00000000), %g1
ld [%g1 + %lo(0x00000000)], %g1
ld [%g1 + (4 * _gloffset_MultiModeDrawArraysIBM)], %g3
#endif
jmpl %g3, %g0
nop
.globl glMultiModeDrawElementsIBM
.type glMultiModeDrawElementsIBM,#function
glMultiModeDrawElementsIBM:
#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_MultiModeDrawElementsIBM), %g2
or %g2, %lo(8 * _gloffset_MultiModeDrawElementsIBM), %g2
ldx [%g1 + %g2], %g3
#else
sethi %hi(0x00000000), %g1
ld [%g1 + %lo(0x00000000)], %g1
ld [%g1 + (4 * _gloffset_MultiModeDrawElementsIBM)], %g3
#endif #endif
jmpl %g3, %g0 jmpl %g3, %g0
nop nop

View File

@@ -5385,5 +5385,17 @@ GL_PREFIX(GetQueryObjectuivARB):
MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX)
JMP(GL_OFFSET(_gloffset_GetQueryObjectuivARB)) JMP(GL_OFFSET(_gloffset_GetQueryObjectuivARB))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(MultiModeDrawArraysIBM))
GL_PREFIX(MultiModeDrawArraysIBM):
MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX)
JMP(GL_OFFSET(_gloffset_MultiModeDrawArraysIBM))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(MultiModeDrawElementsIBM))
GL_PREFIX(MultiModeDrawElementsIBM):
MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX)
JMP(GL_OFFSET(_gloffset_MultiModeDrawElementsIBM))
#endif /* __WIN32__ */ #endif /* __WIN32__ */