v3dv: Use the common QueueSignalReleaseImageANDROID from RADV

This is an actual functional change as we now plumb through the sync FD
instead of doing a vkQueueSubmit and trusting in implicit sync.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14372>
This commit is contained in:
Jason Ekstrand 2022-01-01 23:08:48 -06:00 committed by Marge Bot
parent a9321b1309
commit ca1d0333db
1 changed files with 0 additions and 36 deletions

View File

@ -423,39 +423,3 @@ v3dv_GetSwapchainGrallocUsage2ANDROID(
return VK_SUCCESS;
}
#endif
VkResult
v3dv_QueueSignalReleaseImageANDROID(VkQueue queue,
uint32_t waitSemaphoreCount,
const VkSemaphore *pWaitSemaphores,
VkImage image,
int *pNativeFenceFd)
{
VkResult result;
if (waitSemaphoreCount == 0)
goto done;
result = v3dv_QueueSubmit(
queue, 1,
&(VkSubmitInfo) {
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
.waitSemaphoreCount = 1,
.pWaitSemaphores = pWaitSemaphores,
.pWaitDstStageMask =
&(VkPipelineStageFlags) { VK_PIPELINE_STAGE_ALL_COMMANDS_BIT },
},
(VkFence) VK_NULL_HANDLE);
if (result != VK_SUCCESS)
return result;
done:
if (pNativeFenceFd) {
/* We can rely implicit on sync because above we submitted all
* semaphores to the queue.
*/
*pNativeFenceFd = -1;
}
return VK_SUCCESS;
}