diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-09-20 14:44:40 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-09-20 14:44:40 +0000 |
commit | b35121d54df4bb8700c4135203162c1d79ca637d (patch) | |
tree | 67a66dc27a98705eb2be20ce93d91f25ca722015 /src/mesa/drivers/dri/i965/bufmgr_fake.c | |
parent | 3a5319293c9210ea3c0c9d84604fa0720a96f0e8 (diff) |
1) Add a new flag in the sarea (coopting the unused texAge value) to
identify context switches between members of a share group -
ie. multiple contexts in a single application, possibly on different
threads. In this case the contexts share a bufmgr instance and there
is no need to evict textures - so don't.
2) Use a new flag 'need_flush' to ensure hardware rendering is flushed
prior to starting a software fallback.
Diffstat (limited to 'src/mesa/drivers/dri/i965/bufmgr_fake.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/bufmgr_fake.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/bufmgr_fake.c b/src/mesa/drivers/dri/i965/bufmgr_fake.c index 8f182f3d87..30a235a2e5 100644 --- a/src/mesa/drivers/dri/i965/bufmgr_fake.c +++ b/src/mesa/drivers/dri/i965/bufmgr_fake.c @@ -117,6 +117,7 @@ struct bufmgr { struct block fenced; /* after bmFenceBuffers (mi_flush, emit irq, write dword) */ /* then to pool->lru or free() */ + unsigned ctxId; unsigned last_fence; unsigned free_on_hardware; @@ -578,6 +579,12 @@ struct bufmgr *bm_fake_intel_Attach( struct intel_context *intel ) make_empty_list(&bm.referenced); make_empty_list(&bm.fenced); make_empty_list(&bm.on_hardware); + + /* The context id of any of the share group. This won't be used + * in communication with the kernel, so it doesn't matter if + * this context is eventually deleted. + */ + bm.ctxId = intel->hHWContext; } nr_attach++; @@ -1242,7 +1249,6 @@ void bmReleaseBuffers( struct intel_context *intel ) LOCK(bm); { struct block *block, *tmp; - assert(intel->locked); foreach_s (block, tmp, &bm->referenced) { @@ -1432,3 +1438,9 @@ GLboolean bmError( struct intel_context *intel ) return retval; } + + +GLuint bmCtxId( struct intel_context *intel ) +{ + return intel->bm->ctxId; +} |