{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments/76885373","id":76885373,"diff_hunk":"@@ -0,0 +1,187 @@\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 CopyTexSubImage Tests</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+<script src=\"../../../js/glsl-conformance-test.js\"></script>\n+</head>\n+<body>\n+<div id=\"description\"></div>\n+<canvas id=\"canvas\" width=\"64px\" height=\"32px\"> </canvas>\n+<div id=\"console\"></div>\n+<script id=\"vshader\" type=\"x-shader/x-vertex\">#version 300 es\n+in highp vec4 a_position;\n+in highp vec2 a_coord;\n+out highp vec2 v_coord;\n+void main(void) {\n+    gl_Position = a_position;\n+    v_coord = a_coord;\n+}\n+</script>\n+<script id=\"fshader_luminance_alpha\" type=\"x-shader/x-fragment\">#version 300 es\n+in highp vec2 v_coord;\n+uniform highp sampler3D u_sampler0;\n+out highp vec4 o_color0;\n+void main (void) {\n+    o_color0 = vec4(texture(u_sampler0,vec3(v_coord, 0)));\n+}\n+</script>\n+<script>\n+\"use strict\";\n+description(\"This test verifies the behavior of copTexSubImage3D with luminance textures.\");\n+debug(\"\");\n+\n+var wtu = WebGLTestUtils;\n+var canvas = document.getElementById(\"canvas\");\n+var gl = wtu.create3DContext(canvas, null, 2);\n+\n+function copytexsubimage3D_luma_format() {\n+\n+    var testGroup = [\n+        {\n+            name: '3d_alpha',\n+            format: gl.ALPHA,\n+            width: 64,\n+            height: 32,\n+            depth: 2\n+        },\n+        {\n+            name: '3d_luminance',\n+            format: gl.LUMINANCE,\n+            width: 64,\n+            height: 32,\n+            depth: 2\n+        },\n+        {\n+            name: '3d_luminance_alpha',\n+            format: gl.LUMINANCE_ALPHA,\n+            width: 64,\n+            height: 32,\n+            depth: 2\n+        }\n+    ];\n+\n+    testGroup.forEach(function(testcase) {\n+        debug(\"\");\n+        debug(\"Testing copytexsubimage3d_luma_format_\" + testcase.name);\n+\n+        var texture = [];\n+        texture[0] = gl.createTexture();\n+        texture[1] = gl.createTexture();\n+        var layer = 0;\n+        var width = testcase.width;\n+        var height = testcase.height;\n+        var depth = testcase.depth;\n+        var msg;\n+        var uint1 = new Uint8Array(width * height * 4);\n+        for (var i = 0; i < uint1.length - 1; ++i) {\n+            uint1[i + 1] = (uint1[i] + 10) % 255;\n+        }\n+\n+        gl.bindTexture(gl.TEXTURE_2D, texture[0]);\n+        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA8, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, uint1);\n+        var fbo = gl.createFramebuffer();\n+        gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n+        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture[0], 0);\n+\n+        if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) {\n+            gl.bindTexture(gl.TEXTURE_3D, texture[1]);\n+            setUpTexStatus();\n+            gl.texImage3D(gl.TEXTURE_3D, 0, testcase.format, width, height, depth, 0, testcase.format, gl.UNSIGNED_BYTE, null);\n+            gl.copyTexSubImage3D(gl.TEXTURE_3D, 0, 0, 0, layer, 0, 0,width, height);\n+            gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n+\n+            var program = wtu.setupProgram(gl, [\"vshader\", \"fshader_luminance_alpha\"]);\n+            wtu.setupUnitQuad(gl, 0, 1);\n+            wtu.drawUnitQuad(gl);\n+\n+            for (var y = 0; y < height; ++y) {\n+                for (var x = 0; x < width; ++x) {\n+                    var cur = y * width * 4 + x * 4;\n+                    if (testcase.format == gl.ALPHA) {\n+                        wtu.checkCanvasRect(gl, x, y, 1, 1, [ 0, 0,\n+                        0, uint1[cur + 3]], msg, [1, 1, 1, 1]);","path":"sdk/tests/conformance2/textures/misc/copy-texture-image-luma-format.html","position":133,"original_position":133,"commit_id":"a11206ddf49a24bbe5af1ae14bc757f19e0d4068","original_commit_id":"a11206ddf49a24bbe5af1ae14bc757f19e0d4068","user":{"login":"kenrussell","id":1149904,"avatar_url":"https://avatars.githubusercontent.com/u/1149904?v=3","gravatar_id":"","url":"https://api.github.com/users/kenrussell","html_url":"https://github.com/kenrussell","followers_url":"https://api.github.com/users/kenrussell/followers","following_url":"https://api.github.com/users/kenrussell/following{/other_user}","gists_url":"https://api.github.com/users/kenrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/kenrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenrussell/subscriptions","organizations_url":"https://api.github.com/users/kenrussell/orgs","repos_url":"https://api.github.com/users/kenrussell/repos","events_url":"https://api.github.com/users/kenrussell/events{/privacy}","received_events_url":"https://api.github.com/users/kenrussell/received_events","type":"User","site_admin":false},"body":"The formatting is weird here and below. Please look into re-indenting this later. You can align to the open parenthesis \"(\" or at least use four space indent.","created_at":"2016-08-30T21:44:26Z","updated_at":"2016-08-30T21:44:26Z","html_url":"https://github.com/KhronosGroup/WebGL/pull/1976#discussion_r76885373","pull_request_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments/76885373"},"html":{"href":"https://github.com/KhronosGroup/WebGL/pull/1976#discussion_r76885373"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976"}}},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976","id":82154987,"html_url":"https://github.com/KhronosGroup/WebGL/pull/1976","diff_url":"https://github.com/KhronosGroup/WebGL/pull/1976.diff","patch_url":"https://github.com/KhronosGroup/WebGL/pull/1976.patch","issue_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1976","number":1976,"state":"open","locked":false,"title":"Add testcase to test luminance alpha format for copytexsubimage3d.","user":{"login":"JiangYizhou","id":18566891,"avatar_url":"https://avatars.githubusercontent.com/u/18566891?v=3","gravatar_id":"","url":"https://api.github.com/users/JiangYizhou","html_url":"https://github.com/JiangYizhou","followers_url":"https://api.github.com/users/JiangYizhou/followers","following_url":"https://api.github.com/users/JiangYizhou/following{/other_user}","gists_url":"https://api.github.com/users/JiangYizhou/gists{/gist_id}","starred_url":"https://api.github.com/users/JiangYizhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiangYizhou/subscriptions","organizations_url":"https://api.github.com/users/JiangYizhou/orgs","repos_url":"https://api.github.com/users/JiangYizhou/repos","events_url":"https://api.github.com/users/JiangYizhou/events{/privacy}","received_events_url":"https://api.github.com/users/JiangYizhou/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-22T08:58:01Z","updated_at":"2016-08-30T21:44:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0809d2d4ea7ee209b5cdf2f36a5db0dec6274a5f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976/comments","review_comment_url":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1976/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/WebGL/statuses/a11206ddf49a24bbe5af1ae14bc757f19e0d4068","head":{"label":"JiangYizhou:luminance","ref":"luminance","sha":"a11206ddf49a24bbe5af1ae14bc757f19e0d4068","user":{"login":"JiangYizhou","id":18566891,"avatar_url":"https://avatars.githubusercontent.com/u/18566891?v=3","gravatar_id":"","url":"https://api.github.com/users/JiangYizhou","html_url":"https://github.com/JiangYizhou","followers_url":"https://api.github.com/users/JiangYizhou/followers","following_url":"https://api.github.com/users/JiangYizhou/following{/other_user}","gists_url":"https://api.github.com/users/JiangYizhou/gists{/gist_id}","starred_url":"https://api.github.com/users/JiangYizhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiangYizhou/subscriptions","organizations_url":"https://api.github.com/users/JiangYizhou/orgs","repos_url":"https://api.github.com/users/JiangYizhou/repos","events_url":"https://api.github.com/users/JiangYizhou/events{/privacy}","received_events_url":"https://api.github.com/users/JiangYizhou/received_events","type":"User","site_admin":false},"repo":{"id":56656792,"name":"WebGL","full_name":"JiangYizhou/WebGL","owner":{"login":"JiangYizhou","id":18566891,"avatar_url":"https://avatars.githubusercontent.com/u/18566891?v=3","gravatar_id":"","url":"https://api.github.com/users/JiangYizhou","html_url":"https://github.com/JiangYizhou","followers_url":"https://api.github.com/users/JiangYizhou/followers","following_url":"https://api.github.com/users/JiangYizhou/following{/other_user}","gists_url":"https://api.github.com/users/JiangYizhou/gists{/gist_id}","starred_url":"https://api.github.com/users/JiangYizhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiangYizhou/subscriptions","organizations_url":"https://api.github.com/users/JiangYizhou/orgs","repos_url":"https://api.github.com/users/JiangYizhou/repos","events_url":"https://api.github.com/users/JiangYizhou/events{/privacy}","received_events_url":"https://api.github.com/users/JiangYizhou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JiangYizhou/WebGL","description":"The Official Khronos WebGL Repository","fork":true,"url":"https://api.github.com/repos/JiangYizhou/WebGL","forks_url":"https://api.github.com/repos/JiangYizhou/WebGL/forks","keys_url":"https://api.github.com/repos/JiangYizhou/WebGL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JiangYizhou/WebGL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JiangYizhou/WebGL/teams","hooks_url":"https://api.github.com/repos/JiangYizhou/WebGL/hooks","issue_events_url":"https://api.github.com/repos/JiangYizhou/WebGL/issues/events{/number}","events_url":"https://api.github.com/repos/JiangYizhou/WebGL/events","assignees_url":"https://api.github.com/repos/JiangYizhou/WebGL/assignees{/user}","branches_url":"https://api.github.com/repos/JiangYizhou/WebGL/branches{/branch}","tags_url":"https://api.github.com/repos/JiangYizhou/WebGL/tags","blobs_url":"https://api.github.com/repos/JiangYizhou/WebGL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JiangYizhou/WebGL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JiangYizhou/WebGL/git/refs{/sha}","trees_url":"https://api.github.com/repos/JiangYizhou/WebGL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JiangYizhou/WebGL/statuses/{sha}","languages_url":"https://api.github.com/repos/JiangYizhou/WebGL/languages","stargazers_url":"https://api.github.com/repos/JiangYizhou/WebGL/stargazers","contributors_url":"https://api.github.com/repos/JiangYizhou/WebGL/contributors","subscribers_url":"https://api.github.com/repos/JiangYizhou/WebGL/subscribers","subscription_url":"https://api.github.com/repos/JiangYizhou/WebGL/subscription","commits_url":"https://api.github.com/repos/JiangYizhou/WebGL/commits{/sha}","git_commits_url":"https://api.github.com/repos/JiangYizhou/WebGL/git/commits{/sha}","comments_url":"https://api.github.com/repos/JiangYizhou/WebGL/comments{/number}","issue_comment_url":"https://api.github.com/repos/JiangYizhou/WebGL/issues/comments{/number}","contents_url":"https://api.github.com/repos/JiangYizhou/WebGL/contents/{+path}","compare_url":"https://api.github.com/repos/JiangYizhou/WebGL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JiangYizhou/WebGL/merges","archive_url":"https://api.github.com/repos/JiangYizhou/WebGL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JiangYizhou/WebGL/downloads","issues_url":"https://api.github.com/repos/JiangYizhou/WebGL/issues{/number}","pulls_url":"https://api.github.com/repos/JiangYizhou/WebGL/pulls{/number}","milestones_url":"https://api.github.com/repos/JiangYizhou/WebGL/milestones{/number}","notifications_url":"https://api.github.com/repos/JiangYizhou/WebGL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JiangYizhou/WebGL/labels{/name}","releases_url":"https://api.github.com/repos/JiangYizhou/WebGL/releases{/id}","deployments_url":"https://api.github.com/repos/JiangYizhou/WebGL/deployments","created_at":"2016-04-20T05:03:44Z","updated_at":"2016-04-20T05:04:05Z","pushed_at":"2016-08-30T07:08:58Z","git_url":"git://github.com/JiangYizhou/WebGL.git","ssh_url":"git@github.com:JiangYizhou/WebGL.git","clone_url":"https://github.com/JiangYizhou/WebGL.git","svn_url":"https://github.com/JiangYizhou/WebGL","homepage":null,"size":22633,"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":"fe8718efd9179f823949e19a55460823c4775dad","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-08-30T14:55:45Z","pushed_at":"2016-08-30T17:57:38Z","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":29626,"stargazers_count":663,"watchers_count":663,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":324,"mirror_url":null,"open_issues_count":78,"forks":324,"open_issues":78,"watchers":663,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976"},"html":{"href":"https://github.com/KhronosGroup/WebGL/pull/1976"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1976"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1976/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976/comments"},"review_comment":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/pulls/1976/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/WebGL/statuses/a11206ddf49a24bbe5af1ae14bc757f19e0d4068"}}}}
{"actor":{"display_login":"kenrussell"}}