diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-04-16 18:12:37 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-05-07 10:41:12 +0800 |
commit | 75143ef05576ee9f25ee176bc28c3c4d03705bf5 (patch) | |
tree | d8d1bd7f30088a95c8d773a8544a5c29fdcdde0f /src/gallium/state_trackers/vega/vg_context.c | |
parent | bdc4504252692b2eb971c08114182828870cc0f8 (diff) |
st/vega: Use vgapi.
Rename vgFooBar to vegaFooBar and use vgapi as the dispatcher. This
makes sure there is always a current context when the internal functions
are called. And eglGetProcAddress is finally supported.
Diffstat (limited to 'src/gallium/state_trackers/vega/vg_context.c')
-rw-r--r-- | src/gallium/state_trackers/vega/vg_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vega/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c index 1a8952ce34..f6b07f2109 100644 --- a/src/gallium/state_trackers/vega/vg_context.c +++ b/src/gallium/state_trackers/vega/vg_context.c @@ -33,6 +33,7 @@ #include "asm_util.h" #include "st_inlines.h" #include "vg_manager.h" +#include "api.h" #include "pipe/p_context.h" #include "util/u_inlines.h" @@ -67,6 +68,7 @@ static void init_clear(struct vg_context *st) void vg_set_current_context(struct vg_context *ctx) { _vg_context = ctx; + api_make_dispatch_current((ctx) ? ctx->dispatch : NULL); } struct vg_context * vg_create_context(struct pipe_context *pipe, @@ -80,6 +82,8 @@ struct vg_context * vg_create_context(struct pipe_context *pipe, ctx->pipe = pipe; + ctx->dispatch = api_create_dispatch(); + vg_init_state(&ctx->state.vg); ctx->state.dirty = ALL_DIRTY; @@ -185,6 +189,8 @@ void vg_destroy_context(struct vg_context *ctx) cso_hash_delete(ctx->owned_objects[VG_OBJECT_FONT]); cso_hash_delete(ctx->owned_objects[VG_OBJECT_PATH]); + api_destroy_dispatch(ctx->dispatch); + free(ctx); } |