diff options
author | Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 2009-04-28 14:20:45 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 2009-04-28 14:22:33 +0200 |
commit | 8cfa6546c9aa25edad3e7bc3cf6f1a9399052b79 (patch) | |
tree | 4b7a9428e785773a472fb3cd4729d58396ba777d /src/gallium/state_trackers/dri/dri_context.c | |
parent | 3d2bba0d10d59a9c2d6d09c5dc3fabe148d5e0d7 (diff) |
gallium dri st: Use st_get_current() instead of GET_CURRENT_CONTEXT()
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_context.c')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_context.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c index 8e6299c5409..54d2a563565 100644 --- a/src/gallium/state_trackers/dri/dri_context.c +++ b/src/gallium/state_trackers/dri/dri_context.c @@ -126,9 +126,7 @@ dri_unbind_context(__DRIcontextPrivate * cPriv) struct dri_context *ctx = dri_context(cPriv); if (--ctx->bind_count == 0) { - GET_CURRENT_CONTEXT(curGLCtx); - - if (curGLCtx && ctx->st == curGLCtx->st) { + if (ctx->st && ctx->st == st_get_current()) { st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL); st_make_current(NULL, NULL, NULL); } @@ -148,11 +146,10 @@ dri_make_current(__DRIcontextPrivate * cPriv, struct dri_screen *screen = dri_screen(cPriv->driScreenPriv); struct dri_drawable *draw = dri_drawable(driDrawPriv); struct dri_drawable *read = dri_drawable(driReadPriv); + struct st_context *old_st = st_get_current(); - GET_CURRENT_CONTEXT(oldGLCtx); - - if (oldGLCtx && oldGLCtx->st != ctx->st) - st_flush(oldGLCtx->st, PIPE_FLUSH_RENDER_CACHE, NULL); + if (old_st && old_st != ctx->st) + st_flush(old_st, PIPE_FLUSH_RENDER_CACHE, NULL); ++ctx->bind_count; |