diff options
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot')
14 files changed, 321 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_001_to_006.html new file mode 100644 index 0000000000..975dde6742 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_001_to_006.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: dot_001_to_006.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", + "fragmentShader": "dot_float_frag_xvaryyone_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "dot_float_frag_xvaryyone.frag" + }, + "name": "dot_float_frag_xvaryyone.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "dot_vec2_frag_xvaryyhalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "dot_vec2_frag_xvaryyhalf.frag" + }, + "name": "dot_vec2_frag_xvaryyhalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "dot_vec3_frag_xvaryythird_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "dot_vec3_frag_xvaryythird.frag" + }, + "name": "dot_vec3_frag_xvaryythird.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "dot_float_vert_xvaryyone_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "dot_float_vert_xvaryyone.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "dot_float_vert_xvaryyone.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "dot_vec2_vert_xvaryyhalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "dot_vec2_vert_xvaryyhalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "dot_vec2_vert_xvaryyhalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "dot_vec3_vert_xvaryythird_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "dot_vec3_vert_xvaryythird.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "dot_vec3_vert_xvaryythird.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag new file mode 100644 index 0000000000..ddb6ade7c4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag @@ -0,0 +1,17 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + gl_FragColor = vec4(vec3(dot(color.r, 1.0)), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag new file mode 100644 index 0000000000..9e5672b1d5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag @@ -0,0 +1,17 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + gl_FragColor = vec4(vec3(color.r), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert new file mode 100644 index 0000000000..3c3e8d0c86 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + color = vec4(vec3(dot(gtf_Color.r, 1.0)), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert new file mode 100644 index 0000000000..940b53e278 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + color = vec4(vec3(gtf_Color.r), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag new file mode 100644 index 0000000000..de74683979 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag @@ -0,0 +1,17 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + gl_FragColor = vec4(vec3(dot(color.rg, vec2(0.5))), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag new file mode 100644 index 0000000000..82935af669 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag @@ -0,0 +1,17 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + gl_FragColor = vec4(vec3(color.r + color.g) * 0.5, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert new file mode 100644 index 0000000000..8098142fab --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + color = vec4(vec3(dot(gtf_Color.rg, vec2(0.5))), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert new file mode 100644 index 0000000000..81206d3dfb --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + color = vec4(vec3(gtf_Color.r + gtf_Color.g) * 0.5, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag new file mode 100644 index 0000000000..13e1ac8134 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag @@ -0,0 +1,17 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + gl_FragColor = vec4(vec3(dot(color.rgb, vec3(0.3333))), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag new file mode 100644 index 0000000000..d3a96d5be5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag @@ -0,0 +1,17 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + gl_FragColor = vec4(vec3(color.r + color.g + color.b) * 0.3333, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert new file mode 100644 index 0000000000..506d16c89e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + color = vec4(vec3(dot(gtf_Color.rgb, vec3(0.3333))), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert new file mode 100644 index 0000000000..daba538dab --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + color = vec4(vec3(gtf_Color.r + gtf_Color.g + gtf_Color.b) * 0.3333, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/input.run.txt new file mode 100644 index 0000000000..e87547fd33 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/dot/input.run.txt @@ -0,0 +1,2 @@ +# this file is auto-generated. DO NOT EDIT. +dot_001_to_006.html |