[Mesa-dev] [PATCH 17/23] mesa: remove Driver.NotifySaveBegin

Marek Olšák maraeo at gmail.com
Sun Sep 27 15:20:46 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

Nothing overrides it.
---
 src/mesa/drivers/common/driverfuncs.c | 1 -
 src/mesa/main/dd.h                    | 7 -------
 src/mesa/main/dlist.c                 | 2 +-
 src/mesa/vbo/vbo.h                    | 2 +-
 src/mesa/vbo/vbo_save.c               | 1 -
 src/mesa/vbo/vbo_save.h               | 1 -
 src/mesa/vbo/vbo_save_api.c           | 5 +----
 7 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 571c631..1d6246a 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->NotifySaveBegin = NULL;
    driver->LightingSpaceChange = NULL;
 
    /* display list */
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 5b083ab..76fa46d 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -791,13 +791,6 @@ struct dd_function_table {
    GLboolean SaveNeedFlush;
 
    /**
-    * Give the driver the opportunity to hook in its own vtxfmt for
-    * compiling optimized display lists.  This is called on each valid
-    * glBegin() during list compilation.
-    */
-   GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
-
-   /**
     * Notify driver that the special derived value _NeedEyeCoords has
     * changed.
     */
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 944be25..f63efa1 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -5465,7 +5465,7 @@ save_Begin(GLenum mode)
       /* Give the driver an opportunity to hook in an optimized
        * display list compiler.
        */
-      if (ctx->Driver.NotifySaveBegin(ctx, mode))
+      if (vbo_save_NotifyBegin(ctx, mode))
          return;
 
       SAVE_FLUSH_VERTICES(ctx);
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index c1f9236..c316a09 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -90,7 +90,7 @@ vbo_initialize_save_dispatch(const struct gl_context *ctx,
 
 void vbo_exec_FlushVertices(struct gl_context *ctx, GLuint flags);
 void vbo_save_SaveFlushVertices(struct gl_context *ctx);
-
+GLboolean vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode);
 
 
 typedef void (*vbo_draw_func)( struct gl_context *ctx,
diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c
index 7de1966..bee6634 100644
--- a/src/mesa/vbo/vbo_save.c
+++ b/src/mesa/vbo/vbo_save.c
@@ -39,7 +39,6 @@ static void vbo_save_callback_init( struct gl_context *ctx )
    ctx->Driver.EndList = vbo_save_EndList;
    ctx->Driver.BeginCallList = vbo_save_BeginCallList;
    ctx->Driver.EndCallList = vbo_save_EndCallList;
-   ctx->Driver.NotifySaveBegin = vbo_save_NotifyBegin;
 }
 
 
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index 465c314..ccfe570 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -179,7 +179,6 @@ void vbo_save_EndList( struct gl_context *ctx );
 void vbo_save_NewList( struct gl_context *ctx, GLuint list, GLenum mode );
 void vbo_save_EndCallList( struct gl_context *ctx );
 void vbo_save_BeginCallList( struct gl_context *ctx, struct gl_display_list *list );
-GLboolean vbo_save_NotifyBegin( struct gl_context *ctx, GLenum mode );
 
 void vbo_save_playback_vertex_list( struct gl_context *ctx, void *data );
 
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 36cc117..1a70d16 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -970,8 +970,7 @@ _save_CallLists(GLsizei n, GLenum type, const GLvoid * v)
 
 
 /**
- * Called via ctx->Driver.NotifySaveBegin() when a glBegin is getting
- * compiled into a display list.
+ * Called when a glBegin is getting compiled into a display list.
  * Updating of ctx->Driver.CurrentSavePrimitive is already taken care of.
  */
 GLboolean
@@ -1604,8 +1603,6 @@ vbo_save_api_init(struct vbo_save_context *save)
                                vbo_destroy_vertex_list,
                                vbo_print_vertex_list);
 
-   ctx->Driver.NotifySaveBegin = vbo_save_NotifyBegin;
-
    _save_vtxfmt_init(ctx);
    _save_current_init(ctx);
    _mesa_noop_vtxfmt_init(&save->vtxfmt_noop);
-- 
2.1.4



More information about the mesa-dev mailing list