diff options
author | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2017-11-12 14:44:58 +0200 |
---|---|---|
committer | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2017-11-21 15:48:03 +0200 |
commit | 181df00a4f5617fed665e5953b7da932e3544ead (patch) | |
tree | d971f6348ccee0aeb0bef04fd0f747a27ca22156 | |
parent | 3a8558caf1bf1dda9e616c31e07c7797c0413b5e (diff) |
glsl-es-1.00: Test for mediump division
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r-- | tests/spec/glsl-es-1.00/execution/mediump_div.shader_test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/execution/mediump_div.shader_test b/tests/spec/glsl-es-1.00/execution/mediump_div.shader_test new file mode 100644 index 000000000..7f70f4e99 --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/mediump_div.shader_test @@ -0,0 +1,40 @@ +[require] +GL ES >= 2.0 +GLSL ES >= 1.00 + +[vertex shader] +#version 100 + +precision highp float; + +attribute vec4 piglit_vertex; +varying float f[4]; +uniform vec4 f_1; + +void main() +{ + gl_Position = piglit_vertex; + f[0] = f_1[0]; + f[1] = f_1[1]; + f[2] = f_1[2]; + f[3] = f_1[3]; +} + +[fragment shader] +#version 100 +precision mediump float; + +varying float f[4]; + +void main() +{ + gl_FragColor = vec4(f[0] / 3.0, + f[1] / 2.0, + f[2] / 5.0, + f[3] / 6.0); +} + +[test] +uniform vec4 f_1 0.3 0.44 0.55 1.2 +draw rect -1 -1 2 2 +probe all rgba 0.1 0.22 0.11 0.2 |