Implement frexp, ldexp, packUnorm2x16, unpackUnorm2x16, packUnorm4x8, packSnorm4x8, unpackUnorm4x8, unpackSnorm4x8, and unpackDouble2x32().

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27738 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2014-08-14 19:45:52 +00:00
parent 122c5f199b
commit 0a33592810
6 changed files with 207 additions and 17 deletions

View File

@@ -35,4 +35,15 @@ void main()
i4 = findLSB(u4);
i1 = findMSB(i1);
i2 = findMSB(u2);
vec3 v3;
v3 = frexp(v3, i3);
vec2 v2;
v2 = ldexp(v2, i2);
mediump vec4 v4;
u1 = packUnorm4x8(v4);
u1 = packSnorm4x8(v4);
v4 = unpackUnorm4x8(u1);
v4 = unpackSnorm4x8(u1);
}

View File

@@ -82,4 +82,20 @@ void foodc2()
vec2 v2 = dFdxFine(in2);
vec3 v3 = dFdyCoarse(in3);
vec4 v4 = fwidthCoarse(in4) + fwidthFine(in4);
uint u1;
ivec3 i3;
ivec2 i2;
v2 = frexp(v2, i2);
v3 = ldexp(v3, i3);
u1 = packUnorm4x8(v4);
u1 = packSnorm4x8(v4);
v4 = unpackUnorm4x8(u1);
v4 = unpackSnorm4x8(u1);
double d;
uvec2 u2;
d = packDouble2x32(u2);
u2 = unpackDouble2x32(d);
}

View File

@@ -100,6 +100,32 @@ ERROR: node is still EOpNull!
0:37 'i2' (highp 2-component vector of int)
0:37 Function Call: findMSB(vu2; (highp 2-component vector of int)
0:37 'u2' (highp 2-component vector of uint)
0:40 move second child to first child (highp 3-component vector of float)
0:40 'v3' (highp 3-component vector of float)
0:40 Function Call: frexp(vf3;vi3; (highp 3-component vector of float)
0:40 'v3' (highp 3-component vector of float)
0:40 'i3' (highp 3-component vector of int)
0:42 move second child to first child (highp 2-component vector of float)
0:42 'v2' (highp 2-component vector of float)
0:42 Function Call: ldexp(vf2;vi2; (highp 2-component vector of float)
0:42 'v2' (highp 2-component vector of float)
0:42 'i2' (highp 2-component vector of int)
0:45 move second child to first child (highp uint)
0:45 'u1' (highp uint)
0:45 Function Call: packUnorm4x8(vf4; (highp uint)
0:45 'v4' (mediump 4-component vector of float)
0:46 move second child to first child (highp uint)
0:46 'u1' (highp uint)
0:46 Function Call: packSnorm4x8(vf4; (highp uint)
0:46 'v4' (mediump 4-component vector of float)
0:47 move second child to first child (mediump 4-component vector of float)
0:47 'v4' (mediump 4-component vector of float)
0:47 Function Call: unpackUnorm4x8(u1; (mediump 4-component vector of float)
0:47 'u1' (highp uint)
0:48 move second child to first child (mediump 4-component vector of float)
0:48 'v4' (mediump 4-component vector of float)
0:48 Function Call: unpackSnorm4x8(u1; (mediump 4-component vector of float)
0:48 'u1' (highp uint)
0:? Linker Objects
0:? 's' (shared highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)
@@ -207,6 +233,32 @@ ERROR: node is still EOpNull!
0:37 'i2' (highp 2-component vector of int)
0:37 Function Call: findMSB(vu2; (highp 2-component vector of int)
0:37 'u2' (highp 2-component vector of uint)
0:40 move second child to first child (highp 3-component vector of float)
0:40 'v3' (highp 3-component vector of float)
0:40 Function Call: frexp(vf3;vi3; (highp 3-component vector of float)
0:40 'v3' (highp 3-component vector of float)
0:40 'i3' (highp 3-component vector of int)
0:42 move second child to first child (highp 2-component vector of float)
0:42 'v2' (highp 2-component vector of float)
0:42 Function Call: ldexp(vf2;vi2; (highp 2-component vector of float)
0:42 'v2' (highp 2-component vector of float)
0:42 'i2' (highp 2-component vector of int)
0:45 move second child to first child (highp uint)
0:45 'u1' (highp uint)
0:45 Function Call: packUnorm4x8(vf4; (highp uint)
0:45 'v4' (mediump 4-component vector of float)
0:46 move second child to first child (highp uint)
0:46 'u1' (highp uint)
0:46 Function Call: packSnorm4x8(vf4; (highp uint)
0:46 'v4' (mediump 4-component vector of float)
0:47 move second child to first child (mediump 4-component vector of float)
0:47 'v4' (mediump 4-component vector of float)
0:47 Function Call: unpackUnorm4x8(u1; (mediump 4-component vector of float)
0:47 'u1' (highp uint)
0:48 move second child to first child (mediump 4-component vector of float)
0:48 'v4' (mediump 4-component vector of float)
0:48 Function Call: unpackSnorm4x8(u1; (mediump 4-component vector of float)
0:48 'u1' (highp uint)
0:? Linker Objects
0:? 's' (shared highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)

View File

@@ -264,6 +264,40 @@ ERROR: node is still EOpNull!
0:84 'in4' (smooth in 4-component vector of float)
0:84 fwidthFine (4-component vector of float)
0:84 'in4' (smooth in 4-component vector of float)
0:89 move second child to first child (2-component vector of float)
0:89 'v2' (2-component vector of float)
0:89 Function Call: frexp(vf2;vi2; (2-component vector of float)
0:89 'v2' (2-component vector of float)
0:89 'i2' (2-component vector of int)
0:90 move second child to first child (3-component vector of float)
0:90 'v3' (3-component vector of float)
0:90 Function Call: ldexp(vf3;vi3; (3-component vector of float)
0:90 'v3' (3-component vector of float)
0:90 'i3' (3-component vector of int)
0:92 move second child to first child (uint)
0:92 'u1' (uint)
0:92 Function Call: packUnorm4x8(vf4; (uint)
0:92 'v4' (4-component vector of float)
0:93 move second child to first child (uint)
0:93 'u1' (uint)
0:93 Function Call: packSnorm4x8(vf4; (uint)
0:93 'v4' (4-component vector of float)
0:94 move second child to first child (4-component vector of float)
0:94 'v4' (4-component vector of float)
0:94 Function Call: unpackUnorm4x8(u1; (4-component vector of float)
0:94 'u1' (uint)
0:95 move second child to first child (4-component vector of float)
0:95 'v4' (4-component vector of float)
0:95 Function Call: unpackSnorm4x8(u1; (4-component vector of float)
0:95 'u1' (uint)
0:99 move second child to first child (double)
0:99 'd' (double)
0:99 Function Call: packDouble2x32(vu2; (double)
0:99 'u2' (2-component vector of uint)
0:100 move second child to first child (2-component vector of uint)
0:100 'u2' (2-component vector of uint)
0:100 Function Call: unpackDouble2x32(d1; (2-component vector of uint)
0:100 'd' (double)
0:? Linker Objects
0:? 'c2D' (smooth in 2-component vector of float)
0:? 'i' (flat in int)
@@ -533,6 +567,40 @@ ERROR: node is still EOpNull!
0:84 'in4' (smooth in 4-component vector of float)
0:84 fwidthFine (4-component vector of float)
0:84 'in4' (smooth in 4-component vector of float)
0:89 move second child to first child (2-component vector of float)
0:89 'v2' (2-component vector of float)
0:89 Function Call: frexp(vf2;vi2; (2-component vector of float)
0:89 'v2' (2-component vector of float)
0:89 'i2' (2-component vector of int)
0:90 move second child to first child (3-component vector of float)
0:90 'v3' (3-component vector of float)
0:90 Function Call: ldexp(vf3;vi3; (3-component vector of float)
0:90 'v3' (3-component vector of float)
0:90 'i3' (3-component vector of int)
0:92 move second child to first child (uint)
0:92 'u1' (uint)
0:92 Function Call: packUnorm4x8(vf4; (uint)
0:92 'v4' (4-component vector of float)
0:93 move second child to first child (uint)
0:93 'u1' (uint)
0:93 Function Call: packSnorm4x8(vf4; (uint)
0:93 'v4' (4-component vector of float)
0:94 move second child to first child (4-component vector of float)
0:94 'v4' (4-component vector of float)
0:94 Function Call: unpackUnorm4x8(u1; (4-component vector of float)
0:94 'u1' (uint)
0:95 move second child to first child (4-component vector of float)
0:95 'v4' (4-component vector of float)
0:95 Function Call: unpackSnorm4x8(u1; (4-component vector of float)
0:95 'u1' (uint)
0:99 move second child to first child (double)
0:99 'd' (double)
0:99 Function Call: packDouble2x32(vu2; (double)
0:99 'u2' (2-component vector of uint)
0:100 move second child to first child (2-component vector of uint)
0:100 'u2' (2-component vector of uint)
0:100 Function Call: unpackDouble2x32(d1; (2-component vector of uint)
0:100 'd' (double)
0:? Linker Objects
0:? 'c2D' (smooth in 2-component vector of float)
0:? 'i' (flat in int)