[Mesa-dev] [PATCH 10/10] vbo: remove vbo_context::mat_currval
Marek Olšák
maraeo at gmail.com
Wed Apr 18 07:16:44 PDT 2012
---
src/mesa/vbo/vbo_context.c | 7 ++-----
src/mesa/vbo/vbo_context.h | 4 ----
src/mesa/vbo/vbo_exec_array.c | 3 ++-
src/mesa/vbo/vbo_exec_draw.c | 3 ++-
src/mesa/vbo/vbo_save_draw.c | 3 ++-
5 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index 33bd4f3..5f1c72b 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -104,7 +104,8 @@ static void init_generic_currval(struct gl_context *ctx)
static void init_mat_currval(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
- struct gl_client_array *arrays = vbo->mat_currval;
+ struct gl_client_array *arrays =
+ &vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT];
GLuint i;
ASSERT(NR_MAT_ATTRIBS == MAT_ATTRIB_MAX);
@@ -160,10 +161,6 @@ GLboolean _vbo_CreateContext( struct gl_context *ctx )
return GL_FALSE;
}
- /* TODO: remove these pointers.
- */
- vbo->mat_currval = &vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT];
-
init_legacy_currval( ctx );
init_generic_currval( ctx );
init_mat_currval( ctx );
diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index b9d0086..b9a8aff 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -61,10 +61,6 @@
struct vbo_context {
struct gl_client_array currval[VBO_ATTRIB_MAX];
- /* These point into the above. TODO: remove.
- */
- struct gl_client_array *mat_currval;
-
/** Map VERT_ATTRIB_x to VBO_ATTRIB_y */
GLuint map_vp_none[VERT_ATTRIB_MAX];
GLuint map_vp_arb[VERT_ATTRIB_MAX];
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 60e18db..f95e062 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -426,7 +426,8 @@ recalculate_input_bindings(struct gl_context *ctx)
}
for (i = 0; i < MAT_ATTRIB_MAX; i++) {
- inputs[VERT_ATTRIB_GENERIC(i)] = &vbo->mat_currval[i];
+ inputs[VERT_ATTRIB_GENERIC(i)] =
+ &vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT+i];
const_inputs |= VERT_BIT_GENERIC(i);
}
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 570323a..5cc6586 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -178,7 +178,8 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
}
for (attr = 0; attr < MAT_ATTRIB_MAX; attr++) {
ASSERT(VERT_ATTRIB_GENERIC(attr) < Elements(exec->vtx.inputs));
- exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] = &vbo->mat_currval[attr];
+ exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] =
+ &vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT+attr];
}
map = vbo->map_vp_none;
break;
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 4eac65a..57186de 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -150,7 +150,8 @@ static void vbo_bind_vertex_list(struct gl_context *ctx,
save->inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr];
}
for (attr = 0; attr < MAT_ATTRIB_MAX; attr++) {
- save->inputs[VERT_ATTRIB_GENERIC(attr)] = &vbo->mat_currval[attr];
+ save->inputs[VERT_ATTRIB_GENERIC(attr)] =
+ &vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT+attr];
}
map = vbo->map_vp_none;
break;
--
1.7.5.4
More information about the mesa-dev
mailing list