{"action":"created","issue":{"url":"https://api.github.com/repos/Overv/VulkanTutorial/issues/28","repository_url":"https://api.github.com/repos/Overv/VulkanTutorial","labels_url":"https://api.github.com/repos/Overv/VulkanTutorial/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/Overv/VulkanTutorial/issues/28/comments","events_url":"https://api.github.com/repos/Overv/VulkanTutorial/issues/28/events","html_url":"https://github.com/Overv/VulkanTutorial/issues/28","id":188617669,"number":28,"title":"Useless dependency in Tutorial 03.03","user":{"login":"qnope","id":9252855,"avatar_url":"https://avatars.githubusercontent.com/u/9252855?v=3","gravatar_id":"","url":"https://api.github.com/users/qnope","html_url":"https://github.com/qnope","followers_url":"https://api.github.com/users/qnope/followers","following_url":"https://api.github.com/users/qnope/following{/other_user}","gists_url":"https://api.github.com/users/qnope/gists{/gist_id}","starred_url":"https://api.github.com/users/qnope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qnope/subscriptions","organizations_url":"https://api.github.com/users/qnope/orgs","repos_url":"https://api.github.com/users/qnope/repos","events_url":"https://api.github.com/users/qnope/events{/privacy}","received_events_url":"https://api.github.com/users/qnope/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-10T21:03:02Z","updated_at":"2016-11-14T18:50:15Z","closed_at":null,"body":"You are making a subpass dependency between \"before the renderpass\" and the subpass 0.\r\n\r\nAs you wrote your dependency, it can be understandable like \"I am waiting for the presentation finish to read\".\r\nHowever, presentation engine is asynchronous and synchronisation for it should be done via Semaphore. Moreover semaphores make memory available and visible : \r\n\r\n> This semaphore signal operation defines the first half of a memory dependency, guaranteeing that all memory accesses defined by the submitted queue operations in the batch are made available, and that those queue operations have completed execution.\r\n\r\n> A semaphore wait operation defines the second half of a memory dependency for the semaphores being waited on. This half of the memory dependency guarantees that the first half has completed execution, and also guarantees that all available memory accesses are made visible to the queue operations in the batch.\r\n\r\nThe semaphore we are talking about is the semaphore that you use inside the `vkAcquireNextImageKHR`.\r\n\r\n> The presentation engine may not have finished reading from the image at the\r\ntime it is acquired, so the application must use semaphore and/or fence to ensure that the image layout and contents\r\nare not modified until the presentation engine reads have completed.\r\n\r\nSo, to me you do not need to use a dependency since the layout transition is performed by the renderpass itself, and the _memory dependencies / execution dependencies_ are performed by the semaphore.\r\n"},"comment":{"url":"https://api.github.com/repos/Overv/VulkanTutorial/issues/comments/260425085","html_url":"https://github.com/Overv/VulkanTutorial/issues/28#issuecomment-260425085","issue_url":"https://api.github.com/repos/Overv/VulkanTutorial/issues/28","id":260425085,"user":{"login":"qnope","id":9252855,"avatar_url":"https://avatars.githubusercontent.com/u/9252855?v=3","gravatar_id":"","url":"https://api.github.com/users/qnope","html_url":"https://github.com/qnope","followers_url":"https://api.github.com/users/qnope/followers","following_url":"https://api.github.com/users/qnope/following{/other_user}","gists_url":"https://api.github.com/users/qnope/gists{/gist_id}","starred_url":"https://api.github.com/users/qnope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qnope/subscriptions","organizations_url":"https://api.github.com/users/qnope/orgs","repos_url":"https://api.github.com/users/qnope/repos","events_url":"https://api.github.com/users/qnope/events{/privacy}","received_events_url":"https://api.github.com/users/qnope/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T18:50:15Z","updated_at":"2016-11-14T18:50:15Z","body":"The fact is you do not explicitly tell Vulkan to transition this image. From how I understand specs. The will be mean to mean that it will be transitioned.\r\n\r\nAdmit you are right and you do need a dependency. You want to transition the image to the layout UNDEFINED. You already know that your reads from the presentation engine are over (thanks to semaphores)! So, you do not need a dependency in this case. Am I wrong?\r\n\r\nLet's take a look for a subpass.\r\n\r\nThe specs tell :\r\n> layout is a VkImageLayout value specifying the layout the attachment uses during the subpass. The implementation will automatically perform layout transitions as needed between subpasses to make each subpass use the requested layouts.\r\n\r\nThe transition layout To COLOR_ATTACHMENT is automatic.\r\n\r\nSo, in my understand, you do not need a dependency"}}
{"actor":{"display_login":"qnope"}}