[Mesa-dev] [PATCH 10/11] mesa: Remove set but not used gl_client_array::Enabled.

Mathias.Froehlich at gmx.net Mathias.Froehlich at gmx.net
Fri Jun 17 18:04:22 UTC 2016


From: Mathias Fröhlich <mathias.froehlich at web.de>

The way it is used today does not care about the
Enabled flag anymore.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
---
 src/mesa/main/mtypes.h                   | 1 -
 src/mesa/main/varray.c                   | 1 -
 src/mesa/main/varray.h                   | 1 -
 src/mesa/state_tracker/st_cb_rasterpos.c | 1 -
 src/mesa/vbo/vbo_context.c               | 1 -
 src/mesa/vbo/vbo_exec_draw.c             | 1 -
 src/mesa/vbo/vbo_save_draw.c             | 1 -
 src/mesa/vbo/vbo_split_copy.c            | 5 ++---
 8 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 87e3c0c..f7f797b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1324,7 +1324,6 @@ struct gl_client_array
    GLsizei StrideB;		/**< actual stride in bytes */
    GLuint _ElementSize;         /**< size of each element in bytes */
    const GLubyte *Ptr;          /**< Points to array data */
-   GLboolean Enabled;		/**< Enabled flag is a boolean */
    GLboolean Normalized;        /**< GL_ARB_vertex_program */
    GLboolean Integer;           /**< Integer-valued? */
    GLboolean Doubles;       /**< double precision values are not converted to floats */
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 577f5ab..6eb2265 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -2322,7 +2322,6 @@ _mesa_copy_client_array(struct gl_context *ctx,
    dst->Stride = src->Stride;
    dst->StrideB = src->StrideB;
    dst->Ptr = src->Ptr;
-   dst->Enabled = src->Enabled;
    dst->Normalized = src->Normalized;
    dst->Integer = src->Integer;
    dst->Doubles = src->Doubles;
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index 18bfe19..cacb093 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -65,7 +65,6 @@ _mesa_update_client_array(struct gl_context *ctx,
    dst->Stride = src->Stride;
    dst->StrideB = binding->Stride;
    dst->Ptr = _mesa_vertex_attrib_address(src, binding);
-   dst->Enabled = src->Enabled;
    dst->Normalized = src->Normalized;
    dst->Integer = src->Integer;
    dst->Doubles = src->Doubles;
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index eec72f8..fc7c07d 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -199,7 +199,6 @@ new_draw_rastpos_stage(struct gl_context *ctx, struct draw_context *draw)
       rs->array[i].Stride = 0;
       rs->array[i].StrideB = 0;
       rs->array[i].Ptr = (GLubyte *) ctx->Current.Attrib[i];
-      rs->array[i].Enabled = GL_TRUE;
       rs->array[i].Normalized = GL_TRUE;
       rs->array[i].BufferObj = NULL;
       rs->arrays[i] = &rs->array[i];
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index ae5d265..9bceaf4 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -59,7 +59,6 @@ init_array(struct gl_context *ctx, struct gl_client_array *cl,
    cl->StrideB = 0;
    cl->_ElementSize = cl->Size * sizeof(GLfloat);
    cl->Ptr = pointer;
-   cl->Enabled = 1;
 
    _mesa_reference_buffer_object(ctx, &cl->BufferObj,
                                  ctx->Shared->NullBufferObj);
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 8d1b2c0..7f3e1e8 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -252,7 +252,6 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
 	 arrays[attr].Integer =
                vbo_attrtype_to_integer_flag(exec->vtx.attrtype[src]);
          arrays[attr].Format = GL_RGBA;
-	 arrays[attr].Enabled = 1;
          arrays[attr]._ElementSize = arrays[attr].Size * sizeof(GLfloat);
          _mesa_reference_buffer_object(ctx,
                                        &arrays[attr].BufferObj,
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 7881ce1..3424b78 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -201,7 +201,6 @@ static void vbo_bind_vertex_list(struct gl_context *ctx,
          arrays[attr].Integer =
                vbo_attrtype_to_integer_flag(node_attrtype[src]);
          arrays[attr].Format = GL_RGBA;
-	 arrays[attr].Enabled = 1;
          arrays[attr]._ElementSize = arrays[attr].Size * sizeof(GLfloat);
          _mesa_reference_buffer_object(ctx,
                                        &arrays[attr].BufferObj,
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index cb27ef9..084110c 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -156,8 +156,8 @@ dump_draw_info(struct gl_context *ctx,
       printf("  IB: %p\n", (void*) ib);
       for (j = 0; j < VERT_ATTRIB_MAX; j++) {
          printf("    array %d at %p:\n", j, (void*) arrays[j]);
-         printf("      enabled %d, ptr %p, size %d, type 0x%x, stride %d\n",
-		arrays[j]->Enabled, arrays[j]->Ptr,
+         printf("      ptr %p, size %d, type 0x%x, stride %d\n",
+		arrays[j]->Ptr,
 		arrays[j]->Size, arrays[j]->Type, arrays[j]->StrideB);
          if (0) {
             GLint k = prims[i].start + prims[i].count - 1;
@@ -530,7 +530,6 @@ replay_init( struct copy_context *copy )
       dst->Stride = copy->vertex_size;
       dst->StrideB = copy->vertex_size;
       dst->Ptr = copy->dstbuf + offset;
-      dst->Enabled = GL_TRUE;
       dst->Normalized = src->Normalized; 
       dst->Integer = src->Integer;
       dst->Doubles = src->Doubles;
-- 
2.5.5



More information about the mesa-dev mailing list