diff options
author | Brian Paul <[email protected]> | 2012-12-07 13:58:34 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-12-08 06:58:10 -0700 |
commit | 4b73cdb864aef6d64c35a7ab9a59e4ee4e3f9d0f (patch) | |
tree | 19c52ea3738fc07c6ade5f00c1c168f81d6b2a77 /src/gallium/auxiliary/draw/draw_pt.h | |
parent | c5f544e69075001855da9f49f1c1d06191765a6c (diff) |
draw: fix/improve dirty state validation
This patch does two things:
1. Constant buffer state changes were broken (but happened to work by
dumb luck). The problem is we weren't calling draw_do_flush() in
draw_set_mapped_constant_buffer() when we changed that state. All the
other draw_set_foo() functions were calling draw_do_flush() already.
2. Use a simpler state validation step when we're changing light-weight
parameter state such as constant buffers, viewport dims or clip planes.
There's no need to revalidate the whole pipeline when changing state
like that. The new validation method is called bind_parameters()
and is called instead of the prepare() method. A new
DRAW_FLUSH_PARAMETER_CHANGE flag is used to signal these light-weight
state changes. This results in a modest but measurable increase in
FPS for many Mesa demos.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.h b/src/gallium/auxiliary/draw/draw_pt.h index 2c2efdc1c59..7d07363068e 100644 --- a/src/gallium/auxiliary/draw/draw_pt.h +++ b/src/gallium/auxiliary/draw/draw_pt.h @@ -93,6 +93,13 @@ struct draw_pt_middle_end { unsigned opt, unsigned *max_vertices ); + /** + * Bind/update parameter state such as constants, viewport dims + * and clip planes. Basically, stuff which isn't "baked" into the + * shader or pipeline state. + */ + void (*bind_parameters)(struct draw_pt_middle_end *); + void (*run)( struct draw_pt_middle_end *, const unsigned *fetch_elts, unsigned fetch_count, |