{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/117","repository_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs","labels_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/117/comments","events_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/117/events","html_url":"https://github.com/KhronosGroup/Vulkan-Docs/issues/117","id":138153643,"number":117,"title":"vkAcquireNextImage is overburdened.","user":{"login":"ratchetfreak","id":16795580,"avatar_url":"https://avatars.githubusercontent.com/u/16795580?v=3","gravatar_id":"","url":"https://api.github.com/users/ratchetfreak","html_url":"https://github.com/ratchetfreak","followers_url":"https://api.github.com/users/ratchetfreak/followers","following_url":"https://api.github.com/users/ratchetfreak/following{/other_user}","gists_url":"https://api.github.com/users/ratchetfreak/gists{/gist_id}","starred_url":"https://api.github.com/users/ratchetfreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ratchetfreak/subscriptions","organizations_url":"https://api.github.com/users/ratchetfreak/orgs","repos_url":"https://api.github.com/users/ratchetfreak/repos","events_url":"https://api.github.com/users/ratchetfreak/events{/privacy}","received_events_url":"https://api.github.com/users/ratchetfreak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/labels/Resolving%20Inside%20Khronos","name":"Resolving Inside Khronos","color":"ed458b"},{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/labels/WSI","name":"WSI","color":"6f6cb9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-03-03T11:33:39Z","updated_at":"2016-04-08T09:27:08Z","closed_at":"2016-04-08T09:27:08Z","body":"`vkAcquireNextImage` blocks if no image is ready and a timeout is set. However you can pass a fence that gets signaled when the image does become ready.\r\n\r\nThis seems to result from a change in the semantics according to the version history. It was originally meant to block until the image was ready (concerning [issue 7](https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/xhtml/vkspec.html#_issues_2) in the spec). However [Revision 56, (2015-09-18)](https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/xhtml/vkspec.html#_version_history_3) added the fence argument which makes the blocking behavior redundant.\r\n\r\nAs it stands now it's unclear exactly what happens if an image is not ready (but will be soon) and you call `vkAcquireNextImage` with various timeout values and whether or not you provide a semaphore and/or fence.\r\n\r\nSimilarly it is unclear when an image is actually owned by the application for a given return value.\r\n\r\nI propose to remove the timeout parameter and turn the operation into one that never blocks. \r\n\r\nIf no semaphore and no fence is provided it will only return `VK_SUCCESS` if an image is ready and its index is passed back through `pImageIndex`. The image can be used immediately. If no image is ready then it will return `VK_NOT_READY` and no image is reserved.\r\n\r\nif any of the two is provided then it will not block and return `VK_SUCCESS` if the swapchain can reserve an image, the reserved image's index is passed back through `pImageIndex`. The image cannot be used until after the semaphore or fence is signaled. If no image can be reserved then it will return `VK_NOT_READY` and no image is reserved.\r\n\r\n`VK_ERROR_SURFACE_LOST_KHR` and `VK_ERROR_OUT_OF_DATE_KHR` both will not reserve an image. `VK_SUBOPTIMAL_KHR` will reserve an image with the same semantics as if it had returned `VK_SUCCESS`.\r\n\r\nThis simplifies behavior on both sides. "},"comment":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/comments/207346917","html_url":"https://github.com/KhronosGroup/Vulkan-Docs/issues/117#issuecomment-207346917","issue_url":"https://api.github.com/repos/KhronosGroup/Vulkan-Docs/issues/117","id":207346917,"user":{"login":"oddhack","id":4693344,"avatar_url":"https://avatars.githubusercontent.com/u/4693344?v=3","gravatar_id":"","url":"https://api.github.com/users/oddhack","html_url":"https://github.com/oddhack","followers_url":"https://api.github.com/users/oddhack/followers","following_url":"https://api.github.com/users/oddhack/following{/other_user}","gists_url":"https://api.github.com/users/oddhack/gists{/gist_id}","starred_url":"https://api.github.com/users/oddhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oddhack/subscriptions","organizations_url":"https://api.github.com/users/oddhack/orgs","repos_url":"https://api.github.com/users/oddhack/repos","events_url":"https://api.github.com/users/oddhack/events{/privacy}","received_events_url":"https://api.github.com/users/oddhack/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T09:27:08Z","updated_at":"2016-04-08T09:27:08Z","body":"Should be fixed in the 1.0.9 spec update."}}