diff options
author | Marek Olšák <[email protected]> | 2012-09-10 04:06:20 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-09-13 20:18:44 +0200 |
commit | 3fe78594b1221358f4ba96072d952e33a7e54a76 (patch) | |
tree | cc693127cb02513bca3c205b1a1cb95755a46a0c /src/gallium/drivers/r600/r600_pipe.h | |
parent | 6c86124157da86ced9f9574ec49480f4abbd7e8c (diff) |
r600g: do fine-grained sampler state updates
Update only those sampler states which are changed in a shader stage,
instead of always updating all sampler states in the shader stage.
That requires keeping a bitmask of those states which are enabled, and those
states which are dirty at a given point (subset of enabled states).
This is similar to how sampler views, constant buffers, and vertex buffers
are handled.
Reviewed-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 5966cefb75a..8d1acd26504 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -261,11 +261,17 @@ struct r600_samplerview_state { uint32_t compressed_colortex_mask; }; +struct r600_sampler_states { + struct r600_atom atom; + struct r600_pipe_sampler_state *states[NUM_TEX_UNITS]; + uint32_t enabled_mask; + uint32_t dirty_mask; + uint32_t has_bordercolor_mask; /* which states contain the border color */ +}; + struct r600_textures_info { struct r600_samplerview_state views; - struct r600_atom atom_sampler; - struct r600_pipe_sampler_state *samplers[NUM_TEX_UNITS]; - unsigned n_samplers; + struct r600_sampler_states states; bool is_array_sampler[NUM_TEX_UNITS]; }; @@ -571,6 +577,8 @@ void r600_init_atom(struct r600_context *rctx, struct r600_atom *atom, unsigned void r600_vertex_buffers_dirty(struct r600_context *rctx); void r600_sampler_views_dirty(struct r600_context *rctx, struct r600_samplerview_state *state); +void r600_sampler_states_dirty(struct r600_context *rctx, + struct r600_sampler_states *state); void r600_set_max_scissor(struct r600_context *rctx); void r600_constant_buffers_dirty(struct r600_context *rctx, struct r600_constbuf_state *state); void r600_draw_rectangle(struct blitter_context *blitter, |