X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fvtxfmt.c;h=3e96c7d2fbac5c79c35ad257f3d62070dd8c1f27;hb=2734baa9e24fc9401fab2a116fcfb18c56538175;hp=d7bf98ec8ec3703b0fb919efb86445a6ed85be91;hpb=200e09e393c05706d830667cbf626d1d51c000c4;p=mesa.git diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index d7bf98ec8ec..3e96c7d2fba 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -1,6 +1,5 @@ /* * Mesa 3-D graphics library - * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -23,7 +22,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell Gareth Hughes + * Keith Whitwell Gareth Hughes */ #include "glheader.h" @@ -35,18 +34,16 @@ #include "eval.h" #include "dlist.h" #include "main/dispatch.h" -#include "vbo/vbo_context.h" +#include "vbo/vbo.h" /** - * Use the per-vertex functions found in to initialize the given - * API dispatch table. - * If beginend is true, only plug in the functions which are legal - * between glBegin/glEnd. + * Copy the functions found in the GLvertexformat object into the + * dispatch table. */ static void install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, - const GLvertexformat *vfmt, bool beginend) + const GLvertexformat *vfmt) { assert(ctx->Version > 0); @@ -208,6 +205,23 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, SET_VertexAttribP2uiv(tab, vfmt->VertexAttribP2uiv); SET_VertexAttribP3uiv(tab, vfmt->VertexAttribP3uiv); SET_VertexAttribP4uiv(tab, vfmt->VertexAttribP4uiv); + + /* GL_ARB_bindless_texture */ + SET_VertexAttribL1ui64ARB(tab, vfmt->VertexAttribL1ui64ARB); + SET_VertexAttribL1ui64vARB(tab, vfmt->VertexAttribL1ui64vARB); + } + + if (_mesa_is_desktop_gl(ctx)) { + /* GL_ARB_vertex_attrib_64bit */ + SET_VertexAttribL1d(tab, vfmt->VertexAttribL1d); + SET_VertexAttribL2d(tab, vfmt->VertexAttribL2d); + SET_VertexAttribL3d(tab, vfmt->VertexAttribL3d); + SET_VertexAttribL4d(tab, vfmt->VertexAttribL4d); + + SET_VertexAttribL1dv(tab, vfmt->VertexAttribL1dv); + SET_VertexAttribL2dv(tab, vfmt->VertexAttribL2dv); + SET_VertexAttribL3dv(tab, vfmt->VertexAttribL3dv); + SET_VertexAttribL4dv(tab, vfmt->VertexAttribL4dv); } } @@ -218,9 +232,9 @@ install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab, void _mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) { - install_vtxfmt(ctx, ctx->Exec, vfmt, false); + install_vtxfmt(ctx, ctx->Exec, vfmt); if (ctx->BeginEnd) - install_vtxfmt(ctx, ctx->BeginEnd, vfmt, true); + install_vtxfmt(ctx, ctx->BeginEnd, vfmt); } @@ -232,7 +246,7 @@ void _mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) { if (_mesa_is_desktop_gl(ctx)) - install_vtxfmt(ctx, ctx->Save, vfmt, false); + install_vtxfmt(ctx, ctx->Save, vfmt); } @@ -244,8 +258,7 @@ _mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) void _mesa_initialize_vbo_vtxfmt(struct gl_context *ctx) { - struct vbo_exec_context *exec = &vbo_context(ctx)->exec; - _mesa_install_exec_vtxfmt(ctx, &exec->vtxfmt); + _vbo_install_exec_vtxfmt(ctx); if (ctx->API == API_OPENGL_COMPAT) { _mesa_install_save_vtxfmt(ctx, &ctx->ListState.ListVtxfmt); }