mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
gfxstream: fix goldfish guards on fence functions
... to ensure that "mSyncHelper->close()" still happens on non goldfish devices. Android equivalent ag/39315505 for b/500332164 Tested with CtsGraphicsTestCases after the build file changes. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40836>
This commit is contained in:
parent
5a5febfccd
commit
bc848da244
1 changed files with 8 additions and 4 deletions
|
|
@ -4829,14 +4829,16 @@ VkResult ResourceTracker::on_vkResetFences(void* context, VkResult, VkDevice dev
|
|||
auto& info = it->second;
|
||||
if (!info.external) continue;
|
||||
|
||||
#if GFXSTREAM_ENABLE_GUEST_GOLDFISH
|
||||
if (info.syncFd && *info.syncFd >= 0) {
|
||||
MESA_TRACE_SCOPE("%s: resetting fence. make fd -1\n", __func__);
|
||||
|
||||
#if GFXSTREAM_ENABLE_GUEST_GOLDFISH
|
||||
goldfish_sync_signal(*info.syncFd);
|
||||
#endif
|
||||
|
||||
mSyncHelper->close(*info.syncFd);
|
||||
}
|
||||
info.syncFd.reset();
|
||||
#endif
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
@ -4873,13 +4875,15 @@ VkResult ResourceTracker::on_vkImportFenceFdKHR(void* context, VkResult, VkDevic
|
|||
|
||||
auto& info = it->second;
|
||||
|
||||
#if GFXSTREAM_ENABLE_GUEST_GOLDFISH
|
||||
if (info.syncFd && *info.syncFd >= 0) {
|
||||
MESA_TRACE_SCOPE("%s: previous sync fd exists, close it\n", __func__);
|
||||
|
||||
#if GFXSTREAM_ENABLE_GUEST_GOLDFISH
|
||||
goldfish_sync_signal(*info.syncFd);
|
||||
#endif
|
||||
|
||||
mSyncHelper->close(*info.syncFd);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pImportFenceFdInfo->fd < 0) {
|
||||
MESA_TRACE_SCOPE("%s: import -1, set to -1 and exit\n", __func__);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue