{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/88035030","pull_request_review_id":8615935,"id":88035030,"diff_hunk":"@@ -117,3 +153,300 @@ TEST_F(ValidateData, vec15) {\n   ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions());\n   EXPECT_THAT(getDiagnosticString(), HasSubstr(invalid_comp_error));\n }\n+\n+TEST_F(ValidateData, int8_good) {\n+  string str = header_with_int8 + \"%2 = OpTypeInt 8 1\";\n+  CompileSuccessfully(str.c_str());\n+  ASSERT_EQ(SPV_SUCCESS, ValidateInstructions());\n+}\n+\n+TEST_F(ValidateData, int8_bad) {\n+  string str = header + \"%2 = OpTypeInt 8 1\";\n+  CompileSuccessfully(str.c_str());\n+  ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions());\n+  EXPECT_THAT(getDiagnosticString(), HasSubstr(missing_int8_cap_error));\n+}\n+\n+TEST_F(ValidateData, int16_good) {\n+  string str = header_with_int16 + \"%2 = OpTypeInt 16 1\";\n+  CompileSuccessfully(str.c_str());\n+  ASSERT_EQ(SPV_SUCCESS, ValidateInstructions());\n+}\n+\n+TEST_F(ValidateData, int16_bad) {\n+  string str = header + \"%2 = OpTypeInt 16 1\";\n+  CompileSuccessfully(str.c_str());\n+  ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions());\n+  EXPECT_THAT(getDiagnosticString(), HasSubstr(missing_int16_cap_error));\n+}\n+\n+TEST_F(ValidateData, int64_good) {\n+  string str = header_with_int64 + \"%2 = OpTypeInt 64 1\";\n+  CompileSuccessfully(str.c_str());\n+  ASSERT_EQ(SPV_SUCCESS, ValidateInstructions());\n+}\n+\n+TEST_F(ValidateData, int64_bad) {\n+  string str = header + \"%2 = OpTypeInt 64 1\";\n+  CompileSuccessfully(str.c_str());\n+  ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions());\n+  EXPECT_THAT(getDiagnosticString(), HasSubstr(missing_int64_cap_error));\n+}\n+\n+// Number of bits in an integer may be only one of: {8,16,32,64}\n+TEST_F(ValidateData, int64_invalid_bits) {","path":"test/val/val_data_test.cpp","position":98,"original_position":98,"commit_id":"c84e08224a2a460fb9b863ba29edd03d83d5f64f","original_commit_id":"c84e08224a2a460fb9b863ba29edd03d83d5f64f","user":{"login":"dneto0","id":13054574,"avatar_url":"https://avatars.githubusercontent.com/u/13054574?v=3","gravatar_id":"","url":"https://api.github.com/users/dneto0","html_url":"https://github.com/dneto0","followers_url":"https://api.github.com/users/dneto0/followers","following_url":"https://api.github.com/users/dneto0/following{/other_user}","gists_url":"https://api.github.com/users/dneto0/gists{/gist_id}","starred_url":"https://api.github.com/users/dneto0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dneto0/subscriptions","organizations_url":"https://api.github.com/users/dneto0/orgs","repos_url":"https://api.github.com/users/dneto0/repos","events_url":"https://api.github.com/users/dneto0/events{/privacy}","received_events_url":"https://api.github.com/users/dneto0/received_events","type":"User","site_admin":false},"body":"The \"int64_\" prefix on the test name is misleading.","created_at":"2016-11-15T15:08:38Z","updated_at":"2016-11-15T15:34:44Z","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/458#discussion_r88035030","pull_request_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/88035030"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/458#discussion_r88035030"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458"}}},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458","id":93225419,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/458","diff_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/458.diff","patch_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/458.patch","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/458","number":458,"state":"open","locked":false,"title":"Adding validation code for more data rules.","user":{"login":"ehsannas","id":3828215,"avatar_url":"https://avatars.githubusercontent.com/u/3828215?v=3","gravatar_id":"","url":"https://api.github.com/users/ehsannas","html_url":"https://github.com/ehsannas","followers_url":"https://api.github.com/users/ehsannas/followers","following_url":"https://api.github.com/users/ehsannas/following{/other_user}","gists_url":"https://api.github.com/users/ehsannas/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsannas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsannas/subscriptions","organizations_url":"https://api.github.com/users/ehsannas/orgs","repos_url":"https://api.github.com/users/ehsannas/repos","events_url":"https://api.github.com/users/ehsannas/events{/privacy}","received_events_url":"https://api.github.com/users/ehsannas/received_events","type":"User","site_admin":false},"body":"These rules are under \"Data Rules\" in 2.16.1 (Universal Validation\r\nRules) part of the SPIR-V 1.1 Specification document:\r\n\r\n* Scalar floating-point types can be parameterized only as 32 bit, plus\r\nany additional sizes enabled by capabilities.\r\n\r\n* Scalar integer types can be parameterized only as 32 bit, plus any\r\nadditional sizes enabled by capabilities.\r\n\r\n* Vector types can only be parameterized with numerical types or the\r\nOpTypeBool type.\r\n\r\n* Matrix types can only be parameterized with floating-point types.\r\n\r\n* Matrix types can only be parameterized as having only 2, 3, or 4\r\ncolumns.\r\n\r\n* Specialization constants (see Specialization) are limited to integers,\r\nBooleans, floating-point numbers, and vectors of these.\r\n\r\nNote that a few existing tests had to be updated to meet the data validation rules.","created_at":"2016-11-10T20:32:27Z","updated_at":"2016-11-15T15:34:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"126b4c050ad280cbb2a399f3a79a5700c363d01d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458/comments","review_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/458/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/c84e08224a2a460fb9b863ba29edd03d83d5f64f","head":{"label":"ehsannas:data_rules","ref":"data_rules","sha":"c84e08224a2a460fb9b863ba29edd03d83d5f64f","user":{"login":"ehsannas","id":3828215,"avatar_url":"https://avatars.githubusercontent.com/u/3828215?v=3","gravatar_id":"","url":"https://api.github.com/users/ehsannas","html_url":"https://github.com/ehsannas","followers_url":"https://api.github.com/users/ehsannas/followers","following_url":"https://api.github.com/users/ehsannas/following{/other_user}","gists_url":"https://api.github.com/users/ehsannas/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsannas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsannas/subscriptions","organizations_url":"https://api.github.com/users/ehsannas/orgs","repos_url":"https://api.github.com/users/ehsannas/repos","events_url":"https://api.github.com/users/ehsannas/events{/privacy}","received_events_url":"https://api.github.com/users/ehsannas/received_events","type":"User","site_admin":false},"repo":{"id":72889860,"name":"SPIRV-Tools","full_name":"ehsannas/SPIRV-Tools","owner":{"login":"ehsannas","id":3828215,"avatar_url":"https://avatars.githubusercontent.com/u/3828215?v=3","gravatar_id":"","url":"https://api.github.com/users/ehsannas","html_url":"https://github.com/ehsannas","followers_url":"https://api.github.com/users/ehsannas/followers","following_url":"https://api.github.com/users/ehsannas/following{/other_user}","gists_url":"https://api.github.com/users/ehsannas/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsannas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsannas/subscriptions","organizations_url":"https://api.github.com/users/ehsannas/orgs","repos_url":"https://api.github.com/users/ehsannas/repos","events_url":"https://api.github.com/users/ehsannas/events{/privacy}","received_events_url":"https://api.github.com/users/ehsannas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ehsannas/SPIRV-Tools","description":null,"fork":true,"url":"https://api.github.com/repos/ehsannas/SPIRV-Tools","forks_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/ehsannas/SPIRV-Tools/deployments","created_at":"2016-11-04T22:27:17Z","updated_at":"2016-11-04T22:27:19Z","pushed_at":"2016-11-14T15:51:18Z","git_url":"git://github.com/ehsannas/SPIRV-Tools.git","ssh_url":"git@github.com:ehsannas/SPIRV-Tools.git","clone_url":"https://github.com/ehsannas/SPIRV-Tools.git","svn_url":"https://github.com/ehsannas/SPIRV-Tools","homepage":null,"size":2735,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KhronosGroup:master","ref":"master","sha":"38036a7203ca604c0f25b0dc33da169ac58e2900","user":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars.githubusercontent.com/u/1608701?v=3","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":45981801,"name":"SPIRV-Tools","full_name":"KhronosGroup/SPIRV-Tools","owner":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars.githubusercontent.com/u/1608701?v=3","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},"private":false,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools","description":null,"fork":false,"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools","forks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/deployments","created_at":"2015-11-11T12:56:25Z","updated_at":"2016-11-14T16:15:52Z","pushed_at":"2016-11-14T15:51:19Z","git_url":"git://github.com/KhronosGroup/SPIRV-Tools.git","ssh_url":"git@github.com:KhronosGroup/SPIRV-Tools.git","clone_url":"https://github.com/KhronosGroup/SPIRV-Tools.git","svn_url":"https://github.com/KhronosGroup/SPIRV-Tools","homepage":null,"size":3327,"stargazers_count":150,"watchers_count":150,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":25,"forks":44,"open_issues":25,"watchers":150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/458"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/458"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/458/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458/comments"},"review_comment":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/458/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/c84e08224a2a460fb9b863ba29edd03d83d5f64f"}}}}
{"actor":{"display_login":"dneto0"}}