File: gs-fma-float-float-float.shader_test

package info (click to toggle)
piglit 0~git20200212-f4710c51b-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 106,972 kB
  • sloc: ansic: 263,763; xml: 48,941; python: 29,918; lisp: 19,789; cpp: 12,142; sh: 22; makefile: 20; pascal: 5
file content (73 lines) | stat: -rw-r--r-- 1,802 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
[require]
GLSL >= 4.00
GL_ARB_shader_precision

[vertex shader]
in vec4 piglit_vertex;
flat out vec4 vertex_to_gs;
void main()
{
     vertex_to_gs = piglit_vertex;
}

[geometry shader]
#extension GL_ARB_shader_precision : require
layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;
flat in vec4 vertex_to_gs[3];
flat out vec4 color;
uniform float arg0;
uniform float arg1;
uniform float arg2;
uniform float expected_a;
uniform float expected_b;

void main()
{
  vec4 tmp_color;
  float result = fma(arg0, arg1, arg2);
  tmp_color = result == expected_a || result == expected_b ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
  for (int i = 0; i < 3; i++) {
    gl_Position = vertex_to_gs[i];
    color = tmp_color;
    EmitVertex();
  }
}

[fragment shader]
flat in vec4 color;

void main()
{
  gl_FragColor = color;
}

[test]
uniform float arg0  0xbcf5c28f
uniform float arg1  0xbf59999a
uniform float arg2  0xbcd0e560
uniform float expected_a  0x00000000
uniform float expected_b  0x302b020c
draw rect -1 -1 1 1
relative probe rgba (0.0, 0.0) (0.0, 1.0, 0.0, 1.0)
uniform float arg0  0x3fd5c28f
uniform float arg1  0x3f28f5c3
uniform float arg2  0x3f800003
uniform float expected_a  0x40068a73
uniform float expected_b  0x40068a74
draw rect 0 -1 1 1
relative probe rgba (1.0, 0.0) (0.0, 1.0, 0.0, 1.0)
uniform float arg0  0xbcf5c28f
uniform float arg1  0x3f28f5c3
uniform float arg2  0x3fb5b22d
uniform float expected_a  0x3fb3295f
uniform float expected_b  0x3fb3295f
draw rect -1 0 1 1
relative probe rgba (0.0, 1.0) (0.0, 1.0, 0.0, 1.0)
uniform float arg0  0x3fef5c29
uniform float arg1  0xbcf5c28f
uniform float arg2  0x3fc8ef34
uniform float expected_a  0x3fc1c0eb
uniform float expected_b  0x3fc1c0eb
draw rect 0 0 1 1
relative probe rgba (1.0, 1.0) (0.0, 1.0, 0.0, 1.0)