st/dri: Get rid of the evil struct dri_drawable::context member
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 28 Jun 2011 12:07:51 +0000 (14:07 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 29 Jun 2011 10:48:59 +0000 (12:48 +0200)
It's incorrect to assume a single context bound to a drawable.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/state_trackers/dri/common/dri_context.c
src/gallium/state_trackers/dri/common/dri_drawable.h

index e23c1bcafafdfb267951106ca7fabdae5b2fd519..08bbdf96e3447123ee4da33ae1b0b6190c9f14d8 100644 (file)
@@ -151,8 +151,6 @@ dri_unbind_context(__DRIcontext * cPriv)
       if (ctx->st == ctx->stapi->get_current(ctx->stapi)) {
          ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
          stapi->make_current(stapi, NULL, NULL, NULL);
-         draw->context = NULL;
-         read->context = NULL;
       }
    }
 
@@ -180,12 +178,10 @@ dri_make_current(__DRIcontext * cPriv,
    else if (!driDrawPriv || !driReadPriv)
       return GL_FALSE;
 
-   draw->context = ctx;
    if (ctx->dPriv != driDrawPriv) {
       ctx->dPriv = driDrawPriv;
       draw->texture_stamp = driDrawPriv->lastStamp - 1;
    }
-   read->context = ctx;
    if (ctx->rPriv != driReadPriv) {
       ctx->rPriv = driReadPriv;
       read->texture_stamp = driReadPriv->lastStamp - 1;
index 7f1aa512ca1bd4decd510c30e37c37b9398d0580..fd3460dd30b59c5af17a8a89099812d95513c0b9 100644 (file)
@@ -42,7 +42,6 @@ struct dri_drawable
    struct st_visual stvis;
 
    struct dri_screen *screen;
-   struct dri_context *context;
 
    /* dri */
    __DRIdrawable *dPriv;