anv/fence: Handle ANV_FENCE_CREATE_SIGNALED_BIT
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Nov 2016 05:46:13 +0000 (21:46 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 17 Nov 2016 04:07:23 +0000 (20:07 -0800)
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/intel/vulkan/anv_device.c

index 6bd87eff35c1b4bfb92accb36204b23f0fd9fefc..3f679195a107630c67768ece282dd160562a68ac 100644 (file)
@@ -1554,7 +1554,11 @@ VkResult anv_CreateFence(
    fence->execbuf.rsvd1 = device->context_id;
    fence->execbuf.rsvd2 = 0;
 
-   fence->state = ANV_FENCE_STATE_RESET;
+   if (pCreateInfo->flags & VK_FENCE_CREATE_SIGNALED_BIT) {
+      fence->state = ANV_FENCE_STATE_SIGNALED;
+   } else {
+      fence->state = ANV_FENCE_STATE_RESET;
+   }
 
    *pFence = anv_fence_to_handle(fence);