core/syncobjtimeline: import release fence at correct timeline point
SyncTimeline::moveInto imports the provided fence to the syncobj by calling drmSyncobjImportSyncFile. However, that function assumes the syncobj a binary syncobj, meaning the fence will be imported at timeline point 0, not at the intended timeline point. Since there is no timeline equivalent of drmSyncobjImportSyncFile, to achieve the correct behavior we create a temporary binary syncobj, import the fence into that, and then use drmSyncobjTransfer to transfer the fence to the desired timeline point on the destination syncobj. Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
This commit is contained in:
parent
26afbfb6fa
commit
9ca7b9b1cf
1 changed files with 5 additions and 1 deletions
|
@ -110,6 +110,10 @@ void SyncTimeline::signal(uint64_t timelinePoint)
|
||||||
|
|
||||||
void SyncTimeline::moveInto(uint64_t timelinePoint, const FileDescriptor &fd)
|
void SyncTimeline::moveInto(uint64_t timelinePoint, const FileDescriptor &fd)
|
||||||
{
|
{
|
||||||
drmSyncobjImportSyncFile(m_drmFd, m_handle, fd.get());
|
uint32_t tempHandle = 0;
|
||||||
|
drmSyncobjCreate(m_drmFd, 0, &tempHandle);
|
||||||
|
drmSyncobjImportSyncFile(m_drmFd, tempHandle, fd.get());
|
||||||
|
drmSyncobjTransfer(m_drmFd, m_handle, timelinePoint, tempHandle, 0, 0);
|
||||||
|
drmSyncobjDestroy(m_drmFd, tempHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue