diff options
author | Marek Olšák <maraeo@gmail.com> | 2011-02-14 06:45:55 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-02-14 07:45:14 +0100 |
commit | 5a6ba08c21f24b14458a2084a170ddfbe8f5d793 (patch) | |
tree | fc13659a370e3e5298dcaa6daa97de3571548437 /src/gallium/drivers/r300/r300_render.c | |
parent | 004dd015839dfb77b9d66fb2df6514feefb87d9e (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.c | 10 |
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); } |