glslang: Correct global precision qualifiers to make the qualifier global instead of temp (local).

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30975 e7fa87d3-cd2b-0410-9028-fcbf551c1848
diff --git a/Test/baseResults/130.frag.out b/Test/baseResults/130.frag.out
index 25c05b7..8558579 100644
--- a/Test/baseResults/130.frag.out
+++ b/Test/baseResults/130.frag.out
@@ -343,7 +343,7 @@
 0:137            'a1' (temp float)

 0:138      move second child to first child (temp float)

 0:138        direct index (temp float)

-0:138          'a' (temp 3-component vector of float)

+0:138          'a' (global 3-component vector of float)

 0:138          Constant:

 0:138            0 (const int)

 0:138        Constant:

@@ -373,9 +373,9 @@
 0:166              'i' (temp int)

 0:166              'i' (temp int)

 0:?   Linker Objects

-0:?     'a' (temp 3-component vector of float)

-0:?     'b' (temp float)

-0:?     'c' (temp int)

+0:?     'a' (global 3-component vector of float)

+0:?     'b' (global float)

+0:?     'c' (global int)

 0:?     'i' (smooth in 4-component vector of float)

 0:?     'o' (out 4-component vector of float)

 0:?     'fflat' (flat in float)

@@ -719,7 +719,7 @@
 0:137            'a1' (temp float)

 0:138      move second child to first child (temp float)

 0:138        direct index (temp float)

-0:138          'a' (temp 3-component vector of float)

+0:138          'a' (global 3-component vector of float)

 0:138          Constant:

 0:138            0 (const int)

 0:138        Constant:

@@ -749,9 +749,9 @@
 0:166              'i' (temp int)

 0:166              'i' (temp int)

 0:?   Linker Objects

-0:?     'a' (temp 3-component vector of float)

-0:?     'b' (temp float)

-0:?     'c' (temp int)

+0:?     'a' (global 3-component vector of float)

+0:?     'b' (global float)

+0:?     'c' (global int)

 0:?     'i' (smooth in 4-component vector of float)

 0:?     'o' (out 4-component vector of float)

 0:?     'fflat' (flat in float)

diff --git a/Test/baseResults/300.frag.out b/Test/baseResults/300.frag.out
index 0a2b5dd..02d5836 100644
--- a/Test/baseResults/300.frag.out
+++ b/Test/baseResults/300.frag.out
@@ -193,7 +193,7 @@
 0:80              0 (const int)

 0:80            Constant:

 0:80              1 (const int)

-0:80        Function Call: textureSize(sSC1;i1; (temp highp 2-component vector of int)

+0:80        Function Call: textureSize(sSC1;i1; (global highp 2-component vector of int)

 0:80          'sCubeShadow' (uniform lowp samplerCubeShadow)

 0:80          Constant:

 0:80            2 (const int)

@@ -549,7 +549,7 @@
 0:80              0 (const int)

 0:80            Constant:

 0:80              1 (const int)

-0:80        Function Call: textureSize(sSC1;i1; (temp highp 2-component vector of int)

+0:80        Function Call: textureSize(sSC1;i1; (global highp 2-component vector of int)

 0:80          'sCubeShadow' (uniform lowp samplerCubeShadow)

 0:80          Constant:

 0:80            2 (const int)

diff --git a/Test/baseResults/300.vert.out b/Test/baseResults/300.vert.out
index 416f0d4..5397b85 100644
--- a/Test/baseResults/300.vert.out
+++ b/Test/baseResults/300.vert.out
@@ -171,7 +171,7 @@
 0:120      Sequence

 0:120        move second child to first child (temp highp 2-component vector of int)

 0:120          'x1' (temp highp 2-component vector of int)

-0:120          Function Call: textureSize(s21;i1; (temp highp 2-component vector of int)

+0:120          Function Call: textureSize(s21;i1; (global highp 2-component vector of int)

 0:120            's2D' (uniform lowp sampler2D)

 0:120            Constant:

 0:120              2 (const int)

@@ -180,7 +180,7 @@
 0:122      Sequence

 0:122        move second child to first child (temp highp 3-component vector of int)

 0:122          'x3' (temp highp 3-component vector of int)

-0:122          Function Call: textureSize(sAS21;i1; (temp highp 3-component vector of int)

+0:122          Function Call: textureSize(sAS21;i1; (global highp 3-component vector of int)

 0:122            's2DAS' (uniform lowp sampler2DArrayShadow)

 0:122            Constant:

 0:122              -1 (const int)

@@ -429,7 +429,7 @@
 0:120      Sequence

 0:120        move second child to first child (temp highp 2-component vector of int)

 0:120          'x1' (temp highp 2-component vector of int)

-0:120          Function Call: textureSize(s21;i1; (temp highp 2-component vector of int)

+0:120          Function Call: textureSize(s21;i1; (global highp 2-component vector of int)

 0:120            's2D' (uniform lowp sampler2D)

 0:120            Constant:

 0:120              2 (const int)

@@ -438,7 +438,7 @@
 0:122      Sequence

 0:122        move second child to first child (temp highp 3-component vector of int)

 0:122          'x3' (temp highp 3-component vector of int)

-0:122          Function Call: textureSize(sAS21;i1; (temp highp 3-component vector of int)

+0:122          Function Call: textureSize(sAS21;i1; (global highp 3-component vector of int)

 0:122            's2DAS' (uniform lowp sampler2DArrayShadow)

 0:122            Constant:

 0:122              -1 (const int)

diff --git a/Test/baseResults/300BuiltIns.frag.out b/Test/baseResults/300BuiltIns.frag.out
index 9352667..63dd0e1 100644
--- a/Test/baseResults/300BuiltIns.frag.out
+++ b/Test/baseResults/300BuiltIns.frag.out
@@ -156,32 +156,32 @@
 0:62      Sequence

 0:62        move second child to first child (temp highp uint)

 0:62          'u19' (temp mediump uint)

-0:62          packSnorm2x16 (temp highp uint)

+0:62          packSnorm2x16 (global highp uint)

 0:62            'v2a' (global mediump 2-component vector of float)

 0:63      Sequence

 0:63        move second child to first child (temp highp 2-component vector of float)

 0:63          'v20' (temp mediump 2-component vector of float)

-0:63          unpackSnorm2x16 (temp highp 2-component vector of float)

+0:63          unpackSnorm2x16 (global highp 2-component vector of float)

 0:63            'uy' (global mediump uint)

 0:64      Sequence

 0:64        move second child to first child (temp highp uint)

 0:64          'u15' (temp mediump uint)

-0:64          packUnorm2x16 (temp highp uint)

+0:64          packUnorm2x16 (global highp uint)

 0:64            'v2a' (global mediump 2-component vector of float)

 0:65      Sequence

 0:65        move second child to first child (temp highp 2-component vector of float)

 0:65          'v16' (temp mediump 2-component vector of float)

-0:65          unpackUnorm2x16 (temp highp 2-component vector of float)

+0:65          unpackUnorm2x16 (global highp 2-component vector of float)

 0:65            'uy' (global mediump uint)

 0:66      Sequence

 0:66        move second child to first child (temp highp uint)

 0:66          'u17' (temp mediump uint)

-0:66          packHalf2x16 (temp highp uint)

+0:66          packHalf2x16 (global highp uint)

 0:66            'v2b' (global mediump 2-component vector of float)

 0:67      Sequence

 0:67        move second child to first child (temp mediump 2-component vector of float)

 0:67          'v18' (temp mediump 2-component vector of float)

-0:67          unpackHalf2x16 (temp mediump 2-component vector of float)

+0:67          unpackHalf2x16 (global mediump 2-component vector of float)

 0:67            'uy' (global mediump uint)

 0:70      Constant:

 0:70        0.000000

@@ -363,32 +363,32 @@
 0:62      Sequence

 0:62        move second child to first child (temp highp uint)

 0:62          'u19' (temp mediump uint)

-0:62          packSnorm2x16 (temp highp uint)

+0:62          packSnorm2x16 (global highp uint)

 0:62            'v2a' (global mediump 2-component vector of float)

 0:63      Sequence

 0:63        move second child to first child (temp highp 2-component vector of float)

 0:63          'v20' (temp mediump 2-component vector of float)

-0:63          unpackSnorm2x16 (temp highp 2-component vector of float)

+0:63          unpackSnorm2x16 (global highp 2-component vector of float)

 0:63            'uy' (global mediump uint)

 0:64      Sequence

 0:64        move second child to first child (temp highp uint)

 0:64          'u15' (temp mediump uint)

-0:64          packUnorm2x16 (temp highp uint)

+0:64          packUnorm2x16 (global highp uint)

 0:64            'v2a' (global mediump 2-component vector of float)

 0:65      Sequence

 0:65        move second child to first child (temp highp 2-component vector of float)

 0:65          'v16' (temp mediump 2-component vector of float)

-0:65          unpackUnorm2x16 (temp highp 2-component vector of float)

+0:65          unpackUnorm2x16 (global highp 2-component vector of float)

 0:65            'uy' (global mediump uint)

 0:66      Sequence

 0:66        move second child to first child (temp highp uint)

 0:66          'u17' (temp mediump uint)

-0:66          packHalf2x16 (temp highp uint)

+0:66          packHalf2x16 (global highp uint)

 0:66            'v2b' (global mediump 2-component vector of float)

 0:67      Sequence

 0:67        move second child to first child (temp mediump 2-component vector of float)

 0:67          'v18' (temp mediump 2-component vector of float)

-0:67          unpackHalf2x16 (temp mediump 2-component vector of float)

+0:67          unpackHalf2x16 (global mediump 2-component vector of float)

 0:67            'uy' (global mediump uint)

 0:70      Constant:

 0:70        0.000000

diff --git a/Test/baseResults/300block.frag.out b/Test/baseResults/300block.frag.out
index 4837149..e8aa6bc 100644
--- a/Test/baseResults/300block.frag.out
+++ b/Test/baseResults/300block.frag.out
@@ -12,8 +12,8 @@
 0:42    Function Parameters: 

 0:44    Sequence

 0:44      Function Call: texture(is31;vf3; (global mediump 4-component vector of int)

-0:44        sampler: direct index for structure (temp lowp isampler3D)

-0:44          's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

+0:44        sampler: direct index for structure (global lowp isampler3D)

+0:44          's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

 0:44          Constant:

 0:44            2 (const int)

 0:44        Construct vec3 (temp 3-component vector of float)

@@ -25,7 +25,7 @@
 0:44          Convert uint to float (temp float)

 0:44            direct index (temp mediump uint)

 0:44              bv: direct index for structure (layout(column_major shared ) uniform mediump 4-component vector of uint)

-0:44                'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

+0:44                'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

 0:44                Constant:

 0:44                  0 (const uint)

 0:44              Constant:

@@ -45,14 +45,14 @@
 0:45        'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})

 0:45        direct index (temp mediump uint)

 0:45          v: direct index for structure (global mediump 4-component vector of uint)

-0:45            's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

+0:45            's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

 0:45            Constant:

 0:45              1 (const int)

 0:45          Constant:

 0:45            0 (const int)

 0:?   Linker Objects

-0:?     's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

-0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

+0:?     's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

+0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

 0:?     'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})

 0:?     'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})

 0:?     'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f, layout(column_major shared ) uniform mediump uint u})

@@ -67,8 +67,8 @@
 0:42    Function Parameters: 

 0:44    Sequence

 0:44      Function Call: texture(is31;vf3; (global mediump 4-component vector of int)

-0:44        sampler: direct index for structure (temp lowp isampler3D)

-0:44          's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

+0:44        sampler: direct index for structure (global lowp isampler3D)

+0:44          's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

 0:44          Constant:

 0:44            2 (const int)

 0:44        Construct vec3 (temp 3-component vector of float)

@@ -80,7 +80,7 @@
 0:44          Convert uint to float (temp float)

 0:44            direct index (temp mediump uint)

 0:44              bv: direct index for structure (layout(column_major shared ) uniform mediump 4-component vector of uint)

-0:44                'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

+0:44                'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

 0:44                Constant:

 0:44                  0 (const uint)

 0:44              Constant:

@@ -100,14 +100,14 @@
 0:45        'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})

 0:45        direct index (temp mediump uint)

 0:45          v: direct index for structure (global mediump 4-component vector of uint)

-0:45            's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

+0:45            's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

 0:45            Constant:

 0:45              1 (const int)

 0:45          Constant:

 0:45            0 (const int)

 0:?   Linker Objects

-0:?     's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

-0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, temp lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

+0:?     's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})

+0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})

 0:?     'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})

 0:?     'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})

 0:?     'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f, layout(column_major shared ) uniform mediump uint u})

diff --git a/Test/baseResults/310.frag.out b/Test/baseResults/310.frag.out
index de90472..cba86bb 100644
--- a/Test/baseResults/310.frag.out
+++ b/Test/baseResults/310.frag.out
@@ -224,40 +224,40 @@
 0:100      Sequence

 0:100        move second child to first child (temp highp 2-component vector of int)

 0:100          'v2' (temp highp 2-component vector of int)

-0:100          Function Call: textureSize(s21;i1; (temp highp 2-component vector of int)

+0:100          Function Call: textureSize(s21;i1; (global highp 2-component vector of int)

 0:100            's1' (layout(binding=3 ) uniform highp sampler2D)

 0:100            Constant:

 0:100              2 (const int)

 0:101      Sequence

 0:101        move second child to first child (temp highp 3-component vector of int)

 0:101          'v3' (temp highp 3-component vector of int)

-0:101          Function Call: textureSize(isA21;i1; (temp highp 3-component vector of int)

+0:101          Function Call: textureSize(isA21;i1; (global highp 3-component vector of int)

 0:101            'isamp2DA' (uniform highp isampler2DArray)

 0:101            Constant:

 0:101              3 (const int)

 0:102      move second child to first child (temp highp 2-component vector of int)

 0:102        'v2' (temp highp 2-component vector of int)

-0:102        Function Call: textureSize(s21; (temp highp 2-component vector of int)

+0:102        Function Call: textureSize(s21; (global highp 2-component vector of int)

 0:102          's2dms' (uniform highp sampler2DMS)

 0:103      move second child to first child (temp highp 2-component vector of int)

 0:103        'v2' (temp highp 2-component vector of int)

-0:103        Function Call: imageSize(I21; (temp highp 2-component vector of int)

+0:103        Function Call: imageSize(I21; (global highp 2-component vector of int)

 0:103          'i2D' (layout(binding=2 ) writeonly uniform highp image2D)

 0:104      move second child to first child (temp highp 3-component vector of int)

 0:104        'v3' (temp highp 3-component vector of int)

-0:104        Function Call: imageSize(I31; (temp highp 3-component vector of int)

+0:104        Function Call: imageSize(I31; (global highp 3-component vector of int)

 0:104          'i3D' (layout(binding=4 ) readonly uniform mediump image3D)

 0:105      move second child to first child (temp highp 2-component vector of int)

 0:105        'v2' (temp highp 2-component vector of int)

-0:105        Function Call: imageSize(IC1; (temp highp 2-component vector of int)

+0:105        Function Call: imageSize(IC1; (global highp 2-component vector of int)

 0:105          'iCube' (layout(binding=5 ) uniform lowp imageCube)

 0:106      move second child to first child (temp highp 3-component vector of int)

 0:106        'v3' (temp highp 3-component vector of int)

-0:106        Function Call: imageSize(IA21; (temp highp 3-component vector of int)

+0:106        Function Call: imageSize(IA21; (global highp 3-component vector of int)

 0:106          'i2DA' (layout(binding=6 ) uniform mediump image2DArray)

 0:107      move second child to first child (temp highp 2-component vector of int)

 0:107        'v2' (temp highp 2-component vector of int)

-0:107        Function Call: imageSize(I21; (temp highp 2-component vector of int)

+0:107        Function Call: imageSize(I21; (global highp 2-component vector of int)

 0:107          'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform highp image2D)

 0:?   Linker Objects

 0:?     'gl_FragCoord' (smooth in mediump 4-component vector of float)

@@ -486,40 +486,40 @@
 0:100      Sequence

 0:100        move second child to first child (temp highp 2-component vector of int)

 0:100          'v2' (temp highp 2-component vector of int)

-0:100          Function Call: textureSize(s21;i1; (temp highp 2-component vector of int)

+0:100          Function Call: textureSize(s21;i1; (global highp 2-component vector of int)

 0:100            's1' (layout(binding=3 ) uniform highp sampler2D)

 0:100            Constant:

 0:100              2 (const int)

 0:101      Sequence

 0:101        move second child to first child (temp highp 3-component vector of int)

 0:101          'v3' (temp highp 3-component vector of int)

-0:101          Function Call: textureSize(isA21;i1; (temp highp 3-component vector of int)

+0:101          Function Call: textureSize(isA21;i1; (global highp 3-component vector of int)

 0:101            'isamp2DA' (uniform highp isampler2DArray)

 0:101            Constant:

 0:101              3 (const int)

 0:102      move second child to first child (temp highp 2-component vector of int)

 0:102        'v2' (temp highp 2-component vector of int)

-0:102        Function Call: textureSize(s21; (temp highp 2-component vector of int)

+0:102        Function Call: textureSize(s21; (global highp 2-component vector of int)

 0:102          's2dms' (uniform highp sampler2DMS)

 0:103      move second child to first child (temp highp 2-component vector of int)

 0:103        'v2' (temp highp 2-component vector of int)

-0:103        Function Call: imageSize(I21; (temp highp 2-component vector of int)

+0:103        Function Call: imageSize(I21; (global highp 2-component vector of int)

 0:103          'i2D' (layout(binding=2 ) writeonly uniform highp image2D)

 0:104      move second child to first child (temp highp 3-component vector of int)

 0:104        'v3' (temp highp 3-component vector of int)

-0:104        Function Call: imageSize(I31; (temp highp 3-component vector of int)

+0:104        Function Call: imageSize(I31; (global highp 3-component vector of int)

 0:104          'i3D' (layout(binding=4 ) readonly uniform mediump image3D)

 0:105      move second child to first child (temp highp 2-component vector of int)

 0:105        'v2' (temp highp 2-component vector of int)

-0:105        Function Call: imageSize(IC1; (temp highp 2-component vector of int)

+0:105        Function Call: imageSize(IC1; (global highp 2-component vector of int)

 0:105          'iCube' (layout(binding=5 ) uniform lowp imageCube)

 0:106      move second child to first child (temp highp 3-component vector of int)

 0:106        'v3' (temp highp 3-component vector of int)

-0:106        Function Call: imageSize(IA21; (temp highp 3-component vector of int)

+0:106        Function Call: imageSize(IA21; (global highp 3-component vector of int)

 0:106          'i2DA' (layout(binding=6 ) uniform mediump image2DArray)

 0:107      move second child to first child (temp highp 2-component vector of int)

 0:107        'v2' (temp highp 2-component vector of int)

-0:107        Function Call: imageSize(I21; (temp highp 2-component vector of int)

+0:107        Function Call: imageSize(I21; (global highp 2-component vector of int)

 0:107          'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform highp image2D)

 0:?   Linker Objects

 0:?     'gl_FragCoord' (smooth in mediump 4-component vector of float)

diff --git a/Test/baseResults/310.vert.out b/Test/baseResults/310.vert.out
index ed004b7..8f3b682 100644
--- a/Test/baseResults/310.vert.out
+++ b/Test/baseResults/310.vert.out
@@ -112,40 +112,40 @@
 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; (temp highp 3-component vector of float)

+0:40        Function Call: frexp(vf3;vi3; (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; (temp highp 2-component vector of float)

+0:42        Function Call: ldexp(vf2;vi2; (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; (temp highp uint)

+0:45        Function Call: packUnorm4x8(vf4; (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; (temp highp uint)

+0:46        Function Call: packSnorm4x8(vf4; (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; (temp mediump 4-component vector of float)

+0:47        Function Call: unpackUnorm4x8(u1; (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; (temp mediump 4-component vector of float)

+0:48        Function Call: unpackSnorm4x8(u1; (global mediump 4-component vector of float)

 0:48          'u1' (temp highp uint)

 0:60  Function Definition: foo( (global void)

 0:60    Function Parameters: 

 0:?     Sequence

 0:63      move second child to first child (temp highp 2-component vector of int)

 0:63        'v2' (temp highp 2-component vector of int)

-0:63        Function Call: textureSize(s21; (temp highp 2-component vector of int)

+0:63        Function Call: textureSize(s21; (global highp 2-component vector of int)

 0:63          's2dms' (uniform highp sampler2DMS)

 0:64      move second child to first child (temp highp 2-component vector of int)

 0:64        'v2' (temp highp 2-component vector of int)

-0:64        Function Call: textureSize(us21; (temp highp 2-component vector of int)

+0:64        Function Call: textureSize(us21; (global highp 2-component vector of int)

 0:64          'us2dms' (uniform highp usampler2DMS)

 0:65      Sequence

 0:65        move second child to first child (temp highp 4-component vector of float)

@@ -287,40 +287,40 @@
 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; (temp highp 3-component vector of float)

+0:40        Function Call: frexp(vf3;vi3; (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; (temp highp 2-component vector of float)

+0:42        Function Call: ldexp(vf2;vi2; (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; (temp highp uint)

+0:45        Function Call: packUnorm4x8(vf4; (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; (temp highp uint)

+0:46        Function Call: packSnorm4x8(vf4; (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; (temp mediump 4-component vector of float)

+0:47        Function Call: unpackUnorm4x8(u1; (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; (temp mediump 4-component vector of float)

+0:48        Function Call: unpackSnorm4x8(u1; (global mediump 4-component vector of float)

 0:48          'u1' (temp highp uint)

 0:60  Function Definition: foo( (global void)

 0:60    Function Parameters: 

 0:?     Sequence

 0:63      move second child to first child (temp highp 2-component vector of int)

 0:63        'v2' (temp highp 2-component vector of int)

-0:63        Function Call: textureSize(s21; (temp highp 2-component vector of int)

+0:63        Function Call: textureSize(s21; (global highp 2-component vector of int)

 0:63          's2dms' (uniform highp sampler2DMS)

 0:64      move second child to first child (temp highp 2-component vector of int)

 0:64        'v2' (temp highp 2-component vector of int)

-0:64        Function Call: textureSize(us21; (temp highp 2-component vector of int)

+0:64        Function Call: textureSize(us21; (global highp 2-component vector of int)

 0:64          'us2dms' (uniform highp usampler2DMS)

 0:65      Sequence

 0:65        move second child to first child (temp highp 4-component vector of float)

diff --git a/Test/baseResults/400.frag.out b/Test/baseResults/400.frag.out
index ca4db39..4cf43eb 100644
--- a/Test/baseResults/400.frag.out
+++ b/Test/baseResults/400.frag.out
@@ -266,29 +266,29 @@
 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; (temp 2-component vector of float)

+0:89        Function Call: frexp(vf2;vi2; (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; (temp 3-component vector of float)

+0:90        Function Call: ldexp(vf3;vi3; (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; (temp uint)

+0:92        Function Call: packUnorm4x8(vf4; (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; (temp uint)

+0:93        Function Call: packSnorm4x8(vf4; (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; (temp 4-component vector of float)

+0:94        Function Call: unpackUnorm4x8(u1; (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; (temp 4-component vector of float)

+0:95        Function Call: unpackSnorm4x8(u1; (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)

@@ -569,29 +569,29 @@
 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; (temp 2-component vector of float)

+0:89        Function Call: frexp(vf2;vi2; (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; (temp 3-component vector of float)

+0:90        Function Call: ldexp(vf3;vi3; (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; (temp uint)

+0:92        Function Call: packUnorm4x8(vf4; (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; (temp uint)

+0:93        Function Call: packSnorm4x8(vf4; (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; (temp 4-component vector of float)

+0:94        Function Call: unpackUnorm4x8(u1; (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; (temp 4-component vector of float)

+0:95        Function Call: unpackSnorm4x8(u1; (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)

diff --git a/Test/baseResults/precision.frag.out b/Test/baseResults/precision.frag.out
index 1744362..dd8f124 100644
--- a/Test/baseResults/precision.frag.out
+++ b/Test/baseResults/precision.frag.out
@@ -11,7 +11,7 @@
 

 Shader version: 100

 ERROR: node is still EOpNull!

-0:5  Function Definition: foo(vf3; (temp lowp 2-component vector of float)

+0:5  Function Definition: foo(vf3; (global lowp 2-component vector of float)

 0:5    Function Parameters: 

 0:5      'mv3' (in mediump 3-component vector of float)

 0:?     Sequence

@@ -122,7 +122,7 @@
 0:?     'samplerHigh' (uniform highp sampler2D)

 0:?     'uint' (global mediump 4-component vector of float)

 0:?     'global_high' (global highp int)

-0:?     'b2' (temp mediump 2-component vector of bool)

+0:?     'b2' (global mediump 2-component vector of bool)

 

 

 Linked fragment stage:

@@ -130,7 +130,7 @@
 

 Shader version: 100

 ERROR: node is still EOpNull!

-0:5  Function Definition: foo(vf3; (temp lowp 2-component vector of float)

+0:5  Function Definition: foo(vf3; (global lowp 2-component vector of float)

 0:5    Function Parameters: 

 0:5      'mv3' (in mediump 3-component vector of float)

 0:?     Sequence

@@ -241,5 +241,5 @@
 0:?     'samplerHigh' (uniform highp sampler2D)

 0:?     'uint' (global mediump 4-component vector of float)

 0:?     'global_high' (global highp int)

-0:?     'b2' (temp mediump 2-component vector of bool)

+0:?     'b2' (global mediump 2-component vector of bool)

 

diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp
index 9e695ba..43911d6 100644
--- a/glslang/MachineIndependent/ParseHelper.cpp
+++ b/glslang/MachineIndependent/ParseHelper.cpp
@@ -2217,7 +2217,8 @@
     else if ((dst.storage == EvqIn    && src.storage == EvqConst) ||
              (dst.storage == EvqConst && src.storage == EvqIn))
         dst.storage = EvqConstReadOnly;
-    else if (src.storage != EvqTemporary)
+    else if (src.storage != EvqTemporary &&
+             src.storage != EvqGlobal)
         error(loc, "too many storage qualifiers", GetStorageQualifierString(src.storage), "");
 
     // Precision qualifiers
@@ -2871,6 +2872,7 @@
     case EvqInOut:
         type.getQualifier().storage = qualifier;
         break;
+    case EvqGlobal:
     case EvqTemporary:
         type.getQualifier().storage = EvqIn;
         break;
diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y
index b60f7fa..f398acf 100644
--- a/glslang/MachineIndependent/glslang.y
+++ b/glslang/MachineIndependent/glslang.y
@@ -1894,19 +1894,19 @@
 precision_qualifier

     : HIGH_PRECISION {

         parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "highp precision qualifier");

-        $$.init($1.loc);

+        $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());

         if (parseContext.profile == EEsProfile)

 		    $$.qualifier.precision = EpqHigh;

     }

     | MEDIUM_PRECISION {

         parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "mediump precision qualifier");

-        $$.init($1.loc);

+        $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());

         if (parseContext.profile == EEsProfile)

 	    	$$.qualifier.precision = EpqMedium;

     }

     | LOW_PRECISION {

         parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "lowp precision qualifier");

-        $$.init($1.loc);

+        $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());

         if (parseContext.profile == EEsProfile)

     		$$.qualifier.precision = EpqLow;

     }