{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments/71937560","id":71937560,"diff_hunk":"@@ -0,0 +1,147 @@\n+<!--\n+\n+/*\n+** Copyright (c) 2016 The Khronos Group Inc.\n+**\n+** Permission is hereby granted, free of charge, to any person obtaining a\n+** copy of this software and/or associated documentation files (the\n+** \"Materials\"), to deal in the Materials without restriction, including\n+** without limitation the rights to use, copy, modify, merge, publish,\n+** distribute, sublicense, and/or sell copies of the Materials, and to\n+** permit persons to whom the Materials are furnished to do so, subject to\n+** the following conditions:\n+**\n+** The above copyright notice and this permission notice shall be included\n+** in all copies or substantial portions of the Materials.\n+**\n+** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n+*/\n+\n+-->\n+\n+<!DOCTYPE html>\n+<html>\n+<head>\n+<meta charset=\"utf-8\">\n+<title>WebGL WEBGL_draw_buffers FRAMEBUFFER_UNSUPPORTED Test</title>\n+<link rel=\"stylesheet\" href=\"../../resources/js-test-style.css\"/>\n+<script src=\"../../js/js-test-pre.js\"></script>\n+<script src=\"../../js/webgl-test-utils.js\"></script>\n+</head>\n+<body>\n+<div id=\"description\"></div>\n+<div id=\"console\"></div>\n+<canvas id=\"canvas\" width=\"2\" height=\"2\"> </canvas>\n+\n+<script>\n+\"use strict\";\n+var wtu = WebGLTestUtils;\n+var gl;\n+var canvas = document.getElementById(\"canvas\");\n+var fb1 = null;\n+var fb2 = null;\n+\n+function checkFramebuffer(expected) {\n+    var actual = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n+    if (expected.indexOf(actual) < 0) {\n+        var msg = \"checkFramebufferStatus expects [\";\n+        for (var index = 0; index < expected.length; ++index) {\n+            msg += wtu.glEnumToString(gl, expected[index]);\n+            if (index + 1 < expected.length)\n+                msg += \", \";\n+        }\n+        msg += \"], was \" + wtu.glEnumToString(gl, actual);\n+        testFailed(msg);\n+    } else {\n+        var msg = \"checkFramebufferStatus got \" + wtu.glEnumToString(gl, actual) +\n+                  \" as expected\";\n+        testPassed(msg);\n+    }\n+}\n+\n+function testImageAttachedTwoPoints() {\n+    debug(\"\");\n+    debug(\"Checking an image is attached to more than one color attachment in a framebuffer.\");\n+\n+    var tex1 = gl.createTexture();\n+    var tex2 = gl.createTexture();\n+    gl.bindTexture(gl.TEXTURE_2D, tex1);\n+    gl.texImage2D(gl.TEXTURE_2D,\n+                  0,                                          // level\n+                  gl.RGBA,                                    // internalFormat\n+                  1,                                          // width\n+                  1,                                          // height\n+                  0,                                          // border\n+                  gl.RGBA,                                    // format\n+                  gl.UNSIGNED_BYTE,                           // type\n+                  new Uint8Array(4));                         // data\n+    gl.bindTexture(gl.TEXTURE_2D, tex2);\n+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));\n+    wtu.glErrorShouldBe(gl, gl.NO_ERROR, \"Texture creation should succeed.\");\n+\n+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb1);\n+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT0_WEBGL, gl.TEXTURE_2D, tex1, 0);\n+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);\n+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT1_WEBGL, gl.TEXTURE_2D, tex2, 0);\n+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);\n+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT2_WEBGL, gl.TEXTURE_2D, tex1, 0);\n+    checkFramebuffer([gl.FRAMEBUFFER_UNSUPPORTED]);\n+\n+    gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n+    gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);\n+    var texCube = gl.createTexture();\n+    gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCube);\n+    for (var target = gl.TEXTURE_CUBE_MAP_POSITIVE_X; target < gl.TEXTURE_CUBE_MAP_POSITIVE_X + 6; target++) {\n+        gl.texImage2D(target, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));\n+    }\n+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT0_WEBGL, gl.TEXTURE_CUBE_MAP_POSITIVE_X, texCube, 0);\n+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);\n+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT1_WEBGL, gl.TEXTURE_CUBE_MAP_POSITIVE_Y, texCube, 0);\n+    checkFramebuffer([gl.FRAMEBUFFER_COMPLETE]);\n+    gl.framebufferTexture2D(gl.FRAMEBUFFER, ext.COLOR_ATTACHMENT2_WEBGL, gl.TEXTURE_CUBE_MAP_POSITIVE_X, texCube, 0);\n+    checkFramebuffer([gl.FRAMEBUFFER_UNSUPPORTED]);\n+\n+    // Clean up\n+    gl.deleteTexture(tex1);\n+    gl.deleteTexture(tex2);\n+    gl.deleteTexture(texCube);\n+}\n+\n+description(\"This tests FRAMEBUFFER_UNSUPPORTED.\");\n+\n+shouldBeNonNull(\"gl = wtu.create3DContext(undefined, undefined, 1)\");\n+fb1 = gl.createFramebuffer();","path":"sdk/tests/conformance/extensions/webgl-draw-buffers-framebuffer-unsupported.html","position":119,"original_position":119,"commit_id":"7857d86089da5c6861ee759126090c6cb5fd51c5","original_commit_id":"7857d86089da5c6861ee759126090c6cb5fd51c5","user":{"login":"zhenyao","id":2073521,"avatar_url":"https://avatars.githubusercontent.com/u/2073521?v=3","gravatar_id":"","url":"https://api.github.com/users/zhenyao","html_url":"https://github.com/zhenyao","followers_url":"https://api.github.com/users/zhenyao/followers","following_url":"https://api.github.com/users/zhenyao/following{/other_user}","gists_url":"https://api.github.com/users/zhenyao/gists{/gist_id}","starred_url":"https://api.github.com/users/zhenyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhenyao/subscriptions","organizations_url":"https://api.github.com/users/zhenyao/orgs","repos_url":"https://api.github.com/users/zhenyao/repos","events_url":"https://api.github.com/users/zhenyao/events{/privacy}","received_events_url":"https://api.github.com/users/zhenyao/received_events","type":"User","site_admin":false},"body":"nit: this should move into else because you only delete in else. again, not a big deal.","created_at":"2016-07-22T20:05:44Z","updated_at":"2016-07-22T20:05:44Z","html_url":"https://github.com/KhronosGroup/WebGL/pull/1939#discussion_r71937560","pull_request_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments/71937560"},"html":{"href":"https://github.com/KhronosGroup/WebGL/pull/1939#discussion_r71937560"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939"}}},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939","id":78528364,"html_url":"https://github.com/KhronosGroup/WebGL/pull/1939","diff_url":"https://github.com/KhronosGroup/WebGL/pull/1939.diff","patch_url":"https://github.com/KhronosGroup/WebGL/pull/1939.patch","issue_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1939","number":1939,"state":"open","locked":false,"title":"Add framebuffer unsupported cases for WEBGL_draw_buffers","user":{"login":"qkmiao","id":1152109,"avatar_url":"https://avatars.githubusercontent.com/u/1152109?v=3","gravatar_id":"","url":"https://api.github.com/users/qkmiao","html_url":"https://github.com/qkmiao","followers_url":"https://api.github.com/users/qkmiao/followers","following_url":"https://api.github.com/users/qkmiao/following{/other_user}","gists_url":"https://api.github.com/users/qkmiao/gists{/gist_id}","starred_url":"https://api.github.com/users/qkmiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qkmiao/subscriptions","organizations_url":"https://api.github.com/users/qkmiao/orgs","repos_url":"https://api.github.com/users/qkmiao/repos","events_url":"https://api.github.com/users/qkmiao/events{/privacy}","received_events_url":"https://api.github.com/users/qkmiao/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-22T19:31:55Z","updated_at":"2016-07-22T20:05:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c971ffc5c7fb5ec1c141cfff26b010f0a021303","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939/comments","review_comment_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1939/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/WebGL/statuses/7857d86089da5c6861ee759126090c6cb5fd51c5","head":{"label":"qkmiao:fb-unsupported-extension","ref":"fb-unsupported-extension","sha":"7857d86089da5c6861ee759126090c6cb5fd51c5","user":{"login":"qkmiao","id":1152109,"avatar_url":"https://avatars.githubusercontent.com/u/1152109?v=3","gravatar_id":"","url":"https://api.github.com/users/qkmiao","html_url":"https://github.com/qkmiao","followers_url":"https://api.github.com/users/qkmiao/followers","following_url":"https://api.github.com/users/qkmiao/following{/other_user}","gists_url":"https://api.github.com/users/qkmiao/gists{/gist_id}","starred_url":"https://api.github.com/users/qkmiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qkmiao/subscriptions","organizations_url":"https://api.github.com/users/qkmiao/orgs","repos_url":"https://api.github.com/users/qkmiao/repos","events_url":"https://api.github.com/users/qkmiao/events{/privacy}","received_events_url":"https://api.github.com/users/qkmiao/received_events","type":"User","site_admin":false},"repo":{"id":35211224,"name":"WebGL","full_name":"qkmiao/WebGL","owner":{"login":"qkmiao","id":1152109,"avatar_url":"https://avatars.githubusercontent.com/u/1152109?v=3","gravatar_id":"","url":"https://api.github.com/users/qkmiao","html_url":"https://github.com/qkmiao","followers_url":"https://api.github.com/users/qkmiao/followers","following_url":"https://api.github.com/users/qkmiao/following{/other_user}","gists_url":"https://api.github.com/users/qkmiao/gists{/gist_id}","starred_url":"https://api.github.com/users/qkmiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qkmiao/subscriptions","organizations_url":"https://api.github.com/users/qkmiao/orgs","repos_url":"https://api.github.com/users/qkmiao/repos","events_url":"https://api.github.com/users/qkmiao/events{/privacy}","received_events_url":"https://api.github.com/users/qkmiao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/qkmiao/WebGL","description":"The Official Khronos WebGL Repository","fork":true,"url":"https://api.github.com/repos/qkmiao/WebGL","forks_url":"https://api.github.com/repos/qkmiao/WebGL/forks","keys_url":"https://api.github.com/repos/qkmiao/WebGL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qkmiao/WebGL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qkmiao/WebGL/teams","hooks_url":"https://api.github.com/repos/qkmiao/WebGL/hooks","issue_events_url":"https://api.github.com/repos/qkmiao/WebGL/issues/events{/number}","events_url":"https://api.github.com/repos/qkmiao/WebGL/events","assignees_url":"https://api.github.com/repos/qkmiao/WebGL/assignees{/user}","branches_url":"https://api.github.com/repos/qkmiao/WebGL/branches{/branch}","tags_url":"https://api.github.com/repos/qkmiao/WebGL/tags","blobs_url":"https://api.github.com/repos/qkmiao/WebGL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qkmiao/WebGL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qkmiao/WebGL/git/refs{/sha}","trees_url":"https://api.github.com/repos/qkmiao/WebGL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qkmiao/WebGL/statuses/{sha}","languages_url":"https://api.github.com/repos/qkmiao/WebGL/languages","stargazers_url":"https://api.github.com/repos/qkmiao/WebGL/stargazers","contributors_url":"https://api.github.com/repos/qkmiao/WebGL/contributors","subscribers_url":"https://api.github.com/repos/qkmiao/WebGL/subscribers","subscription_url":"https://api.github.com/repos/qkmiao/WebGL/subscription","commits_url":"https://api.github.com/repos/qkmiao/WebGL/commits{/sha}","git_commits_url":"https://api.github.com/repos/qkmiao/WebGL/git/commits{/sha}","comments_url":"https://api.github.com/repos/qkmiao/WebGL/comments{/number}","issue_comment_url":"https://api.github.com/repos/qkmiao/WebGL/issues/comments{/number}","contents_url":"https://api.github.com/repos/qkmiao/WebGL/contents/{+path}","compare_url":"https://api.github.com/repos/qkmiao/WebGL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qkmiao/WebGL/merges","archive_url":"https://api.github.com/repos/qkmiao/WebGL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qkmiao/WebGL/downloads","issues_url":"https://api.github.com/repos/qkmiao/WebGL/issues{/number}","pulls_url":"https://api.github.com/repos/qkmiao/WebGL/pulls{/number}","milestones_url":"https://api.github.com/repos/qkmiao/WebGL/milestones{/number}","notifications_url":"https://api.github.com/repos/qkmiao/WebGL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qkmiao/WebGL/labels{/name}","releases_url":"https://api.github.com/repos/qkmiao/WebGL/releases{/id}","deployments_url":"https://api.github.com/repos/qkmiao/WebGL/deployments","created_at":"2015-05-07T09:30:20Z","updated_at":"2015-05-07T09:30:39Z","pushed_at":"2016-07-22T19:31:45Z","git_url":"git://github.com/qkmiao/WebGL.git","ssh_url":"git@github.com:qkmiao/WebGL.git","clone_url":"https://github.com/qkmiao/WebGL.git","svn_url":"https://github.com/qkmiao/WebGL","homepage":null,"size":22470,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"66c549d40222d160bf8b905d2e3bf2214d38056d","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":5207280,"name":"WebGL","full_name":"KhronosGroup/WebGL","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/WebGL","description":"The Official Khronos WebGL Repository","fork":false,"url":"https://api.github.com/repos/KhronosGroup/WebGL","forks_url":"https://api.github.com/repos/KhronosGroup/WebGL/forks","keys_url":"https://api.github.com/repos/KhronosGroup/WebGL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KhronosGroup/WebGL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KhronosGroup/WebGL/teams","hooks_url":"https://api.github.com/repos/KhronosGroup/WebGL/hooks","issue_events_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/events{/number}","events_url":"https://api.github.com/repos/KhronosGroup/WebGL/events","assignees_url":"https://api.github.com/repos/KhronosGroup/WebGL/assignees{/user}","branches_url":"https://api.github.com/repos/KhronosGroup/WebGL/branches{/branch}","tags_url":"https://api.github.com/repos/KhronosGroup/WebGL/tags","blobs_url":"https://api.github.com/repos/KhronosGroup/WebGL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KhronosGroup/WebGL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KhronosGroup/WebGL/git/refs{/sha}","trees_url":"https://api.github.com/repos/KhronosGroup/WebGL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KhronosGroup/WebGL/statuses/{sha}","languages_url":"https://api.github.com/repos/KhronosGroup/WebGL/languages","stargazers_url":"https://api.github.com/repos/KhronosGroup/WebGL/stargazers","contributors_url":"https://api.github.com/repos/KhronosGroup/WebGL/contributors","subscribers_url":"https://api.github.com/repos/KhronosGroup/WebGL/subscribers","subscription_url":"https://api.github.com/repos/KhronosGroup/WebGL/subscription","commits_url":"https://api.github.com/repos/KhronosGroup/WebGL/commits{/sha}","git_commits_url":"https://api.github.com/repos/KhronosGroup/WebGL/git/commits{/sha}","comments_url":"https://api.github.com/repos/KhronosGroup/WebGL/comments{/number}","issue_comment_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/comments{/number}","contents_url":"https://api.github.com/repos/KhronosGroup/WebGL/contents/{+path}","compare_url":"https://api.github.com/repos/KhronosGroup/WebGL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KhronosGroup/WebGL/merges","archive_url":"https://api.github.com/repos/KhronosGroup/WebGL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KhronosGroup/WebGL/downloads","issues_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues{/number}","pulls_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls{/number}","milestones_url":"https://api.github.com/repos/KhronosGroup/WebGL/milestones{/number}","notifications_url":"https://api.github.com/repos/KhronosGroup/WebGL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KhronosGroup/WebGL/labels{/name}","releases_url":"https://api.github.com/repos/KhronosGroup/WebGL/releases{/id}","deployments_url":"https://api.github.com/repos/KhronosGroup/WebGL/deployments","created_at":"2012-07-27T17:21:51Z","updated_at":"2016-07-21T21:27:09Z","pushed_at":"2016-07-22T19:31:55Z","git_url":"git://github.com/KhronosGroup/WebGL.git","ssh_url":"git@github.com:KhronosGroup/WebGL.git","clone_url":"https://github.com/KhronosGroup/WebGL.git","svn_url":"https://github.com/KhronosGroup/WebGL","homepage":null,"size":29415,"stargazers_count":643,"watchers_count":643,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":318,"mirror_url":null,"open_issues_count":72,"forks":318,"open_issues":72,"watchers":643,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939"},"html":{"href":"https://github.com/KhronosGroup/WebGL/pull/1939"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1939"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1939/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939/comments"},"review_comment":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1939/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/statuses/7857d86089da5c6861ee759126090c6cb5fd51c5"}}}}
{"actor":{"display_login":"zhenyao"}}