From 09388459a8a8561159a0eed8db75552f2d2a78f4 Mon Sep 17 00:00:00 2001 From: John Kessenich <cepheus@frii.com> Date: Wed, 29 Apr 2015 11:00:28 +0000 Subject: [PATCH] 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 --- Test/baseResults/130.frag.out | 16 +++++------ Test/baseResults/300.frag.out | 4 +-- Test/baseResults/300.vert.out | 8 +++--- Test/baseResults/300BuiltIns.frag.out | 24 ++++++++-------- Test/baseResults/300block.frag.out | 24 ++++++++-------- Test/baseResults/310.frag.out | 32 +++++++++++----------- Test/baseResults/310.vert.out | 32 +++++++++++----------- Test/baseResults/400.frag.out | 24 ++++++++-------- Test/baseResults/precision.frag.out | 8 +++--- glslang/MachineIndependent/ParseHelper.cpp | 4 ++- glslang/MachineIndependent/glslang.y | 6 ++-- 11 files changed, 92 insertions(+), 90 deletions(-) diff --git a/Test/baseResults/130.frag.out b/Test/baseResults/130.frag.out index 25c05b765..85585799a 100644 --- a/Test/baseResults/130.frag.out +++ b/Test/baseResults/130.frag.out @@ -343,7 +343,7 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 0a2b5ddf5..02d5836d4 100644 --- a/Test/baseResults/300.frag.out +++ b/Test/baseResults/300.frag.out @@ -193,7 +193,7 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 416f0d4d6..5397b851a 100644 --- a/Test/baseResults/300.vert.out +++ b/Test/baseResults/300.vert.out @@ -171,7 +171,7 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 935266762..63dd0e19e 100644 --- a/Test/baseResults/300BuiltIns.frag.out +++ b/Test/baseResults/300BuiltIns.frag.out @@ -156,32 +156,32 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 48371495e..e8aa6bc35 100644 --- a/Test/baseResults/300block.frag.out +++ b/Test/baseResults/300block.frag.out @@ -12,8 +12,8 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 de904725f..cba86bb0f 100644 --- a/Test/baseResults/310.frag.out +++ b/Test/baseResults/310.frag.out @@ -224,40 +224,40 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 ed004b7c2..8f3b68216 100644 --- a/Test/baseResults/310.vert.out +++ b/Test/baseResults/310.vert.out @@ -112,40 +112,40 @@ ERROR: node is still EOpNull! 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 @@ ERROR: node is still EOpNull! 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 ca4db3901..4cf43eb20 100644 --- a/Test/baseResults/400.frag.out +++ b/Test/baseResults/400.frag.out @@ -266,29 +266,29 @@ 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; (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 @@ 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; (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 174436258..dd8f124eb 100644 --- a/Test/baseResults/precision.frag.out +++ b/Test/baseResults/precision.frag.out @@ -11,7 +11,7 @@ ERROR: 7 compilation errors. No code generated. 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 @@ ERROR: node is still EOpNull! 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 @@ Linked fragment stage: 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 @@ ERROR: node is still EOpNull! 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 9e695ba63..43911d629 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -2217,7 +2217,8 @@ void TParseContext::mergeQualifiers(TSourceLoc loc, TQualifier& dst, const TQual 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 @@ void TParseContext::paramCheckFix(TSourceLoc loc, const TStorageQualifier& quali 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 b60f7facf..f398acf06 100644 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -1894,19 +1894,19 @@ type_specifier_nonarray 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; } -- GitLab