blob: 7def598feb63caafc4ece75935dd18180732371e (
plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
#!/bin/bash
function emit_vs
{
targetdir=$1
t=$2
echo "$targetdir/outerProduct-$t.vert"
cat > $targetdir/outerProduct-$t.vert <<EOF
/* [config]
* expect_result: fail
* glsl_version: 3.00
* [end config]
* outerProduct is available in OpenGL SL ES 3.00 but
* not for all data types.
*
* http://www.khronos.org/opengles/sdk/docs/manglsl/xhtml/outerProduct.xml
*/
void main () {
gl_Position = vec4(0);
outerProduct(${t}(0), ${t}(0));
}
EOF
}
function emit_valid_vs
{
targetdir=$1
t=$2
echo "$targetdir/outerProduct-$t.vert"
cat > $targetdir/outerProduct-$t.vert <<EOF
/* [config]
* expect_result: pass
* glsl_version: 3.00
* [end config]
* outerProduct is available in OpenGL SL ES 3.00.
* not for all data types.
*
* http://www.khronos.org/opengles/sdk/docs/manglsl/xhtml/outerProduct.xml
*/
void main () {
gl_Position = vec4(0);
outerProduct(${t}(0), ${t}(0));
}
EOF
}
function emit_valid_mixed_vs
{
targetdir=$1
t=$2
u=$3
echo "$targetdir/outerProduct-$t.vert"
cat > $targetdir/outerProduct-$t.vert <<EOF
/* [config]
* expect_result: pass
* glsl_version: 3.00
* [end config]
* outerProduct is available in OpenGL SL ES 3.00.
* not for all data types.
*
* http://www.khronos.org/opengles/sdk/docs/manglsl/xhtml/outerProduct.xml
*/
void main () {
gl_Position = vec4(0);
outerProduct(${t}(0), ${u}(0));
}
EOF
}
set +x
targetdir="spec/glsl-es-3.00/compiler/built-in-functions"
mkdir -p $targetdir
for i in int float bool bvec2 bvec3 bvec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4
do
emit_vs $targetdir $i
done
for i in vec2 vec3 vec4
do
emit_valid_vs $targetdir $i
done
emit_valid_mixed_vs $targetdir vec3 vec2
emit_valid_mixed_vs $targetdir vec2 vec3
emit_valid_mixed_vs $targetdir vec4 vec2
emit_valid_mixed_vs $targetdir vec4 vec3
emit_valid_mixed_vs $targetdir vec2 vec4
emit_valid_mixed_vs $targetdir vec3 vec4
|