summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-14 06:45:55 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-14 07:45:14 +0100
commit5a6ba08c21f24b14458a2084a170ddfbe8f5d793 (patch)
treefc13659a370e3e5298dcaa6daa97de3571548437 /src/gallium/drivers/r300/r300_render.c
parent004dd015839dfb77b9d66fb2df6514feefb87d9e (diff)
r300g: emit 3D_LOAD_VBPNTR only when necessary
I thought I couldn't skip emitting this packet in some cases. Well it looks like I can.
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 0d50de5e7f..abe7b506d7 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -264,9 +264,17 @@ static boolean r300_emit_states(struct r300_context *r300,
r500_emit_index_bias(r300, 0);
}
- if (emit_vertex_arrays)
+ if (emit_vertex_arrays &&
+ (r300->vertex_arrays_dirty ||
+ r300->vertex_arrays_indexed != indexed ||
+ r300->vertex_arrays_offset != buffer_offset)) {
r300_emit_vertex_arrays(r300, buffer_offset, indexed);
+ r300->vertex_arrays_dirty = FALSE;
+ r300->vertex_arrays_indexed = indexed;
+ r300->vertex_arrays_offset = buffer_offset;
+ }
+
if (emit_vertex_arrays_swtcl)
r300_emit_vertex_arrays_swtcl(r300, indexed);
}