[Mesa-dev] [PATCH] radv: only report external semaphore info for opaque fd.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Tue Jul 25 05:30:08 UTC 2017
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Tue, Jul 25, 2017 at 2:21 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Until we support sync fd, don't report the info.
>
> Fixes CTS dEQP-VK.api.external.semaphore.sync_fd.* from crashing.
>
> Fixes: eaa56eab6 (radv: initial support for shared semaphores (v2))
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/amd/vulkan/radv_device.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> index 497ef21..5244c15 100644
> --- a/src/amd/vulkan/radv_device.c
> +++ b/src/amd/vulkan/radv_device.c
> @@ -3624,9 +3624,14 @@ void radv_GetPhysicalDeviceExternalSemaphorePropertiesKHR(
> const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo,
> VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties)
> {
> - pExternalSemaphoreProperties->exportFromImportedHandleTypes = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
> - pExternalSemaphoreProperties->compatibleHandleTypes = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
> - pExternalSemaphoreProperties->externalSemaphoreFeatures = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR |
> - VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR;
> -
> + if (pExternalSemaphoreInfo->handleType == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR) {
> + pExternalSemaphoreProperties->exportFromImportedHandleTypes = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
> + pExternalSemaphoreProperties->compatibleHandleTypes = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
> + pExternalSemaphoreProperties->externalSemaphoreFeatures = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR |
> + VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR;
> + } else {
> + pExternalSemaphoreProperties->exportFromImportedHandleTypes = 0;
> + pExternalSemaphoreProperties->compatibleHandleTypes = 0;
> + pExternalSemaphoreProperties->externalSemaphoreFeatures = 0;
> + }
> }
> --
> 2.9.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list