[Mesa-dev] [PATCH 09/17] mesa: use new _vbo_install_exec_vtxfmt() function
Brian Paul
brianp at vmware.com
Fri Jan 19 17:46:59 UTC 2018
Instead of reaching into the vbo_context object in vtxfmt.c
---
src/mesa/main/vtxfmt.c | 3 +--
src/mesa/vbo/vbo_context.c | 10 ++++++++++
src/mesa/vbo/vbo_context.h | 4 ++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index d3c83e5..ec8f387 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -257,8 +257,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);
}
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index ed1b650..3d3f838 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -28,6 +28,7 @@
#include "main/mtypes.h"
#include "main/bufferobj.h"
#include "math/m_eval.h"
+#include "main/vtxfmt.h"
#include "vbo.h"
#include "vbo_context.h"
@@ -181,6 +182,15 @@ vbo_draw_indirect_prims(struct gl_context *ctx,
}
+void
+_vbo_install_exec_vtxfmt(struct gl_context *ctx)
+{
+ struct vbo_context *vbo = vbo_context(ctx);
+
+ _mesa_install_exec_vtxfmt(ctx, &vbo->exec.vtxfmt);
+}
+
+
GLboolean
_vbo_CreateContext(struct gl_context *ctx)
{
diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index cd1cbd9..2eac019 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -110,6 +110,10 @@ vbo_exec_invalidate_state(struct gl_context *ctx)
}
+void
+_vbo_install_exec_vtxfmt(struct gl_context *ctx);
+
+
/**
* Return VP_x token to indicate whether we're running fixed-function
* vertex transformation, an NV vertex program or ARB vertex program/shader.
--
2.7.4
More information about the mesa-dev
mailing list