{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/545","repository_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross","labels_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/545/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/545/comments","events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/545/events","html_url":"https://github.com/KhronosGroup/SPIRV-Cross/issues/545","id":318089530,"number":545,"title":"Using the result of OpSampledImage in multiple expressions can result in invalid code gen","user":{"login":"jodavis42","id":22943955,"avatar_url":"https://avatars3.githubusercontent.com/u/22943955?v=4","gravatar_id":"","url":"https://api.github.com/users/jodavis42","html_url":"https://github.com/jodavis42","followers_url":"https://api.github.com/users/jodavis42/followers","following_url":"https://api.github.com/users/jodavis42/following{/other_user}","gists_url":"https://api.github.com/users/jodavis42/gists{/gist_id}","starred_url":"https://api.github.com/users/jodavis42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodavis42/subscriptions","organizations_url":"https://api.github.com/users/jodavis42/orgs","repos_url":"https://api.github.com/users/jodavis42/repos","events_url":"https://api.github.com/users/jodavis42/events{/privacy}","received_events_url":"https://api.github.com/users/jodavis42/received_events","type":"User","site_admin":false},"labels":[{"id":352397990,"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-26T15:45:28Z","updated_at":"2018-04-26T19:27:56Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"In the attached file I merge an image and sampler into a sampled image and use that result id (14) to sample out a value and store it. If I use that same id (14) to do another sample then the translated code generates a new sampler on the stack. If instead I make another sampledimage from the same inputs to make a new temporary id this problem goes away.\r\n\r\n[SamplersTestBed.txt](https://github.com/KhronosGroup/SPIRV-Cross/files/1951912/SamplersTestBed.txt)\r\n\r\nI'll be honest and admit that I find the standard a bit lacking in rules regarding images/samplers so I could be doing something wrong that I don't realize.\r\n"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/comments/384762166","html_url":"https://github.com/KhronosGroup/SPIRV-Cross/issues/545#issuecomment-384762166","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/545","id":384762166,"user":{"login":"jodavis42","id":22943955,"avatar_url":"https://avatars3.githubusercontent.com/u/22943955?v=4","gravatar_id":"","url":"https://api.github.com/users/jodavis42","html_url":"https://github.com/jodavis42","followers_url":"https://api.github.com/users/jodavis42/followers","following_url":"https://api.github.com/users/jodavis42/following{/other_user}","gists_url":"https://api.github.com/users/jodavis42/gists{/gist_id}","starred_url":"https://api.github.com/users/jodavis42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodavis42/subscriptions","organizations_url":"https://api.github.com/users/jodavis42/orgs","repos_url":"https://api.github.com/users/jodavis42/repos","events_url":"https://api.github.com/users/jodavis42/events{/privacy}","received_events_url":"https://api.github.com/users/jodavis42/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T19:27:56Z","updated_at":"2018-04-26T19:27:56Z","author_association":"CONTRIBUTOR","body":"Nevermind. According to the Tools team it is illegal to store a sampled image and the validator will be adding a check for this.\r\nhttps://github.com/KhronosGroup/SPIRV-Tools/issues/1528"}}
{"actor":{"display_login":"jodavis42"}}