diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-float-blend.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-float-blend.html')
-rw-r--r-- | dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-float-blend.html | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-float-blend.html b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-float-blend.html new file mode 100644 index 0000000000..a825d78bef --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/ext-float-blend.html @@ -0,0 +1,98 @@ +<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL EXT_float_blend 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="../../js/tests/ext-float-blend.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test verifies the functionality of the EXT_float_blend extension, if it is available.");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+function extFloatBlendTests(version, config) {
+ debug("");
+ debug("Testing float32 blending without EXT_float_blend");
+ testExtFloatBlend(config.internalFormat);
+ testExtFloatBlendMRT(version, config.drawBuffers);
+ testExtFloatBlendNonFloat32Type(version, config.oesTextureHalfFloat);
+
+ const floatBlend = gl.getExtension("EXT_float_blend");
+ if (!floatBlend) {
+ testPassed("EXT_float_blend is allowed to be missing.");
+ return;
+ }
+
+ debug("");
+ debug("Testing that float32 blending is allowed with EXT_float_blend");
+ testExtFloatBlend(config.internalFormat);
+ testExtFloatBlendMRT(version, config.drawBuffers);
+ testExtFloatBlendNonFloat32Type(version, config.oesTextureHalfFloat);
+}
+
+(function(){
+ if (wtu.getDefault3DContextVersion() < 2) {
+ const oesTextureFloat = gl.getExtension("OES_texture_float");
+ if (!oesTextureFloat) {
+ testPassed("OES_texture_float is allowed to be missing.");
+ return;
+ }
+
+ const colorBufferFloat = gl.getExtension("WEBGL_color_buffer_float");
+ if (!colorBufferFloat) {
+ testPassed("WEBGL_color_buffer_float is allowed to be missing.");
+ return;
+ }
+
+ const drawBuffers = gl.getExtension("WEBGL_draw_buffers");
+ if (!drawBuffers) {
+ debug("WEBGL_draw_buffers is allowed to be missing. MRT tests will be skipped.");
+ }
+
+ const oesTextureHalfFloat = gl.getExtension("OES_texture_half_float");
+ const extColorBufferHalfFloat = gl.getExtension("EXT_color_buffer_half_float");
+ const testHalfFloat = !(!oesTextureHalfFloat || !extColorBufferHalfFloat);
+ if (!testHalfFloat) {
+ debug("OES_texture_half_float or EXT_color_buffer_half_float is allowed to be missing. NonFloat32Type tests will be skipped.");
+ }
+
+ const internalFormat = gl.RGBA;
+ extFloatBlendTests(1, {
+ internalFormat, drawBuffers, oesTextureHalfFloat
+ });
+ } else {
+ const colorBufferFloat = gl.getExtension("EXT_color_buffer_float");
+ if (!colorBufferFloat) {
+ testPassed("EXT_color_buffer_float is allowed to be missing.");
+ return;
+ }
+
+ const internalFormat = gl.RGBA32F;
+ extFloatBlendTests(2, {
+ internalFormat
+ });
+ }
+})();
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../js/js-test-post.js"></script>
+
+</body>
+</html>
+<!--
+Copyright (c) 2019 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.
+-->
|