[Mesa-dev] [PATCH 15/23] mesa: remove Driver.FlushVertices
Marek Olšák
maraeo at gmail.com
Sun Sep 27 15:20:44 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
Nothing overrides it.
---
src/mesa/drivers/common/driverfuncs.c | 1 -
src/mesa/main/context.h | 5 +++--
src/mesa/main/dd.h | 10 ----------
src/mesa/vbo/vbo.h | 3 +++
src/mesa/vbo/vbo_exec.c | 1 -
src/mesa/vbo/vbo_exec.h | 1 -
src/mesa/vbo/vbo_exec_api.c | 9 ++++++++-
7 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index da70dfd..f34f7ff 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -187,7 +187,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->SaveNeedFlush = 0;
driver->ProgramStringNotify = _tnl_program_string;
- driver->FlushVertices = NULL;
driver->SaveFlushVertices = NULL;
driver->NotifySaveBegin = NULL;
driver->LightingSpaceChange = NULL;
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 0f7529a..1e7a12c 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -51,6 +51,7 @@
#include "imports.h"
#include "mtypes.h"
+#include "vbo/vbo.h"
#ifdef __cplusplus
@@ -227,7 +228,7 @@ do { \
if (MESA_VERBOSE & VERBOSE_STATE) \
_mesa_debug(ctx, "FLUSH_VERTICES in %s\n", MESA_FUNCTION);\
if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) \
- ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES); \
+ vbo_exec_FlushVertices(ctx, FLUSH_STORED_VERTICES); \
ctx->NewState |= newstate; \
} while (0)
@@ -246,7 +247,7 @@ do { \
if (MESA_VERBOSE & VERBOSE_STATE) \
_mesa_debug(ctx, "FLUSH_CURRENT in %s\n", MESA_FUNCTION); \
if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) \
- ctx->Driver.FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \
+ vbo_exec_FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \
ctx->NewState |= newstate; \
} while (0)
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index a5991cb..05fa00d 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -790,16 +790,6 @@ struct dd_function_table {
/** Need to call SaveFlushVertices() upon state change? */
GLboolean SaveNeedFlush;
- /**
- * If inside glBegin()/glEnd(), it should assert(0). Otherwise, if
- * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
- * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
- * __struct gl_contextRec::Current and gl_light_attrib::Material
- *
- * Note that the default T&L engine never clears the
- * FLUSH_UPDATE_CURRENT bit, even after performing the update.
- */
- void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
void (*SaveFlushVertices)( struct gl_context *ctx );
/**
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 2aaff5d..57ab2ac 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -88,6 +88,9 @@ void
vbo_initialize_save_dispatch(const struct gl_context *ctx,
struct _glapi_table *exec);
+void vbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags);
+
+
typedef void (*vbo_draw_func)( struct gl_context *ctx,
const struct _mesa_prim *prims,
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 18fb88c..a301c6c 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -50,7 +50,6 @@ void vbo_exec_init( struct gl_context *ctx )
ctx->Driver.NeedFlush = 0;
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
- ctx->Driver.FlushVertices = vbo_exec_FlushVertices;
vbo_exec_invalidate_state( ctx, ~0 );
}
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index f17fe68..80f3015 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -148,7 +148,6 @@ void vbo_exec_destroy( struct gl_context *ctx );
void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state );
void vbo_exec_BeginVertices( struct gl_context *ctx );
-void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags );
/* Internal functions:
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 4855589..583a2f9 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -1165,7 +1165,14 @@ void vbo_exec_BeginVertices( struct gl_context *ctx )
/**
- * Called via ctx->Driver.FlushVertices()
+ * If inside glBegin()/glEnd(), it should assert(0). Otherwise, if
+ * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
+ * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
+ * __struct gl_contextRec::Current and gl_light_attrib::Material
+ *
+ * Note that the default T&L engine never clears the
+ * FLUSH_UPDATE_CURRENT bit, even after performing the update.
+ *
* \param flags bitmask of FLUSH_STORED_VERTICES, FLUSH_UPDATE_CURRENT
*/
void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
--
2.1.4
More information about the mesa-dev
mailing list