{"action":"opened","issue":{"url":"https://api.github.com/repos/KhronosGroup/glslang/issues/159","repository_url":"https://api.github.com/repos/KhronosGroup/glslang","labels_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/159/comments","events_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/159/events","html_url":"https://github.com/KhronosGroup/glslang/issues/159","id":130903794,"number":159,"title":"Incorrect use of SampleImplicitLod in non-fragment shader","user":{"login":"amdrexu","id":13959852,"avatar_url":"https://avatars.githubusercontent.com/u/13959852?v=3","gravatar_id":"","url":"https://api.github.com/users/amdrexu","html_url":"https://github.com/amdrexu","followers_url":"https://api.github.com/users/amdrexu/followers","following_url":"https://api.github.com/users/amdrexu/following{/other_user}","gists_url":"https://api.github.com/users/amdrexu/gists{/gist_id}","starred_url":"https://api.github.com/users/amdrexu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amdrexu/subscriptions","organizations_url":"https://api.github.com/users/amdrexu/orgs","repos_url":"https://api.github.com/users/amdrexu/repos","events_url":"https://api.github.com/users/amdrexu/events{/privacy}","received_events_url":"https://api.github.com/users/amdrexu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-03T03:57:20Z","updated_at":"2016-02-03T03:57:20Z","closed_at":null,"body":"If we use such statement in non-fragment shader, the texture() call will be translated to SampleImplicitLod.\r\n\r\ntexel = texture(samp1D, 1.0);\r\n\r\nHowever, in SPIR-V spec, there are limitations of the use of SampleImplicitLod:\r\n\r\nThis instruction is only valid in the Fragment Execution Model.\r\n\r\nSo I wonder if we should use SampleExplicitLod with lod=0 for such texture() call when we detect the shader stage is not fragment shader."}}