Commit 1c92d06a by Alexis Hetu Committed by Alexis Hétu

Fixed FenceSync object ref count

FenceSync objects are ref counted objects, so the are deleted using the release() method. This means that they need to be refed at creation (since we only store the pointer inside the map), otherwise we'll hit the assert at deletion. FenceSync objects are currently only ever refed once (at creation) and unrefed once (at deletion), but are not fully implemented yet. Change-Id: Ie693ace8895b6140ae96f9325d5c48951c7e9730 Reviewed-on: https://swiftshader-review.googlesource.com/4901Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent d2cde9ca
......@@ -153,7 +153,9 @@ GLuint ResourceManager::createFenceSync(GLenum condition, GLbitfield flags)
{
GLuint handle = mFenceSyncHandleAllocator.allocate();
mFenceSyncMap[handle] = new FenceSync(handle, condition, flags);
FenceSync* fenceSync = new FenceSync(handle, condition, flags);
mFenceSyncMap[handle] = fenceSync;
fenceSync->addRef();
return handle;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment