diff options
Diffstat (limited to '')
4 files changed, 145 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag new file mode 100644 index 0000000000..2cda606455 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag @@ -0,0 +1,16 @@ + +/* +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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif + +void main(void) +{ + gl_FragColor = vec4(gl_DepthRange.near, gl_DepthRange.far, gl_DepthRange.diff, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert new file mode 100644 index 0000000000..a095711f1d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert @@ -0,0 +1,18 @@ + +/* +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. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main(void) +{ + color = vec4(gl_DepthRange.near, gl_DepthRange.far, gl_DepthRange.diff, 1.0); + + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html new file mode 100644 index 0000000000..18400ee704 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html @@ -0,0 +1,109 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: biuDepthRange_001_to_002.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 0.25, + 0.75, + 0.5, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "name": "DepthRange_frag.test.html", + "pattern": "compare", + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "DepthRange_frag.frag", + "builtin_uniforms": { + "min_required": 2, + "valid_values": [ + "gl_DepthRange.near", + "gl_DepthRange.far", + "gl_DepthRange.diff" + ], + } + }, + "state": { + "depthrange": { + "far": "0.75", + "near": "0.25" + } + }, + "model": null + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 0.25, + 0.75, + 0.5, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "name": "DepthRange_vert.test.html", + "pattern": "compare", + "testProgram": { + "vertexShader": "DepthRange_vert.vert", + "fragmentShader": "../default/default.frag", + "builtin_uniforms": { + "min_required": 2, + "valid_values": [ + "gl_DepthRange.near", + "gl_DepthRange.far", + "gl_DepthRange.diff" + ] + } + }, + "state": { + "depthrange": { + "far": "0.75", + "near": "0.25" + } + }, + "model": "grid" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/input.run.txt new file mode 100644 index 0000000000..21f2fd2e19 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/biuDepthRange/input.run.txt @@ -0,0 +1,2 @@ +# this file is auto-generated. DO NOT EDIT. +biuDepthRange_001_to_002.html |