2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
10 <meta charset=
"utf-8">
11 <title>WebGL compressed texture size limit conformance test
</title>
12 <link rel=
"stylesheet" href=
"../../resources/js-test-style.css"/>
13 <script src=
"../../js/js-test-pre.js"></script>
14 <script src=
"../../js/webgl-test-utils.js"></script>
15 <script src=
"../../js/tests/webgl-compressed-texture-size-limit.js"></script>
18 <canvas id=
"example" width=
"32" height=
"32" style=
"width: 40px; height: 40px;"></canvas>
19 <div id=
"description"></div>
20 <div id=
"console"></div>
23 enableJSTestPreVerboseLogging();
24 description("Checks size limit of the webgl compressed textures")
26 // ArrayBuffers can be at most 4GB (minus 1 byte), but any allocations larger than 1 GB are unreliable in practice. So limit allocations to 1 GB.
27 // Textures that are wide in just one dimension can still be used to test max TEXTURE_2D size limit even if we can't allocate space for huge square textures.
28 // Use a fairly conservative limit for positive test cube map size so OOM is avoided.
29 runCompressedTextureSizeLimitTest(Math
.pow(2, 30), 2048);
31 var successfullyParsed
= true;