summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-05-11 23:09:05 +0200
committerMarek Olšák <[email protected]>2012-05-12 00:50:52 +0200
commit8a963d122d4b67209214b0483084ba950814f42b (patch)
tree560cbeeedf9128060c6ef23854c09c90b1c1df60 /src/gallium/drivers/r300/r300_state.c
parentf808984f438b827afff6fdbe52ac52dee8781d03 (diff)
r300g/swtcl: don't do stuff which is only for HWTCL
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index a9a76c5fed8..5b02cfd90cd 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1594,19 +1594,22 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
- /* There must be at least one vertex buffer set, otherwise it locks up. */
- if (!count) {
- buffers = &r300->dummy_vb;
- count = 1;
- }
+ if (r300->screen->caps.has_tcl) {
+ /* There must be at least one vertex buffer set, otherwise it locks up. */
+ if (!count) {
+ buffers = &r300->dummy_vb;
+ count = 1;
+ }
- util_copy_vertex_buffers(r300->vertex_buffer,
- &r300->nr_vertex_buffers,
- buffers, count);
+ util_copy_vertex_buffers(r300->vertex_buffer,
+ &r300->nr_vertex_buffers,
+ buffers, count);
- if (r300->screen->caps.has_tcl) {
r300->vertex_arrays_dirty = TRUE;
} else {
+ util_copy_vertex_buffers(r300->vertex_buffer,
+ &r300->nr_vertex_buffers,
+ buffers, count);
draw_set_vertex_buffers(r300->draw, count, buffers);
}
}