diff options
author | Benjamin Franzke <[email protected]> | 2011-06-21 13:25:56 +0200 |
---|---|---|
committer | Benjamin Franzke <[email protected]> | 2011-06-21 15:09:55 +0200 |
commit | 0c74091591a8ab2760949715b2fde41074fb9532 (patch) | |
tree | 3c415de568820a2627ff7bedef5b6e4bb99554d3 /src/mesa/state_tracker | |
parent | e251b3903a6aadd49cec6a9ce1ce466e3fcbbdcd (diff) |
st/mesa: Invalidate drawables on context switch
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index a68544ddac7..46be55318a2 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -707,6 +707,15 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, return &st->iface; } +static struct st_context_iface * +st_api_get_current(struct st_api *stapi) +{ + GET_CURRENT_CONTEXT(ctx); + struct st_context *st = (ctx) ? ctx->st : NULL; + + return (st) ? &st->iface : NULL; +} + static boolean st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi, struct st_framebuffer_iface *stdrawi, @@ -742,6 +751,10 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi, } if (stdraw && stread) { + if (stctxi != st_api_get_current(stapi)) { + p_atomic_set(&stdraw->revalidate, TRUE); + p_atomic_set(&stread->revalidate, TRUE); + } st_framebuffer_validate(stdraw, st); if (stread != stdraw) st_framebuffer_validate(stread, st); @@ -773,15 +786,6 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi, return ret; } -static struct st_context_iface * -st_api_get_current(struct st_api *stapi) -{ - GET_CURRENT_CONTEXT(ctx); - struct st_context *st = (ctx) ? ctx->st : NULL; - - return (st) ? &st->iface : NULL; -} - static st_proc_t st_api_get_proc_address(struct st_api *stapi, const char *procname) { |