[Intel-gfx] share one render buffer within Multithreading multiple contexts in intel driver
slahs
slahs at 126.com
Fri Sep 18 05:18:30 CEST 2009
Hello,
I reviewed intel driver in Mesa7.2 and found there seems a problem in
======================================================
intel_region_release(struct intel_region **region)
{
if (!*region)
return;
DBG("%s %d\n", __FUNCTION__, (*region)->refcount - 1);
ASSERT((*region)->refcount > 0);
(*region)->refcount--;
if ((*region)->refcount == 0) {
assert((*region)->map_refcount == 0);
if ((*region)->pbo)
(*region)->pbo->region = NULL;
(*region)->pbo = NULL;
dri_bo_unreference((*region)->buffer);
free(*region);
}
*region = NULL;
}
==========================================
If there are two contexts made current on this region of rb, after "(*region)->refcount--;" is it possible refcount still be larger than "0", and it will not be free then leaked?
thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090918/94d6fe56/attachment.html>
More information about the Intel-gfx
mailing list