yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
69aa9c1b
main
1#version 100 2 3varying vec3 color ;// ERRROR, there is no default qualifier for float 4 5lowp vec2 foo (mediump vec3 mv3 ) 6{ 7highp vec4 hv4 ; 8return hv4 .xy ; 9} 10 11int global_medium ; 12 13uniform lowp sampler2D samplerLow ; 14uniform mediump sampler2D samplerMed ; 15uniform highp sampler2D samplerHigh ; 16 17precision highp int ; 18precision highp ivec2 ; // ERROR 19precision mediump int [ 2 ]; // ERROR 20vec4 uint; // okay 21precision mediump vec4 ; // ERROR 22 23int global_high; 24 25void main() 26{ 27lowp int sum = global_medium + global_high; 28 29gl_FragColor = vec4(color, 1.0 ); 30 31int level1_high; 32sum += level1_high; 33 34precision lowp int ; 35int level1_low; 36sum += level1_low; 3738 // test maxing precisions of args to get precision of builtin 39lowp float arg1; 40mediump float arg2; 41lowp float d = distance(arg1, arg2); 42 43{ 44int level2_low; 45sum += level2_low; 4647 precision highp int ; 48int level2_high; 49sum += level2_high; 50do { 51if (true) { 52precision mediump int ; 53int level4_medium; 54sum += level4_medium; 55} 56int level3_high; 57sum += level3_high; 58} while (true); 59int level2_high2; 60sum += level2_high2; 61} 62int level1_low3; 63sum += level1_low3; 64 65sum += 4 + ((ivec2(level1_low3) * ivec2(level1_high) + ivec2(( /* comma operator */ level1_low3, level1_high)))). x ; 6667 texture2D(samplerLow, vec2( 0.1 , 0.2 )); 68texture2D(samplerMed, vec2( 0.1 , 0.2 )); 69texture2D(samplerHigh, vec2( 0.1 , 0.2 )); 70} 71 72precision mediump bool ; // ERROR 73//precision mediump struct { int a; } s; // ERROR 74struct s { int a ;}; 75precision mediump s ; // ERROR 76mediump bvec2 b2; // ERROR