diff options
author | Chia-I Wu <[email protected]> | 2013-04-16 16:27:50 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-04-26 16:16:42 +0800 |
commit | 89d1702b9b31488ae95a4364b4161b9186d5220b (patch) | |
tree | 2be866f35987a1b4af1767d4730c7b2a2fd48124 /src/gallium/drivers/ilo/ilo_context.c | |
parent | 520af667971faccf8996f67a1ff8a3d9c6efa4a4 (diff) |
ilo: hook up pipe context state functions
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_context.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_context.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_context.c b/src/gallium/drivers/ilo/ilo_context.c index 714a9bf72c2..d92b07811ea 100644 --- a/src/gallium/drivers/ilo/ilo_context.c +++ b/src/gallium/drivers/ilo/ilo_context.c @@ -34,6 +34,7 @@ #include "ilo_query.h" #include "ilo_resource.h" #include "ilo_screen.h" +#include "ilo_shader.h" #include "ilo_state.h" #include "ilo_video.h" #include "ilo_context.h" @@ -99,6 +100,8 @@ ilo_context_destroy(struct pipe_context *pipe) if (ilo->last_cp_bo) ilo->last_cp_bo->unreference(ilo->last_cp_bo); + if (ilo->shader_cache) + ilo_shader_cache_destroy(ilo->shader_cache); if (ilo->cp) ilo_cp_destroy(ilo->cp); @@ -170,7 +173,9 @@ ilo_context_create(struct pipe_screen *screen, void *priv) } ilo->cp = ilo_cp_create(ilo->winsys, is->has_llc); - if (!ilo->cp) { + ilo->shader_cache = ilo_shader_cache_create(ilo->winsys); + + if (!ilo->cp || !ilo->shader_cache) { ilo_context_destroy(&ilo->base); return NULL; } @@ -182,6 +187,8 @@ ilo_context_create(struct pipe_screen *screen, void *priv) ilo_cp_set_hook(ilo->cp, ILO_CP_HOOK_POST_FLUSH, ilo_context_post_cp_flush, (void *) ilo); + ilo->dirty = ILO_DIRTY_ALL; + ilo->base.screen = screen; ilo->base.priv = priv; |