diff options
author | Marek Olšák <[email protected]> | 2010-12-07 07:54:31 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-12-07 08:46:18 +0100 |
commit | 4953ba6a717ad1d3aa4426d147b52d05932c47ab (patch) | |
tree | f30608d28c439c83365fc273795d5ee1c3ac4e60 /src/gallium/drivers/r300/r300_state.c | |
parent | 78068a5fbfc21fb52b289a81142b4211628f845c (diff) |
r300g: validate buffers only if any of bound buffers is changed
This prevents needless buffer validation (CS space checking).
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index c4945fb2fd9..75292532405 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -751,6 +751,7 @@ static void util_copy_framebuffer_state(r300->fb_state.state, state); r300_mark_fb_state_dirty(r300, R300_CHANGED_FB_STATE); + r300->validate_buffers = TRUE; r300->z_compression = false; @@ -1333,6 +1334,7 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe, state->sampler_view_count = count; r300_mark_atom_dirty(r300, &r300->textures_state); + r300->validate_buffers = TRUE; if (dirty_tex) { r300_mark_atom_dirty(r300, &r300->texture_cache_inval); @@ -1510,6 +1512,7 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe, r300->any_user_vbs = any_user_buffer; r300->vertex_buffer_max_index = max_index; r300->aos_dirty = TRUE; + r300->validate_buffers = TRUE; } else { /* SW TCL. */ draw_set_vertex_buffers(r300->draw, count, buffers); @@ -1545,10 +1548,10 @@ static void r300_set_index_buffer(struct pipe_context* pipe, } if (r300->screen->caps.has_tcl) { - /* TODO make this more like a state */ + r300->validate_buffers = TRUE; } else { - draw_set_index_buffer(r300->draw, ib); + draw_set_index_buffer(r300->draw, ib); } } |