<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[161978] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161978">161978</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-01-14 09:53:14 -0800 (Tue, 14 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Source/WebCore: [WebGL] Invalid range checking in WebGLRenderingContext::validateTexFuncLevel
https://bugs.webkit.org/show_bug.cgi?id=126925
Reviewed by Dean Jackson.
Added fast/canvas/webgl/webgl-compressed-texture-size-limit.html.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateTexFuncLevel): Avoid off-by-one error
LayoutTests: [WebGL] Invalid range checking in WebGLRenderContext::validateTexFunctionLevel
https://bugs.webkit.org/show_bug.cgi?id=126925
Reviewed by Dean Jackson.
* fast/canvas/webgl/resources/webgl-test-utils.js:
(WebGLTestUtils): Add missing 'waitForComposite' implementatino.
* fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt: Added.
* fast/canvas/webgl/webgl-compressed-texture-size-limit.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglresourceswebgltestutilsjs">trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebglcompressedtexturesizelimitexpectedtxt">trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvaswebglwebglcompressedtexturesizelimithtml">trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (161977 => 161978)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-01-14 17:41:15 UTC (rev 161977)
+++ trunk/LayoutTests/ChangeLog        2014-01-14 17:53:14 UTC (rev 161978)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-01-14 Brent Fulgham <bfulgham@apple.com>
+
+ [WebGL] Invalid range checking in WebGLRenderContext::validateTexFunctionLevel
+ https://bugs.webkit.org/show_bug.cgi?id=126925
+
+ Reviewed by Dean Jackson.
+
+ * fast/canvas/webgl/resources/webgl-test-utils.js:
+ (WebGLTestUtils): Add missing 'waitForComposite' implementatino.
+ * fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt: Added.
+ * fast/canvas/webgl/webgl-compressed-texture-size-limit.html: Added.
+
</ins><span class="cx"> 2014-01-14 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed Mac TestExpectations update.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglresourceswebgltestutilsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js (161977 => 161978)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js        2014-01-14 17:41:15 UTC (rev 161977)
+++ trunk/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js        2014-01-14 17:53:14 UTC (rev 161978)
</span><span class="lines">@@ -1312,6 +1312,23 @@
</span><span class="cx"> countDown();
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+/**
+ * Waits for the browser to composite the canvas associated with
+ * the WebGL context passed in.
+ */
+var waitForComposite = function(gl, callback) {
+ var frames = 5;
+ var countDown = function() {
+ if (frames == 0) {
+ callback();
+ } else {
+ --frames;
+ requestAnimFrame(countDown);
+ }
+ };
+ countDown();
+};
+
</ins><span class="cx"> return {
</span><span class="cx"> cancelAnimFrame: cancelAnimFrame,
</span><span class="cx"> create3DContext: create3DContext,
</span><span class="lines">@@ -1364,6 +1381,7 @@
</span><span class="cx"> readFileList: readFileList,
</span><span class="cx"> requestAnimFrame: requestAnimFrame,
</span><span class="cx"> waitFrames: waitFrames,
</span><ins>+ waitForComposite: waitForComposite,
</ins><span class="cx">
</span><span class="cx"> none: false
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebglcompressedtexturesizelimitexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt (0 => 161978)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt        2014-01-14 17:53:14 UTC (rev 161978)
</span><span class="lines">@@ -0,0 +1,500 @@
</span><ins>+Checks size limit of the webgl compressed textures
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+max size for TEXTURE_2D: 8192
+
+num levels: 14, levels used in positive test: 14
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_2D
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 8192x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 4096x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 2048x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 1024x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 512x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 256x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 128x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 64x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 32x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 16x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 8x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 4x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 12, size is 2x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 13, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+num levels: 14, levels used in positive test: 14
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_2D
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 8192x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 4096x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 2048x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 1024x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 512x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 256x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 128x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 64x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 32x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 16x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 8x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 4x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 12, size is 2x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 13, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+num levels: 14, levels used in positive test: 14
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_2D
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 8192x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 4096x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 2048x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 1024x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 512x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 256x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 128x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 64x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 32x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 16x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 8x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 4x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 12, size is 2x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 13, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+num levels: 14, levels used in positive test: 14
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_2D
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 8192x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 4096x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 2048x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 1024x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 512x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 256x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 128x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 64x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 32x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 16x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 8x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 4x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 12, size is 2x1
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 13, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+max size for TEXTURE_CUBE_MAP: 8192
+
+num levels: 14, levels used in positive test: 12
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_CUBE_MAP_POSITIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+num levels: 14, levels used in positive test: 12
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_CUBE_MAP_POSITIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+num levels: 14, levels used in positive test: 12
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_CUBE_MAP_POSITIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+num levels: 14, levels used in positive test: 12
+
+PASS Successfully enabled WEBGL_compressed_texture_s3tc extension
+
+TEXTURE_CUBE_MAP_POSITIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_X
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Y
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_POSITIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+
+TEXTURE_CUBE_MAP_NEGATIVE_Z
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 0, size is 2048x2048
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 1, size is 1024x1024
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 2, size is 512x512
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 3, size is 256x256
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 4, size is 128x128
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 5, size is 64x64
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 6, size is 32x32
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 7, size is 16x16
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 8, size is 8x8
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 9, size is 4x4
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 10, size is 2x2
+PASS getError was expected value: NO_ERROR : uploading compressed texture should generate NO_ERROR.level is 11, size is 1x1
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : width or height out of bounds: should generate INVALID_VALUE. level is 0, size is 8196x8196
+FAIL getError expected: INVALID_VALUE. Was NO_ERROR : level out of bounds: should generate INVALID_VALUE. level is 14, size is 256x256
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcanvaswebglwebglcompressedtexturesizelimithtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit.html (0 => 161978)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit.html         (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl-compressed-texture-size-limit.html        2014-01-14 17:53:14 UTC (rev 161978)
</span><span class="lines">@@ -0,0 +1,259 @@
</span><ins>+
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+** Copyright (c) 2013 Apple 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.
+*/
+
+-->
+
+<html>
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="resources/webgl-test.js"></script>
+<script src="resources/webgl-test-utils.js"></script>
+</head>
+<script>
+function init()
+{
+"use strict";
+description("Checks size limit of the webgl compressed textures")
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+if (window.internals)
+ window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
+
+var canvas;
+
+function numLevelsFromSize(size) {
+ var levels = 0;
+ while ((size >> levels) > 0) {
+ ++levels;
+ }
+ return levels;
+}
+
+// More formats can be added here when more texture compression extensions are enabled in WebGL.
+var validFormats = {
+ COMPRESSED_RGB_S3TC_DXT1_EXT : 0x83F0,
+ COMPRESSED_RGBA_S3TC_DXT1_EXT : 0x83F1,
+ COMPRESSED_RGBA_S3TC_DXT3_EXT : 0x83F2,
+ COMPRESSED_RGBA_S3TC_DXT5_EXT : 0x83F3,
+};
+
+// format specific restrictions for COMPRESSED_RGB_S3TC_DXT1_EXT and COMPRESSED_RGBA_S3TC_DXT1_EXT
+// on the byteLength of the ArrayBufferView, pixels
+function func1 (width, height)
+{
+ return Math.floor((width + 3) / 4) * Math.floor((height + 3) / 4) * 8;
+}
+
+// format specific restrictions for COMPRESSED_RGBA_S3TC_DXT3_EXT and COMPRESSED_RGBA_S3TC_DXT5_EXT
+// on the byteLength of the ArrayBufferView, pixels
+function func2 (width, height)
+{
+ return Math.floor((width + 3) / 4) * Math.floor((height + 3) / 4) * 16;
+}
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var tests = [
+ // More tests can be added here when more texture compression extensions are enabled in WebGL.
+ // Level 0 image width and height must be a multiple of the sizeStep.
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGB_S3TC_DXT1_EXT, dataType: Uint8Array, func: func1, sizeStep: 4},
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGBA_S3TC_DXT1_EXT, dataType: Uint8Array, func: func1, sizeStep: 4},
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGBA_S3TC_DXT3_EXT, dataType: Uint8Array, func: func2, sizeStep: 4},
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGBA_S3TC_DXT5_EXT, dataType: Uint8Array, func: func2, sizeStep: 4},
+];
+
+// Note: We expressly only use 2 textures because first a texture will be defined
+// using all mip levels of 1 format, then for a moment it will have mixed formats which
+// may uncover bugs.
+var targets = [
+ { target: gl.TEXTURE_2D,
+ maxSize: Math.min(8192, gl.getParameter(gl.MAX_TEXTURE_SIZE)), // Clamp size to avoid hardware test differences
+ tex: gl.createTexture(),
+ targets: [gl.TEXTURE_2D]
+ },
+ { target: gl.TEXTURE_CUBE_MAP,
+ maxSize: Math.min(8192, gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE)), // Clamp size to avoid hardware test differences
+ tex: gl.createTexture(),
+ targets: [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ]
+ }
+];
+
+function getSharedArrayBufferSize() {
+ var sharedArrayBufferSize = 0;
+ for (var tt = 0; tt < tests.length; ++tt) {
+ var test = tests[tt];
+ for (var trg = 0; trg < targets.length; ++trg) {
+ var t = targets[trg];
+ var bufferSizeNeeded;
+ if (t.target === gl.TEXTURE_CUBE_MAP) {
+ var positiveTestSize = Math.min(2048, t.maxSize);
+ bufferSizeNeeded = test.func(positiveTestSize, positiveTestSize);
+ } else {
+ bufferSizeNeeded = test.func(t.maxSize, test.sizeStep);
+ }
+ if (bufferSizeNeeded > sharedArrayBufferSize) {
+ sharedArrayBufferSize = bufferSizeNeeded;
+ }
+ bufferSizeNeeded = test.func(t.maxSize + test.sizeStep, t.maxSize + test.sizeStep);
+ // ArrayBuffers can be at most 4GB (minus 1 byte)
+ if (bufferSizeNeeded > sharedArrayBufferSize && bufferSizeNeeded <= 4294967295) {
+ sharedArrayBufferSize = bufferSizeNeeded;
+ }
+ }
+ }
+ return sharedArrayBufferSize;
+}
+
+// Share an ArrayBuffer among tests to avoid too many large allocations
+var sharedArrayBuffer = new ArrayBuffer(getSharedArrayBufferSize());
+
+gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
+
+var trg = 0;
+var tt = 0;
+runNextTest();
+
+function runNextTest() {
+ var t = targets[trg];
+
+ if (tt == 0) {
+ var tex = t.tex;
+ gl.bindTexture(t.target, tex);
+
+ debug("");
+ debug("max size for " + wtu.glEnumToString(gl, t.target) + ": " + t.maxSize);
+ }
+
+ var test = tests[tt];
+ testFormatType(t, test);
+ ++tt;
+ if (tt == tests.length) {
+ tt = 0;
+ ++trg;
+ if (trg == targets.length) {
+ finishTest();
+ return;
+ }
+ }
+ wtu.waitForComposite(gl, runNextTest)
+}
+
+function testFormatType(t, test) {
+ var positiveTestSize = t.maxSize;
+ var positiveTestOtherDimension = test.sizeStep;
+ if (t.target === gl.TEXTURE_CUBE_MAP) {
+ // Can't always test the maximum size since that can cause OOM:
+ positiveTestSize = Math.min(2048, t.maxSize);
+ // Cube map textures need to be square:
+ positiveTestOtherDimension = positiveTestSize;
+ }
+ var positiveTestLevels = numLevelsFromSize(positiveTestSize);
+ var numLevels = numLevelsFromSize(t.maxSize);
+ debug("");
+ debug("num levels: " + numLevels + ", levels used in positive test: " + positiveTestLevels);
+
+ debug("");
+
+ // Query the extension and store globally so shouldBe can access it
+ var ext = wtu.getExtensionWithKnownPrefixes(gl, test.extension);
+ if (ext) {
+
+ testPassed("Successfully enabled " + test.extension + " extension");
+
+ for (var j = 0; j < t.targets.length; ++j) {
+ var target = t.targets[j];
+ debug("");
+ debug(wtu.glEnumToString(gl, target));
+
+ // positive test
+ var size = positiveTestSize;
+ var otherDimension = positiveTestOtherDimension;
+ for (var i = 0; i < positiveTestLevels; i++) {
+ var pixels = new test.dataType(sharedArrayBuffer, 0, test.func(size, otherDimension));
+ gl.compressedTexImage2D(target, i, test.format, size, otherDimension, 0, pixels);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture should generate NO_ERROR."
+ + "level is " + i + ", size is " + size + "x" + otherDimension);
+ size /= 2;
+ otherDimension /= 2;
+ if (otherDimension < 1) {
+ otherDimension = 1;
+ }
+ }
+
+ var numLevels = numLevelsFromSize(t.maxSize);
+
+ // out of bounds tests
+ // width and height out of bounds
+ var dataSize = test.func(t.maxSize + test.sizeStep, t.maxSize + test.sizeStep);
+ // this check assumes that each element is 1 byte
+ if (dataSize > sharedArrayBuffer.byteLength) {
+ testPassed("Unable to test texture larger than maximum size due to ArrayBuffer size limitations -- this is legal");
+ } else {
+ var pixelsNegativeTest1 = new test.dataType(sharedArrayBuffer, 0, dataSize);
+ gl.compressedTexImage2D(target, 0, test.format, t.maxSize + test.sizeStep, t.maxSize + test.sizeStep, 0, pixelsNegativeTest1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds: should generate INVALID_VALUE."
+ + " level is 0, size is " + (t.maxSize + test.sizeStep) + "x" + (t.maxSize + test.sizeStep));
+ }
+ // level out of bounds
+ var pixelsNegativeTest2 = new test.dataType(sharedArrayBuffer, 0, test.func(256, 256));
+ gl.compressedTexImage2D(target, numLevels, test.format, 256, 256, 0, pixelsNegativeTest2);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "level out of bounds: should generate INVALID_VALUE."
+ + " level is " + numLevels + ", size is 256x256");
+
+ /* This section disabled for now: See https://bugs.webkit.org/show_bug.cgi?id=126926
+ //width and height out of bounds for specified level
+ gl.compressedTexImage2D(target, numLevels - 1, test.format, 256, 256, 0, pixelsNegativeTest2);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds for specified level: should generate INVALID_VALUE."
+ + " level is " + (numLevels - 1) + ", size is 256x256");
+ */
+ }
+ }
+ else
+ testPassed("No " + test.extension + " extension support -- this is legal");
+}
+}
+
+var successfullyParsed = true;
+</script>
+<body onload="init()">
+<canvas id="example" width="32" height="32" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161977 => 161978)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-14 17:41:15 UTC (rev 161977)
+++ trunk/Source/WebCore/ChangeLog        2014-01-14 17:53:14 UTC (rev 161978)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-01-14 Brent Fulgham <bfulgham@apple.com>
+
+ [WebGL] Invalid range checking in WebGLRenderingContext::validateTexFuncLevel
+ https://bugs.webkit.org/show_bug.cgi?id=126925
+
+ Reviewed by Dean Jackson.
+
+ Added fast/canvas/webgl/webgl-compressed-texture-size-limit.html.
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::validateTexFuncLevel): Avoid off-by-one error
+
</ins><span class="cx"> 2014-01-14 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [SOUP] SoupNetworkSession::setAcceptLanguages should receive a const reference
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (161977 => 161978)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2014-01-14 17:41:15 UTC (rev 161977)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2014-01-14 17:53:14 UTC (rev 161978)
</span><span class="lines">@@ -5144,7 +5144,7 @@
</span><span class="cx"> }
</span><span class="cx"> switch (target) {
</span><span class="cx"> case GraphicsContext3D::TEXTURE_2D:
</span><del>- if (level > m_maxTextureLevel) {
</del><ins>+ if (level >= m_maxTextureLevel) {
</ins><span class="cx"> synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "level out of range");
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -5155,7 +5155,7 @@
</span><span class="cx"> case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Y:
</span><span class="cx"> case GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Z:
</span><span class="cx"> case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Z:
</span><del>- if (level > m_maxCubeMapTextureLevel) {
</del><ins>+ if (level >= m_maxCubeMapTextureLevel) {
</ins><span class="cx"> synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "level out of range");
</span><span class="cx"> return false;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>