From e88217b7d8bc88195c1f58c7fe634d2de1a8bb08 Mon Sep 17 00:00:00 2001 From: John Kessenich <cepheus@frii.com> Date: Tue, 18 Aug 2015 17:00:37 -0600 Subject: [PATCH] Add more TOperator: fma/frexp/ldexp, AddCarry/SubBorrow/MulExtended/Bit*/Find*, (un)pack4x8/2x32, ftransform. Also corrects some existing ones missing the "Op" part of their name. --- Test/baseResults/150.tesc.out | 8 +- Test/baseResults/310.frag.out | 8 +- Test/baseResults/310.tesc.out | 12 +- Test/baseResults/310.vert.out | 96 +++++++-------- Test/baseResults/400.frag.out | 32 ++--- Test/baseResults/400.geom.out | 64 +++++----- Test/baseResults/400.tesc.out | 8 +- glslang/Include/intermediate.h | 100 ++++++++++------ glslang/Include/revision.h | 2 +- glslang/MachineIndependent/Initialize.cpp | 140 +++++++++++++--------- glslang/MachineIndependent/intermOut.cpp | 99 +++++++++------ 11 files changed, 327 insertions(+), 242 deletions(-) diff --git a/Test/baseResults/150.tesc.out b/Test/baseResults/150.tesc.out index 423a1e534..323e0895f 100644 --- a/Test/baseResults/150.tesc.out +++ b/Test/baseResults/150.tesc.out @@ -401,13 +401,13 @@ ERROR: node is still EOpNull! 0:95 'pv3' (temp 3-component vector of float) 0:96 move second child to first child (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) -0:96 Function Call: fma(vf3;vf3;vf3; (global 3-component vector of float) +0:96 fma (global 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:97 move second child to first child (temp double) 0:97 'd' (temp double) -0:97 Function Call: fma(d1;d1;d1; (global double) +0:97 fma (global double) 0:97 'd' (temp double) 0:97 'd' (temp double) 0:97 'd' (temp double) @@ -1186,13 +1186,13 @@ vertices = 4 0:95 'pv3' (temp 3-component vector of float) 0:96 move second child to first child (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) -0:96 Function Call: fma(vf3;vf3;vf3; (global 3-component vector of float) +0:96 fma (global 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:97 move second child to first child (temp double) 0:97 'd' (temp double) -0:97 Function Call: fma(d1;d1;d1; (global double) +0:97 fma (global double) 0:97 'd' (temp double) 0:97 'd' (temp double) 0:97 'd' (temp double) diff --git a/Test/baseResults/310.frag.out b/Test/baseResults/310.frag.out index c92a6c9c3..3b8421e27 100644 --- a/Test/baseResults/310.frag.out +++ b/Test/baseResults/310.frag.out @@ -398,7 +398,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:210 move second child to first child (temp mediump 2-component vector of float) 0:210 'h' (temp mediump 2-component vector of float) -0:210 Function Call: fma(vf2;vf2;vf2; (global mediump 2-component vector of float) +0:210 fma (global mediump 2-component vector of float) 0:210 'inf' (smooth in mediump 2-component vector of float) 0:210 'ing' (smooth in mediump 2-component vector of float) 0:210 'h' (temp mediump 2-component vector of float) @@ -434,7 +434,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:220 move second child to first child (temp mediump 2-component vector of float) 0:220 'h' (temp mediump 2-component vector of float) -0:220 Function Call: fma(vf2;vf2;vf2; (global mediump 2-component vector of float) +0:220 fma (global mediump 2-component vector of float) 0:220 'inf' (smooth in mediump 2-component vector of float) 0:220 'ing' (smooth in mediump 2-component vector of float) 0:220 'h' (temp mediump 2-component vector of float) @@ -1121,7 +1121,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:210 move second child to first child (temp mediump 2-component vector of float) 0:210 'h' (temp mediump 2-component vector of float) -0:210 Function Call: fma(vf2;vf2;vf2; (global mediump 2-component vector of float) +0:210 fma (global mediump 2-component vector of float) 0:210 'inf' (smooth in mediump 2-component vector of float) 0:210 'ing' (smooth in mediump 2-component vector of float) 0:210 'h' (temp mediump 2-component vector of float) @@ -1157,7 +1157,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:220 move second child to first child (temp mediump 2-component vector of float) 0:220 'h' (temp mediump 2-component vector of float) -0:220 Function Call: fma(vf2;vf2;vf2; (global mediump 2-component vector of float) +0:220 fma (global mediump 2-component vector of float) 0:220 'inf' (smooth in mediump 2-component vector of float) 0:220 'ing' (smooth in mediump 2-component vector of float) 0:220 'h' (temp mediump 2-component vector of float) diff --git a/Test/baseResults/310.tesc.out b/Test/baseResults/310.tesc.out index 42afc61c6..158fcb77d 100644 --- a/Test/baseResults/310.tesc.out +++ b/Test/baseResults/310.tesc.out @@ -196,7 +196,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:95 move second child to first child (temp highp float) 0:95 'd' (temp highp float) -0:95 Function Call: fma(f1;f1;f1; (global highp float) +0:95 fma (global highp float) 0:95 'd' (temp highp float) 0:95 'd' (temp highp float) 0:95 'd' (temp highp float) @@ -230,13 +230,13 @@ ERROR: node is still EOpNull! 0:126 'pv3' (temp highp 3-component vector of float) 0:127 move second child to first child (temp highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) -0:127 Function Call: fma(vf3;vf3;vf3; (global highp 3-component vector of float) +0:127 fma (global highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) 0:128 move second child to first child (temp highp float) 0:128 'd' (temp highp float) -0:128 Function Call: fma(f1;f1;f1; (global highp float) +0:128 fma (global highp float) 0:128 'd' (temp highp float) 0:128 'd' (temp highp float) 0:128 'd' (temp highp float) @@ -458,7 +458,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:95 move second child to first child (temp highp float) 0:95 'd' (temp highp float) -0:95 Function Call: fma(f1;f1;f1; (global highp float) +0:95 fma (global highp float) 0:95 'd' (temp highp float) 0:95 'd' (temp highp float) 0:95 'd' (temp highp float) @@ -492,13 +492,13 @@ ERROR: node is still EOpNull! 0:126 'pv3' (temp highp 3-component vector of float) 0:127 move second child to first child (temp highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) -0:127 Function Call: fma(vf3;vf3;vf3; (global highp 3-component vector of float) +0:127 fma (global highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) 0:127 'pv3' (temp highp 3-component vector of float) 0:128 move second child to first child (temp highp float) 0:128 'd' (temp highp float) -0:128 Function Call: fma(f1;f1;f1; (global highp float) +0:128 fma (global highp float) 0:128 'd' (temp highp float) 0:128 'd' (temp highp float) 0:128 'd' (temp highp float) diff --git a/Test/baseResults/310.vert.out b/Test/baseResults/310.vert.out index afb2b911a..36a86e414 100644 --- a/Test/baseResults/310.vert.out +++ b/Test/baseResults/310.vert.out @@ -107,29 +107,29 @@ ERROR: node is still EOpNull! 0:? Sequence 0:15 move second child to first child (temp highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) -0:15 Function Call: uaddCarry(vu2;vu2;vu2; (global highp 2-component vector of uint) +0:15 addCarry (global highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) 0:17 move second child to first child (temp highp uint) 0:17 'u1' (temp highp uint) -0:17 Function Call: usubBorrow(u1;u1;u1; (global highp uint) +0:17 subBorrow (global highp uint) 0:17 'u1' (temp highp uint) 0:17 'u1' (temp highp uint) 0:17 'u1' (temp highp uint) -0:19 Function Call: umulExtended(vu4;vu4;vu4;vu4; (global void) +0:19 uMulExtended (global void) 0:19 'u4' (temp highp 4-component vector of uint) 0:19 'u4' (temp highp 4-component vector of uint) 0:19 'u4' (temp highp 4-component vector of uint) 0:19 'u4' (temp highp 4-component vector of uint) -0:21 Function Call: imulExtended(vi4;vi4;vi4;vi4; (global void) +0:21 iMulExtended (global void) 0:21 'i4' (temp highp 4-component vector of int) 0:21 'i4' (temp highp 4-component vector of int) 0:21 'i4' (temp highp 4-component vector of int) 0:21 'i4' (temp highp 4-component vector of int) 0:23 move second child to first child (temp highp int) 0:23 'i1' (temp highp int) -0:23 Function Call: bitfieldExtract(i1;i1;i1; (global highp int) +0:23 bitfieldExtract (global highp int) 0:23 'i1' (temp highp int) 0:23 Constant: 0:23 4 (const int) @@ -137,7 +137,7 @@ ERROR: node is still EOpNull! 0:23 5 (const int) 0:25 move second child to first child (temp highp 3-component vector of uint) 0:25 'u3' (temp highp 3-component vector of uint) -0:25 Function Call: bitfieldExtract(vu3;i1;i1; (global highp 3-component vector of uint) +0:25 bitfieldExtract (global highp 3-component vector of uint) 0:25 'u3' (temp highp 3-component vector of uint) 0:25 Constant: 0:25 4 (const int) @@ -145,7 +145,7 @@ ERROR: node is still EOpNull! 0:25 5 (const int) 0:27 move second child to first child (temp highp 3-component vector of int) 0:27 'i3' (temp highp 3-component vector of int) -0:27 Function Call: bitfieldInsert(vi3;vi3;i1;i1; (global highp 3-component vector of int) +0:27 bitfieldInsert (global highp 3-component vector of int) 0:27 'i3' (temp highp 3-component vector of int) 0:27 'i3' (temp highp 3-component vector of int) 0:27 Constant: @@ -154,7 +154,7 @@ ERROR: node is still EOpNull! 0:27 5 (const int) 0:28 move second child to first child (temp highp uint) 0:28 'u1' (temp highp uint) -0:28 Function Call: bitfieldInsert(u1;u1;i1;i1; (global highp uint) +0:28 bitfieldInsert (global highp uint) 0:28 'u1' (temp highp uint) 0:28 'u1' (temp highp uint) 0:28 Constant: @@ -163,61 +163,61 @@ ERROR: node is still EOpNull! 0:28 5 (const int) 0:30 move second child to first child (temp highp 2-component vector of int) 0:30 'i2' (temp highp 2-component vector of int) -0:30 Function Call: bitfieldReverse(vi2; (global highp 2-component vector of int) +0:30 bitFieldReverse (global highp 2-component vector of int) 0:30 'i2' (temp highp 2-component vector of int) 0:31 move second child to first child (temp highp 4-component vector of uint) 0:31 'u4' (temp highp 4-component vector of uint) -0:31 Function Call: bitfieldReverse(vu4; (global highp 4-component vector of uint) +0:31 bitFieldReverse (global highp 4-component vector of uint) 0:31 'u4' (temp highp 4-component vector of uint) 0:32 move second child to first child (temp highp int) 0:32 'i1' (temp highp int) -0:32 Function Call: bitCount(i1; (global highp int) +0:32 bitCount (global highp int) 0:32 'i1' (temp highp int) 0:33 move second child to first child (temp highp 3-component vector of int) 0:33 'i3' (temp highp 3-component vector of int) -0:33 Function Call: bitCount(vu3; (global highp 3-component vector of int) +0:33 bitCount (global highp 3-component vector of int) 0:33 'u3' (temp highp 3-component vector of uint) 0:34 move second child to first child (temp highp 2-component vector of int) 0:34 'i2' (temp highp 2-component vector of int) -0:34 Function Call: findLSB(vi2; (global highp 2-component vector of int) +0:34 findLSB (global highp 2-component vector of int) 0:34 'i2' (temp highp 2-component vector of int) 0:35 move second child to first child (temp highp 4-component vector of int) 0:35 'i4' (temp highp 4-component vector of int) -0:35 Function Call: findLSB(vu4; (global highp 4-component vector of int) +0:35 findLSB (global highp 4-component vector of int) 0:35 'u4' (temp highp 4-component vector of uint) 0:36 move second child to first child (temp highp int) 0:36 'i1' (temp highp int) -0:36 Function Call: findMSB(i1; (global highp int) +0:36 findMSB (global highp int) 0:36 'i1' (temp highp int) 0:37 move second child to first child (temp highp 2-component vector of int) 0:37 'i2' (temp highp 2-component vector of int) -0:37 Function Call: findMSB(vu2; (global highp 2-component vector of int) +0:37 findMSB (global highp 2-component vector of int) 0:37 'u2' (temp highp 2-component vector of uint) 0:40 move second child to first child (temp highp 3-component vector of float) 0:40 'v3' (temp highp 3-component vector of float) -0:40 Function Call: frexp(vf3;vi3; (global highp 3-component vector of float) +0:40 frexp (global highp 3-component vector of float) 0:40 'v3' (temp highp 3-component vector of float) 0:40 'i3' (temp highp 3-component vector of int) 0:42 move second child to first child (temp highp 2-component vector of float) 0:42 'v2' (temp highp 2-component vector of float) -0:42 Function Call: ldexp(vf2;vi2; (global highp 2-component vector of float) +0:42 ldexp (global highp 2-component vector of float) 0:42 'v2' (temp highp 2-component vector of float) 0:42 'i2' (temp highp 2-component vector of int) 0:45 move second child to first child (temp highp uint) 0:45 'u1' (temp highp uint) -0:45 Function Call: packUnorm4x8(vf4; (global highp uint) +0:45 PackUnorm4x8 (global highp uint) 0:45 'v4' (temp mediump 4-component vector of float) 0:46 move second child to first child (temp highp uint) 0:46 'u1' (temp highp uint) -0:46 Function Call: packSnorm4x8(vf4; (global highp uint) +0:46 PackSnorm4x8 (global highp uint) 0:46 'v4' (temp mediump 4-component vector of float) 0:47 move second child to first child (temp mediump 4-component vector of float) 0:47 'v4' (temp mediump 4-component vector of float) -0:47 Function Call: unpackUnorm4x8(u1; (global mediump 4-component vector of float) +0:47 UnpackUnorm4x8 (global mediump 4-component vector of float) 0:47 'u1' (temp highp uint) 0:48 move second child to first child (temp mediump 4-component vector of float) 0:48 'v4' (temp mediump 4-component vector of float) -0:48 Function Call: unpackSnorm4x8(u1; (global mediump 4-component vector of float) +0:48 UnpackSnorm4x8 (global mediump 4-component vector of float) 0:48 'u1' (temp highp uint) 0:60 Function Definition: foo( (global void) 0:60 Function Parameters: @@ -276,7 +276,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:156 move second child to first child (temp highp 2-component vector of float) 0:156 'h' (temp highp 2-component vector of float) -0:156 Function Call: fma(vf2;vf2;vf2; (global highp 2-component vector of float) +0:156 fma (global highp 2-component vector of float) 0:156 'inf' (in highp 2-component vector of float) 0:156 'ing' (in highp 2-component vector of float) 0:156 'h' (temp highp 2-component vector of float) @@ -351,7 +351,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:174 move second child to first child (temp highp 2-component vector of float) 0:174 'h' (temp highp 2-component vector of float) -0:174 Function Call: fma(vf2;vf2;vf2; (global highp 2-component vector of float) +0:174 fma (global highp 2-component vector of float) 0:174 'inf' (in highp 2-component vector of float) 0:174 'ing' (in highp 2-component vector of float) 0:174 'h' (temp highp 2-component vector of float) @@ -974,29 +974,29 @@ ERROR: node is still EOpNull! 0:? Sequence 0:15 move second child to first child (temp highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) -0:15 Function Call: uaddCarry(vu2;vu2;vu2; (global highp 2-component vector of uint) +0:15 addCarry (global highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) 0:15 'u2' (temp highp 2-component vector of uint) 0:17 move second child to first child (temp highp uint) 0:17 'u1' (temp highp uint) -0:17 Function Call: usubBorrow(u1;u1;u1; (global highp uint) +0:17 subBorrow (global highp uint) 0:17 'u1' (temp highp uint) 0:17 'u1' (temp highp uint) 0:17 'u1' (temp highp uint) -0:19 Function Call: umulExtended(vu4;vu4;vu4;vu4; (global void) +0:19 uMulExtended (global void) 0:19 'u4' (temp highp 4-component vector of uint) 0:19 'u4' (temp highp 4-component vector of uint) 0:19 'u4' (temp highp 4-component vector of uint) 0:19 'u4' (temp highp 4-component vector of uint) -0:21 Function Call: imulExtended(vi4;vi4;vi4;vi4; (global void) +0:21 iMulExtended (global void) 0:21 'i4' (temp highp 4-component vector of int) 0:21 'i4' (temp highp 4-component vector of int) 0:21 'i4' (temp highp 4-component vector of int) 0:21 'i4' (temp highp 4-component vector of int) 0:23 move second child to first child (temp highp int) 0:23 'i1' (temp highp int) -0:23 Function Call: bitfieldExtract(i1;i1;i1; (global highp int) +0:23 bitfieldExtract (global highp int) 0:23 'i1' (temp highp int) 0:23 Constant: 0:23 4 (const int) @@ -1004,7 +1004,7 @@ ERROR: node is still EOpNull! 0:23 5 (const int) 0:25 move second child to first child (temp highp 3-component vector of uint) 0:25 'u3' (temp highp 3-component vector of uint) -0:25 Function Call: bitfieldExtract(vu3;i1;i1; (global highp 3-component vector of uint) +0:25 bitfieldExtract (global highp 3-component vector of uint) 0:25 'u3' (temp highp 3-component vector of uint) 0:25 Constant: 0:25 4 (const int) @@ -1012,7 +1012,7 @@ ERROR: node is still EOpNull! 0:25 5 (const int) 0:27 move second child to first child (temp highp 3-component vector of int) 0:27 'i3' (temp highp 3-component vector of int) -0:27 Function Call: bitfieldInsert(vi3;vi3;i1;i1; (global highp 3-component vector of int) +0:27 bitfieldInsert (global highp 3-component vector of int) 0:27 'i3' (temp highp 3-component vector of int) 0:27 'i3' (temp highp 3-component vector of int) 0:27 Constant: @@ -1021,7 +1021,7 @@ ERROR: node is still EOpNull! 0:27 5 (const int) 0:28 move second child to first child (temp highp uint) 0:28 'u1' (temp highp uint) -0:28 Function Call: bitfieldInsert(u1;u1;i1;i1; (global highp uint) +0:28 bitfieldInsert (global highp uint) 0:28 'u1' (temp highp uint) 0:28 'u1' (temp highp uint) 0:28 Constant: @@ -1030,61 +1030,61 @@ ERROR: node is still EOpNull! 0:28 5 (const int) 0:30 move second child to first child (temp highp 2-component vector of int) 0:30 'i2' (temp highp 2-component vector of int) -0:30 Function Call: bitfieldReverse(vi2; (global highp 2-component vector of int) +0:30 bitFieldReverse (global highp 2-component vector of int) 0:30 'i2' (temp highp 2-component vector of int) 0:31 move second child to first child (temp highp 4-component vector of uint) 0:31 'u4' (temp highp 4-component vector of uint) -0:31 Function Call: bitfieldReverse(vu4; (global highp 4-component vector of uint) +0:31 bitFieldReverse (global highp 4-component vector of uint) 0:31 'u4' (temp highp 4-component vector of uint) 0:32 move second child to first child (temp highp int) 0:32 'i1' (temp highp int) -0:32 Function Call: bitCount(i1; (global highp int) +0:32 bitCount (global highp int) 0:32 'i1' (temp highp int) 0:33 move second child to first child (temp highp 3-component vector of int) 0:33 'i3' (temp highp 3-component vector of int) -0:33 Function Call: bitCount(vu3; (global highp 3-component vector of int) +0:33 bitCount (global highp 3-component vector of int) 0:33 'u3' (temp highp 3-component vector of uint) 0:34 move second child to first child (temp highp 2-component vector of int) 0:34 'i2' (temp highp 2-component vector of int) -0:34 Function Call: findLSB(vi2; (global highp 2-component vector of int) +0:34 findLSB (global highp 2-component vector of int) 0:34 'i2' (temp highp 2-component vector of int) 0:35 move second child to first child (temp highp 4-component vector of int) 0:35 'i4' (temp highp 4-component vector of int) -0:35 Function Call: findLSB(vu4; (global highp 4-component vector of int) +0:35 findLSB (global highp 4-component vector of int) 0:35 'u4' (temp highp 4-component vector of uint) 0:36 move second child to first child (temp highp int) 0:36 'i1' (temp highp int) -0:36 Function Call: findMSB(i1; (global highp int) +0:36 findMSB (global highp int) 0:36 'i1' (temp highp int) 0:37 move second child to first child (temp highp 2-component vector of int) 0:37 'i2' (temp highp 2-component vector of int) -0:37 Function Call: findMSB(vu2; (global highp 2-component vector of int) +0:37 findMSB (global highp 2-component vector of int) 0:37 'u2' (temp highp 2-component vector of uint) 0:40 move second child to first child (temp highp 3-component vector of float) 0:40 'v3' (temp highp 3-component vector of float) -0:40 Function Call: frexp(vf3;vi3; (global highp 3-component vector of float) +0:40 frexp (global highp 3-component vector of float) 0:40 'v3' (temp highp 3-component vector of float) 0:40 'i3' (temp highp 3-component vector of int) 0:42 move second child to first child (temp highp 2-component vector of float) 0:42 'v2' (temp highp 2-component vector of float) -0:42 Function Call: ldexp(vf2;vi2; (global highp 2-component vector of float) +0:42 ldexp (global highp 2-component vector of float) 0:42 'v2' (temp highp 2-component vector of float) 0:42 'i2' (temp highp 2-component vector of int) 0:45 move second child to first child (temp highp uint) 0:45 'u1' (temp highp uint) -0:45 Function Call: packUnorm4x8(vf4; (global highp uint) +0:45 PackUnorm4x8 (global highp uint) 0:45 'v4' (temp mediump 4-component vector of float) 0:46 move second child to first child (temp highp uint) 0:46 'u1' (temp highp uint) -0:46 Function Call: packSnorm4x8(vf4; (global highp uint) +0:46 PackSnorm4x8 (global highp uint) 0:46 'v4' (temp mediump 4-component vector of float) 0:47 move second child to first child (temp mediump 4-component vector of float) 0:47 'v4' (temp mediump 4-component vector of float) -0:47 Function Call: unpackUnorm4x8(u1; (global mediump 4-component vector of float) +0:47 UnpackUnorm4x8 (global mediump 4-component vector of float) 0:47 'u1' (temp highp uint) 0:48 move second child to first child (temp mediump 4-component vector of float) 0:48 'v4' (temp mediump 4-component vector of float) -0:48 Function Call: unpackSnorm4x8(u1; (global mediump 4-component vector of float) +0:48 UnpackSnorm4x8 (global mediump 4-component vector of float) 0:48 'u1' (temp highp uint) 0:60 Function Definition: foo( (global void) 0:60 Function Parameters: @@ -1143,7 +1143,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:156 move second child to first child (temp highp 2-component vector of float) 0:156 'h' (temp highp 2-component vector of float) -0:156 Function Call: fma(vf2;vf2;vf2; (global highp 2-component vector of float) +0:156 fma (global highp 2-component vector of float) 0:156 'inf' (in highp 2-component vector of float) 0:156 'ing' (in highp 2-component vector of float) 0:156 'h' (temp highp 2-component vector of float) @@ -1218,7 +1218,7 @@ ERROR: node is still EOpNull! 0:? Sequence 0:174 move second child to first child (temp highp 2-component vector of float) 0:174 'h' (temp highp 2-component vector of float) -0:174 Function Call: fma(vf2;vf2;vf2; (global highp 2-component vector of float) +0:174 fma (global highp 2-component vector of float) 0:174 'inf' (in highp 2-component vector of float) 0:174 'ing' (in highp 2-component vector of float) 0:174 'h' (temp highp 2-component vector of float) diff --git a/Test/baseResults/400.frag.out b/Test/baseResults/400.frag.out index c711bc62a..a4a880c42 100644 --- a/Test/baseResults/400.frag.out +++ b/Test/baseResults/400.frag.out @@ -266,37 +266,37 @@ ERROR: node is still EOpNull! 0:84 'in4' (smooth in 4-component vector of float) 0:89 move second child to first child (temp 2-component vector of float) 0:89 'v2' (temp 2-component vector of float) -0:89 Function Call: frexp(vf2;vi2; (global 2-component vector of float) +0:89 frexp (global 2-component vector of float) 0:89 'v2' (temp 2-component vector of float) 0:89 'i2' (temp 2-component vector of int) 0:90 move second child to first child (temp 3-component vector of float) 0:90 'v3' (temp 3-component vector of float) -0:90 Function Call: ldexp(vf3;vi3; (global 3-component vector of float) +0:90 ldexp (global 3-component vector of float) 0:90 'v3' (temp 3-component vector of float) 0:90 'i3' (temp 3-component vector of int) 0:92 move second child to first child (temp uint) 0:92 'u1' (temp uint) -0:92 Function Call: packUnorm4x8(vf4; (global uint) +0:92 PackUnorm4x8 (global uint) 0:92 'v4' (temp 4-component vector of float) 0:93 move second child to first child (temp uint) 0:93 'u1' (temp uint) -0:93 Function Call: packSnorm4x8(vf4; (global uint) +0:93 PackSnorm4x8 (global uint) 0:93 'v4' (temp 4-component vector of float) 0:94 move second child to first child (temp 4-component vector of float) 0:94 'v4' (temp 4-component vector of float) -0:94 Function Call: unpackUnorm4x8(u1; (global 4-component vector of float) +0:94 UnpackUnorm4x8 (global 4-component vector of float) 0:94 'u1' (temp uint) 0:95 move second child to first child (temp 4-component vector of float) 0:95 'v4' (temp 4-component vector of float) -0:95 Function Call: unpackSnorm4x8(u1; (global 4-component vector of float) +0:95 UnpackSnorm4x8 (global 4-component vector of float) 0:95 'u1' (temp uint) 0:99 move second child to first child (temp double) 0:99 'd' (temp double) -0:99 Function Call: packDouble2x32(vu2; (global double) +0:99 PackUnorm4x8 (global double) 0:99 'u2' (temp 2-component vector of uint) 0:100 move second child to first child (temp 2-component vector of uint) 0:100 'u2' (temp 2-component vector of uint) -0:100 Function Call: unpackDouble2x32(d1; (global 2-component vector of uint) +0:100 UnpackUnorm4x8 (global 2-component vector of uint) 0:100 'd' (temp double) 0:? Linker Objects 0:? 'c2D' (smooth in 2-component vector of float) @@ -569,37 +569,37 @@ ERROR: node is still EOpNull! 0:84 'in4' (smooth in 4-component vector of float) 0:89 move second child to first child (temp 2-component vector of float) 0:89 'v2' (temp 2-component vector of float) -0:89 Function Call: frexp(vf2;vi2; (global 2-component vector of float) +0:89 frexp (global 2-component vector of float) 0:89 'v2' (temp 2-component vector of float) 0:89 'i2' (temp 2-component vector of int) 0:90 move second child to first child (temp 3-component vector of float) 0:90 'v3' (temp 3-component vector of float) -0:90 Function Call: ldexp(vf3;vi3; (global 3-component vector of float) +0:90 ldexp (global 3-component vector of float) 0:90 'v3' (temp 3-component vector of float) 0:90 'i3' (temp 3-component vector of int) 0:92 move second child to first child (temp uint) 0:92 'u1' (temp uint) -0:92 Function Call: packUnorm4x8(vf4; (global uint) +0:92 PackUnorm4x8 (global uint) 0:92 'v4' (temp 4-component vector of float) 0:93 move second child to first child (temp uint) 0:93 'u1' (temp uint) -0:93 Function Call: packSnorm4x8(vf4; (global uint) +0:93 PackSnorm4x8 (global uint) 0:93 'v4' (temp 4-component vector of float) 0:94 move second child to first child (temp 4-component vector of float) 0:94 'v4' (temp 4-component vector of float) -0:94 Function Call: unpackUnorm4x8(u1; (global 4-component vector of float) +0:94 UnpackUnorm4x8 (global 4-component vector of float) 0:94 'u1' (temp uint) 0:95 move second child to first child (temp 4-component vector of float) 0:95 'v4' (temp 4-component vector of float) -0:95 Function Call: unpackSnorm4x8(u1; (global 4-component vector of float) +0:95 UnpackSnorm4x8 (global 4-component vector of float) 0:95 'u1' (temp uint) 0:99 move second child to first child (temp double) 0:99 'd' (temp double) -0:99 Function Call: packDouble2x32(vu2; (global double) +0:99 PackUnorm4x8 (global double) 0:99 'u2' (temp 2-component vector of uint) 0:100 move second child to first child (temp 2-component vector of uint) 0:100 'u2' (temp 2-component vector of uint) -0:100 Function Call: unpackDouble2x32(d1; (global 2-component vector of uint) +0:100 UnpackUnorm4x8 (global 2-component vector of uint) 0:100 'd' (temp double) 0:? Linker Objects 0:? 'c2D' (smooth in 2-component vector of float) diff --git a/Test/baseResults/400.geom.out b/Test/baseResults/400.geom.out index 31b5e269a..09e0b66b0 100644 --- a/Test/baseResults/400.geom.out +++ b/Test/baseResults/400.geom.out @@ -79,29 +79,29 @@ ERROR: node is still EOpNull! 0:? Sequence 0:78 move second child to first child (temp 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) -0:78 Function Call: uaddCarry(vu2;vu2;vu2; (global 2-component vector of uint) +0:78 addCarry (global 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) 0:80 move second child to first child (temp uint) 0:80 'u1' (temp uint) -0:80 Function Call: usubBorrow(u1;u1;u1; (global uint) +0:80 subBorrow (global uint) 0:80 'u1' (temp uint) 0:80 'u1' (temp uint) 0:80 'u1' (temp uint) -0:82 Function Call: umulExtended(vu4;vu4;vu4;vu4; (global void) +0:82 uMulExtended (global void) 0:82 'u4' (temp 4-component vector of uint) 0:82 'u4' (temp 4-component vector of uint) 0:82 'u4' (temp 4-component vector of uint) 0:82 'u4' (temp 4-component vector of uint) -0:84 Function Call: imulExtended(vi4;vi4;vi4;vi4; (global void) +0:84 iMulExtended (global void) 0:84 'i4' (temp 4-component vector of int) 0:84 'i4' (temp 4-component vector of int) 0:84 'i4' (temp 4-component vector of int) 0:84 'i4' (temp 4-component vector of int) 0:86 move second child to first child (temp int) 0:86 'i1' (temp int) -0:86 Function Call: bitfieldExtract(i1;i1;i1; (global int) +0:86 bitfieldExtract (global int) 0:86 'i1' (temp int) 0:86 Constant: 0:86 4 (const int) @@ -109,7 +109,7 @@ ERROR: node is still EOpNull! 0:86 5 (const int) 0:88 move second child to first child (temp 3-component vector of uint) 0:88 'u3' (temp 3-component vector of uint) -0:88 Function Call: bitfieldExtract(vu3;i1;i1; (global 3-component vector of uint) +0:88 bitfieldExtract (global 3-component vector of uint) 0:88 'u3' (temp 3-component vector of uint) 0:88 Constant: 0:88 4 (const int) @@ -117,7 +117,7 @@ ERROR: node is still EOpNull! 0:88 5 (const int) 0:90 move second child to first child (temp 3-component vector of int) 0:90 'i3' (temp 3-component vector of int) -0:90 Function Call: bitfieldInsert(vi3;vi3;i1;i1; (global 3-component vector of int) +0:90 bitfieldInsert (global 3-component vector of int) 0:90 'i3' (temp 3-component vector of int) 0:90 'i3' (temp 3-component vector of int) 0:90 Constant: @@ -126,7 +126,7 @@ ERROR: node is still EOpNull! 0:90 5 (const int) 0:91 move second child to first child (temp uint) 0:91 'u1' (temp uint) -0:91 Function Call: bitfieldInsert(u1;u1;i1;i1; (global uint) +0:91 bitfieldInsert (global uint) 0:91 'u1' (temp uint) 0:91 'u1' (temp uint) 0:91 Constant: @@ -135,35 +135,35 @@ ERROR: node is still EOpNull! 0:91 5 (const int) 0:93 move second child to first child (temp 2-component vector of int) 0:93 'i2' (temp 2-component vector of int) -0:93 Function Call: bitfieldReverse(vi2; (global 2-component vector of int) +0:93 bitFieldReverse (global 2-component vector of int) 0:93 'i2' (temp 2-component vector of int) 0:94 move second child to first child (temp 4-component vector of uint) 0:94 'u4' (temp 4-component vector of uint) -0:94 Function Call: bitfieldReverse(vu4; (global 4-component vector of uint) +0:94 bitFieldReverse (global 4-component vector of uint) 0:94 'u4' (temp 4-component vector of uint) 0:95 move second child to first child (temp int) 0:95 'i1' (temp int) -0:95 Function Call: bitCount(i1; (global int) +0:95 bitCount (global int) 0:95 'i1' (temp int) 0:96 move second child to first child (temp 3-component vector of int) 0:96 'i3' (temp 3-component vector of int) -0:96 Function Call: bitCount(vu3; (global 3-component vector of int) +0:96 bitCount (global 3-component vector of int) 0:96 'u3' (temp 3-component vector of uint) 0:97 move second child to first child (temp 2-component vector of int) 0:97 'i2' (temp 2-component vector of int) -0:97 Function Call: findLSB(vi2; (global 2-component vector of int) +0:97 findLSB (global 2-component vector of int) 0:97 'i2' (temp 2-component vector of int) 0:98 move second child to first child (temp 4-component vector of int) 0:98 'i4' (temp 4-component vector of int) -0:98 Function Call: findLSB(vu4; (global 4-component vector of int) +0:98 findLSB (global 4-component vector of int) 0:98 'u4' (temp 4-component vector of uint) 0:99 move second child to first child (temp int) 0:99 'i1' (temp int) -0:99 Function Call: findMSB(i1; (global int) +0:99 findMSB (global int) 0:99 'i1' (temp int) 0:100 move second child to first child (temp 2-component vector of int) 0:100 'i2' (temp 2-component vector of int) -0:100 Function Call: findMSB(vu2; (global 2-component vector of int) +0:100 findMSB (global 2-component vector of int) 0:100 'u2' (temp 2-component vector of uint) 0:? Linker Objects 0:? 'bn' (in 3-element array of block{in int a}) @@ -245,29 +245,29 @@ ERROR: node is still EOpNull! 0:? Sequence 0:78 move second child to first child (temp 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) -0:78 Function Call: uaddCarry(vu2;vu2;vu2; (global 2-component vector of uint) +0:78 addCarry (global 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) 0:78 'u2' (temp 2-component vector of uint) 0:80 move second child to first child (temp uint) 0:80 'u1' (temp uint) -0:80 Function Call: usubBorrow(u1;u1;u1; (global uint) +0:80 subBorrow (global uint) 0:80 'u1' (temp uint) 0:80 'u1' (temp uint) 0:80 'u1' (temp uint) -0:82 Function Call: umulExtended(vu4;vu4;vu4;vu4; (global void) +0:82 uMulExtended (global void) 0:82 'u4' (temp 4-component vector of uint) 0:82 'u4' (temp 4-component vector of uint) 0:82 'u4' (temp 4-component vector of uint) 0:82 'u4' (temp 4-component vector of uint) -0:84 Function Call: imulExtended(vi4;vi4;vi4;vi4; (global void) +0:84 iMulExtended (global void) 0:84 'i4' (temp 4-component vector of int) 0:84 'i4' (temp 4-component vector of int) 0:84 'i4' (temp 4-component vector of int) 0:84 'i4' (temp 4-component vector of int) 0:86 move second child to first child (temp int) 0:86 'i1' (temp int) -0:86 Function Call: bitfieldExtract(i1;i1;i1; (global int) +0:86 bitfieldExtract (global int) 0:86 'i1' (temp int) 0:86 Constant: 0:86 4 (const int) @@ -275,7 +275,7 @@ ERROR: node is still EOpNull! 0:86 5 (const int) 0:88 move second child to first child (temp 3-component vector of uint) 0:88 'u3' (temp 3-component vector of uint) -0:88 Function Call: bitfieldExtract(vu3;i1;i1; (global 3-component vector of uint) +0:88 bitfieldExtract (global 3-component vector of uint) 0:88 'u3' (temp 3-component vector of uint) 0:88 Constant: 0:88 4 (const int) @@ -283,7 +283,7 @@ ERROR: node is still EOpNull! 0:88 5 (const int) 0:90 move second child to first child (temp 3-component vector of int) 0:90 'i3' (temp 3-component vector of int) -0:90 Function Call: bitfieldInsert(vi3;vi3;i1;i1; (global 3-component vector of int) +0:90 bitfieldInsert (global 3-component vector of int) 0:90 'i3' (temp 3-component vector of int) 0:90 'i3' (temp 3-component vector of int) 0:90 Constant: @@ -292,7 +292,7 @@ ERROR: node is still EOpNull! 0:90 5 (const int) 0:91 move second child to first child (temp uint) 0:91 'u1' (temp uint) -0:91 Function Call: bitfieldInsert(u1;u1;i1;i1; (global uint) +0:91 bitfieldInsert (global uint) 0:91 'u1' (temp uint) 0:91 'u1' (temp uint) 0:91 Constant: @@ -301,35 +301,35 @@ ERROR: node is still EOpNull! 0:91 5 (const int) 0:93 move second child to first child (temp 2-component vector of int) 0:93 'i2' (temp 2-component vector of int) -0:93 Function Call: bitfieldReverse(vi2; (global 2-component vector of int) +0:93 bitFieldReverse (global 2-component vector of int) 0:93 'i2' (temp 2-component vector of int) 0:94 move second child to first child (temp 4-component vector of uint) 0:94 'u4' (temp 4-component vector of uint) -0:94 Function Call: bitfieldReverse(vu4; (global 4-component vector of uint) +0:94 bitFieldReverse (global 4-component vector of uint) 0:94 'u4' (temp 4-component vector of uint) 0:95 move second child to first child (temp int) 0:95 'i1' (temp int) -0:95 Function Call: bitCount(i1; (global int) +0:95 bitCount (global int) 0:95 'i1' (temp int) 0:96 move second child to first child (temp 3-component vector of int) 0:96 'i3' (temp 3-component vector of int) -0:96 Function Call: bitCount(vu3; (global 3-component vector of int) +0:96 bitCount (global 3-component vector of int) 0:96 'u3' (temp 3-component vector of uint) 0:97 move second child to first child (temp 2-component vector of int) 0:97 'i2' (temp 2-component vector of int) -0:97 Function Call: findLSB(vi2; (global 2-component vector of int) +0:97 findLSB (global 2-component vector of int) 0:97 'i2' (temp 2-component vector of int) 0:98 move second child to first child (temp 4-component vector of int) 0:98 'i4' (temp 4-component vector of int) -0:98 Function Call: findLSB(vu4; (global 4-component vector of int) +0:98 findLSB (global 4-component vector of int) 0:98 'u4' (temp 4-component vector of uint) 0:99 move second child to first child (temp int) 0:99 'i1' (temp int) -0:99 Function Call: findMSB(i1; (global int) +0:99 findMSB (global int) 0:99 'i1' (temp int) 0:100 move second child to first child (temp 2-component vector of int) 0:100 'i2' (temp 2-component vector of int) -0:100 Function Call: findMSB(vu2; (global 2-component vector of int) +0:100 findMSB (global 2-component vector of int) 0:100 'u2' (temp 2-component vector of uint) 0:? Linker Objects 0:? 'bn' (in 3-element array of block{in int a}) diff --git a/Test/baseResults/400.tesc.out b/Test/baseResults/400.tesc.out index 9d1784e58..93f8cd4e5 100644 --- a/Test/baseResults/400.tesc.out +++ b/Test/baseResults/400.tesc.out @@ -187,13 +187,13 @@ ERROR: node is still EOpNull! 0:95 'pv3' (temp 3-component vector of float) 0:96 move second child to first child (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) -0:96 Function Call: fma(vf3;vf3;vf3; (global 3-component vector of float) +0:96 fma (global 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:97 move second child to first child (temp double) 0:97 'd' (temp double) -0:97 Function Call: fma(d1;d1;d1; (global double) +0:97 fma (global double) 0:97 'd' (temp double) 0:97 'd' (temp double) 0:97 'd' (temp double) @@ -385,13 +385,13 @@ ERROR: node is still EOpNull! 0:95 'pv3' (temp 3-component vector of float) 0:96 move second child to first child (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) -0:96 Function Call: fma(vf3;vf3;vf3; (global 3-component vector of float) +0:96 fma (global 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:96 'pv3' (temp 3-component vector of float) 0:97 move second child to first child (temp double) 0:97 'd' (temp double) -0:97 Function Call: fma(d1;d1;d1; (global double) +0:97 fma (global double) 0:97 'd' (temp double) 0:97 'd' (temp double) 0:97 'd' (temp double) diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index 589c8a149..c613cc13c 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -140,7 +140,7 @@ enum TOperator { EOpMethod, // - // Built-in functions potentially mapped to operators + // Built-in functions mapped to operators // EOpRadians, @@ -185,6 +185,11 @@ enum TOperator { EOpIsNan, EOpIsInf, + EOpFma, + + EFrexp, + ELdexp, + EOpFloatBitsToInt, EOpFloatBitsToUint, EOpIntBitsToFloat, @@ -193,8 +198,14 @@ enum TOperator { EOpUnpackSnorm2x16, EOpPackUnorm2x16, EOpUnpackUnorm2x16, + EOpPackSnorm4x8, + EOpUnpackSnorm4x8, + EOpPackUnorm4x8, + EOpUnpackUnorm4x8, EOpPackHalf2x16, EOpUnpackHalf2x16, + EOpPackDouble2x32, + EOpUnpackDouble2x32, EOpLength, EOpDistance, @@ -221,6 +232,8 @@ enum TOperator { EOpMatrixInverse, EOpTranspose, + EOpFtransform, + EOpEmitVertex, // geometry only EOpEndPrimitive, // geometry only EOpEmitStreamVertex, // geometry only @@ -340,46 +353,61 @@ enum TOperator { // N.B. The following is not being used yet, pending input, as switching // to it from the current text-based approach will break existing consumers. - EImageQuerySize, - EImageQuerySamples, - EImageLoad, - EImageStore, - EImageAtomicAdd, - EImageAtomicMin, - EImageAtomicMax, - EImageAtomicAnd, - EImageAtomicOr, - EImageAtomicXor, - EImageAtomicExchange, - EImageAtomicCompSwap, + EOpImageQuerySize, + EOpImageQuerySamples, + EOpImageLoad, + EOpImageStore, + EOpImageAtomicAdd, + EOpImageAtomicMin, + EOpImageAtomicMax, + EOpImageAtomicAnd, + EOpImageAtomicOr, + EOpImageAtomicXor, + EOpImageAtomicExchange, + EOpImageAtomicCompSwap, // // Texture operations // - ETextureGuardBegin, - ETextureQuerySize, - ETextureQueryLod, - ETextureQueryLevels, - ETextureQuerySamples, - ETexture, - ETextureProj, - ETextureLod, - ETextureOffset, - ETextureFetch, - ETextureFetchOffset, - ETextureProjOffset, - ETextureLodOffset, - ETextureProjLod, - ETextureProjLodOffset, - ETextureGrad, - ETextureGradOffset, - ETextureProjGrad, - ETextureProjGradOffset, - ETextureGather, - ETextureGatherOffset, - ETextureGatherOffsets, - ETextureGuardEnd, + EOpTextureGuardBegin, + EOpTextureQuerySize, + EOpTextureQueryLod, + EOpTextureQueryLevels, + EOpTextureQuerySamples, + EOpTexture, + EOpTextureProj, + EOpTextureLod, + EOpTextureOffset, + EOpTextureFetch, + EOpTextureFetchOffset, + EOpTextureProjOffset, + EOpTextureLodOffset, + EOpTextureProjLod, + EOpTextureProjLodOffset, + EOpTextureGrad, + EOpTextureGradOffset, + EOpTextureProjGrad, + EOpTextureProjGradOffset, + EOpTextureGather, + EOpTextureGatherOffset, + EOpTextureGatherOffsets, + EOpTextureGuardEnd, + + // + // Integer operations + // + + EOpAddCarry, + EOpSubBorrow, + EOpUMulExtended, + EOpIMulExtended, + EOpBitfieldExtract, + EOpBitfieldInsert, + EOpBitFieldReverse, + EOpBitCount, + EOpFindLSB, + EOpFindMSB, }; class TIntermTraverser; diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index 05af79b81..627fb9296 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "2.3.721" +#define GLSLANG_REVISION "2.3.723" #define GLSLANG_DATE "18-Aug-2015" diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 47b5194b5..450884b78 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -57,7 +57,9 @@ namespace glslang { bool ARBCompatibility = true; const bool ForwardCompatibility = false; -const bool PureOperatorBuiltins = false; // could break backward compatibility; pending feedback + +// change this back to false if depending on textual spellings of texturing calls when consuming the AST +const bool PureOperatorBuiltins = false; inline bool IncludeLegacy(int version, EProfile profile) { @@ -3167,10 +3169,20 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb symbolTable.relateToOperator("floatBitsToUint", EOpFloatBitsToUint); symbolTable.relateToOperator("intBitsToFloat", EOpIntBitsToFloat); symbolTable.relateToOperator("uintBitsToFloat", EOpUintBitsToFloat); + symbolTable.relateToOperator("packSnorm2x16", EOpPackSnorm2x16); symbolTable.relateToOperator("unpackSnorm2x16", EOpUnpackSnorm2x16); symbolTable.relateToOperator("packUnorm2x16", EOpPackUnorm2x16); symbolTable.relateToOperator("unpackUnorm2x16", EOpUnpackUnorm2x16); + + symbolTable.relateToOperator("packSnorm4x8", EOpPackSnorm4x8); + symbolTable.relateToOperator("unpackSnorm4x8", EOpUnpackSnorm4x8); + symbolTable.relateToOperator("packUnorm4x8", EOpPackUnorm4x8); + symbolTable.relateToOperator("unpackUnorm4x8", EOpUnpackUnorm4x8); + + symbolTable.relateToOperator("packDouble2x32", EOpPackUnorm4x8); + symbolTable.relateToOperator("unpackDouble2x32", EOpUnpackUnorm4x8); + symbolTable.relateToOperator("packHalf2x16", EOpPackHalf2x16); symbolTable.relateToOperator("unpackHalf2x16", EOpUnpackHalf2x16); @@ -3205,66 +3217,80 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement); symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter); + symbolTable.relateToOperator("fma", EOpFma); + symbolTable.relateToOperator("frexp", EFrexp); + symbolTable.relateToOperator("ldexp", ELdexp); + symbolTable.relateToOperator("uaddCarry", EOpAddCarry); + symbolTable.relateToOperator("usubBorrow", EOpSubBorrow); + symbolTable.relateToOperator("umulExtended", EOpUMulExtended); + symbolTable.relateToOperator("imulExtended", EOpIMulExtended); + symbolTable.relateToOperator("bitfieldExtract", EOpBitfieldExtract); + symbolTable.relateToOperator("bitfieldInsert", EOpBitfieldInsert); + symbolTable.relateToOperator("bitfieldReverse", EOpBitFieldReverse); + symbolTable.relateToOperator("bitCount", EOpBitCount); + symbolTable.relateToOperator("findLSB", EOpFindLSB); + symbolTable.relateToOperator("findMSB", EOpFindMSB); + if (PureOperatorBuiltins) { - symbolTable.relateToOperator("imageQuerySize", EImageQuerySize); - symbolTable.relateToOperator("imageQuerySamples", EImageQuerySamples); - symbolTable.relateToOperator("imageLoad", EImageLoad); - symbolTable.relateToOperator("imageStore", EImageStore); - symbolTable.relateToOperator("imageAtomicAdd", EImageAtomicAdd); - symbolTable.relateToOperator("imageAtomicMin", EImageAtomicMin); - symbolTable.relateToOperator("imageAtomicMax", EImageAtomicMax); - symbolTable.relateToOperator("imageAtomicAnd", EImageAtomicAnd); - symbolTable.relateToOperator("imageAtomicOr", EImageAtomicOr); - symbolTable.relateToOperator("imageAtomicXor", EImageAtomicXor); - symbolTable.relateToOperator("imageAtomicExchange", EImageAtomicExchange); - symbolTable.relateToOperator("imageAtomicCompSwap", EImageAtomicCompSwap); - - symbolTable.relateToOperator("textureSize", ETextureQuerySize); - symbolTable.relateToOperator("textureQueryLod", ETextureQueryLod); - symbolTable.relateToOperator("textureQueryLevels", ETextureQueryLevels); - symbolTable.relateToOperator("textureSamples", ETextureQuerySamples); - symbolTable.relateToOperator("texture", ETexture); - symbolTable.relateToOperator("textureProj", ETextureProj); - symbolTable.relateToOperator("textureLod", ETextureLod); - symbolTable.relateToOperator("textureOffset", ETextureOffset); - symbolTable.relateToOperator("textureFetch", ETextureFetch); - symbolTable.relateToOperator("textureFetchOffset", ETextureFetchOffset); - symbolTable.relateToOperator("textureProjOffset", ETextureProjOffset); - symbolTable.relateToOperator("textureLodOffset", ETextureLodOffset); - symbolTable.relateToOperator("textureProjLod", ETextureProjLod); - symbolTable.relateToOperator("textureProjLodOffset", ETextureProjLodOffset); - symbolTable.relateToOperator("textureGrad", ETextureGrad); - symbolTable.relateToOperator("textureGradOffset", ETextureGradOffset); - symbolTable.relateToOperator("textureProjGrad", ETextureProjGrad); - symbolTable.relateToOperator("textureProjGradOffset", ETextureProjGradOffset); - symbolTable.relateToOperator("textureGather", ETextureGather); - symbolTable.relateToOperator("textureGatherOffset", ETextureGatherOffset); - symbolTable.relateToOperator("textureGatherOffsets", ETextureGatherOffsets); + symbolTable.relateToOperator("imageSize", EOpImageQuerySize); + symbolTable.relateToOperator("imageSamples", EOpImageQuerySamples); + symbolTable.relateToOperator("imageLoad", EOpImageLoad); + symbolTable.relateToOperator("imageStore", EOpImageStore); + symbolTable.relateToOperator("imageAtomicAdd", EOpImageAtomicAdd); + symbolTable.relateToOperator("imageAtomicMin", EOpImageAtomicMin); + symbolTable.relateToOperator("imageAtomicMax", EOpImageAtomicMax); + symbolTable.relateToOperator("imageAtomicAnd", EOpImageAtomicAnd); + symbolTable.relateToOperator("imageAtomicOr", EOpImageAtomicOr); + symbolTable.relateToOperator("imageAtomicXor", EOpImageAtomicXor); + symbolTable.relateToOperator("imageAtomicExchange", EOpImageAtomicExchange); + symbolTable.relateToOperator("imageAtomicCompSwap", EOpImageAtomicCompSwap); + + symbolTable.relateToOperator("textureSize", EOpTextureQuerySize); + symbolTable.relateToOperator("textureQueryLod", EOpTextureQueryLod); + symbolTable.relateToOperator("textureQueryLevels", EOpTextureQueryLevels); + symbolTable.relateToOperator("textureSamples", EOpTextureQuerySamples); + symbolTable.relateToOperator("texture", EOpTexture); + symbolTable.relateToOperator("textureProj", EOpTextureProj); + symbolTable.relateToOperator("textureLod", EOpTextureLod); + symbolTable.relateToOperator("textureOffset", EOpTextureOffset); + symbolTable.relateToOperator("texelFetch", EOpTextureFetch); + symbolTable.relateToOperator("texelFetchOffset", EOpTextureFetchOffset); + symbolTable.relateToOperator("textureProjOffset", EOpTextureProjOffset); + symbolTable.relateToOperator("textureLodOffset", EOpTextureLodOffset); + symbolTable.relateToOperator("textureProjLod", EOpTextureProjLod); + symbolTable.relateToOperator("textureProjLodOffset", EOpTextureProjLodOffset); + symbolTable.relateToOperator("textureGrad", EOpTextureGrad); + symbolTable.relateToOperator("textureGradOffset", EOpTextureGradOffset); + symbolTable.relateToOperator("textureProjGrad", EOpTextureProjGrad); + symbolTable.relateToOperator("textureProjGradOffset", EOpTextureProjGradOffset); + symbolTable.relateToOperator("textureGather", EOpTextureGather); + symbolTable.relateToOperator("textureGatherOffset", EOpTextureGatherOffset); + symbolTable.relateToOperator("textureGatherOffsets", EOpTextureGatherOffsets); if (IncludeLegacy(version, profile)) { // TBD: add ftransform(), any others? - symbolTable.relateToOperator("texture1D", ETexture); - symbolTable.relateToOperator("texture1DProj", ETextureProj); - symbolTable.relateToOperator("texture1DLod", ETextureLod); - symbolTable.relateToOperator("texture1DProjLod", ETextureProjLod); - symbolTable.relateToOperator("texture2D", ETexture); - symbolTable.relateToOperator("texture2DProj", ETextureProj); - symbolTable.relateToOperator("texture2DLod", ETextureLod); - symbolTable.relateToOperator("texture2DProjLod", ETextureProjLod); - symbolTable.relateToOperator("texture3D", ETexture); - symbolTable.relateToOperator("texture3DProj", ETextureProj); - symbolTable.relateToOperator("texture3DLod", ETextureLod); - symbolTable.relateToOperator("texture3DProjLod", ETextureProjLod); - symbolTable.relateToOperator("textureCube", ETexture); - symbolTable.relateToOperator("textureCubeLod", ETextureLod); - symbolTable.relateToOperator("shadow1D", ETexture); - symbolTable.relateToOperator("shadow2D", ETexture); - symbolTable.relateToOperator("shadow1DProj", ETextureProj); - symbolTable.relateToOperator("shadow2DProj", ETextureProj); - symbolTable.relateToOperator("shadow1DLod", ETextureLod); - symbolTable.relateToOperator("shadow2DLod", ETextureLod); - symbolTable.relateToOperator("shadow1DProjLod", ETextureProjLod); - symbolTable.relateToOperator("shadow2DProjLod", ETextureProjLod); + symbolTable.relateToOperator("texture1D", EOpTexture); + symbolTable.relateToOperator("texture1DProj", EOpTextureProj); + symbolTable.relateToOperator("texture1DLod", EOpTextureLod); + symbolTable.relateToOperator("texture1DProjLod", EOpTextureProjLod); + symbolTable.relateToOperator("texture2D", EOpTexture); + symbolTable.relateToOperator("texture2DProj", EOpTextureProj); + symbolTable.relateToOperator("texture2DLod", EOpTextureLod); + symbolTable.relateToOperator("texture2DProjLod", EOpTextureProjLod); + symbolTable.relateToOperator("texture3D", EOpTexture); + symbolTable.relateToOperator("texture3DProj", EOpTextureProj); + symbolTable.relateToOperator("texture3DLod", EOpTextureLod); + symbolTable.relateToOperator("texture3DProjLod", EOpTextureProjLod); + symbolTable.relateToOperator("textureCube", EOpTexture); + symbolTable.relateToOperator("textureCubeLod", EOpTextureLod); + symbolTable.relateToOperator("shadow1D", EOpTexture); + symbolTable.relateToOperator("shadow2D", EOpTexture); + symbolTable.relateToOperator("shadow1DProj", EOpTextureProj); + symbolTable.relateToOperator("shadow2DProj", EOpTextureProj); + symbolTable.relateToOperator("shadow1DLod", EOpTextureLod); + symbolTable.relateToOperator("shadow2DLod", EOpTextureLod); + symbolTable.relateToOperator("shadow1DProjLod", EOpTextureProjLod); + symbolTable.relateToOperator("shadow2DProjLod", EOpTextureProjLod); } } diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index 16a3ec202..156557ded 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -268,6 +268,13 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpPackHalf2x16: out.debug << "packHalf2x16"; break; case EOpUnpackHalf2x16: out.debug << "unpackHalf2x16"; break; + case EOpPackSnorm4x8: out.debug << "PackSnorm4x8"; break; + case EOpUnpackSnorm4x8: out.debug << "UnpackSnorm4x8"; break; + case EOpPackUnorm4x8: out.debug << "PackUnorm4x8"; break; + case EOpUnpackUnorm4x8: out.debug << "UnpackUnorm4x8"; break; + case EOpPackDouble2x32: out.debug << "PackDouble2x32"; break; + case EOpUnpackDouble2x32: out.debug << "UnpackDouble2x32"; break; + case EOpLength: out.debug << "length"; break; case EOpNormalize: out.debug << "normalize"; break; case EOpDPdx: out.debug << "dPdx"; break; @@ -295,6 +302,19 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpAtomicCounterDecrement: out.debug << "AtomicCounterDecrement";break; case EOpAtomicCounter: out.debug << "AtomicCounter"; break; + case EOpTextureQuerySize: out.debug << "textureSize"; break; + case EOpTextureQueryLod: out.debug << "textureQueryLod"; break; + case EOpTextureQueryLevels: out.debug << "textureQueryLevels"; break; + case EOpTextureQuerySamples: out.debug << "textureSamples"; break; + case EOpImageQuerySize: out.debug << "imageQuerySize"; break; + case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break; + case EOpImageLoad: out.debug << "imageLoad"; break; + + case EOpBitFieldReverse: out.debug << "bitFieldReverse"; break; + case EOpBitCount: out.debug << "bitCount"; break; + case EOpFindLSB: out.debug << "findLSB"; break; + case EOpFindMSB: out.debug << "findMSB"; break; + default: out.debug.message(EPrefixError, "Bad unary op"); } @@ -410,40 +430,51 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpAtomicExchange: out.debug << "AtomicExchange"; break; case EOpAtomicCompSwap: out.debug << "AtomicCompSwap"; break; - case EImageQuerySize: out.debug << "imageQuerySize"; break; - case EImageQuerySamples: out.debug << "imageQuerySamples"; break; - case EImageLoad: out.debug << "imageLoad"; break; - case EImageStore: out.debug << "imageStore"; break; - case EImageAtomicAdd: out.debug << "imageAtomicAdd"; break; - case EImageAtomicMin: out.debug << "imageAtomicMin"; break; - case EImageAtomicMax: out.debug << "imageAtomicMax"; break; - case EImageAtomicAnd: out.debug << "imageAtomicAnd"; break; - case EImageAtomicOr: out.debug << "imageAtomicOr"; break; - case EImageAtomicXor: out.debug << "imageAtomicXor"; break; - case EImageAtomicExchange: out.debug << "imageAtomicExchange"; break; - case EImageAtomicCompSwap: out.debug << "imageAtomicCompSwap"; break; - - case ETextureQuerySize: out.debug << "textureSize"; break; - case ETextureQueryLod: out.debug << "textureQueryLod"; break; - case ETextureQueryLevels: out.debug << "textureQueryLevels"; break; - case ETextureQuerySamples: out.debug << "textureSamples"; break; - case ETexture: out.debug << "texture"; break; - case ETextureProj: out.debug << "textureProj"; break; - case ETextureLod: out.debug << "textureLod"; break; - case ETextureOffset: out.debug << "textureOffset"; break; - case ETextureFetch: out.debug << "textureFetch"; break; - case ETextureFetchOffset: out.debug << "textureFetchOffset"; break; - case ETextureProjOffset: out.debug << "textureProjOffset"; break; - case ETextureLodOffset: out.debug << "textureLodOffset"; break; - case ETextureProjLod: out.debug << "textureProjLod"; break; - case ETextureProjLodOffset: out.debug << "textureProjLodOffset"; break; - case ETextureGrad: out.debug << "textureGrad"; break; - case ETextureGradOffset: out.debug << "textureGradOffset"; break; - case ETextureProjGrad: out.debug << "textureProjGrad"; break; - case ETextureProjGradOffset: out.debug << "textureProjGradOffset"; break; - case ETextureGather: out.debug << "textureGather"; break; - case ETextureGatherOffset: out.debug << "textureGatherOffset"; break; - case ETextureGatherOffsets: out.debug << "textureGatherOffsets"; break; + case EOpImageQuerySize: out.debug << "imageQuerySize"; break; + case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break; + case EOpImageLoad: out.debug << "imageLoad"; break; + case EOpImageStore: out.debug << "imageStore"; break; + case EOpImageAtomicAdd: out.debug << "imageAtomicAdd"; break; + case EOpImageAtomicMin: out.debug << "imageAtomicMin"; break; + case EOpImageAtomicMax: out.debug << "imageAtomicMax"; break; + case EOpImageAtomicAnd: out.debug << "imageAtomicAnd"; break; + case EOpImageAtomicOr: out.debug << "imageAtomicOr"; break; + case EOpImageAtomicXor: out.debug << "imageAtomicXor"; break; + case EOpImageAtomicExchange: out.debug << "imageAtomicExchange"; break; + case EOpImageAtomicCompSwap: out.debug << "imageAtomicCompSwap"; break; + + case EOpTextureQuerySize: out.debug << "textureSize"; break; + case EOpTextureQueryLod: out.debug << "textureQueryLod"; break; + case EOpTextureQueryLevels: out.debug << "textureQueryLevels"; break; + case EOpTextureQuerySamples: out.debug << "textureSamples"; break; + case EOpTexture: out.debug << "texture"; break; + case EOpTextureProj: out.debug << "textureProj"; break; + case EOpTextureLod: out.debug << "textureLod"; break; + case EOpTextureOffset: out.debug << "textureOffset"; break; + case EOpTextureFetch: out.debug << "textureFetch"; break; + case EOpTextureFetchOffset: out.debug << "textureFetchOffset"; break; + case EOpTextureProjOffset: out.debug << "textureProjOffset"; break; + case EOpTextureLodOffset: out.debug << "textureLodOffset"; break; + case EOpTextureProjLod: out.debug << "textureProjLod"; break; + case EOpTextureProjLodOffset: out.debug << "textureProjLodOffset"; break; + case EOpTextureGrad: out.debug << "textureGrad"; break; + case EOpTextureGradOffset: out.debug << "textureGradOffset"; break; + case EOpTextureProjGrad: out.debug << "textureProjGrad"; break; + case EOpTextureProjGradOffset: out.debug << "textureProjGradOffset"; break; + case EOpTextureGather: out.debug << "textureGather"; break; + case EOpTextureGatherOffset: out.debug << "textureGatherOffset"; break; + case EOpTextureGatherOffsets: out.debug << "textureGatherOffsets"; break; + + case EOpAddCarry: out.debug << "addCarry"; break; + case EOpSubBorrow: out.debug << "subBorrow"; break; + case EOpUMulExtended: out.debug << "uMulExtended"; break; + case EOpIMulExtended: out.debug << "iMulExtended"; break; + case EOpBitfieldExtract: out.debug << "bitfieldExtract"; break; + case EOpBitfieldInsert: out.debug << "bitfieldInsert"; break; + + case EOpFma: out.debug << "fma"; break; + case EFrexp: out.debug << "frexp"; break; + case ELdexp: out.debug << "ldexp"; break; default: out.debug.message(EPrefixError, "Bad aggregation op"); } -- GitLab