{"action":"closed","number":711,"pull_request":{"url":"https://api.github.com/repos/OGRECave/ogre/pulls/711","id":177394174,"html_url":"https://github.com/OGRECave/ogre/pull/711","diff_url":"https://github.com/OGRECave/ogre/pull/711.diff","patch_url":"https://github.com/OGRECave/ogre/pull/711.patch","issue_url":"https://api.github.com/repos/OGRECave/ogre/issues/711","number":711,"state":"closed","locked":false,"title":"GLSupport: fix layout qualifier parsing","user":{"login":"fbridault","id":8638653,"avatar_url":"https://avatars0.githubusercontent.com/u/8638653?v=4","gravatar_id":"","url":"https://api.github.com/users/fbridault","html_url":"https://github.com/fbridault","followers_url":"https://api.github.com/users/fbridault/followers","following_url":"https://api.github.com/users/fbridault/following{/other_user}","gists_url":"https://api.github.com/users/fbridault/gists{/gist_id}","starred_url":"https://api.github.com/users/fbridault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbridault/subscriptions","organizations_url":"https://api.github.com/users/fbridault/orgs","repos_url":"https://api.github.com/users/fbridault/repos","events_url":"https://api.github.com/users/fbridault/events{/privacy}","received_events_url":"https://api.github.com/users/fbridault/received_events","type":"User","site_admin":false},"body":"This brings two fixes for `extractLayoutQualifiers()`.\r\n\r\n## 1. Handle case with interpolation qualifier\r\n\r\nWhen using both layout location and interpolation qualifiers, I use to write it this way:\r\n```\r\nflat layout(location = 1) out vec4 outColor;\r\n```\r\nHowever I discovered that this syntax is not supported by the MacOs GLSL compiler. It is hard to find an official documentation to know what is the correct syntax (nothing [here](https://www.khronos.org/opengl/wiki/Layout_Qualifier_(GLSL)) for instance), but I found that this way works on all the platforms I tested so far (Linux, Windows, MacOs):\r\n```\r\nlayout(location = 1) flat out vec4 outColor;\r\n```\r\nHowever, `GLSLProgramCommon::extractLayoutQualifiers(void)` fails to parse this correctly. I propose so to detect the case when a interpolation qualifiers is used and skip it appropriately since it does not provide any information we need.\r\n\r\n## 2. Fix the increment of curPos when skipping 'out' qualifiers\r\n\r\nWorking on the previous fix, I discovered that the loop was broken with 'out' qualifiers. The keyword `continue` was used, but without calling the loop increment `currPos = shaderSource.find(\"layout\", currPos);`. So a line with an `out` qualifier was parsed many times before being really skipped, and sometimes this led to raise an assertion.\r\nI propose to avoid the use of continue which led to this issue and invert the `if` condition.","created_at":"2018-03-26T09:51:29Z","updated_at":"2018-03-26T12:55:38Z","closed_at":"2018-03-26T12:55:38Z","merged_at":"2018-03-26T12:55:38Z","merge_commit_sha":"ffb4cf935c28b424451339be9621878781e287ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OGRECave/ogre/pulls/711/commits","review_comments_url":"https://api.github.com/repos/OGRECave/ogre/pulls/711/comments","review_comment_url":"https://api.github.com/repos/OGRECave/ogre/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OGRECave/ogre/issues/711/comments","statuses_url":"https://api.github.com/repos/OGRECave/ogre/statuses/9e216e064c1606c24748c43977ae9fad6000c9e8","head":{"label":"fw4spl-org:fix-layout-location-parsing-with-interpolation","ref":"fix-layout-location-parsing-with-interpolation","sha":"9e216e064c1606c24748c43977ae9fad6000c9e8","user":{"login":"fw4spl-org","id":8041292,"avatar_url":"https://avatars1.githubusercontent.com/u/8041292?v=4","gravatar_id":"","url":"https://api.github.com/users/fw4spl-org","html_url":"https://github.com/fw4spl-org","followers_url":"https://api.github.com/users/fw4spl-org/followers","following_url":"https://api.github.com/users/fw4spl-org/following{/other_user}","gists_url":"https://api.github.com/users/fw4spl-org/gists{/gist_id}","starred_url":"https://api.github.com/users/fw4spl-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fw4spl-org/subscriptions","organizations_url":"https://api.github.com/users/fw4spl-org/orgs","repos_url":"https://api.github.com/users/fw4spl-org/repos","events_url":"https://api.github.com/users/fw4spl-org/events{/privacy}","received_events_url":"https://api.github.com/users/fw4spl-org/received_events","type":"Organization","site_admin":false},"repo":{"id":94549894,"name":"ogre","full_name":"fw4spl-org/ogre","owner":{"login":"fw4spl-org","id":8041292,"avatar_url":"https://avatars1.githubusercontent.com/u/8041292?v=4","gravatar_id":"","url":"https://api.github.com/users/fw4spl-org","html_url":"https://github.com/fw4spl-org","followers_url":"https://api.github.com/users/fw4spl-org/followers","following_url":"https://api.github.com/users/fw4spl-org/following{/other_user}","gists_url":"https://api.github.com/users/fw4spl-org/gists{/gist_id}","starred_url":"https://api.github.com/users/fw4spl-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fw4spl-org/subscriptions","organizations_url":"https://api.github.com/users/fw4spl-org/orgs","repos_url":"https://api.github.com/users/fw4spl-org/repos","events_url":"https://api.github.com/users/fw4spl-org/events{/privacy}","received_events_url":"https://api.github.com/users/fw4spl-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fw4spl-org/ogre","description":"OGRE - official github mirror","fork":true,"url":"https://api.github.com/repos/fw4spl-org/ogre","forks_url":"https://api.github.com/repos/fw4spl-org/ogre/forks","keys_url":"https://api.github.com/repos/fw4spl-org/ogre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fw4spl-org/ogre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fw4spl-org/ogre/teams","hooks_url":"https://api.github.com/repos/fw4spl-org/ogre/hooks","issue_events_url":"https://api.github.com/repos/fw4spl-org/ogre/issues/events{/number}","events_url":"https://api.github.com/repos/fw4spl-org/ogre/events","assignees_url":"https://api.github.com/repos/fw4spl-org/ogre/assignees{/user}","branches_url":"https://api.github.com/repos/fw4spl-org/ogre/branches{/branch}","tags_url":"https://api.github.com/repos/fw4spl-org/ogre/tags","blobs_url":"https://api.github.com/repos/fw4spl-org/ogre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fw4spl-org/ogre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fw4spl-org/ogre/git/refs{/sha}","trees_url":"https://api.github.com/repos/fw4spl-org/ogre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fw4spl-org/ogre/statuses/{sha}","languages_url":"https://api.github.com/repos/fw4spl-org/ogre/languages","stargazers_url":"https://api.github.com/repos/fw4spl-org/ogre/stargazers","contributors_url":"https://api.github.com/repos/fw4spl-org/ogre/contributors","subscribers_url":"https://api.github.com/repos/fw4spl-org/ogre/subscribers","subscription_url":"https://api.github.com/repos/fw4spl-org/ogre/subscription","commits_url":"https://api.github.com/repos/fw4spl-org/ogre/commits{/sha}","git_commits_url":"https://api.github.com/repos/fw4spl-org/ogre/git/commits{/sha}","comments_url":"https://api.github.com/repos/fw4spl-org/ogre/comments{/number}","issue_comment_url":"https://api.github.com/repos/fw4spl-org/ogre/issues/comments{/number}","contents_url":"https://api.github.com/repos/fw4spl-org/ogre/contents/{+path}","compare_url":"https://api.github.com/repos/fw4spl-org/ogre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fw4spl-org/ogre/merges","archive_url":"https://api.github.com/repos/fw4spl-org/ogre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fw4spl-org/ogre/downloads","issues_url":"https://api.github.com/repos/fw4spl-org/ogre/issues{/number}","pulls_url":"https://api.github.com/repos/fw4spl-org/ogre/pulls{/number}","milestones_url":"https://api.github.com/repos/fw4spl-org/ogre/milestones{/number}","notifications_url":"https://api.github.com/repos/fw4spl-org/ogre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fw4spl-org/ogre/labels{/name}","releases_url":"https://api.github.com/repos/fw4spl-org/ogre/releases{/id}","deployments_url":"https://api.github.com/repos/fw4spl-org/ogre/deployments","created_at":"2017-06-16T14:06:51Z","updated_at":"2018-03-20T14:01:28Z","pushed_at":"2018-03-23T14:04:54Z","git_url":"git://github.com/fw4spl-org/ogre.git","ssh_url":"git@github.com:fw4spl-org/ogre.git","clone_url":"https://github.com/fw4spl-org/ogre.git","svn_url":"https://github.com/fw4spl-org/ogre","homepage":"https://ogrecave.github.io/ogre/","size":338258,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OGRECave:master","ref":"master","sha":"efdf71fbeb1eaa7a6604b9b545e1f3992efab1e4","user":{"login":"OGRECave","id":16446637,"avatar_url":"https://avatars1.githubusercontent.com/u/16446637?v=4","gravatar_id":"","url":"https://api.github.com/users/OGRECave","html_url":"https://github.com/OGRECave","followers_url":"https://api.github.com/users/OGRECave/followers","following_url":"https://api.github.com/users/OGRECave/following{/other_user}","gists_url":"https://api.github.com/users/OGRECave/gists{/gist_id}","starred_url":"https://api.github.com/users/OGRECave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OGRECave/subscriptions","organizations_url":"https://api.github.com/users/OGRECave/orgs","repos_url":"https://api.github.com/users/OGRECave/repos","events_url":"https://api.github.com/users/OGRECave/events{/privacy}","received_events_url":"https://api.github.com/users/OGRECave/received_events","type":"Organization","site_admin":false},"repo":{"id":47069819,"name":"ogre","full_name":"OGRECave/ogre","owner":{"login":"OGRECave","id":16446637,"avatar_url":"https://avatars1.githubusercontent.com/u/16446637?v=4","gravatar_id":"","url":"https://api.github.com/users/OGRECave","html_url":"https://github.com/OGRECave","followers_url":"https://api.github.com/users/OGRECave/followers","following_url":"https://api.github.com/users/OGRECave/following{/other_user}","gists_url":"https://api.github.com/users/OGRECave/gists{/gist_id}","starred_url":"https://api.github.com/users/OGRECave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OGRECave/subscriptions","organizations_url":"https://api.github.com/users/OGRECave/orgs","repos_url":"https://api.github.com/users/OGRECave/repos","events_url":"https://api.github.com/users/OGRECave/events{/privacy}","received_events_url":"https://api.github.com/users/OGRECave/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OGRECave/ogre","description":"scene-oriented, flexible 3D engine written in C++ - official github mirror","fork":false,"url":"https://api.github.com/repos/OGRECave/ogre","forks_url":"https://api.github.com/repos/OGRECave/ogre/forks","keys_url":"https://api.github.com/repos/OGRECave/ogre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OGRECave/ogre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OGRECave/ogre/teams","hooks_url":"https://api.github.com/repos/OGRECave/ogre/hooks","issue_events_url":"https://api.github.com/repos/OGRECave/ogre/issues/events{/number}","events_url":"https://api.github.com/repos/OGRECave/ogre/events","assignees_url":"https://api.github.com/repos/OGRECave/ogre/assignees{/user}","branches_url":"https://api.github.com/repos/OGRECave/ogre/branches{/branch}","tags_url":"https://api.github.com/repos/OGRECave/ogre/tags","blobs_url":"https://api.github.com/repos/OGRECave/ogre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OGRECave/ogre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OGRECave/ogre/git/refs{/sha}","trees_url":"https://api.github.com/repos/OGRECave/ogre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OGRECave/ogre/statuses/{sha}","languages_url":"https://api.github.com/repos/OGRECave/ogre/languages","stargazers_url":"https://api.github.com/repos/OGRECave/ogre/stargazers","contributors_url":"https://api.github.com/repos/OGRECave/ogre/contributors","subscribers_url":"https://api.github.com/repos/OGRECave/ogre/subscribers","subscription_url":"https://api.github.com/repos/OGRECave/ogre/subscription","commits_url":"https://api.github.com/repos/OGRECave/ogre/commits{/sha}","git_commits_url":"https://api.github.com/repos/OGRECave/ogre/git/commits{/sha}","comments_url":"https://api.github.com/repos/OGRECave/ogre/comments{/number}","issue_comment_url":"https://api.github.com/repos/OGRECave/ogre/issues/comments{/number}","contents_url":"https://api.github.com/repos/OGRECave/ogre/contents/{+path}","compare_url":"https://api.github.com/repos/OGRECave/ogre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OGRECave/ogre/merges","archive_url":"https://api.github.com/repos/OGRECave/ogre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OGRECave/ogre/downloads","issues_url":"https://api.github.com/repos/OGRECave/ogre/issues{/number}","pulls_url":"https://api.github.com/repos/OGRECave/ogre/pulls{/number}","milestones_url":"https://api.github.com/repos/OGRECave/ogre/milestones{/number}","notifications_url":"https://api.github.com/repos/OGRECave/ogre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OGRECave/ogre/labels{/name}","releases_url":"https://api.github.com/repos/OGRECave/ogre/releases{/id}","deployments_url":"https://api.github.com/repos/OGRECave/ogre/deployments","created_at":"2015-11-29T15:57:03Z","updated_at":"2018-03-26T08:58:42Z","pushed_at":"2018-03-26T12:55:38Z","git_url":"git://github.com/OGRECave/ogre.git","ssh_url":"git@github.com:OGRECave/ogre.git","clone_url":"https://github.com/OGRECave/ogre.git","svn_url":"https://github.com/OGRECave/ogre","homepage":"https://ogrecave.github.io/ogre/","size":374612,"stargazers_count":497,"watchers_count":497,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":209,"mirror_url":null,"archived":false,"open_issues_count":130,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":209,"open_issues":130,"watchers":497,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OGRECave/ogre/pulls/711"},"html":{"href":"https://github.com/OGRECave/ogre/pull/711"},"issue":{"href":"https://api.github.com/repos/OGRECave/ogre/issues/711"},"comments":{"href":"https://api.github.com/repos/OGRECave/ogre/issues/711/comments"},"review_comments":{"href":"https://api.github.com/repos/OGRECave/ogre/pulls/711/comments"},"review_comment":{"href":"https://api.github.com/repos/OGRECave/ogre/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OGRECave/ogre/pulls/711/commits"},"statuses":{"href":"https://api.github.com/repos/OGRECave/ogre/statuses/9e216e064c1606c24748c43977ae9fad6000c9e8"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"paroj","id":4941802,"avatar_url":"https://avatars2.githubusercontent.com/u/4941802?v=4","gravatar_id":"","url":"https://api.github.com/users/paroj","html_url":"https://github.com/paroj","followers_url":"https://api.github.com/users/paroj/followers","following_url":"https://api.github.com/users/paroj/following{/other_user}","gists_url":"https://api.github.com/users/paroj/gists{/gist_id}","starred_url":"https://api.github.com/users/paroj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paroj/subscriptions","organizations_url":"https://api.github.com/users/paroj/orgs","repos_url":"https://api.github.com/users/paroj/repos","events_url":"https://api.github.com/users/paroj/events{/privacy}","received_events_url":"https://api.github.com/users/paroj/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":25,"deletions":17,"changed_files":1}}
{"actor":{"display_login":"paroj"}}