Skip to content

Commit

Permalink
Split up deqp/functional/gles3/multisample.html . (KhronosGroup#3273)
Browse files Browse the repository at this point in the history
This test is so large that it times out on some browsers' CI systems.
Split it up into its functional pieces.

Associated with Chromium bug http://crbug.com/1114780 .

Fixes KhronosGroup#3271 .
  • Loading branch information
kenrussell authored Apr 2, 2021
1 parent cb0c9ab commit bcd0701
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 26 deletions.
2 changes: 1 addition & 1 deletion sdk/tests/deqp/functional/gles3/00_test_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fboinvalidate/00_test_list.txt
fborender/00_test_list.txt
fragmentoutput/00_test_list.txt
framebufferblit/00_test_list.txt
multisample/00_test_list.txt
primitiverestart/00_test_list.txt
shaderindexing/00_test_list.txt
shadermatrix/00_test_list.txt
Expand Down Expand Up @@ -43,7 +44,6 @@ instancedrendering.html
integerstatequery.html
internalformatquery.html
lifetime.html
multisample.html
negativebufferapi.html
negativefragmentapi.html
negativeshaderapi.html
Expand Down
4 changes: 3 additions & 1 deletion sdk/tests/deqp/functional/gles3/es3fMultisampleTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ goog.scope(function() {
* Run test
* @param {WebGL2RenderingContext} context
*/
es3fMultisampleTests.run = function(context) {
es3fMultisampleTests.run = function(context, range) {
gl = context;
//Set up Test Root parameters
var testName = 'multisample';
Expand All @@ -1730,6 +1730,8 @@ goog.scope(function() {
try {
//Create test cases
es3fMultisampleTests.init();
if (range)
state.setRange(range);
//Run test cases
tcuTestCase.runTestCases();
}
Expand Down
24 changes: 0 additions & 24 deletions sdk/tests/deqp/functional/gles3/multisample.html

This file was deleted.

6 changes: 6 additions & 0 deletions sdk/tests/deqp/functional/gles3/multisample/00_test_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is auto-generated from multisample_test_generator.py
# DO NOT EDIT!
default_fbo.html
fbo_4_samples.html
fbo_8_samples.html
fbo_max_samples.html
31 changes: 31 additions & 0 deletions sdk/tests/deqp/functional/gles3/multisample/default_fbo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
This file is auto-generated from multisample_test_generator.py
DO NOT EDIT!
-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebGL Multisample Conformance Tests</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css"/>
<script src="../../../../js/js-test-pre.js"></script>
<script src="../../../../js/webgl-test-utils.js"></script>

<script src="../../../../closure-library/closure/goog/base.js"></script>
<script src="../../../deqp-deps.js"></script>
<script>goog.require('functional.gles3.es3fMultisampleTests');</script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<canvas id="canvas" width="256" height="256"> </canvas>
<script>
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext('canvas', null, 2);

functional.gles3.es3fMultisampleTests.run(gl, [0, 1]);
</script>
</body>
</html>
31 changes: 31 additions & 0 deletions sdk/tests/deqp/functional/gles3/multisample/fbo_4_samples.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
This file is auto-generated from multisample_test_generator.py
DO NOT EDIT!
-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebGL Multisample Conformance Tests</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css"/>
<script src="../../../../js/js-test-pre.js"></script>
<script src="../../../../js/webgl-test-utils.js"></script>

<script src="../../../../closure-library/closure/goog/base.js"></script>
<script src="../../../deqp-deps.js"></script>
<script>goog.require('functional.gles3.es3fMultisampleTests');</script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<canvas id="canvas" width="256" height="256"> </canvas>
<script>
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext('canvas', null, 2);

functional.gles3.es3fMultisampleTests.run(gl, [1, 2]);
</script>
</body>
</html>
31 changes: 31 additions & 0 deletions sdk/tests/deqp/functional/gles3/multisample/fbo_8_samples.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
This file is auto-generated from multisample_test_generator.py
DO NOT EDIT!
-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebGL Multisample Conformance Tests</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css"/>
<script src="../../../../js/js-test-pre.js"></script>
<script src="../../../../js/webgl-test-utils.js"></script>

<script src="../../../../closure-library/closure/goog/base.js"></script>
<script src="../../../deqp-deps.js"></script>
<script>goog.require('functional.gles3.es3fMultisampleTests');</script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<canvas id="canvas" width="256" height="256"> </canvas>
<script>
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext('canvas', null, 2);

functional.gles3.es3fMultisampleTests.run(gl, [2, 3]);
</script>
</body>
</html>
31 changes: 31 additions & 0 deletions sdk/tests/deqp/functional/gles3/multisample/fbo_max_samples.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
This file is auto-generated from multisample_test_generator.py
DO NOT EDIT!
-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebGL Multisample Conformance Tests</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css"/>
<script src="../../../../js/js-test-pre.js"></script>
<script src="../../../../js/webgl-test-utils.js"></script>

<script src="../../../../closure-library/closure/goog/base.js"></script>
<script src="../../../deqp-deps.js"></script>
<script>goog.require('functional.gles3.es3fMultisampleTests');</script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<canvas id="canvas" width="256" height="256"> </canvas>
<script>
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext('canvas', null, 2);

functional.gles3.es3fMultisampleTests.run(gl, [3, 4]);
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/usr/bin/env python

# Copyright (c) 2021 The Khronos Group Inc.
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE.txt file.

"""
Generator for multisample* tests.
This file needs to be run in its folder.
"""

import sys

_DO_NOT_EDIT_WARNING = """<!--
This file is auto-generated from multisample_test_generator.py
DO NOT EDIT!
-->
"""

_DO_NOT_EDIT_TEST_LIST_WARNING = """# This file is auto-generated from multisample_test_generator.py
# DO NOT EDIT!
"""

_HTML_TEMPLATE = """<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebGL Multisample Conformance Tests</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css"/>
<script src="../../../../js/js-test-pre.js"></script>
<script src="../../../../js/webgl-test-utils.js"></script>
<script src="../../../../closure-library/closure/goog/base.js"></script>
<script src="../../../deqp-deps.js"></script>
<script>goog.require('functional.gles3.es3fMultisampleTests');</script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<canvas id="canvas" width="256" height="256"> </canvas>
<script>
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext('canvas', null, 2);
functional.gles3.es3fMultisampleTests.run(gl, [%(start)s, %(end)s]);
</script>
</body>
</html>
"""

# Note: must match CaseType in es3fMultisampleTests.js.
_GROUPS = [
'default_fbo',
'fbo_4_samples',
'fbo_8_samples',
'fbo_max_samples',
]

def GenerateFilename(group):
"""Generate test filename."""
filename = group
filename += ".html"
return filename

def WriteTest(filename, start, end):
"""Write one test."""
file = open(filename, "wb")
file.write(_DO_NOT_EDIT_WARNING)
file.write(_HTML_TEMPLATE % {
'start': start,
'end': end
})
file.close

def GenerateTests():
"""Generate all tests."""
filelist = []
for ii in range(len(_GROUPS)):
filename = GenerateFilename(_GROUPS[ii])
filelist.append(filename)
WriteTest(filename, ii, ii + 1)
return filelist

def GenerateTestList(filelist):
file = open("00_test_list.txt", "wb")
file.write(_DO_NOT_EDIT_TEST_LIST_WARNING)
file.write('\n'.join(filelist))
file.close

def main(argv):
"""This is the main function."""
filelist = GenerateTests()
GenerateTestList(filelist)

if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))

0 comments on commit bcd0701

Please sign in to comment.