diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_flush.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_flush.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c index 1afd27f..b250532 100644 --- a/src/gallium/drivers/r300/r300_flush.c +++ b/src/gallium/drivers/r300/r300_flush.c @@ -49,7 +49,7 @@ static void r300_flush(struct pipe_context* pipe, if (r300->dirty_hw) { r300_emit_hyperz_end(r300); r300_emit_query_end(r300); - if (r500_index_bias_supported(r300)) + if (r300->screen->caps.index_bias_supported) r500_emit_index_bias(r300, 0); r300->flush_counter++; @@ -57,9 +57,9 @@ static void r300_flush(struct pipe_context* pipe, r300->dirty_hw = 0; /* New kitchen sink, baby. */ - foreach(atom, &r300->atom_list) { + foreach_atom(r300, atom) { if (atom->state || atom->allow_null_state) { - atom->dirty = TRUE; + r300_mark_atom_dirty(r300, atom); } } @@ -68,6 +68,14 @@ static void r300_flush(struct pipe_context* pipe, r300->vs_state.dirty = FALSE; r300->vs_constants.dirty = FALSE; } + + r300->validate_buffers = TRUE; + r300->upload_vb_validated = FALSE; + r300->upload_ib_validated = FALSE; + } else { + /* Even if hw is not dirty, we should at least reset the CS in case + * the space checking failed for the first draw operation. */ + r300->rws->cs_flush(r300->cs); } /* reset flushed query */ |