summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_state_vertex.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-04-08 21:07:14 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-04-08 21:20:10 -0600
commit28cf8c8fdcbd2817b93f27cad2bba3b4fb8aecf5 (patch)
tree590ecc48a9b009aa42edf0870edff0ec5c7c97e0 /src/gallium/drivers/softpipe/sp_state_vertex.c
parent4382b0c9cba3efa8a60252f6ddf2f0653352f7d8 (diff)
gallium: keep track of num_vertex_attribs/buffers for shorter loops
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_vertex.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_vertex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index e0230e16a4..46b6991195 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
@@ -47,6 +47,7 @@ softpipe_set_vertex_elements(struct pipe_context *pipe,
memcpy(softpipe->vertex_element, attribs,
count * sizeof(struct pipe_vertex_element));
+ softpipe->num_vertex_elements = count;
softpipe->dirty |= SP_NEW_VERTEX;
@@ -64,6 +65,7 @@ softpipe_set_vertex_buffers(struct pipe_context *pipe,
assert(count <= PIPE_MAX_ATTRIBS);
memcpy(softpipe->vertex_buffer, buffers, count * sizeof(buffers[0]));
+ softpipe->num_vertex_buffers = count;
softpipe->dirty |= SP_NEW_VERTEX;