{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/comments/255724449","pull_request_review_id":202377078,"id":255724449,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1NTcyNDQ0OQ==","diff_hunk":"@@ -320,12 +379,31 @@ static string create_sampler_address(const char *prefix, MSLSamplerAddress addr)\n \t}\n }\n \n+SPIRType &CompilerMSL::get_stage_in_struct_type()\n+{\n+\tauto &si_var = get<SPIRVariable>(stage_in_var_id);\n+\treturn get_variable_data_type(si_var);\n+}\n+\n SPIRType &CompilerMSL::get_stage_out_struct_type()\n {\n \tauto &so_var = get<SPIRVariable>(stage_out_var_id);\n \treturn get_variable_data_type(so_var);\n }\n \n+SPIRType &CompilerMSL::get_patch_stage_out_struct_type()\n+{\n+\tauto &so_var = get<SPIRVariable>(patch_stage_out_var_id);\n+\treturn get_variable_data_type(so_var);\n+}\n+\n+std::string CompilerMSL::get_tess_factor_struct_name()\n+{\n+\tif (get_entry_point().flags.get(ExecutionModeTriangles))","path":"spirv_msl.cpp","position":133,"original_position":133,"commit_id":"eb89c3a428b20627d0f5f02b5f40de2ad7df2a3e","original_commit_id":"eb89c3a428b20627d0f5f02b5f40de2ad7df2a3e","user":{"login":"HansKristian-Work","id":17786731,"node_id":"MDQ6VXNlcjE3Nzg2NzMx","avatar_url":"https://avatars2.githubusercontent.com/u/17786731?v=4","gravatar_id":"","url":"https://api.github.com/users/HansKristian-Work","html_url":"https://github.com/HansKristian-Work","followers_url":"https://api.github.com/users/HansKristian-Work/followers","following_url":"https://api.github.com/users/HansKristian-Work/following{/other_user}","gists_url":"https://api.github.com/users/HansKristian-Work/gists{/gist_id}","starred_url":"https://api.github.com/users/HansKristian-Work/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HansKristian-Work/subscriptions","organizations_url":"https://api.github.com/users/HansKristian-Work/orgs","repos_url":"https://api.github.com/users/HansKristian-Work/repos","events_url":"https://api.github.com/users/HansKristian-Work/events{/privacy}","received_events_url":"https://api.github.com/users/HansKristian-Work/received_events","type":"User","site_admin":false},"body":"Hm, right. I guess worst case we just need some offline override options, but this is niche enough. Could we have an error if line tessellation is used at least?","created_at":"2019-02-11T22:40:51Z","updated_at":"2019-02-11T22:40:51Z","html_url":"https://github.com/KhronosGroup/SPIRV-Cross/pull/852#discussion_r255724449","pull_request_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/comments/255724449"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Cross/pull/852#discussion_r255724449"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852"}},"in_reply_to_id":255502666},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852","id":251143777,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUxMTQzNzc3","html_url":"https://github.com/KhronosGroup/SPIRV-Cross/pull/852","diff_url":"https://github.com/KhronosGroup/SPIRV-Cross/pull/852.diff","patch_url":"https://github.com/KhronosGroup/SPIRV-Cross/pull/852.patch","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/852","number":852,"state":"open","locked":false,"title":"MSL: Add support for tessellation control shaders.","user":{"login":"cdavis5e","id":42747760,"node_id":"MDQ6VXNlcjQyNzQ3NzYw","avatar_url":"https://avatars1.githubusercontent.com/u/42747760?v=4","gravatar_id":"","url":"https://api.github.com/users/cdavis5e","html_url":"https://github.com/cdavis5e","followers_url":"https://api.github.com/users/cdavis5e/followers","following_url":"https://api.github.com/users/cdavis5e/following{/other_user}","gists_url":"https://api.github.com/users/cdavis5e/gists{/gist_id}","starred_url":"https://api.github.com/users/cdavis5e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdavis5e/subscriptions","organizations_url":"https://api.github.com/users/cdavis5e/orgs","repos_url":"https://api.github.com/users/cdavis5e/repos","events_url":"https://api.github.com/users/cdavis5e/events{/privacy}","received_events_url":"https://api.github.com/users/cdavis5e/received_events","type":"User","site_admin":false},"body":"These are transpiled to kernel functions that write the output of the\r\nshader to three buffers: one for per-vertex varyings, one for per-patch\r\nvaryings, and one for the tessellation levels. This structure is\r\nmandated by the way Metal works, where the tessellation factors are\r\nsupplied to the draw method in their own buffer, while the per-patch and\r\nper-vertex varyings are supplied as though they were vertex attributes;\r\nsince they have different step rates, they must be in separate buffers.\r\n\r\nThe kernel is expected to be run in a workgroup whose size is the\r\ngreater of the number of input or output control points. It uses Metal's\r\nsupport for vertex-style stage input to a compute shader to get the\r\ninput values; therefore, at least one instance must run per input point.\r\nMeanwhile, Vulkan mandates that it run at least once per output point.\r\nOverrunning the output array is a concern, but any values written should\r\neither be discarded or overwritten by subsequent patches. I'm probably\r\ngoing to put some slop space in the buffer when I integrate this into\r\nMoltenVK to be on the safe side.","created_at":"2019-02-07T14:52:46Z","updated_at":"2019-02-11T22:40:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10f760de7a84979b4b226f6df2b7a03e2f2b0705","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852/comments","review_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/852/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/statuses/eb89c3a428b20627d0f5f02b5f40de2ad7df2a3e","head":{"label":"cdavis5e:tesc-shader","ref":"tesc-shader","sha":"eb89c3a428b20627d0f5f02b5f40de2ad7df2a3e","user":{"login":"cdavis5e","id":42747760,"node_id":"MDQ6VXNlcjQyNzQ3NzYw","avatar_url":"https://avatars1.githubusercontent.com/u/42747760?v=4","gravatar_id":"","url":"https://api.github.com/users/cdavis5e","html_url":"https://github.com/cdavis5e","followers_url":"https://api.github.com/users/cdavis5e/followers","following_url":"https://api.github.com/users/cdavis5e/following{/other_user}","gists_url":"https://api.github.com/users/cdavis5e/gists{/gist_id}","starred_url":"https://api.github.com/users/cdavis5e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdavis5e/subscriptions","organizations_url":"https://api.github.com/users/cdavis5e/orgs","repos_url":"https://api.github.com/users/cdavis5e/repos","events_url":"https://api.github.com/users/cdavis5e/events{/privacy}","received_events_url":"https://api.github.com/users/cdavis5e/received_events","type":"User","site_admin":false},"repo":{"id":146491277,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY0OTEyNzc=","name":"SPIRV-Cross","full_name":"cdavis5e/SPIRV-Cross","private":false,"owner":{"login":"cdavis5e","id":42747760,"node_id":"MDQ6VXNlcjQyNzQ3NzYw","avatar_url":"https://avatars1.githubusercontent.com/u/42747760?v=4","gravatar_id":"","url":"https://api.github.com/users/cdavis5e","html_url":"https://github.com/cdavis5e","followers_url":"https://api.github.com/users/cdavis5e/followers","following_url":"https://api.github.com/users/cdavis5e/following{/other_user}","gists_url":"https://api.github.com/users/cdavis5e/gists{/gist_id}","starred_url":"https://api.github.com/users/cdavis5e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdavis5e/subscriptions","organizations_url":"https://api.github.com/users/cdavis5e/orgs","repos_url":"https://api.github.com/users/cdavis5e/repos","events_url":"https://api.github.com/users/cdavis5e/events{/privacy}","received_events_url":"https://api.github.com/users/cdavis5e/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cdavis5e/SPIRV-Cross","description":"SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.","fork":true,"url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross","forks_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/forks","keys_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/teams","hooks_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/hooks","issue_events_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/issues/events{/number}","events_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/events","assignees_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/assignees{/user}","branches_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/branches{/branch}","tags_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/tags","blobs_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/statuses/{sha}","languages_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/languages","stargazers_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/stargazers","contributors_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/contributors","subscribers_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/subscribers","subscription_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/subscription","commits_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/contents/{+path}","compare_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/merges","archive_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/downloads","issues_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/issues{/number}","pulls_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/pulls{/number}","milestones_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/milestones{/number}","notifications_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/labels{/name}","releases_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/releases{/id}","deployments_url":"https://api.github.com/repos/cdavis5e/SPIRV-Cross/deployments","created_at":"2018-08-28T18:41:42Z","updated_at":"2019-02-06T00:52:40Z","pushed_at":"2019-02-07T14:51:28Z","git_url":"git://github.com/cdavis5e/SPIRV-Cross.git","ssh_url":"git@github.com:cdavis5e/SPIRV-Cross.git","clone_url":"https://github.com/cdavis5e/SPIRV-Cross.git","svn_url":"https://github.com/cdavis5e/SPIRV-Cross","homepage":"","size":5993,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KhronosGroup:master","ref":"master","sha":"d9ed3dcc7a7e62e5f95fd8f24e3d35e7e402ae92","user":{"login":"KhronosGroup","id":1608701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDg3MDE=","avatar_url":"https://avatars3.githubusercontent.com/u/1608701?v=4","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":55413903,"node_id":"MDEwOlJlcG9zaXRvcnk1NTQxMzkwMw==","name":"SPIRV-Cross","full_name":"KhronosGroup/SPIRV-Cross","private":false,"owner":{"login":"KhronosGroup","id":1608701,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDg3MDE=","avatar_url":"https://avatars3.githubusercontent.com/u/1608701?v=4","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/KhronosGroup/SPIRV-Cross","description":"SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.","fork":false,"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross","forks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/forks","keys_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/teams","hooks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/hooks","issue_events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/events{/number}","events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/events","assignees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/assignees{/user}","branches_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/branches{/branch}","tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/tags","blobs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/git/refs{/sha}","trees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/statuses/{sha}","languages_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/languages","stargazers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/stargazers","contributors_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/contributors","subscribers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/subscribers","subscription_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/subscription","commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/commits{/sha}","git_commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/git/commits{/sha}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/comments{/number}","issue_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/comments{/number}","contents_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/contents/{+path}","compare_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/merges","archive_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/downloads","issues_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues{/number}","pulls_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls{/number}","milestones_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/milestones{/number}","notifications_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/labels{/name}","releases_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/releases{/id}","deployments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/deployments","created_at":"2016-04-04T13:35:51Z","updated_at":"2019-02-11T22:06:57Z","pushed_at":"2019-02-07T14:52:47Z","git_url":"git://github.com/KhronosGroup/SPIRV-Cross.git","ssh_url":"git@github.com:KhronosGroup/SPIRV-Cross.git","clone_url":"https://github.com/KhronosGroup/SPIRV-Cross.git","svn_url":"https://github.com/KhronosGroup/SPIRV-Cross","homepage":"","size":5951,"stargazers_count":597,"watchers_count":597,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":117,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":117,"open_issues":21,"watchers":597,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Cross/pull/852"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/852"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/issues/852/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852/comments"},"review_comment":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/pulls/852/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Cross/statuses/eb89c3a428b20627d0f5f02b5f40de2ad7df2a3e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"HansKristian-Work"}}