yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
c4ed9500
16.5.0
1uniform int4 ui4 ; 2uniform float ufvar ; 3 4static const int cia = - 4 ; 5static const int cib = - 42 ; 6 7int4 fn1 ( int4 p0 ) { return int4 ( 1 , 2 , 3 , 4 ) ; } 8 9int4 fn1 ( int4 p0 , bool b1 , bool b2 = false ) { 10return p0 ; 11} 12 13int4 fn1 ( int4 p0 , 14int4 p1 : FOO = int4 ( - 1 , - 2 , - 3 , cia ) , 15int p2 [ 2 ] : BAR = { int ( 1 ) , 2 } , 16int p3 = abs ( cib ) ) 17{ 18return p0 + p1 + p2 [ 0 ] + p3 ; 19} 20 21// These should not be ambiguous if given either an int or a float explicit second parameter. 22int4 fn2 ( int4 p0 , int x = 3 ) 23{ 24return int4 ( 10 , 11 , 12 , 13 ) ; 25} 26 27int4 fn2 ( int4 p0 , float x = ufvar ) // ERROR: non-const expression 28{ 29return p0 + int4 ( 20 , 21 , 22 , 23 ) ; 30} 31 32void fn3 ( int p0 = 5 , int p1 ) // ERROR no-default param after default param 33{ 34} 35 36int4 main () : SV_Target0 37{ 38int myarray [ 2 ] = { 30 , 31 } ; 39 40return fn1 ( 100 ) + // ERROR: ambiguous 41fn1 ( 101 , ui4 ) + 42fn1 ( 102 , ui4 , myarray ) + 43fn1 ( 103 , ui4 , myarray , 99 ) + 44fn1 ( 104 , false ) + 45fn1 ( 105 , false , true ) + 46 47fn2 ( 112 ) + // ERROR: ambiguous 48fn2 ( 110 , 11.11 ) + // calls int4, float form 49fn2 ( 111 , 12 ) ; // calls int4, int form 50}