[Mesa-dev] [PATCH 11/23] mesa: remove Driver.NewArrayObject

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


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

Nothing reimplements it.
---
 src/mesa/drivers/common/driverfuncs.c        | 1 -
 src/mesa/main/arrayobj.c                     | 5 ++---
 src/mesa/main/dd.h                           | 1 -
 src/mesa/main/varray.c                       | 2 +-
 src/mesa/state_tracker/st_cb_bufferobjects.c | 1 -
 5 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 915ac57..85b53f4 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -178,7 +178,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
    _mesa_init_texture_barrier_functions(driver);
 
    /* APPLE_vertex_array_object */
-   driver->NewArrayObject = _mesa_new_vao;
    driver->DeleteArrayObject = _mesa_delete_vao;
    driver->BindArrayObject = NULL;
 
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 2885143..dde489e 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -151,7 +151,6 @@ unbind_array_object_vbos(struct gl_context *ctx, struct gl_vertex_array_object *
  * Allocate and initialize a new vertex array object.
  *
  * This function is intended to be called via
- * \c dd_function_table::NewArrayObject.
  */
 struct gl_vertex_array_object *
 _mesa_new_vao(struct gl_context *ctx, GLuint name)
@@ -408,7 +407,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
          }
 
          /* For APPLE version, generate a new array object now */
-	 newObj = (*ctx->Driver.NewArrayObject)(ctx, id);
+	 newObj = _mesa_new_vao(ctx, id);
          if (!newObj) {
             _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindVertexArrayAPPLE");
             return;
@@ -565,7 +564,7 @@ gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays,
       struct gl_vertex_array_object *obj;
       GLuint name = first + i;
 
-      obj = (*ctx->Driver.NewArrayObject)( ctx, name );
+      obj = _mesa_new_vao(ctx, name);
       if (!obj) {
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
          return;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index db90083..4266ffd 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -752,7 +752,6 @@ struct dd_function_table {
     * \name Vertex Array objects
     */
    /*@{*/
-   struct gl_vertex_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
    void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
    void (*BindArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
    /*@}*/
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 4df57c1..887d0c0 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -2354,7 +2354,7 @@ _mesa_print_arrays(struct gl_context *ctx)
 void
 _mesa_init_varray(struct gl_context *ctx)
 {
-   ctx->Array.DefaultVAO = ctx->Driver.NewArrayObject(ctx, 0);
+   ctx->Array.DefaultVAO = _mesa_new_vao(ctx, 0);
    _mesa_reference_vao(ctx, &ctx->Array.VAO, ctx->Array.DefaultVAO);
    ctx->Array.ActiveTexture = 0;   /* GL_ARB_multitexture */
 
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index db254c2..bcfac98 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -529,6 +529,5 @@ st_init_bufferobject_functions(struct dd_function_table *functions)
    functions->ClearBufferSubData = st_clear_buffer_subdata;
 
    /* For GL_APPLE_vertex_array_object */
-   functions->NewArrayObject = _mesa_new_vao;
    functions->DeleteArrayObject = _mesa_delete_vao;
 }
-- 
2.1.4



More information about the mesa-dev mailing list