summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_context.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-05-30 19:48:32 +0800
committerChia-I Wu <[email protected]>2013-06-07 11:13:15 +0800
commit99725d2f8ae2e2d0dd1e80ac05b127c7f99778d3 (patch)
tree21cdcb7622df4e1fe1f17098b692712dd9a7fb08 /src/gallium/drivers/ilo/ilo_context.c
parente51806ee7ab52873c773619595962582c2abf0fe (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_context.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_context.c b/src/gallium/drivers/ilo/ilo_context.c
index 11e868f405d..a3b1c5e4d92 100644
--- a/src/gallium/drivers/ilo/ilo_context.c
+++ b/src/gallium/drivers/ilo/ilo_context.c
@@ -91,6 +91,8 @@ ilo_context_destroy(struct pipe_context *pipe)
{
struct ilo_context *ilo = ilo_context(pipe);
+ ilo_cleanup_states(ilo);
+
if (ilo->last_cp_bo)
ilo->last_cp_bo->unreference(ilo->last_cp_bo);
@@ -148,6 +150,8 @@ ilo_context_create(struct pipe_screen *screen, void *priv)
ilo_init_video_functions(ilo);
ilo_init_gpgpu_functions(ilo);
+ ilo_init_states(ilo);
+
/* this must be called last as u_blitter is a client of the pipe context */
ilo->blitter = util_blitter_create(&ilo->base);
if (!ilo->blitter) {