diff --git a/sdk/tests/conformance2/rendering/00_test_list.txt b/sdk/tests/conformance2/rendering/00_test_list.txt index 46ca3048a6..791f42698d 100644 --- a/sdk/tests/conformance2/rendering/00_test_list.txt +++ b/sdk/tests/conformance2/rendering/00_test_list.txt @@ -24,6 +24,7 @@ draw-buffers.html element-index-uint.html --min-version 2.0.1 framebuffer-completeness-draw-framebuffer.html framebuffer-completeness-unaffected.html +--min-version 2.0.1 framebuffer-mismatched-attachment-targets.html --min-version 2.0.1 framebuffer-render-to-layer.html --min-version 2.0.1 framebuffer-render-to-layer-angle-issue.html --min-version 2.0.1 framebuffer-texture-changing-base-level.html diff --git a/sdk/tests/conformance2/rendering/framebuffer-mismatched-attachment-targets.html b/sdk/tests/conformance2/rendering/framebuffer-mismatched-attachment-targets.html new file mode 100644 index 0000000000..a8a28d6444 --- /dev/null +++ b/sdk/tests/conformance2/rendering/framebuffer-mismatched-attachment-targets.html @@ -0,0 +1,162 @@ + + + + + + +WebGL2 can render to framebuffer attachments with different targets + + + + + + + + +
+
+ + + + + diff --git a/sdk/tests/js/webgl-test-utils.js b/sdk/tests/js/webgl-test-utils.js index ca605dfb60..cf9c14d9e8 100644 --- a/sdk/tests/js/webgl-test-utils.js +++ b/sdk/tests/js/webgl-test-utils.js @@ -1751,13 +1751,23 @@ var framebufferStatusShouldBe = function(gl, target, glStatuses, opt_msg) { return glEnumToString(gl, status); }).join(' or '); if (ndx < 0) { - var msg = "checkFramebufferStatus expected" + ((glStatuses.length > 1) ? " one of: " : ": "); - testFailed(msg + expected + ". Was " + glEnumToString(gl, status) + " : " + opt_msg); - } else { - var msg = "checkFramebufferStatus was " + ((glStatuses.length > 1) ? "one of: " : "expected value: "); - testPassed(msg + expected + " : " + opt_msg); + let msg = "checkFramebufferStatus expected" + ((glStatuses.length > 1) ? " one of: " : ": ") + + expected + ". Was " + glEnumToString(gl, status); + if (opt_msg) { + msg += ": " + opt_msg; + } + testFailed(msg); + return false; + } + let msg = `checkFramebufferStatus was ${glEnumToString(gl, status)}`; + if (glStatuses.length > 1) { + msg += `, one of: ${expected}`; + } + if (opt_msg) { + msg += ": " + opt_msg; } - return status; + testPassed(msg); + return [status]; } /**