summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-04-23 18:20:56 +0200
committerMarek Olšák <maraeo@gmail.com>2012-05-08 15:57:51 +0200
commit50f7e75f9e945cfbb2ae868cc961a2205a0b6e73 (patch)
treed55b1c38416040b9df653df6327dbaa0e82866fc /src/mesa/tnl
parenta7ac9c9c7dc7401ca6143d1e7476df5e3c2758b7 (diff)
downloadexternal_mesa3d-50f7e75f9e945cfbb2ae868cc961a2205a0b6e73.zip
external_mesa3d-50f7e75f9e945cfbb2ae868cc961a2205a0b6e73.tar.gz
external_mesa3d-50f7e75f9e945cfbb2ae868cc961a2205a0b6e73.tar.bz2
mesa: move gl_client_array*[] from vbo_draw_func into gl_context
In the future we'd like to treat vertex arrays as a state and not as a parameter to the draw function. This is the first step towards that goal. Part of the goal is to avoid array re-validation for every draw call. This commit adds: const struct gl_client_array **gl_context::Array::_DrawArrays. The pointer is changed in: * vbo_draw_method * vbo_rebase_prims - unused by gallium * vbo_split_prims - unused by gallium * st_RasterPos Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_draw.c3
-rw-r--r--src/mesa/tnl/tnl.h1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 17042cf..6a3c966 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -408,7 +408,6 @@ static void unmap_vbos( struct gl_context *ctx,
void _tnl_vbo_draw_prims(struct gl_context *ctx,
- const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
@@ -417,6 +416,8 @@ void _tnl_vbo_draw_prims(struct gl_context *ctx,
GLuint max_index,
struct gl_transform_feedback_object *tfb_vertcount)
{
+ const struct gl_client_array **arrays = ctx->Array._DrawArrays;
+
if (!index_bounds_valid)
vbo_get_minmax_indices(ctx, prim, ib, &min_index, &max_index, nr_prims);
diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h
index 434bd7f..f6b70e3 100644
--- a/src/mesa/tnl/tnl.h
+++ b/src/mesa/tnl/tnl.h
@@ -86,7 +86,6 @@ _tnl_draw_prims( struct gl_context *ctx,
void
_tnl_vbo_draw_prims( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,