mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 23:50:22 +01:00
radv: Add external fence support.
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
6abfa37879
commit
d27aaae4d2
2 changed files with 22 additions and 0 deletions
|
|
@ -3793,3 +3793,23 @@ VkResult radv_GetFenceFdKHR(VkDevice _device,
|
||||||
return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR);
|
return vk_error(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR);
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void radv_GetPhysicalDeviceExternalFencePropertiesKHR(
|
||||||
|
VkPhysicalDevice physicalDevice,
|
||||||
|
const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo,
|
||||||
|
VkExternalFencePropertiesKHR* pExternalFenceProperties)
|
||||||
|
{
|
||||||
|
RADV_FROM_HANDLE(radv_physical_device, pdevice, physicalDevice);
|
||||||
|
|
||||||
|
if (pdevice->rad_info.has_syncobj_wait &&
|
||||||
|
pExternalFenceInfo->handleType == VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR) {
|
||||||
|
pExternalFenceProperties->exportFromImportedHandleTypes = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
|
||||||
|
pExternalFenceProperties->compatibleHandleTypes = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
|
||||||
|
pExternalFenceProperties->externalFenceFeatures = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR |
|
||||||
|
VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR;
|
||||||
|
} else {
|
||||||
|
pExternalFenceProperties->exportFromImportedHandleTypes = 0;
|
||||||
|
pExternalFenceProperties->compatibleHandleTypes = 0;
|
||||||
|
pExternalFenceProperties->externalFenceFeatures = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ EXTENSIONS = [
|
||||||
Extension('VK_KHR_bind_memory2', 1, True),
|
Extension('VK_KHR_bind_memory2', 1, True),
|
||||||
Extension('VK_KHR_dedicated_allocation', 1, True),
|
Extension('VK_KHR_dedicated_allocation', 1, True),
|
||||||
Extension('VK_KHR_descriptor_update_template', 1, True),
|
Extension('VK_KHR_descriptor_update_template', 1, True),
|
||||||
|
Extension('VK_KHR_external_fence', 1, 'device->rad_info.has_syncobj_wait'),
|
||||||
|
Extension('VK_KHR_external_fence_capabilities', 1, True),
|
||||||
Extension('VK_KHR_external_fence_fd', 1, 'device->rad_info.has_syncobj_wait'),
|
Extension('VK_KHR_external_fence_fd', 1, 'device->rad_info.has_syncobj_wait'),
|
||||||
Extension('VK_KHR_external_memory', 1, True),
|
Extension('VK_KHR_external_memory', 1, True),
|
||||||
Extension('VK_KHR_external_memory_capabilities', 1, True),
|
Extension('VK_KHR_external_memory_capabilities', 1, True),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue