{"action":"created","issue":{"url":"https://api.github.com/repos/SaschaWillems/Vulkan/issues/451","repository_url":"https://api.github.com/repos/SaschaWillems/Vulkan","labels_url":"https://api.github.com/repos/SaschaWillems/Vulkan/issues/451/labels{/name}","comments_url":"https://api.github.com/repos/SaschaWillems/Vulkan/issues/451/comments","events_url":"https://api.github.com/repos/SaschaWillems/Vulkan/issues/451/events","html_url":"https://github.com/SaschaWillems/Vulkan/issues/451","id":310345182,"number":451,"title":"Possible synchronization issues in deferred multisampling example","user":{"login":"jherico","id":1533642,"avatar_url":"https://avatars1.githubusercontent.com/u/1533642?v=4","gravatar_id":"","url":"https://api.github.com/users/jherico","html_url":"https://github.com/jherico","followers_url":"https://api.github.com/users/jherico/followers","following_url":"https://api.github.com/users/jherico/following{/other_user}","gists_url":"https://api.github.com/users/jherico/gists{/gist_id}","starred_url":"https://api.github.com/users/jherico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jherico/subscriptions","organizations_url":"https://api.github.com/users/jherico/orgs","repos_url":"https://api.github.com/users/jherico/repos","events_url":"https://api.github.com/users/jherico/events{/privacy}","received_events_url":"https://api.github.com/users/jherico/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-01T18:52:39Z","updated_at":"2018-04-13T11:59:12Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"https://github.com/SaschaWillems/Vulkan/blob/7b28549bef9e2a65dd59fcc7286c2667fe43e093/examples/deferredmultisampling/deferredmultisampling.cpp#L459\r\n\r\nThis may be specific to the code in my fork, but I'm not certain.  There are two synchronization issues I'm encountering related to the offscreen command buffer.  First, unless I add VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT to the offscreen command buffer, I get validation errors due to the buffer being concurrently queued multiple times as frames are queued up.  \r\n\r\nSecond, when triggering the rebuild of the offscreen command buffer by clicking the sample rate shading checkbox in the UI, I get a warning that I'm writing a command buffer that's currently in use.  \r\n\r\nThe latter issue I've solved by using my context `trash` functionality, which places resources that are no longer needed but might still be in use into a container in the context object... these items are then migrated to another container each frame, protected by the frame fence, and then the `recycle` function actually reclaims the items for each fence that's signaled.  Alternatively, you could just add a queue/device waitIdle function to the `buildDeferredCommandBuffer` function."},"comment":{"url":"https://api.github.com/repos/SaschaWillems/Vulkan/issues/comments/381113546","html_url":"https://github.com/SaschaWillems/Vulkan/issues/451#issuecomment-381113546","issue_url":"https://api.github.com/repos/SaschaWillems/Vulkan/issues/451","id":381113546,"user":{"login":"SaschaWillems","id":10283127,"avatar_url":"https://avatars2.githubusercontent.com/u/10283127?v=4","gravatar_id":"","url":"https://api.github.com/users/SaschaWillems","html_url":"https://github.com/SaschaWillems","followers_url":"https://api.github.com/users/SaschaWillems/followers","following_url":"https://api.github.com/users/SaschaWillems/following{/other_user}","gists_url":"https://api.github.com/users/SaschaWillems/gists{/gist_id}","starred_url":"https://api.github.com/users/SaschaWillems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaschaWillems/subscriptions","organizations_url":"https://api.github.com/users/SaschaWillems/orgs","repos_url":"https://api.github.com/users/SaschaWillems/repos","events_url":"https://api.github.com/users/SaschaWillems/events{/privacy}","received_events_url":"https://api.github.com/users/SaschaWillems/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T11:59:12Z","updated_at":"2018-04-13T11:59:12Z","author_association":"OWNER","body":"> This may be specific to the code in my fork\r\n\r\nI think that's the reason. I still use a ```vkQueueWaitIdle``` after submitting a frame in the example base class that avoids those synchronization issues.\r\n\r\nBeen wanting to get rid of that ```vkQueueWaitIdle``` for some time now, but it's not a small task and in the local branch I've been working on this I do get the exact same behavior as you get."}}
{"actor":{"display_login":"SaschaWillems"}}