{"action":"created","issue":{"url":"https://api.github.com/repos/McNopper/Vulkan/issues/4","repository_url":"https://api.github.com/repos/McNopper/Vulkan","labels_url":"https://api.github.com/repos/McNopper/Vulkan/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/McNopper/Vulkan/issues/4/comments","events_url":"https://api.github.com/repos/McNopper/Vulkan/issues/4/events","html_url":"https://github.com/McNopper/Vulkan/issues/4","id":135992517,"number":4,"title":"VKTS_Example04: App attempts to transfer stage image into invalid image layout","user":{"login":"kbiElude","id":9154207,"avatar_url":"https://avatars.githubusercontent.com/u/9154207?v=3","gravatar_id":"","url":"https://api.github.com/users/kbiElude","html_url":"https://github.com/kbiElude","followers_url":"https://api.github.com/users/kbiElude/followers","following_url":"https://api.github.com/users/kbiElude/following{/other_user}","gists_url":"https://api.github.com/users/kbiElude/gists{/gist_id}","starred_url":"https://api.github.com/users/kbiElude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbiElude/subscriptions","organizations_url":"https://api.github.com/users/kbiElude/orgs","repos_url":"https://api.github.com/users/kbiElude/repos","events_url":"https://api.github.com/users/kbiElude/events{/privacy}","received_events_url":"https://api.github.com/users/kbiElude/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-24T08:31:34Z","updated_at":"2016-02-24T09:42:45Z","closed_at":null,"body":"In fn_texture.cpp::textureCreate(), we have the following code block:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/9154207/13279474/7628427a-dad8-11e5-9f62-6825b980e1fc.png)\r\n\r\nConsider this call stack:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/9154207/13279504/af2a7c14-dad8-11e5-8132-8fa13bb20762.png)\r\n\r\nIn this scenario, the application attempts to initialize an image with VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT image usages. In order to upload data to the texture, it needs to use a stage image. The stage image is created correctly, but the app then attempts to transfer it to SHADER_READ_ONLY_OPTIMAL layout, which is invalid and causes a crash in our driver. This is likely due to invalid newLayout argument, passed to texturePrepare() call, as per picture below:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/9154207/13279573/31528722-dad9-11e5-9d6f-1b1e61687292.png)\r\n\r\nPlease consider using Khronos validation layers in your applications. They can be helpful in capturing omissions like the one I'm describing."},"comment":{"url":"https://api.github.com/repos/McNopper/Vulkan/issues/comments/188164452","html_url":"https://github.com/McNopper/Vulkan/issues/4#issuecomment-188164452","issue_url":"https://api.github.com/repos/McNopper/Vulkan/issues/4","id":188164452,"user":{"login":"kbiElude","id":9154207,"avatar_url":"https://avatars.githubusercontent.com/u/9154207?v=3","gravatar_id":"","url":"https://api.github.com/users/kbiElude","html_url":"https://github.com/kbiElude","followers_url":"https://api.github.com/users/kbiElude/followers","following_url":"https://api.github.com/users/kbiElude/following{/other_user}","gists_url":"https://api.github.com/users/kbiElude/gists{/gist_id}","starred_url":"https://api.github.com/users/kbiElude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbiElude/subscriptions","organizations_url":"https://api.github.com/users/kbiElude/orgs","repos_url":"https://api.github.com/users/kbiElude/repos","events_url":"https://api.github.com/users/kbiElude/events{/privacy}","received_events_url":"https://api.github.com/users/kbiElude/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T09:42:45Z","updated_at":"2016-02-24T09:42:45Z","body":"I'm from the AMD driver team, so there's only one driver I could be using :-) "}}