[Mesa-dev] [PATCH 11/17] vbo: move remaining items from vbo_context.h to vbo.h
Brian Paul
brianp at vmware.com
Fri Jan 19 17:47:01 UTC 2018
Non-VBO sources files sometimes included vbo.h while others included
vbo_context.h. We're moving all public types, functions to the former.
---
src/mesa/vbo/vbo.h | 6 ++++++
src/mesa/vbo/vbo_context.c | 2 +-
src/mesa/vbo/vbo_context.h | 40 ----------------------------------------
src/mesa/vbo/vbo_exec.c | 2 +-
src/mesa/vbo/vbo_private.h | 25 +++++++++++++++++++++++++
src/mesa/vbo/vbo_save_loopback.c | 2 +-
6 files changed, 34 insertions(+), 43 deletions(-)
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 146d4cd..d85b3ed 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -81,6 +81,12 @@ void _vbo_DestroyContext( struct gl_context *ctx );
void
+vbo_exec_invalidate_state(struct gl_context *ctx);
+
+void
+_vbo_install_exec_vtxfmt(struct gl_context *ctx);
+
+void
vbo_initialize_exec_dispatch(const struct gl_context *ctx,
struct _glapi_table *exec);
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index 34c7d59..dbeb687 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -29,8 +29,8 @@
#include "main/bufferobj.h"
#include "math/m_eval.h"
#include "main/vtxfmt.h"
+#include "main/api_arrayelt.h"
#include "vbo.h"
-#include "vbo_context.h"
#include "vbo_private.h"
diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index a723a6a..48f9a9b 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -52,46 +52,6 @@
#define _VBO_CONTEXT_H
#include "vbo.h"
-#include "vbo_attrib.h"
-#include "vbo_exec.h"
-#include "vbo_save.h"
-
-#include "main/api_arrayelt.h"
-#include "main/macros.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct vbo_context {
- struct gl_vertex_array currval[VBO_ATTRIB_MAX];
-
- /** Map VERT_ATTRIB_x to VBO_ATTRIB_y */
- GLubyte map_vp_none[VERT_ATTRIB_MAX];
- GLubyte map_vp_arb[VERT_ATTRIB_MAX];
-
- struct vbo_exec_context exec;
- struct vbo_save_context save;
-
- /* Callback into the driver. This must always succeed, the driver
- * is responsible for initiating any fallback actions required:
- */
- vbo_draw_func draw_prims;
-
- /* Optional callback for indirect draws. This allows multidraws to not be
- * broken up, as well as for the actual count to be passed in as a separate
- * indirect parameter.
- */
- vbo_indirect_draw_func draw_indirect_prims;
-};
-
-
-void
-vbo_exec_invalidate_state(struct gl_context *ctx);
-
-
-void
-_vbo_install_exec_vtxfmt(struct gl_context *ctx);
#ifdef __cplusplus
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 5718c9d..82f204e 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -28,8 +28,8 @@
#include "main/glheader.h"
#include "main/mtypes.h"
+#include "main/api_arrayelt.h"
#include "main/vtxfmt.h"
-#include "vbo_context.h"
#include "vbo_private.h"
diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h
index e4c0cbc..c6dee0d 100644
--- a/src/mesa/vbo/vbo_private.h
+++ b/src/mesa/vbo/vbo_private.h
@@ -33,6 +33,9 @@
#include "vbo/vbo_context.h"
+#include "vbo/vbo_attrib.h"
+#include "vbo/vbo_exec.h"
+#include "vbo/vbo_save.h"
#include "main/mtypes.h"
@@ -40,6 +43,28 @@ struct _glapi_table;
struct _mesa_prim;
+struct vbo_context {
+ struct gl_vertex_array currval[VBO_ATTRIB_MAX];
+
+ /** Map VERT_ATTRIB_x to VBO_ATTRIB_y */
+ GLubyte map_vp_none[VERT_ATTRIB_MAX];
+ GLubyte map_vp_arb[VERT_ATTRIB_MAX];
+
+ struct vbo_exec_context exec;
+ struct vbo_save_context save;
+
+ /* Callback into the driver. This must always succeed, the driver
+ * is responsible for initiating any fallback actions required:
+ */
+ vbo_draw_func draw_prims;
+
+ /* Optional callback for indirect draws. This allows multidraws to not be
+ * broken up, as well as for the actual count to be passed in as a separate
+ * indirect parameter.
+ */
+ vbo_indirect_draw_func draw_indirect_prims;
+};
+
static inline struct vbo_context *
vbo_context(struct gl_context *ctx)
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c
index 9c0e937..43d458a 100644
--- a/src/mesa/vbo/vbo_save_loopback.c
+++ b/src/mesa/vbo/vbo_save_loopback.c
@@ -34,7 +34,7 @@
#include "main/dispatch.h"
#include "glapi/glapi.h"
-#include "vbo_context.h"
+#include "vbo_private.h"
typedef void (*attr_func)(struct gl_context *ctx, GLint index, const GLfloat *);
--
2.7.4
More information about the mesa-dev
mailing list