diff options
author | Eric Anholt <[email protected]> | 2007-05-21 10:49:32 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2007-05-21 10:49:32 -0700 |
commit | 8b8d4d3e106b1ca7174c834a2f9b494922fc6e72 (patch) | |
tree | 953eae5e7f6a3ce2926643277f83c3758f580897 /src/mesa | |
parent | 1bdee1853627e08894bd267b8f0ec176a1b5978f (diff) |
Notify the fake buffer manager on contended lock take.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_context.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/server/i830_common.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c index 4f58f56adaf..696845a7fc9 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.c +++ b/src/mesa/drivers/dri/i915tex/intel_context.c @@ -638,6 +638,16 @@ intelContendedLock(struct intel_context *intel, GLuint flags) if (dPriv) DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv); + /* If the last consumer of the texture memory wasn't us, notify the fake + * bufmgr and record the new owner. We should have the memory shared + * between contexts of a single fake bufmgr, but this will at least make + * things correct for now. + */ + if (!intel->intelScreen->ttm && sarea->texAge != intel->hHWContext) { + sarea->texAge = intel->hHWContext; + dri_bufmgr_fake_contended_lock_take(intel->intelScreen->bufmgr); + } + if (sarea->width != intelScreen->width || sarea->height != intelScreen->height || sarea->rotation != intelScreen->current_rotation) { diff --git a/src/mesa/drivers/dri/i915tex/server/i830_common.h b/src/mesa/drivers/dri/i915tex/server/i830_common.h index d4d58886ce0..7a76957c6a1 100644 --- a/src/mesa/drivers/dri/i915tex/server/i830_common.h +++ b/src/mesa/drivers/dri/i915tex/server/i830_common.h @@ -85,6 +85,7 @@ typedef struct { int last_enqueue; /* last time a buffer was enqueued */ int last_dispatch; /* age of the most recently dispatched buffer */ int ctxOwner; /* last context to upload state */ + /** Last context that used the buffer manager. */ int texAge; int pf_enabled; /* is pageflipping allowed? */ int pf_active; |