Diff
Modified: trunk/LayoutTests/ChangeLog (142855 => 142856)
--- trunk/LayoutTests/ChangeLog 2013-02-14 07:51:43 UTC (rev 142855)
+++ trunk/LayoutTests/ChangeLog 2013-02-14 08:01:16 UTC (rev 142856)
@@ -1,3 +1,25 @@
+2013-02-06 Gregg Tavares <g...@chromium.org>
+
+ Adds the WebGL Conformance Tests limits folder.
+ https://bugs.webkit.org/show_bug.cgi?id=108904
+
+ Reviewed by Kenneth Russell.
+
+ * platform/mac/TestExpectations:
+ * webgl/conformance/limits/gl-max-texture-dimensions-expected.txt: Added.
+ * webgl/conformance/limits/gl-max-texture-dimensions.html: Added.
+ * webgl/conformance/limits/gl-min-attribs-expected.txt: Added.
+ * webgl/conformance/limits/gl-min-attribs.html: Added.
+ * webgl/conformance/limits/gl-min-textures-expected.txt: Added.
+ * webgl/conformance/limits/gl-min-textures.html: Added.
+ * webgl/conformance/limits/gl-min-uniforms-expected.txt: Added.
+ * webgl/conformance/limits/gl-min-uniforms.html: Added.
+ * webgl/resources/webgl_test_files/conformance/limits/00_test_list.txt: Added.
+ * webgl/resources/webgl_test_files/conformance/limits/gl-max-texture-dimensions.html: Added.
+ * webgl/resources/webgl_test_files/conformance/limits/gl-min-attribs.html: Added.
+ * webgl/resources/webgl_test_files/conformance/limits/gl-min-textures.html: Added.
+ * webgl/resources/webgl_test_files/conformance/limits/gl-min-uniforms.html: Added.
+
2013-02-13 Hayato Ito <hay...@chromium.org>
[Shadow DOM] Implements a '::distributed()' pseudo element.
Modified: trunk/LayoutTests/platform/mac/TestExpectations (142855 => 142856)
--- trunk/LayoutTests/platform/mac/TestExpectations 2013-02-14 07:51:43 UTC (rev 142855)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2013-02-14 08:01:16 UTC (rev 142856)
@@ -990,6 +990,7 @@
webgl/conformance/glsl/misc/shader-with-short-circuiting-operators.html [ Skip ]
webgl/conformance/glsl/variables/gl-pointcoord.html [ Skip ]
webgl/conformance/glsl/misc/shaders-with-varyings.html [ Skip ]
+webgl/conformance/limits/gl-max-texture-dimensions.html [ Skip ]
webgl/conformance/more/conformance/quickCheckAPI-A.html [ Skip ]
webgl/conformance/more/conformance/quickCheckAPI-B1.html [ Skip ]
webgl/conformance/more/conformance/quickCheckAPI-B2.html [ Skip ]
Added: trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions-expected.txt (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions-expected.txt (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions-expected.txt 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../resources/webgl_test_files/conformance/limits/gl-max-texture-dimensions.html
+PASS
+
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions.html (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions.html (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for gl-max-texture-dimensions.html</title>
+<script type="text/_javascript_" src=""
+<script type="text/_javascript_" src=""
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href=""
+<div id="result"></div>
+<div id="iframe">
+<iframe src="" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-max-texture-dimensions.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs-expected.txt (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs-expected.txt (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs-expected.txt 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../resources/webgl_test_files/conformance/limits/gl-min-attribs.html
+PASS
+
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs.html (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs.html (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for gl-min-attribs.html</title>
+<script type="text/_javascript_" src=""
+<script type="text/_javascript_" src=""
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href=""
+<div id="result"></div>
+<div id="iframe">
+<iframe src="" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-min-attribs.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/conformance/limits/gl-min-textures-expected.txt (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-min-textures-expected.txt (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-min-textures-expected.txt 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../resources/webgl_test_files/conformance/limits/gl-min-textures.html
+PASS
+
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-min-textures-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/conformance/limits/gl-min-textures.html (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-min-textures.html (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-min-textures.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for gl-min-textures.html</title>
+<script type="text/_javascript_" src=""
+<script type="text/_javascript_" src=""
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href=""
+<div id="result"></div>
+<div id="iframe">
+<iframe src="" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-min-textures.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms-expected.txt (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms-expected.txt (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms-expected.txt 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../resources/webgl_test_files/conformance/limits/gl-min-uniforms.html
+PASS
+
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms.html (0 => 142856)
--- trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms.html (rev 0)
+++ trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for gl-min-uniforms.html</title>
+<script type="text/_javascript_" src=""
+<script type="text/_javascript_" src=""
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href=""
+<div id="result"></div>
+<div id="iframe">
+<iframe src="" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/webgl/conformance/limits/gl-min-uniforms.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/00_test_list.txt (0 => 142856)
--- trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/00_test_list.txt (rev 0)
+++ trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/00_test_list.txt 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,5 @@
+gl-min-attribs.html
+gl-max-texture-dimensions.html
+gl-min-textures.html
+gl-min-uniforms.html
+
Property changes on: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/00_test_list.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-max-texture-dimensions.html (0 => 142856)
--- trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-max-texture-dimensions.html (rev 0)
+++ trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-max-texture-dimensions.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,120 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the max advertized texture size is supported.</title>
+<link rel="stylesheet" href=""
+<script src=""
+<script src="" </script>
+<script src="" </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = vPosition;
+ texCoord = texCoord0;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform samplerCube tex;
+varying vec2 texCoord;
+void main()
+{
+ gl_FragColor = textureCube(tex, normalize(vec3(texCoord, 1)));
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+// Note: It seems like a reasonable assuption that a 1xN texture size should
+// work. Even 1 by 128k is only 512k
+var maxSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
+debug("advertised max size: " + maxSize);
+var testSize = Math.min(maxSize, 128 * 1024);
+var pixels = new Uint8Array(testSize * 4);
+for (var ii = 0; ii < testSize; ++ii) {
+ var off = ii * 4;
+ pixels[off + 0] = 0;
+ pixels[off + 1] = 255;
+ pixels[off + 2] = 128;
+ pixels[off + 3] = 255;
+}
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+
+debug("test " + testSize + "x1");
+gl.texImage2D(
+ gl.TEXTURE_2D, 0, gl.RGBA, testSize, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ pixels);
+gl.generateMipmap(gl.TEXTURE_2D);
+
+wtu.drawQuad(gl);
+wtu.checkCanvas(gl, [0, 255, 128, 255],
+ "Should be 0, 255, 128, 255");
+debug("test 1x" + testSize);
+gl.texImage2D(
+ gl.TEXTURE_2D, 0, gl.RGBA, 1, testSize, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ pixels);
+gl.generateMipmap(gl.TEXTURE_2D);
+
+wtu.drawQuad(gl);
+wtu.checkCanvas(gl, [0, 255, 128, 255],
+ "Should be 0, 255, 128, 255");
+
+var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition', 'texCoord0'], [0, 1]);
+
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+
+// NOTE: We can't easily test cube maps because they require width == height
+// and we might not have enough memory for maxSize by maxSize texture.
+
+var successfullyParsed = true;
+
+</script>
+<script src=""
+
+</body>
+</html>
+
+
Property changes on: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-max-texture-dimensions.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-attribs.html (0 => 142856)
--- trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-attribs.html (rev 0)
+++ trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-attribs.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,108 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the minimum number of attributes are supported.</title>
+<link rel="stylesheet" href=""
+<script src=""
+<script src="" </script>
+<script src="" </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec4 v0;
+attribute vec4 v1;
+attribute vec4 v2;
+attribute vec4 v3;
+attribute vec4 v4;
+attribute vec4 v5;
+attribute vec4 v6;
+varying vec4 color;
+void main()
+{
+ gl_Position = vPosition;
+ color = v0 + v1 + v2 + v3 + v4 + v5 + v6;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+var program = wtu.setupProgram(
+ gl,
+ ['vshader', 'fshader'],
+ ['vPosition', 'v0', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6'],
+ [0, 1, 2, 3, 4, 5, 6, 7]);
+
+for (var ii = 0; ii < 7; ++ii) {
+ var v = (ii + 1) / 28;
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(ii + 1);
+ gl.vertexAttribPointer(ii + 1, 4, gl.FLOAT, false, 0, 0);
+}
+
+wtu.drawQuad(gl);
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [255, 127, 64, 32], "Should render 255,127,64,32 (+/-1)", 1);
+
+var successfullyParsed = true;
+
+</script>
+</body>
+<script src=""
+
+</body>
+</html>
+
+
Property changes on: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-attribs.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-textures.html (0 => 142856)
--- trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-textures.html (rev 0)
+++ trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-textures.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,95 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the minimum number of uniforms are supported.</title>
+<link rel="stylesheet" href=""
+<script src=""
+<script src="" </script>
+<script src="" </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+#define NUM_TEXTURES 8 // See spec
+precision mediump float;
+uniform sampler2D uni[NUM_TEXTURES];
+void main()
+{
+ vec4 c = vec4(0,0,0,0);
+ for (int ii = 0; ii < NUM_TEXTURES; ++ii) {
+ c += texture2D(uni[ii], vec2(0.5, 0.5));
+ }
+ gl_FragColor = c;
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+//------------------------------------------------------------------------------
+var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition'], [0]);
+
+for (var ii = 0; ii < 8; ++ii) {
+ var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ var tex = gl.createTexture();
+ wtu.fillTexture(gl, tex, 1, 1, [32, 16, 8, ii * 9], 0);
+ gl.uniform1i(loc, ii);
+}
+
+wtu.drawQuad(gl);
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvas(gl, [255, 128, 64, 252],
+ "Should render using all texture units", 1);
+
+var successfullyParsed = true;
+
+</script>
+<script src=""
+
+</body>
+</html>
+
+
Property changes on: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-textures.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style
Added: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-uniforms.html (0 => 142856)
--- trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-uniforms.html (rev 0)
+++ trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-uniforms.html 2013-02-14 08:01:16 UTC (rev 142856)
@@ -0,0 +1,127 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the minimum number of uniforms are supported.</title>
+<link rel="stylesheet" href=""
+<script src=""
+<script src="" </script>
+<script src="" </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+#define NUM_UNIFORMS 128 // See spec
+attribute vec4 vPosition;
+uniform vec4 uni[NUM_UNIFORMS];
+varying vec4 color;
+void main()
+{
+ gl_Position = vPosition;
+ vec4 c = vec4(0,0,0,0);
+ for (int ii = 0; ii < NUM_UNIFORMS; ++ii) {
+ c += uni[ii];
+ }
+ color = c;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script id="vshader2" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader2" type="x-shader/x-fragment">
+precision mediump float;
+#define NUM_UNIFORMS 16 // See spec
+uniform vec4 uni[NUM_UNIFORMS];
+void main()
+{
+ vec4 c = vec4(0,0,0,0);
+ for (int ii = 0; ii < NUM_UNIFORMS; ++ii) {
+ c += uni[ii];
+ }
+ gl_FragColor = vec4(c.r, c.g, c.b, c.a / 120.0);
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+//------------------------------------------------------------------------------
+var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['vPosition'], [0]);
+
+for (var ii = 0; ii < 128; ++ii) {
+ var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
+ gl.uniform4f(loc, 2/256, 2/512, 2/1024, ii/8128);
+}
+
+wtu.drawQuad(gl);
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [255, 127, 64, 255], "Should render 255,127,64,32 (+/-1)", 1);
+
+//------------------------------------------------------------------------------
+var program = wtu.setupProgram(gl, ['vshader2', 'fshader2'], ['vPosition'], [0]);
+
+for (var ii = 0; ii < 16; ++ii) {
+ var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
+ gl.uniform4f(loc, 16/2048, 16/1024, 16/512, ii);
+}
+
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.drawQuad(gl);
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [32, 64, 127, 255], "Should render 32,64,127,255 (+/-1)", 1);
+
+var successfullyParsed = true;
+
+</script>
+<script src=""
+
+</body>
+</html>
+
+
Property changes on: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/limits/gl-min-uniforms.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:eol-style