[Mesa-dev] [PATCH] anv: generate different VkSemaphore handles

Jason Ekstrand jason at jlekstrand.net
Sat Feb 27 18:58:03 UTC 2016


On Sat, Feb 27, 2016 at 5:47 AM, Jacek Konieczny <jajcus at jajcus.net> wrote:

> The same handle returned by all vkCreateSemaphore() calls confuses
> validation layers:
>

>From the Vulkan 1.0 spec, Glossary:
Non-Dispatchable Handle A handle of an integer handle type. Handle values may
not be unique, even for two objects of the same type. Semaphores are
non-dispatchable handles so there is no guarantee that they are unique.

The validation layer is broken.  Please file a bug there.
--Jason


>
> SEMAPHORE(ERROR): object: 0x1 type: 5 location: 1443 msgCode: 0:
> vkQueueSubmit: Semaphore must not be currently signaled or in a wait state
>
> Signed-off-by: Jacek Konieczny <jajcus at jajcus.net>
> ---
>  src/intel/vulkan/anv_device.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 5993055..96aef00 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -1546,7 +1546,9 @@ VkResult anv_CreateSemaphore(
>      * rings. As such, there's nothing to do for the user space semaphore.
>      */
>
> -   *pSemaphore = (VkSemaphore)1;
> +   static uint64_t value = 0;
> +
> +   *pSemaphore = (VkSemaphore) ++value;
>
>     return VK_SUCCESS;
>  }
> --
> 2.2.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160227/d2fd4943/attachment.html>


More information about the mesa-dev mailing list