Backed out changeset 7272b7396c78 (bug 1932758) for causing fenix debug failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / deqp / functional / gles3 / es3fFboCompletenessTests.js
blob1ae68fc8c7b3d381fb98563f6268b66021cd876f
2 // FboCompletenessTests
3 'use strict';
4 goog.provide('functional.gles3.es3fFboCompletenessTests');
5 goog.require('framework.common.tcuTestCase');
6 goog.require('modules.shared.glsFboCompletenessTests');
7 goog.require('modules.shared.glsFboUtil');
9 goog.scope(function() {
11     var es3fFboCompletenessTests = functional.gles3.es3fFboCompletenessTests;
12     var glsFboUtil = modules.shared.glsFboUtil;
13     var glsFboCompletenessTests = modules.shared.glsFboCompletenessTests;
14     var tcuTestCase = framework.common.tcuTestCase;
16     es3fFboCompletenessTests.initGlDependents = function(gl) {
17         if (!(gl = gl || window.gl)) throw new Error('Invalid gl object');
19         /**
20         * @type {Array<number>}
21         */
22         es3fFboCompletenessTests.s_es3ColorRenderables = [
23             // GLES3, 4.4.4: "An internal format is color-renderable if it is one of
24             // the formats from table 3.12 noted as color-renderable..."
25             gl.R8, gl.RG8, gl.RGB8, gl.RGB565, gl.RGBA4, gl.RGB5_A1, gl.RGBA8,
26             gl.RGB10_A2, gl.RGB10_A2UI, gl.SRGB8_ALPHA8,
27             gl.R8I, gl.R8UI, gl.R16I, gl.R16UI, gl.R32I, gl.R32UI,
28             gl.RG8I, gl.RG8UI, gl.RG16I, gl.RG16UI, gl.RG32I, gl.RG32UI,
29             gl.RGBA81, gl.RGBA8UI, gl.RGB16I, gl.RGBA16UI, gl.RGBA32I, gl.RGBA32UI
30         ];
32         /**
33         * @type {Array<number>}
34         */
35         es3fFboCompletenessTests.s_es3UnsizedColorRenderables = [
36             // "...or if it is unsized format RGBA or RGB."
37             // See Table 3.3 in GLES3.
38             glsFboUtil.formatkey(gl.RGBA, gl.UNSIGNED_BYTE),
39             glsFboUtil.formatkey(gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4),
40             glsFboUtil.formatkey(gl.RGBA, gl.UNSIGNED_SHORT_5_5_5_1),
41             glsFboUtil.formatkey(gl.RGB, gl.UNSIGNED_BYTE),
42             glsFboUtil.formatkey(gl.RGB, gl.UNSIGNED_SHORT_5_6_5)
43         ];
45         /**
46         * @type {Array<number>}
47         */
48         es3fFboCompletenessTests.s_es3DepthRenderables = [
49             // GLES3, 4.4.4: "An internal format is depth-renderable if it is one of
50             // the formats from table 3.13."
51             gl.DEPTH_COMPONENT16, gl.DEPTH_COMPONENT24, gl.DEPTH_COMPONENT32F,
52             gl.DEPTH24_STENCIL8, gl.DEPTH32F_STENCIL8
53         ];
55         /**
56         * @type {Array<number>}
57         */
58         es3fFboCompletenessTests.s_es3StencilRboRenderables = [
59             // GLES3, 4.4.4: "An internal format is stencil-renderable if it is
60             // STENCIL_INDEX8..."
61             gl.STENCIL_INDEX8
62         ];
64         /**
65         * @type {Array<number>}
66         */
67         es3fFboCompletenessTests.s_es3StencilRenderables = [
68             // "...or one of the formats from table 3.13 whose base internal format is
69             // DEPTH_STENCIL."
70             gl.DEPTH24_STENCIL8, gl.DEPTH32F_STENCIL8
71         ];
73         /**
74         * @type {Array<number>}
75         */
76         es3fFboCompletenessTests.s_es3TextureFloatFormats = [
77             gl.RGBA32F, gl.RGBA16F, gl.R11F_G11F_B10F,
78             gl.RG32F, gl.RG16F, gl.R32F, gl.R16F,
79             gl.RGBA16F, gl.RGB16F, gl.RG16F, gl.R16F
80         ];
82         /**
83         * @type {Array<glsFboUtil.formatT>}
84         */
85         es3fFboCompletenessTests.s_es3Formats = [
86             [
87                 (
88                     glsFboUtil.FormatFlags.REQUIRED_RENDERABLE |
89                     glsFboUtil.FormatFlags.COLOR_RENDERABLE |
90                     glsFboUtil.FormatFlags.TEXTURE_VALID
91                 ),
92                 glsFboUtil.rangeArray(es3fFboCompletenessTests.s_es3UnsizedColorRenderables)
93             ],
94             [
95                 (
96                     glsFboUtil.FormatFlags.REQUIRED_RENDERABLE |
97                     glsFboUtil.FormatFlags.COLOR_RENDERABLE |
98                     glsFboUtil.FormatFlags.RENDERBUFFER_VALID |
99                     glsFboUtil.FormatFlags.TEXTURE_VALID
100                 ),
101                 glsFboUtil.rangeArray(es3fFboCompletenessTests.s_es3ColorRenderables)
102             ], [
103                 (
104                     glsFboUtil.FormatFlags.REQUIRED_RENDERABLE |
105                     glsFboUtil.FormatFlags.DEPTH_RENDERABLE |
106                     glsFboUtil.FormatFlags.RENDERBUFFER_VALID |
107                     glsFboUtil.FormatFlags.TEXTURE_VALID
108                 ),
109                 glsFboUtil.rangeArray(es3fFboCompletenessTests.s_es3DepthRenderables)
110             ], [
111                 (
112                     glsFboUtil.FormatFlags.REQUIRED_RENDERABLE |
113                     glsFboUtil.FormatFlags.STENCIL_RENDERABLE |
114                     glsFboUtil.FormatFlags.RENDERBUFFER_VALID
115                 ),
116                 glsFboUtil.rangeArray(es3fFboCompletenessTests.s_es3StencilRboRenderables)
117             ], [
118                 (
119                     glsFboUtil.FormatFlags.REQUIRED_RENDERABLE |
120                     glsFboUtil.FormatFlags.STENCIL_RENDERABLE |
121                     glsFboUtil.FormatFlags.RENDERBUFFER_VALID |
122                     glsFboUtil.FormatFlags.TEXTURE_VALID
123                 ),
124                 glsFboUtil.rangeArray(es3fFboCompletenessTests.s_es3StencilRenderables)
125             ],
127             // These are not color-renderable in vanilla ES3, but we need to mark them
128             // as valid for textures, since EXT_color_buffer_(half_)float brings in
129             // color-renderability and only renderbuffer-validity.
130             [
131                 glsFboUtil.FormatFlags.TEXTURE_VALID,
132                 glsFboUtil.rangeArray(es3fFboCompletenessTests.s_es3TextureFloatFormats)
133             ]
134         ];
136         // gl.EXT_color_buffer_float
137         es3fFboCompletenessTests.s_extColorBufferFloatFormats = [
138             gl.RGBA32F, gl.RGBA16F, gl.R11F_G11F_B10F, gl.RG32F, gl.RG16F, gl.R32F, gl.R16F
139         ];
141         // gl.OES_texture_stencil8
142         es3fFboCompletenessTests.s_extOESTextureStencil8 = [
143             gl.STENCIL_INDEX8
144         ];
146         es3fFboCompletenessTests.s_es3ExtFormats = [{
147                 extensions: 'gl.EXT_color_buffer_float',
148                 flags: glsFboUtil.FormatFlags.REQUIRED_RENDERABLE |
149                             glsFboUtil.FormatFlags.COLOR_RENDERABLE |
150                             glsFboUtil.FormatFlags.RENDERBUFFER_VALID,
151                 formats: new glsFboUtil.Range(es3fFboCompletenessTests.s_extColorBufferFloatFormats)
152             }, {
153                 extensions: 'gl.OES_texture_stencil8',
154                 flags: glsFboUtil.FormatFlags.REQUIRED_RENDERABLE |
155                             glsFboUtil.FormatFlags.STENCIL_RENDERABLE |
156                             glsFboUtil.FormatFlags.TEXTURE_VALID,
157                 formats: new glsFboUtil.Range(es3fFboCompletenessTests.s_extOESTextureStencil8)
158             }
159         ];
161         glsFboCompletenessTests.initGlDependents(gl);
162     };
164     /**
165      * @constructor
166      * @extends {glsFboUtil.Checker}
167      */
168     es3fFboCompletenessTests.ES3Checker = function() {
169         glsFboUtil.Checker.call(this, gl);
170         /** @type {number} */ this.m_numSamples = -1; // GLsizei
171         /** @type {number} */ this.m_depthStencilImage = 0; // GLuint
172         /** @type {number} */ this.m_depthStencilType = gl.NONE;
173     };
174     es3fFboCompletenessTests.ES3Checker.prototype = Object.create(glsFboUtil.Checker.prototype);
175     es3fFboCompletenessTests.ES3Checker.prototype.constructor = es3fFboCompletenessTests.ES3Checker;
177     es3fFboCompletenessTests.ES3Checker.prototype.check = function(attPoint, att, image) {
179         var imgSamples = glsFboUtil.imageNumSamples(image);
181         if (this.m_numSamples == -1) {
182             this.m_numSamples = imgSamples;
183         } else {
184             // GLES3: "The value of RENDERBUFFER_SAMPLES is the same for all attached
185             // renderbuffers and, if the attached images are a mix of renderbuffers
186             // and textures, the value of RENDERBUFFER_SAMPLES is zero."
187             //
188             // On creating a renderbuffer: "If _samples_ is zero, then
189             // RENDERBUFFER_SAMPLES is set to zero. Otherwise [...] the resulting
190             // value for RENDERBUFFER_SAMPLES is guaranteed to be greater than or
191             // equal to _samples_ and no more than the next larger sample count
192             // supported by the implementation."
194             // Either all attachments are zero-sample renderbuffers and/or
195             // textures, or none of them are.
196             this.addFBOStatus(
197                 (this.m_numSamples == 0) == (imgSamples == 0),
198                 gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
199             );
201             // If the attachments requested a different number of samples, the
202             // implementation is allowed to report this as incomplete. However, it
203             // is also possible that despite the different requests, the
204             // implementation allocated the same number of samples to both. Hence
205             // reporting the framebuffer as complete is also legal.
206             this.addPotentialFBOStatus(
207                 this.m_numSamples == imgSamples,
208                 gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
209             );
210         }
212         // "Depth and stencil attachments, if present, are the same image."
213         if (attPoint == gl.DEPTH_ATTACHMENT || attPoint == gl.STENCIL_ATTACHMENT) {
214             if (this.m_depthStencilImage == 0) {
215                 this.m_depthStencilImage = att.imageName;
216                 this.m_depthStencilType = glsFboUtil.attachmentType(att);
218             } else {
219                 this.addFBOStatus(
220                     this.m_depthStencilImage == att.imageName && this.m_depthStencilType == glsFboUtil.attachmentType(att),
221                     gl.FRAMEBUFFER_UNSUPPORTED
222                 );
223             }
224         }
226     };
228     /**
229     * @typedef {{textureKind: number, numLayers: number, attachmentLayer: number}}
230     */
231     es3fFboCompletenessTests.numLayersParamsT;
233     /**
234     * @param {number} textureKind
235     * @param {number} numLayers
236     * @param {number} attachmentLayer
237     * @return {es3fFboCompletenessTests.numLayersParamsT}
238     */
239     es3fFboCompletenessTests.numLayersParams = function(textureKind, numLayers, attachmentLayer) {
240         if (typeof(attachmentLayer) == 'undefined') {
241             textureKind = 0;
242             numLayers = 0;
243             attachmentLayer = 0;
244         }
245         return {
246             textureKind: textureKind, //< gl.TEXTURE_3D or gl.TEXTURE_2D_ARRAY
247             numLayers: numLayers, //< Number of layers in texture
248             attachmentLayer: attachmentLayer //< Layer referenced by attachment
249         };
250     };
252     /**
253      * es3fFboCompletenessTests.numLayersParams.getName
254      * @param {es3fFboCompletenessTests.numLayersParamsT} params
255      * @return {string}
256      */
257     es3fFboCompletenessTests.numLayersParams.getName = function(params) {
258         return (
259             (params.textureKind == gl.TEXTURE_3D ? '3d' : '2darr') + '_' +
260             params.numLayers + '_' +
261             params.attachmentLayer
262         );
263     };
264     /**
265      * es3fFboCompletenessTests.numLayersParams.getDescription
266      * @param {es3fFboCompletenessTests.numLayersParamsT} params
267      * @return {string}
268      */
269     es3fFboCompletenessTests.numLayersParams.getDescription = function(params) {
270         return (
271             (params.textureKind == gl.TEXTURE_3D ? '3D Texture' : '2D Array Texture') + ', ' +
272             params.numLayers + ' layers, ' +
273             'attached layer ' + params.attachmentLayer + '.'
274         );
275     };
277     // string, string, glsFboCompleteness::context, params.
278     /**
279     * @constructor
280     * @extends {glsFboCompletenessTests.TestBase}
281     * @param {string} name
282     * @param {string} desc
283     * @param {glsFboCompletenessTests.Context} ctx
284     * @param {es3fFboCompletenessTests.numLayersParamsT} params
285     */
286     es3fFboCompletenessTests.NumLayersTest = function(name, desc, ctx, params) {
287         glsFboCompletenessTests.TestBase.call(this, name, desc, params);
288         this.m_ctx = ctx;
289     };
291     es3fFboCompletenessTests.NumLayersTest.prototype = Object.create(glsFboCompletenessTests.TestBase.prototype);
292     es3fFboCompletenessTests.NumLayersTest.prototype.constructor = es3fFboCompletenessTests.NumLayersTest;
294     es3fFboCompletenessTests.NumLayersTest.prototype.build = function(builder, gl) {
296         if (!(gl = gl || window.gl)) throw new Error('Invalid gl object');
298         var target = gl.COLOR_ATTACHMENT0;
299         var texCfg = builder.makeConfig(
300             function(kind) {
301                 switch (kind) {
302                     case gl.TEXTURE_3D: return glsFboUtil.Texture3D;
303                     case gl.TEXTURE_2D_ARRAY: return glsFboUtil.Texture2DArray;
304                     default: throw new Error('Impossible case');
305                 }
306             }(this.m_params.textureKind)
307         );
309         texCfg.internalFormat = this.getDefaultFormat(target, gl.TEXTURE, gl);
310         texCfg.width = 64;
311         texCfg.height = 64;
312         texCfg.numLayers = this.m_params.numLayers;
313         var tex = builder.glCreateTexture(texCfg);
315         var att = builder.makeConfig(glsFboUtil.TextureLayerAttachment);
316         att.layer = this.m_params.attachmentLayer;
317         att.imageName = tex;
319         builder.glAttach(target, att);
321     //  return tcuTestCase.IterateResult.STOP;
322     };
323 //es3fFboCompletenessTests.NumLayersTest.prototype.isExecutable = function() {
324 //    return false;
325 //};
327     /**
328      * @enum
329      */
330     es3fFboCompletenessTests.e_samples = {
331         NONE: -2,
332         TEXTURE: -1
333     };
335     /**
336     * @typedef {{numSamples: Array<number>}}
337     */
338     es3fFboCompletenessTests.numSamplesParamsT;
340     /**
341     * @param {number} colour
342     * @param {number} depth
343     * @param {number} stencil
344     * @return {es3fFboCompletenessTests.numSamplesParamsT}
345     */
346     es3fFboCompletenessTests.numSamplesParams = function(colour, depth, stencil) {
347         var ret = {
348             numSamples: new Array(3)
349         };
350         if (colour !== undefined) {
351             ret.numSamples[0] = colour;
352             if (depth !== undefined) {
353                 ret.numSamples[1] = depth;
354                 if (stencil !== undefined) {
355                     ret.numSamples[2] = stencil;
356                 }
357             }
358         }
359         return ret;
360     };
362     /**
363     * @param {es3fFboCompletenessTests.numSamplesParamsT} params
364     * @return {string}
365     */
366     es3fFboCompletenessTests.numSamplesParams.getName = function(params) {
367         var out = '';
369         var first = true;
370         for (var i = 0; i < 3; ++i) {
371             if (first)
372                 first = false;
373             else
374                 out += '_';
376             switch (params.numSamples[i]) {
377                 case es3fFboCompletenessTests.e_samples.NONE: out += 'none'; break;
378                 case es3fFboCompletenessTests.e_samples.TEXTURE: out += 'tex'; break;
379                 default: out += 'rbo'; break;
380             }
381         }
382         return out;
383     };
384     /**
385     * @param {es3fFboCompletenessTests.numSamplesParamsT} params
386     * @return {string}
387     */
388     es3fFboCompletenessTests.numSamplesParams.getDescription = function(params) {
389         var out = '';
390         var names = ['color', 'depth', 'stencil'];
391         var first = true;
393         for (var i = 0; i < 3; ++i) {
394             if (first)
395                 first = false;
396             else
397                 out += ', ';
399             if (params.numSamples[i] == es3fFboCompletenessTests.e_samples.TEXTURE) {
400                 out += 'texture ' + names[i] + ' attachment';
401             } else {
402                 out += params.numSamples[i] + '-sample renderbuffer ' + names[i] + ' attachment';
403             }
404         }
405         return out;
406     };
408     /**
409     * @constructor
410     * @extends {glsFboCompletenessTests.TestBase}
411     * @param {string} name
412     * @param {string} desc
413     * @param {glsFboCompletenessTests.Context} ctx
414     * @param {es3fFboCompletenessTests.numSamplesParamsT} params
415     */
416     es3fFboCompletenessTests.NumSamplesTest = function(name, desc, ctx, params) {
417         glsFboCompletenessTests.TestBase.call(this, name, desc, params);
418         this.m_ctx = ctx;
419     };
420     es3fFboCompletenessTests.NumSamplesTest.prototype = Object.create(glsFboCompletenessTests.TestBase.prototype);
421     es3fFboCompletenessTests.NumSamplesTest.prototype.constructor = es3fFboCompletenessTests.NumSamplesTest;
423     es3fFboCompletenessTests.NumSamplesTest.prototype.build = function(builder, gl) {
424         if (!(gl = gl || window.gl)) throw new Error('Invalid gl object');
426         var s_targets = [
427             gl.COLOR_ATTACHMENT0, gl.COLOR_ATTACHMENT1, gl.DEPTH_ATTACHMENT
428         ];
429         // Non-integer formats for each attachment type.
430         // \todo [2013-12-17 lauri] Add fixed/floating/integer metadata for formats so
431         // we can pick one smartly or maybe try several.
432         var s_formats = [
433             gl.RGBA8, gl.RGB565, gl.DEPTH_COMPONENT24
434         ];
436         var l = s_targets.length;
437         if (this.m_params.numSamples.length != l)
438             throw new Error('Wrong number of params.');
440         for (var i = 0; i < l; ++i) {
441             var target = s_targets[i];
442             var fmt = new glsFboUtil.ImageFormat(s_formats[i], gl.NONE);
444             var ns = this.m_params.numSamples[i];
445             if (ns == es3fFboCompletenessTests.e_samples.NONE)
446                 continue;
447             if (ns == es3fFboCompletenessTests.e_samples.TEXTURE) {
448                 this.attachTargetToNew(target, gl.TEXTURE, fmt, 64, 64, builder, gl);
449             } else {
450                 var rboCfg = builder.makeConfig(glsFboUtil.Renderbuffer);
451                 rboCfg.internalFormat = fmt;
452                 rboCfg.width = rboCfg.height = 64;
453                 rboCfg.numSamples = ns;
455                 var rbo = builder.glCreateRbo(rboCfg);
456                 // Implementations do not necessarily support sample sizes greater than 1.
457                 if (builder.getError() == gl.INVALID_OPERATION) {
458                     throw new Error('Unsupported number of samples.');
459                 }
460                 var att = builder.makeConfig(glsFboUtil.RenderbufferAttachment);
461                 att.imageName = rbo;
462                 builder.glAttach(target, att);
463             }
464         }
466         return true;
467     };
469     es3fFboCompletenessTests.init = function() {
471         //(testCtx, renderCtx, factory) {
472         var fboCtx = new glsFboCompletenessTests.Context(null, gl, function() {
473             return new es3fFboCompletenessTests.ES3Checker();
474         });
476         fboCtx.addFormats(glsFboUtil.rangeArray(es3fFboCompletenessTests.s_es3Formats));
478         /** @const @type {tcuTestCase.DeqpTest} */
479         var testGroup = tcuTestCase.runner.testCases;
481         testGroup.addChild(fboCtx.createRenderableTests(gl));
482         testGroup.addChild(fboCtx.createAttachmentTests(gl));
483         testGroup.addChild(fboCtx.createSizeTests(gl));
485         /** @type {tcuTestCase.DeqpTest} */
486         var layerTests = tcuTestCase.newTest('layer', 'Tests for layer attachments');
488         /** @static */
489         var s_layersParams = [
490             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_2D_ARRAY, 1, 0),
491             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_2D_ARRAY, 1, 3),
492             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_2D_ARRAY, 4, 3),
493             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_2D_ARRAY, 4, 15),
494             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_3D, 1, 0),
495             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_3D, 1, 15),
496             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_3D, 4, 15),
497             es3fFboCompletenessTests.numLayersParams(gl.TEXTURE_3D, 64, 15)
498         ];
500         for (var i = 0; i < s_layersParams.length; ++i) {
501             var name = 'name';
502             var desc = 'desc';
503             layerTests.addChild(new es3fFboCompletenessTests.NumLayersTest(
504                 es3fFboCompletenessTests.numLayersParams.getName(s_layersParams[i]),
505                 es3fFboCompletenessTests.numLayersParams.getDescription(s_layersParams[i]),
506                 fboCtx, s_layersParams[i]
507             ));
508         }
509         testGroup.addChild(layerTests);
511         /** @type {tcuTestCase.DeqpTest} */
512         var sampleTests = tcuTestCase.newTest('sample', 'Tests for multisample attachments');
513         // some short hand
514         var samples = es3fFboCompletenessTests.e_samples;
515         // sample tests
516         /** @static */
517         var s_samplesParams = [
518             es3fFboCompletenessTests.numSamplesParams(0, samples.NONE, samples.NONE),
519             es3fFboCompletenessTests.numSamplesParams(1, samples.NONE, samples.NONE),
520             es3fFboCompletenessTests.numSamplesParams(2, samples.NONE, samples.NONE),
521             es3fFboCompletenessTests.numSamplesParams(0, samples.TEXTURE, samples.NONE),
522             es3fFboCompletenessTests.numSamplesParams(1, samples.TEXTURE, samples.NONE),
523             es3fFboCompletenessTests.numSamplesParams(2, samples.TEXTURE, samples.NONE),
524             es3fFboCompletenessTests.numSamplesParams(2, 1, samples.NONE),
525             es3fFboCompletenessTests.numSamplesParams(2, 2, samples.NONE),
526             es3fFboCompletenessTests.numSamplesParams(0, 0, samples.TEXTURE),
527             es3fFboCompletenessTests.numSamplesParams(1, 2, 0),
528             es3fFboCompletenessTests.numSamplesParams(2, 2, 0),
529             es3fFboCompletenessTests.numSamplesParams(1, 1, 1),
530             es3fFboCompletenessTests.numSamplesParams(1, 2, 4)
531         ];
533         for (var i = 0; i < s_samplesParams.length; ++i) {
534             var name = 'name';
535             var desc = 'desc';
536             sampleTests.addChild(new es3fFboCompletenessTests.NumSamplesTest(
537                 es3fFboCompletenessTests.numSamplesParams.getName(s_samplesParams[i]),
538                 es3fFboCompletenessTests.numSamplesParams.getDescription(s_samplesParams[i]),
539                 fboCtx, s_samplesParams[i]
540             ));
541         }
542         testGroup.addChild(sampleTests);
544     };
546     es3fFboCompletenessTests.run = function() {
547         var testName = 'completeness';
548         var testDescription = 'Completeness tests';
549         var state = tcuTestCase.runner;
551         state.testName = testName;
552         state.testCases = tcuTestCase.newTest(testName, testDescription, null);
554         //Set up name and description of this test series.
555         setCurrentTestName(testName);
556         description(testDescription);
557         try {
558             es3fFboCompletenessTests.init();
559             tcuTestCase.runner.runCallback(tcuTestCase.runTestCases);
560         } catch (err) {
561             bufferedLogToConsole(err);
562             tcuTestCase.runner.terminate();
563         }
565     };