diff options
author | Chia-I Wu <[email protected]> | 2013-05-30 19:48:32 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-07 11:13:15 +0800 |
commit | 99725d2f8ae2e2d0dd1e80ac05b127c7f99778d3 (patch) | |
tree | 21cdcb7622df4e1fe1f17098b692712dd9a7fb08 /src/gallium/drivers/ilo/ilo_state.c | |
parent | e51806ee7ab52873c773619595962582c2abf0fe (diff) |
ilo: construct SCISSOR_RECT in set_scissor_states()
This allows us to memcpy() the state in draw_vbo(). Add ilo_init_states() and
ilo_cleanup_states() that are called when contexts are created and destroyed
respectively, and properly set the initial scissor state in ilo_init_states().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index 205128e0993..cc74d03c49b 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -581,10 +581,9 @@ ilo_set_scissor_states(struct pipe_context *pipe, const struct pipe_scissor_state *scissors) { struct ilo_context *ilo = ilo_context(pipe); - unsigned i; - for (i = 0; i < num_scissors; i++) - ilo->scissor.states[start_slot + i] = scissors[i]; + ilo_gpe_set_scissor(ilo->dev, start_slot, num_scissors, + scissors, &ilo->scissor); ilo->dirty |= ILO_DIRTY_SCISSOR; } @@ -1056,3 +1055,14 @@ ilo_init_state_functions(struct ilo_context *ilo) ilo->base.set_compute_resources = ilo_set_compute_resources; ilo->base.set_global_binding = ilo_set_global_binding; } + +void +ilo_init_states(struct ilo_context *ilo) +{ + ilo_gpe_set_scissor_null(ilo->dev, &ilo->scissor); +} + +void +ilo_cleanup_states(struct ilo_context *ilo) +{ +} |