<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 27, 2016 at 5:47 AM, Jacek Konieczny <span dir="ltr"><<a href="mailto:jajcus@jajcus.net" target="_blank">jajcus@jajcus.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The same handle returned by all vkCreateSemaphore() calls confuses<br>
validation layers:<br></blockquote><br>From the Vulkan 1.0 spec, Glossary:<br><div><dl class=""><dt><span class="">Non-Dispatchable Handle
</span></dt><dd>
A handle of an integer handle type. Handle values <span class="">may not</span> be unique,
even for two objects of the same type.
</dd></dl>Semaphores are non-dispatchable handles so there is no guarantee that they are unique.<br><br></div><div>The validation layer is broken. Please file a bug there.<br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
SEMAPHORE(ERROR): object: 0x1 type: 5 location: 1443 msgCode: 0: vkQueueSubmit: Semaphore must not be currently signaled or in a wait state<br>
<br>
Signed-off-by: Jacek Konieczny <<a href="mailto:jajcus@jajcus.net">jajcus@jajcus.net</a>><br>
---<br>
src/intel/vulkan/anv_device.c | 4 +++-<br>
1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c<br>
index 5993055..96aef00 100644<br>
--- a/src/intel/vulkan/anv_device.c<br>
+++ b/src/intel/vulkan/anv_device.c<br>
@@ -1546,7 +1546,9 @@ VkResult anv_CreateSemaphore(<br>
* rings. As such, there's nothing to do for the user space semaphore.<br>
*/<br>
<br>
- *pSemaphore = (VkSemaphore)1;<br>
+ static uint64_t value = 0;<br>
+<br>
+ *pSemaphore = (VkSemaphore) ++value;<br>
<br>
return VK_SUCCESS;<br>
}<br>
<span class=""><font color="#888888">--<br>
2.2.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>