X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fvtxfmt.c;h=692ce080c9f83c07eea74336afc0e18e3688ad7c;hb=d9e591391d490c83ce301aa568a2e0afe4cc3c0a;hp=9236bf81a20fe5cec7ddbfce0f9f7ebb3a832527;hpb=69a07be3e527dbc2148a4e20c50e60266225f5f2;p=mesa.git diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index 9236bf81a20..692ce080c9f 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -30,6 +30,7 @@ #include "api_arrayelt.h" #include "context.h" #include "imports.h" +#include "mfeatures.h" #include "mtypes.h" #include "vtxfmt.h" #include "eval.h" @@ -40,7 +41,7 @@ #if FEATURE_beginend /** - * Use the per-vertex functions found in to initialze the given + * Use the per-vertex functions found in to initialoze the given * API dispatch table. */ static void @@ -88,7 +89,7 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) SET_Vertex4f(tab, vfmt->Vertex4f); SET_Vertex4fv(tab, vfmt->Vertex4fv); - _mesa_install_dlist_vtxfmt(tab, vfmt); + _mesa_install_dlist_vtxfmt(tab, vfmt); /* glCallList / glCallLists */ SET_Begin(tab, vfmt->Begin); SET_End(tab, vfmt->End); @@ -103,8 +104,8 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex); SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex); SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex); - SET_DrawArraysInstanced(tab, vfmt->DrawArraysInstanced); - SET_DrawElementsInstanced(tab, vfmt->DrawElementsInstanced); + SET_DrawArraysInstancedARB(tab, vfmt->DrawArraysInstanced); + SET_DrawElementsInstancedARB(tab, vfmt->DrawElementsInstanced); /* GL_NV_vertex_program */ SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV); @@ -125,17 +126,43 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) SET_VertexAttrib4fARB(tab, vfmt->VertexAttrib4fARB); SET_VertexAttrib4fvARB(tab, vfmt->VertexAttrib4fvARB); #endif + + /* GL_EXT_gpu_shader4 / OpenGL 3.0 */ + SET_VertexAttribI1iEXT(tab, vfmt->VertexAttribI1i); + SET_VertexAttribI2iEXT(tab, vfmt->VertexAttribI2i); + SET_VertexAttribI3iEXT(tab, vfmt->VertexAttribI3i); + SET_VertexAttribI4iEXT(tab, vfmt->VertexAttribI4i); + SET_VertexAttribI2ivEXT(tab, vfmt->VertexAttribI2iv); + SET_VertexAttribI3ivEXT(tab, vfmt->VertexAttribI3iv); + SET_VertexAttribI4ivEXT(tab, vfmt->VertexAttribI4iv); + + SET_VertexAttribI1uiEXT(tab, vfmt->VertexAttribI1ui); + SET_VertexAttribI2uiEXT(tab, vfmt->VertexAttribI2ui); + SET_VertexAttribI3uiEXT(tab, vfmt->VertexAttribI3ui); + SET_VertexAttribI4uiEXT(tab, vfmt->VertexAttribI4ui); + SET_VertexAttribI2uivEXT(tab, vfmt->VertexAttribI2uiv); + SET_VertexAttribI3uivEXT(tab, vfmt->VertexAttribI3uiv); + SET_VertexAttribI4uivEXT(tab, vfmt->VertexAttribI4uiv); } -void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) +/** + * Install per-vertex functions into the API dispatch table for execution. + */ +void +_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) { if (ctx->API == API_OPENGL) install_vtxfmt( ctx->Exec, vfmt ); } -void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) +/** + * Install per-vertex functions into the API dispatch table for display + * list compilation. + */ +void +_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) { if (ctx->API == API_OPENGL) install_vtxfmt( ctx->Save, vfmt );