diff options
Diffstat (limited to '')
16 files changed, 424 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/input.run.txt new file mode 100644 index 0000000000..d369e576f8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/input.run.txt @@ -0,0 +1,2 @@ +# this file is auto-generated. DO NOT EDIT. +mod_001_to_008.html diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_001_to_008.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_001_to_008.html new file mode 100644 index 0000000000..23577304e2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_001_to_008.html @@ -0,0 +1,159 @@ +<!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: mod_001_to_008.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": "mod_float_frag_xvary_yconst1_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mod_float_frag_xvary_yconst1.frag" + }, + "name": "mod_float_frag_xvary_yconst1.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mod_vec2_frag_xvary_yconst1_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mod_vec2_frag_xvary_yconst1.frag" + }, + "name": "mod_vec2_frag_xvary_yconst1.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mod_vec3_frag_xvary_yconst1_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mod_vec3_frag_xvary_yconst1.frag" + }, + "name": "mod_vec3_frag_xvary_yconst1.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "mod_float_vert_xvary_yconst1_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "mod_float_vert_xvary_yconst1.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mod_float_vert_xvary_yconst1.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "mod_vec2_vert_xvary_yconst1_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "mod_vec2_vert_xvary_yconst1.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mod_vec2_vert_xvary_yconst1.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "mod_vec3_vert_xvary_yconst1_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "mod_vec3_vert_xvary_yconst1.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mod_vec3_vert_xvary_yconst1.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4f", + "value": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mod_x_large_y_large_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mod_x_large_y_large_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4f", + "value": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mod_x_large_y_large_frag.frag" + }, + "name": "mod_x_large_y_large_frag.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag new file mode 100644 index 0000000000..c3ec59b9e9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + float c = 10.0 * 2.0 * (color.r - 0.5); + gl_FragColor = vec4(mod(c, 1.0), 0.0, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag new file mode 100644 index 0000000000..616e907f34 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag @@ -0,0 +1,19 @@ + +/* +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) +{ + float c = 10.0 * 2.0 * (color.r - 0.5); + c = c - 1.0 * floor(c / 1.0); + gl_FragColor = vec4(c, 0.0, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert new file mode 100644 index 0000000000..85f4a97008 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert @@ -0,0 +1,19 @@ + +/* +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) +{ + float c = 10.0 * 2.0 * (gtf_Color.r - 0.5); + color = vec4(mod(c, 1.0), 0.0, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert new file mode 100644 index 0000000000..fa709a91a4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert @@ -0,0 +1,20 @@ + +/* +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) +{ + float c = 10.0 * 2.0 * (gtf_Color.r - 0.5); + c = c - 1.0 * floor(c / 1.0); + color = vec4(c, 0.0, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag new file mode 100644 index 0000000000..b65b6054d8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + vec2 c = 10.0 * 2.0 * (color.rg - 0.5); + gl_FragColor = vec4(mod(c, 1.0), 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag new file mode 100644 index 0000000000..4490d64569 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag @@ -0,0 +1,19 @@ + +/* +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) +{ + vec2 c = 10.0 * 2.0 * (color.rg - 0.5); + c = c - 1.0 * floor(c / 1.0); + gl_FragColor = vec4(c, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert new file mode 100644 index 0000000000..d622b9a359 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert @@ -0,0 +1,19 @@ + +/* +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) +{ + vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5); + color = vec4(mod(c, 1.0), 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert new file mode 100644 index 0000000000..62f9c46b00 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert @@ -0,0 +1,20 @@ + +/* +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) +{ + vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5); + c = c - 1.0 * floor(c / 1.0); + color = vec4(c, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag new file mode 100644 index 0000000000..9ecd423dd8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + vec3 c = 10.0 * 2.0 * (color.rgb - 0.5); + gl_FragColor = vec4(mod(c, 1.0), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag new file mode 100644 index 0000000000..e9cbffb7ef --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag @@ -0,0 +1,19 @@ + +/* +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) +{ + vec3 c = 10.0 * 2.0 * (color.rgb - 0.5); + c = c - 1.0 * floor(c / 1.0); + gl_FragColor = vec4(c, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert new file mode 100644 index 0000000000..3b14becf8f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert @@ -0,0 +1,19 @@ + +/* +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) +{ + vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5); + color = vec4(mod(c, 1.0), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert new file mode 100644 index 0000000000..242fcf07b0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert @@ -0,0 +1,20 @@ + +/* +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) +{ + vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5); + c = c - 1.0 * floor(c / 1.0); + color = vec4(c, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag new file mode 100644 index 0000000000..7e7128ec27 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + gl_FragColor = vec4(mod(300.0, 100.0), 0.0, 0.0, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert new file mode 100644 index 0000000000..1d168308b6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert @@ -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. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + color = vec4(mod(300.0, 100.0), 0.0, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} |