{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/glslang/issues/89","repository_url":"https://api.github.com/repos/KhronosGroup/glslang","labels_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/89/comments","events_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/89/events","html_url":"https://github.com/KhronosGroup/glslang/issues/89","id":113824666,"number":89,"title":"Catching link errors?","user":{"login":"io7m","id":612494,"avatar_url":"https://avatars.githubusercontent.com/u/612494?v=3","gravatar_id":"","url":"https://api.github.com/users/io7m","html_url":"https://github.com/io7m","followers_url":"https://api.github.com/users/io7m/followers","following_url":"https://api.github.com/users/io7m/following{/other_user}","gists_url":"https://api.github.com/users/io7m/gists{/gist_id}","starred_url":"https://api.github.com/users/io7m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/io7m/subscriptions","organizations_url":"https://api.github.com/users/io7m/orgs","repos_url":"https://api.github.com/users/io7m/repos","events_url":"https://api.github.com/users/io7m/events{/privacy}","received_events_url":"https://api.github.com/users/io7m/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KhronosGroup/glslang/labels/GLSL/ESSL","name":"GLSL/ESSL","color":"006b75"},{"url":"https://api.github.com/repos/KhronosGroup/glslang/labels/Missing%20Functionality","name":"Missing Functionality","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2015-10-28T13:49:01Z","updated_at":"2016-08-12T23:45:35Z","closed_at":null,"body":"Hello.\r\n\r\nGiven `m.vert`:\r\n\r\n```\r\n#version 330 core\r\n\r\nvec4 f();\r\n\r\nvoid\r\nmain()\r\n{\r\n  gl_Position = f();\r\n}\r\n```\r\n\r\n... and `m.frag`:\r\n\r\n```\r\n#version 330 core\r\n\r\nlayout(location = 0) out vec4 out_rgba;\r\n\r\nvoid\r\nmain()\r\n{\r\n  out_rgba = vec4(1.0);\r\n}\r\n```\r\n\r\nValidating with `glslangValidator -l m.vert m.frag` gives:\r\n\r\n```\r\nm.vert\r\nm.frag\r\n\r\nLinked vertex stage:\r\n\r\n\r\nLinked fragment stage:\r\n\r\n\r\n```\r\n\r\nNo error is indicated, despite the definition for `f` not having been given anywhere. Is there a way to get the validator to catch errors of this type? In C-like languages, that would obviously become a link-time error."},"comment":{"url":"https://api.github.com/repos/KhronosGroup/glslang/issues/comments/239585396","html_url":"https://github.com/KhronosGroup/glslang/issues/89#issuecomment-239585396","issue_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/89","id":239585396,"user":{"login":"johnkslang","id":5607714,"avatar_url":"https://avatars.githubusercontent.com/u/5607714?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkslang","html_url":"https://github.com/johnkslang","followers_url":"https://api.github.com/users/johnkslang/followers","following_url":"https://api.github.com/users/johnkslang/following{/other_user}","gists_url":"https://api.github.com/users/johnkslang/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkslang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkslang/subscriptions","organizations_url":"https://api.github.com/users/johnkslang/orgs","repos_url":"https://api.github.com/users/johnkslang/repos","events_url":"https://api.github.com/users/johnkslang/events{/privacy}","received_events_url":"https://api.github.com/users/johnkslang/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T23:45:35Z","updated_at":"2016-08-12T23:45:35Z","body":"From @weifengz in comment #296.\r\n\r\nThis simple pair of shaders should have failed to generate spv with linking option due to mismatched uniform blocks, but SPV was generated successfully.\r\n\r\nFS:\r\n\r\n```\r\n#version 310 es\r\nprecision highp float;\r\nlayout(location = 0) out vec4 color;\r\nlayout(set = 0, binding = 0) uniform myUBO {\r\n  vec4 base;\r\n};\r\nvoid main()\r\n{\r\n  color = base + 1.0;\r\n}\r\n```\r\n\r\nVS:\r\n\r\n```\r\n#version 310 es\r\nlayout (set = 0, binding = 1) uniform myUBO {\r\n  mat4 m;\r\n};\r\nvoid main()\r\n{\r\n  gl_Position = m[1];\r\n}\r\n```"}}
{"actor":{"display_login":"johnkslang"}}