From e3f2c8f98ac45549c2b72a0e6f44483fac4fb58d Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Thu, 25 Aug 2016 15:57:56 -0600 Subject: [PATCH] HLSL: Include shape-changing conversions in overloaded signature selection. This also enables vecN -> vec1 shape conversions for all places doing shape conversions. For signature selection, makes shape changes worse than any other comparison when deciding what conversions are better than others. --- .../hlsl.intrinsics.negative.frag.out | 97 +- Test/baseResults/hlsl.overload.frag.out | 2119 ++++++++++------- Test/hlsl.overload.frag | 227 +- glslang/Include/revision.h | 2 +- glslang/MachineIndependent/Intermediate.cpp | 10 +- hlsl/hlslParseHelper.cpp | 75 +- 6 files changed, 1504 insertions(+), 1026 deletions(-) diff --git a/Test/baseResults/hlsl.intrinsics.negative.frag.out b/Test/baseResults/hlsl.intrinsics.negative.frag.out index 74dd6c4e8..90fc21273 100644 --- a/Test/baseResults/hlsl.intrinsics.negative.frag.out +++ b/Test/baseResults/hlsl.intrinsics.negative.frag.out @@ -1,12 +1,6 @@ hlsl.intrinsics.negative.frag -ERROR: 0:8: 'cross' : no matching overloaded function found -ERROR: 0:9: 'D3DCOLORtoUBYTE4' : no matching overloaded function found ERROR: 0:10: 'determinant' : no matching overloaded function found ERROR: 0:12: 'f32tof16' : unimplemented intrinsic: handle natively -ERROR: 0:23: 'length' : no matching overloaded function found -ERROR: 0:25: 'normalize' : no matching overloaded function found -ERROR: 0:26: 'reflect' : no matching overloaded function found -ERROR: 0:27: 'refract' : no matching overloaded function found ERROR: 0:28: 'refract' : no matching overloaded function found ERROR: 0:30: 'transpose' : no matching overloaded function found ERROR: 0:39: 'GetRenderTargetSamplePosition' : no matching overloaded function found @@ -23,7 +17,6 @@ ERROR: 0:67: 'determinant' : no matching overloaded function found ERROR: 0:68: 'f32tof16' : unimplemented intrinsic: handle natively ERROR: 0:73: 'transpose' : no matching overloaded function found ERROR: 0:81: 'CheckAccessFullyMapped' : no matching overloaded function found -ERROR: 0:83: 'cross' : no matching overloaded function found ERROR: 0:84: 'determinant' : no matching overloaded function found ERROR: 0:85: 'f32tof16' : unimplemented intrinsic: handle natively ERROR: 0:90: 'transpose' : no matching overloaded function found @@ -66,7 +59,7 @@ ERROR: 0:133: 'normalize' : no matching overloaded function found ERROR: 0:133: 'reflect' : no matching overloaded function found ERROR: 0:133: 'refract' : no matching overloaded function found ERROR: 0:133: 'reversebits' : no matching overloaded function found -ERROR: 67 compilation errors. No code generated. +ERROR: 60 compilation errors. No code generated. Shader version: 450 @@ -91,10 +84,14 @@ ERROR: node is still EOpNull! 0:7 bitCount (global uint) 0:7 Convert float to uint (temp uint) 0:7 'inF0' (in float) -0:8 Constant: -0:8 0.000000 -0:9 Constant: -0:9 0.000000 +0:8 cross-product (global 3-component vector of float) +0:8 Construct vec3 (in 3-component vector of float) +0:8 'inF0' (in float) +0:8 Construct vec3 (in 3-component vector of float) +0:8 'inF1' (in float) +0:9 Function Call: D3DCOLORtoUBYTE4(vf4; (global 4-component vector of int) +0:9 Construct vec4 (in 4-component vector of float) +0:9 'inF0' (in float) 0:10 Constant: 0:10 0.000000 0:12 ERROR: Bad unary op @@ -107,8 +104,9 @@ ERROR: node is still EOpNull! 0:14 findLSB (global uint) 0:14 Convert float to uint (temp uint) 0:14 'inF0' (in float) -0:23 Constant: -0:23 0.000000 +0:23 length (global float) +0:23 Construct vec2 (in 2-component vector of float) +0:23 'inF0' (in float) 0:24 Function Call: msad4(u1;vu2;vu4; (global 4-component vector of uint) 0:24 Convert float to uint (temp uint) 0:24 'inF0' (in float) @@ -120,12 +118,20 @@ ERROR: node is still EOpNull! 0:24 0 (const uint) 0:24 0 (const uint) 0:24 0 (const uint) -0:25 Constant: -0:25 0.000000 -0:26 Constant: -0:26 0.000000 -0:27 Constant: -0:27 0.000000 +0:25 normalize (global 2-component vector of float) +0:25 Construct vec2 (in 2-component vector of float) +0:25 'inF0' (in float) +0:26 reflect (global 2-component vector of float) +0:26 Construct vec2 (in 2-component vector of float) +0:26 'inF0' (in float) +0:26 Construct vec2 (in 2-component vector of float) +0:26 'inF1' (in float) +0:27 refract (global 2-component vector of float) +0:27 Construct vec2 (in 2-component vector of float) +0:27 'inF0' (in float) +0:27 Construct vec2 (in 2-component vector of float) +0:27 'inF1' (in float) +0:27 'inF2' (in float) 0:28 Constant: 0:28 0.000000 0:29 bitFieldReverse (global uint) @@ -239,8 +245,11 @@ ERROR: node is still EOpNull! 0:82 bitCount (global 4-component vector of uint) 0:82 Convert float to uint (temp 4-component vector of uint) 0:82 'inF0' (in 4-component vector of float) -0:83 Constant: -0:83 0.000000 +0:83 cross-product (global 3-component vector of float) +0:83 Construct vec3 (in 3-component vector of float) +0:83 'inF0' (in 4-component vector of float) +0:83 Construct vec3 (in 3-component vector of float) +0:83 'inF1' (in 4-component vector of float) 0:84 Constant: 0:84 0.000000 0:85 ERROR: Bad unary op @@ -423,10 +432,14 @@ ERROR: node is still EOpNull! 0:7 bitCount (global uint) 0:7 Convert float to uint (temp uint) 0:7 'inF0' (in float) -0:8 Constant: -0:8 0.000000 -0:9 Constant: -0:9 0.000000 +0:8 cross-product (global 3-component vector of float) +0:8 Construct vec3 (in 3-component vector of float) +0:8 'inF0' (in float) +0:8 Construct vec3 (in 3-component vector of float) +0:8 'inF1' (in float) +0:9 Function Call: D3DCOLORtoUBYTE4(vf4; (global 4-component vector of int) +0:9 Construct vec4 (in 4-component vector of float) +0:9 'inF0' (in float) 0:10 Constant: 0:10 0.000000 0:12 ERROR: Bad unary op @@ -439,8 +452,9 @@ ERROR: node is still EOpNull! 0:14 findLSB (global uint) 0:14 Convert float to uint (temp uint) 0:14 'inF0' (in float) -0:23 Constant: -0:23 0.000000 +0:23 length (global float) +0:23 Construct vec2 (in 2-component vector of float) +0:23 'inF0' (in float) 0:24 Function Call: msad4(u1;vu2;vu4; (global 4-component vector of uint) 0:24 Convert float to uint (temp uint) 0:24 'inF0' (in float) @@ -452,12 +466,20 @@ ERROR: node is still EOpNull! 0:24 0 (const uint) 0:24 0 (const uint) 0:24 0 (const uint) -0:25 Constant: -0:25 0.000000 -0:26 Constant: -0:26 0.000000 -0:27 Constant: -0:27 0.000000 +0:25 normalize (global 2-component vector of float) +0:25 Construct vec2 (in 2-component vector of float) +0:25 'inF0' (in float) +0:26 reflect (global 2-component vector of float) +0:26 Construct vec2 (in 2-component vector of float) +0:26 'inF0' (in float) +0:26 Construct vec2 (in 2-component vector of float) +0:26 'inF1' (in float) +0:27 refract (global 2-component vector of float) +0:27 Construct vec2 (in 2-component vector of float) +0:27 'inF0' (in float) +0:27 Construct vec2 (in 2-component vector of float) +0:27 'inF1' (in float) +0:27 'inF2' (in float) 0:28 Constant: 0:28 0.000000 0:29 bitFieldReverse (global uint) @@ -571,8 +593,11 @@ ERROR: node is still EOpNull! 0:82 bitCount (global 4-component vector of uint) 0:82 Convert float to uint (temp 4-component vector of uint) 0:82 'inF0' (in 4-component vector of float) -0:83 Constant: -0:83 0.000000 +0:83 cross-product (global 3-component vector of float) +0:83 Construct vec3 (in 3-component vector of float) +0:83 'inF0' (in 4-component vector of float) +0:83 Construct vec3 (in 3-component vector of float) +0:83 'inF1' (in 4-component vector of float) 0:84 Constant: 0:84 0.000000 0:85 ERROR: Bad unary op diff --git a/Test/baseResults/hlsl.overload.frag.out b/Test/baseResults/hlsl.overload.frag.out index 7b69a54ba..832175818 100755 --- a/Test/baseResults/hlsl.overload.frag.out +++ b/Test/baseResults/hlsl.overload.frag.out @@ -57,219 +57,299 @@ gl_FragCoord origin is upper left 0:23 Function Definition: foo7(d1; (global void) 0:20 Function Parameters: 0:20 'b' (in double) -0:118 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float) +0:24 Function Definition: foo8(f1; (global void) +0:23 Function Parameters: +0:23 '' (in float) +0:25 Function Definition: foo8(d1; (global void) +0:24 Function Parameters: +0:24 '' (in double) +0:26 Function Definition: foo9(i1; (global void) +0:25 Function Parameters: +0:25 '' (in int) +0:27 Function Definition: foo9(u1; (global void) +0:26 Function Parameters: +0:26 '' (in uint) +0:28 Function Definition: foo10(b1; (global void) +0:27 Function Parameters: +0:27 '' (in bool) +0:31 Function Definition: foo10(i1; (global void) +0:28 Function Parameters: +0:28 '' (in int) +0:32 Function Definition: foo11(vf3; (global void) 0:31 Function Parameters: -0:31 'input' (in 4-component vector of float) +0:31 '' (in 3-component vector of float) +0:33 Function Definition: foo11(d1; (global void) +0:32 Function Parameters: +0:32 '' (in double) +0:34 Function Definition: foo11(vi3; (global void) +0:33 Function Parameters: +0:33 '' (in 3-component vector of int) +0:35 Function Definition: foo11(u1; (global void) +0:34 Function Parameters: +0:34 '' (in uint) +0:36 Function Definition: foo12(vf1; (global void) +0:35 Function Parameters: +0:35 '' (in 1-component vector of float) +0:37 Function Definition: foo12(vd3; (global void) +0:36 Function Parameters: +0:36 '' (in 3-component vector of double) +0:38 Function Definition: foo16(u1; (global void) +0:37 Function Parameters: +0:37 '' (in uint) +0:41 Function Definition: foo16(vu2; (global void) +0:38 Function Parameters: +0:38 '' (in 2-component vector of uint) +0:42 Function Definition: foo13(vf3; (global void) +0:41 Function Parameters: +0:41 '' (in 3-component vector of float) +0:43 Function Definition: foo14(vi1; (global void) +0:42 Function Parameters: +0:42 '' (in 1-component vector of int) +0:45 Function Definition: foo15(vb1; (global void) +0:43 Function Parameters: +0:43 '' (in 1-component vector of bool) +0:143 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float) +0:46 Function Parameters: +0:46 'input' (in 4-component vector of float) 0:? Sequence -0:38 Function Call: foo1(d1;b1; (global void) -0:38 'd' (temp double) -0:38 'b' (temp bool) -0:39 Function Call: foo1(d1;d1; (global void) -0:39 'd' (temp double) -0:39 'd' (temp double) -0:40 Function Call: foo1(d1;u1; (global void) -0:40 'd' (temp double) -0:40 'u' (temp uint) -0:41 Function Call: foo1(d1;i1; (global void) -0:41 'd' (temp double) -0:41 'i' (temp int) -0:42 Function Call: foo1(d1;f1; (global void) -0:42 'd' (temp double) -0:42 'f' (temp float) -0:44 Function Call: foo1(d1;b1; (global void) -0:44 Convert float to double (temp double) -0:44 'f' (temp float) -0:44 'b' (temp bool) -0:45 Function Call: foo1(d1;d1; (global void) -0:45 Convert float to double (temp double) -0:45 'f' (temp float) -0:45 'd' (temp double) -0:46 Function Call: foo1(d1;u1; (global void) -0:46 Convert float to double (temp double) -0:46 'f' (temp float) -0:46 'u' (temp uint) -0:47 Function Call: foo1(d1;i1; (global void) -0:47 Convert float to double (temp double) -0:47 'f' (temp float) -0:47 'i' (temp int) -0:48 Function Call: foo1(d1;f1; (global void) -0:48 Convert float to double (temp double) -0:48 'f' (temp float) -0:48 'f' (temp float) -0:50 Function Call: foo1(d1;b1; (global void) -0:50 Convert uint to double (temp double) -0:50 'u' (temp uint) -0:50 'b' (temp bool) -0:51 Function Call: foo1(d1;d1; (global void) -0:51 Convert uint to double (temp double) -0:51 'u' (temp uint) -0:51 'd' (temp double) -0:52 Function Call: foo1(d1;u1; (global void) -0:52 Convert uint to double (temp double) -0:52 'u' (temp uint) -0:52 'u' (temp uint) -0:53 Function Call: foo1(d1;i1; (global void) -0:53 Convert uint to double (temp double) -0:53 'u' (temp uint) -0:53 'i' (temp int) -0:54 Function Call: foo1(d1;f1; (global void) -0:54 Convert uint to double (temp double) -0:54 'u' (temp uint) -0:54 'f' (temp float) -0:56 Function Call: foo1(d1;b1; (global void) -0:56 Convert int to double (temp double) -0:56 'i' (temp int) -0:56 'b' (temp bool) -0:57 Function Call: foo1(d1;d1; (global void) -0:57 Convert int to double (temp double) -0:57 'i' (temp int) +0:53 Function Call: foo1(d1;b1; (global void) +0:53 'd' (temp double) +0:53 'b' (temp bool) +0:54 Function Call: foo1(d1;d1; (global void) +0:54 'd' (temp double) +0:54 'd' (temp double) +0:55 Function Call: foo1(d1;u1; (global void) +0:55 'd' (temp double) +0:55 'u' (temp uint) +0:56 Function Call: foo1(d1;i1; (global void) +0:56 'd' (temp double) +0:56 'i' (temp int) +0:57 Function Call: foo1(d1;f1; (global void) 0:57 'd' (temp double) -0:58 Function Call: foo1(d1;u1; (global void) -0:58 Convert int to double (temp double) -0:58 'i' (temp int) -0:58 'u' (temp uint) -0:59 Function Call: foo1(d1;i1; (global void) -0:59 Convert int to double (temp double) -0:59 'i' (temp int) -0:59 'i' (temp int) -0:60 Function Call: foo1(d1;f1; (global void) -0:60 Convert int to double (temp double) -0:60 'i' (temp int) -0:60 'f' (temp float) -0:62 Function Call: foo2(i1;b1; (global void) -0:62 Convert uint to int (temp int) -0:62 'u' (temp uint) -0:62 'b' (temp bool) -0:63 Function Call: foo2(i1;d1; (global void) -0:63 Convert uint to int (temp int) -0:63 'u' (temp uint) -0:63 'd' (temp double) -0:64 Function Call: foo2(i1;u1; (global void) -0:64 Convert uint to int (temp int) -0:64 'u' (temp uint) -0:64 'u' (temp uint) -0:65 Function Call: foo2(i1;i1; (global void) -0:65 Convert uint to int (temp int) +0:57 'f' (temp float) +0:59 Function Call: foo1(d1;b1; (global void) +0:59 Convert float to double (temp double) +0:59 'f' (temp float) +0:59 'b' (temp bool) +0:60 Function Call: foo1(d1;d1; (global void) +0:60 Convert float to double (temp double) +0:60 'f' (temp float) +0:60 'd' (temp double) +0:61 Function Call: foo1(d1;u1; (global void) +0:61 Convert float to double (temp double) +0:61 'f' (temp float) +0:61 'u' (temp uint) +0:62 Function Call: foo1(d1;i1; (global void) +0:62 Convert float to double (temp double) +0:62 'f' (temp float) +0:62 'i' (temp int) +0:63 Function Call: foo1(d1;f1; (global void) +0:63 Convert float to double (temp double) +0:63 'f' (temp float) +0:63 'f' (temp float) +0:65 Function Call: foo1(d1;b1; (global void) +0:65 Convert uint to double (temp double) 0:65 'u' (temp uint) -0:65 'i' (temp int) -0:66 Function Call: foo2(i1;f1; (global void) -0:66 Convert uint to int (temp int) +0:65 'b' (temp bool) +0:66 Function Call: foo1(d1;d1; (global void) +0:66 Convert uint to double (temp double) 0:66 'u' (temp uint) -0:66 'f' (temp float) -0:68 Function Call: foo2(i1;b1; (global void) +0:66 'd' (temp double) +0:67 Function Call: foo1(d1;u1; (global void) +0:67 Convert uint to double (temp double) +0:67 'u' (temp uint) +0:67 'u' (temp uint) +0:68 Function Call: foo1(d1;i1; (global void) +0:68 Convert uint to double (temp double) +0:68 'u' (temp uint) 0:68 'i' (temp int) -0:68 'b' (temp bool) -0:69 Function Call: foo2(i1;d1; (global void) -0:69 'i' (temp int) -0:69 'd' (temp double) -0:70 Function Call: foo2(i1;u1; (global void) -0:70 'i' (temp int) -0:70 'u' (temp uint) -0:71 Function Call: foo2(i1;i1; (global void) -0:71 'i' (temp int) -0:71 'i' (temp int) -0:72 Function Call: foo2(i1;f1; (global void) -0:72 'i' (temp int) -0:72 'f' (temp float) -0:74 Function Call: foo3(b1; (global void) -0:74 'b' (temp bool) -0:75 Function Call: foo3(b1; (global void) -0:75 Convert double to bool (temp bool) -0:75 'd' (temp double) -0:76 Function Call: foo3(b1; (global void) -0:76 Convert uint to bool (temp bool) -0:76 'u' (temp uint) -0:77 Function Call: foo3(b1; (global void) -0:77 Convert int to bool (temp bool) -0:77 'i' (temp int) -0:78 Function Call: foo3(b1; (global void) -0:78 Convert float to bool (temp bool) -0:78 'f' (temp float) -0:80 Function Call: foo4(u1; (global void) -0:80 Convert bool to uint (temp uint) -0:80 'b' (temp bool) -0:81 Function Call: foo4(u1; (global void) -0:81 Convert double to uint (temp uint) -0:81 'd' (temp double) -0:82 Function Call: foo4(u1; (global void) -0:82 'u' (temp uint) -0:83 Function Call: foo4(u1; (global void) -0:83 Convert int to uint (temp uint) -0:83 'i' (temp int) -0:84 Function Call: foo4(u1; (global void) -0:84 Convert float to uint (temp uint) -0:84 'f' (temp float) -0:86 Function Call: foo5(i1; (global void) -0:86 Convert bool to int (temp int) -0:86 'b' (temp bool) -0:87 Function Call: foo5(i1; (global void) -0:87 Convert double to int (temp int) -0:87 'd' (temp double) -0:88 Function Call: foo5(i1; (global void) -0:88 Convert uint to int (temp int) -0:88 'u' (temp uint) -0:89 Function Call: foo5(i1; (global void) -0:89 'i' (temp int) -0:90 Function Call: foo5(i1; (global void) -0:90 Convert float to int (temp int) -0:90 'f' (temp float) -0:92 Function Call: foo6(f1; (global void) -0:92 Convert bool to float (temp float) -0:92 'b' (temp bool) -0:93 Function Call: foo6(f1; (global void) -0:93 Convert double to float (temp float) -0:93 'd' (temp double) -0:94 Function Call: foo6(f1; (global void) -0:94 Convert uint to float (temp float) -0:94 'u' (temp uint) -0:95 Function Call: foo6(f1; (global void) -0:95 Convert int to float (temp float) -0:95 'i' (temp int) -0:96 Function Call: foo6(f1; (global void) -0:96 'f' (temp float) -0:98 Function Call: foo7(d1; (global void) -0:98 Convert bool to double (temp double) -0:98 'b' (temp bool) -0:99 Function Call: foo7(d1; (global void) -0:99 'd' (temp double) -0:100 Function Call: foo7(d1; (global void) -0:100 Convert uint to double (temp double) -0:100 'u' (temp uint) -0:101 Function Call: foo7(d1; (global void) -0:101 Convert int to double (temp double) -0:101 'i' (temp int) -0:102 Function Call: foo7(d1; (global void) -0:102 Convert float to double (temp double) -0:102 'f' (temp float) -0:104 Function Call: foo8(f1; (global void) -0:104 Convert bool to float (temp float) -0:104 'b' (temp bool) -0:105 Function Call: foo8(f1; (global void) -0:105 Convert uint to float (temp float) -0:105 'u' (temp uint) -0:106 Function Call: foo8(f1; (global void) -0:106 Convert int to float (temp float) -0:106 'i' (temp int) -0:108 Function Call: foo9(u1; (global void) -0:108 Convert bool to uint (temp uint) -0:108 'b' (temp bool) -0:109 Function Call: foo9(u1; (global void) -0:109 Convert float to uint (temp uint) -0:109 'f' (temp float) -0:110 Function Call: foo9(u1; (global void) -0:110 Convert double to uint (temp uint) -0:110 'd' (temp double) -0:112 Function Call: foo10(i1; (global void) -0:112 Convert uint to int (temp int) -0:112 'u' (temp uint) -0:113 Function Call: foo10(i1; (global void) -0:113 Convert float to int (temp int) -0:113 'f' (temp float) -0:114 Function Call: foo10(i1; (global void) -0:114 Convert double to int (temp int) -0:114 'd' (temp double) -0:116 Branch: Return with expression -0:116 'input' (in 4-component vector of float) +0:69 Function Call: foo1(d1;f1; (global void) +0:69 Convert uint to double (temp double) +0:69 'u' (temp uint) +0:69 'f' (temp float) +0:71 Function Call: foo1(d1;b1; (global void) +0:71 Convert int to double (temp double) +0:71 'i' (temp int) +0:71 'b' (temp bool) +0:72 Function Call: foo1(d1;d1; (global void) +0:72 Convert int to double (temp double) +0:72 'i' (temp int) +0:72 'd' (temp double) +0:73 Function Call: foo1(d1;u1; (global void) +0:73 Convert int to double (temp double) +0:73 'i' (temp int) +0:73 'u' (temp uint) +0:74 Function Call: foo1(d1;i1; (global void) +0:74 Convert int to double (temp double) +0:74 'i' (temp int) +0:74 'i' (temp int) +0:75 Function Call: foo1(d1;f1; (global void) +0:75 Convert int to double (temp double) +0:75 'i' (temp int) +0:75 'f' (temp float) +0:77 Function Call: foo2(i1;b1; (global void) +0:77 Convert uint to int (temp int) +0:77 'u' (temp uint) +0:77 'b' (temp bool) +0:78 Function Call: foo2(i1;d1; (global void) +0:78 Convert uint to int (temp int) +0:78 'u' (temp uint) +0:78 'd' (temp double) +0:79 Function Call: foo2(i1;u1; (global void) +0:79 Convert uint to int (temp int) +0:79 'u' (temp uint) +0:79 'u' (temp uint) +0:80 Function Call: foo2(i1;i1; (global void) +0:80 Convert uint to int (temp int) +0:80 'u' (temp uint) +0:80 'i' (temp int) +0:81 Function Call: foo2(i1;f1; (global void) +0:81 Convert uint to int (temp int) +0:81 'u' (temp uint) +0:81 'f' (temp float) +0:83 Function Call: foo2(i1;b1; (global void) +0:83 'i' (temp int) +0:83 'b' (temp bool) +0:84 Function Call: foo2(i1;d1; (global void) +0:84 'i' (temp int) +0:84 'd' (temp double) +0:85 Function Call: foo2(i1;u1; (global void) +0:85 'i' (temp int) +0:85 'u' (temp uint) +0:86 Function Call: foo2(i1;i1; (global void) +0:86 'i' (temp int) +0:86 'i' (temp int) +0:87 Function Call: foo2(i1;f1; (global void) +0:87 'i' (temp int) +0:87 'f' (temp float) +0:89 Function Call: foo3(b1; (global void) +0:89 'b' (temp bool) +0:90 Function Call: foo3(b1; (global void) +0:90 Convert double to bool (temp bool) +0:90 'd' (temp double) +0:91 Function Call: foo3(b1; (global void) +0:91 Convert uint to bool (temp bool) +0:91 'u' (temp uint) +0:92 Function Call: foo3(b1; (global void) +0:92 Convert int to bool (temp bool) +0:92 'i' (temp int) +0:93 Function Call: foo3(b1; (global void) +0:93 Convert float to bool (temp bool) +0:93 'f' (temp float) +0:95 Function Call: foo4(u1; (global void) +0:95 Convert bool to uint (temp uint) +0:95 'b' (temp bool) +0:96 Function Call: foo4(u1; (global void) +0:96 Convert double to uint (temp uint) +0:96 'd' (temp double) +0:97 Function Call: foo4(u1; (global void) +0:97 'u' (temp uint) +0:98 Function Call: foo4(u1; (global void) +0:98 Convert int to uint (temp uint) +0:98 'i' (temp int) +0:99 Function Call: foo4(u1; (global void) +0:99 Convert float to uint (temp uint) +0:99 'f' (temp float) +0:101 Function Call: foo5(i1; (global void) +0:101 Convert bool to int (temp int) +0:101 'b' (temp bool) +0:102 Function Call: foo5(i1; (global void) +0:102 Convert double to int (temp int) +0:102 'd' (temp double) +0:103 Function Call: foo5(i1; (global void) +0:103 Convert uint to int (temp int) +0:103 'u' (temp uint) +0:104 Function Call: foo5(i1; (global void) +0:104 'i' (temp int) +0:105 Function Call: foo5(i1; (global void) +0:105 Convert float to int (temp int) +0:105 'f' (temp float) +0:107 Function Call: foo6(f1; (global void) +0:107 Convert bool to float (temp float) +0:107 'b' (temp bool) +0:108 Function Call: foo6(f1; (global void) +0:108 Convert double to float (temp float) +0:108 'd' (temp double) +0:109 Function Call: foo6(f1; (global void) +0:109 Convert uint to float (temp float) +0:109 'u' (temp uint) +0:110 Function Call: foo6(f1; (global void) +0:110 Convert int to float (temp float) +0:110 'i' (temp int) +0:111 Function Call: foo6(f1; (global void) +0:111 'f' (temp float) +0:113 Function Call: foo7(d1; (global void) +0:113 Convert bool to double (temp double) +0:113 'b' (temp bool) +0:114 Function Call: foo7(d1; (global void) +0:114 'd' (temp double) +0:115 Function Call: foo7(d1; (global void) +0:115 Convert uint to double (temp double) +0:115 'u' (temp uint) +0:116 Function Call: foo7(d1; (global void) +0:116 Convert int to double (temp double) +0:116 'i' (temp int) +0:117 Function Call: foo7(d1; (global void) +0:117 Convert float to double (temp double) +0:117 'f' (temp float) +0:119 Function Call: foo8(f1; (global void) +0:119 Convert bool to float (temp float) +0:119 'b' (temp bool) +0:120 Function Call: foo8(f1; (global void) +0:120 Convert uint to float (temp float) +0:120 'u' (temp uint) +0:121 Function Call: foo8(f1; (global void) +0:121 Convert int to float (temp float) +0:121 'i' (temp int) +0:123 Function Call: foo9(i1; (global void) +0:123 Convert bool to int (temp int) +0:123 'b' (temp bool) +0:124 Function Call: foo9(u1; (global void) +0:124 Convert float to uint (temp uint) +0:124 'f' (temp float) +0:125 Function Call: foo9(u1; (global void) +0:125 Convert double to uint (temp uint) +0:125 'd' (temp double) +0:127 Function Call: foo10(i1; (global void) +0:127 Convert uint to int (temp int) +0:127 'u' (temp uint) +0:128 Function Call: foo10(i1; (global void) +0:128 Convert float to int (temp int) +0:128 'f' (temp float) +0:129 Function Call: foo10(i1; (global void) +0:129 Convert double to int (temp int) +0:129 'd' (temp double) +0:131 Function Call: foo11(u1; (global void) +0:131 Convert bool to uint (temp uint) +0:131 'b' (temp bool) +0:132 Function Call: foo11(d1; (global void) +0:132 Convert float to double (temp double) +0:132 'f' (temp float) +0:133 Function Call: foo12(vd3; (global void) +0:133 Convert float to double (temp 3-component vector of double) +0:133 Construct vec3 (temp 3-component vector of float) +0:133 'f' (temp float) +0:134 Function Call: foo16(vu2; (global void) +0:? Convert int to uint (temp 2-component vector of uint) +0:? Construct ivec2 (temp 2-component vector of int) +0:134 'i' (temp int) +0:134 'i' (temp int) +0:136 Function Call: foo13(vf3; (global void) +0:136 Construct vec3 (in 3-component vector of float) +0:136 'f' (temp float) +0:137 Function Call: foo14(vi1; (global void) +0:137 Construct int (in 1-component vector of int) +0:137 Construct ivec4 (temp 4-component vector of int) +0:137 'i' (temp int) +0:138 Function Call: foo15(vb1; (global void) +0:138 Construct bool (in 1-component vector of bool) +0:138 'b' (temp bool) +0:139 Function Call: foo15(vb1; (global void) +0:139 Construct bool (in 1-component vector of bool) +0:139 Construct bvec3 (temp 3-component vector of bool) +0:139 'b' (temp bool) +0:141 Branch: Return with expression +0:141 'input' (in 4-component vector of float) 0:? Linker Objects @@ -334,231 +414,310 @@ gl_FragCoord origin is upper left 0:23 Function Definition: foo7(d1; (global void) 0:20 Function Parameters: 0:20 'b' (in double) -0:118 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float) +0:24 Function Definition: foo8(f1; (global void) +0:23 Function Parameters: +0:23 '' (in float) +0:25 Function Definition: foo8(d1; (global void) +0:24 Function Parameters: +0:24 '' (in double) +0:26 Function Definition: foo9(i1; (global void) +0:25 Function Parameters: +0:25 '' (in int) +0:27 Function Definition: foo9(u1; (global void) +0:26 Function Parameters: +0:26 '' (in uint) +0:28 Function Definition: foo10(b1; (global void) +0:27 Function Parameters: +0:27 '' (in bool) +0:31 Function Definition: foo10(i1; (global void) +0:28 Function Parameters: +0:28 '' (in int) +0:32 Function Definition: foo11(vf3; (global void) 0:31 Function Parameters: -0:31 'input' (in 4-component vector of float) +0:31 '' (in 3-component vector of float) +0:33 Function Definition: foo11(d1; (global void) +0:32 Function Parameters: +0:32 '' (in double) +0:34 Function Definition: foo11(vi3; (global void) +0:33 Function Parameters: +0:33 '' (in 3-component vector of int) +0:35 Function Definition: foo11(u1; (global void) +0:34 Function Parameters: +0:34 '' (in uint) +0:36 Function Definition: foo12(vf1; (global void) +0:35 Function Parameters: +0:35 '' (in 1-component vector of float) +0:37 Function Definition: foo12(vd3; (global void) +0:36 Function Parameters: +0:36 '' (in 3-component vector of double) +0:38 Function Definition: foo16(u1; (global void) +0:37 Function Parameters: +0:37 '' (in uint) +0:41 Function Definition: foo16(vu2; (global void) +0:38 Function Parameters: +0:38 '' (in 2-component vector of uint) +0:42 Function Definition: foo13(vf3; (global void) +0:41 Function Parameters: +0:41 '' (in 3-component vector of float) +0:43 Function Definition: foo14(vi1; (global void) +0:42 Function Parameters: +0:42 '' (in 1-component vector of int) +0:45 Function Definition: foo15(vb1; (global void) +0:43 Function Parameters: +0:43 '' (in 1-component vector of bool) +0:143 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float) +0:46 Function Parameters: +0:46 'input' (in 4-component vector of float) 0:? Sequence -0:38 Function Call: foo1(d1;b1; (global void) -0:38 'd' (temp double) -0:38 'b' (temp bool) -0:39 Function Call: foo1(d1;d1; (global void) -0:39 'd' (temp double) -0:39 'd' (temp double) -0:40 Function Call: foo1(d1;u1; (global void) -0:40 'd' (temp double) -0:40 'u' (temp uint) -0:41 Function Call: foo1(d1;i1; (global void) -0:41 'd' (temp double) -0:41 'i' (temp int) -0:42 Function Call: foo1(d1;f1; (global void) -0:42 'd' (temp double) -0:42 'f' (temp float) -0:44 Function Call: foo1(d1;b1; (global void) -0:44 Convert float to double (temp double) -0:44 'f' (temp float) -0:44 'b' (temp bool) -0:45 Function Call: foo1(d1;d1; (global void) -0:45 Convert float to double (temp double) -0:45 'f' (temp float) -0:45 'd' (temp double) -0:46 Function Call: foo1(d1;u1; (global void) -0:46 Convert float to double (temp double) -0:46 'f' (temp float) -0:46 'u' (temp uint) -0:47 Function Call: foo1(d1;i1; (global void) -0:47 Convert float to double (temp double) -0:47 'f' (temp float) -0:47 'i' (temp int) -0:48 Function Call: foo1(d1;f1; (global void) -0:48 Convert float to double (temp double) -0:48 'f' (temp float) -0:48 'f' (temp float) -0:50 Function Call: foo1(d1;b1; (global void) -0:50 Convert uint to double (temp double) -0:50 'u' (temp uint) -0:50 'b' (temp bool) -0:51 Function Call: foo1(d1;d1; (global void) -0:51 Convert uint to double (temp double) -0:51 'u' (temp uint) -0:51 'd' (temp double) -0:52 Function Call: foo1(d1;u1; (global void) -0:52 Convert uint to double (temp double) -0:52 'u' (temp uint) -0:52 'u' (temp uint) -0:53 Function Call: foo1(d1;i1; (global void) -0:53 Convert uint to double (temp double) -0:53 'u' (temp uint) -0:53 'i' (temp int) -0:54 Function Call: foo1(d1;f1; (global void) -0:54 Convert uint to double (temp double) -0:54 'u' (temp uint) -0:54 'f' (temp float) -0:56 Function Call: foo1(d1;b1; (global void) -0:56 Convert int to double (temp double) -0:56 'i' (temp int) -0:56 'b' (temp bool) -0:57 Function Call: foo1(d1;d1; (global void) -0:57 Convert int to double (temp double) -0:57 'i' (temp int) +0:53 Function Call: foo1(d1;b1; (global void) +0:53 'd' (temp double) +0:53 'b' (temp bool) +0:54 Function Call: foo1(d1;d1; (global void) +0:54 'd' (temp double) +0:54 'd' (temp double) +0:55 Function Call: foo1(d1;u1; (global void) +0:55 'd' (temp double) +0:55 'u' (temp uint) +0:56 Function Call: foo1(d1;i1; (global void) +0:56 'd' (temp double) +0:56 'i' (temp int) +0:57 Function Call: foo1(d1;f1; (global void) 0:57 'd' (temp double) -0:58 Function Call: foo1(d1;u1; (global void) -0:58 Convert int to double (temp double) -0:58 'i' (temp int) -0:58 'u' (temp uint) -0:59 Function Call: foo1(d1;i1; (global void) -0:59 Convert int to double (temp double) -0:59 'i' (temp int) -0:59 'i' (temp int) -0:60 Function Call: foo1(d1;f1; (global void) -0:60 Convert int to double (temp double) -0:60 'i' (temp int) -0:60 'f' (temp float) -0:62 Function Call: foo2(i1;b1; (global void) -0:62 Convert uint to int (temp int) -0:62 'u' (temp uint) -0:62 'b' (temp bool) -0:63 Function Call: foo2(i1;d1; (global void) -0:63 Convert uint to int (temp int) -0:63 'u' (temp uint) -0:63 'd' (temp double) -0:64 Function Call: foo2(i1;u1; (global void) -0:64 Convert uint to int (temp int) -0:64 'u' (temp uint) -0:64 'u' (temp uint) -0:65 Function Call: foo2(i1;i1; (global void) -0:65 Convert uint to int (temp int) +0:57 'f' (temp float) +0:59 Function Call: foo1(d1;b1; (global void) +0:59 Convert float to double (temp double) +0:59 'f' (temp float) +0:59 'b' (temp bool) +0:60 Function Call: foo1(d1;d1; (global void) +0:60 Convert float to double (temp double) +0:60 'f' (temp float) +0:60 'd' (temp double) +0:61 Function Call: foo1(d1;u1; (global void) +0:61 Convert float to double (temp double) +0:61 'f' (temp float) +0:61 'u' (temp uint) +0:62 Function Call: foo1(d1;i1; (global void) +0:62 Convert float to double (temp double) +0:62 'f' (temp float) +0:62 'i' (temp int) +0:63 Function Call: foo1(d1;f1; (global void) +0:63 Convert float to double (temp double) +0:63 'f' (temp float) +0:63 'f' (temp float) +0:65 Function Call: foo1(d1;b1; (global void) +0:65 Convert uint to double (temp double) 0:65 'u' (temp uint) -0:65 'i' (temp int) -0:66 Function Call: foo2(i1;f1; (global void) -0:66 Convert uint to int (temp int) +0:65 'b' (temp bool) +0:66 Function Call: foo1(d1;d1; (global void) +0:66 Convert uint to double (temp double) 0:66 'u' (temp uint) -0:66 'f' (temp float) -0:68 Function Call: foo2(i1;b1; (global void) +0:66 'd' (temp double) +0:67 Function Call: foo1(d1;u1; (global void) +0:67 Convert uint to double (temp double) +0:67 'u' (temp uint) +0:67 'u' (temp uint) +0:68 Function Call: foo1(d1;i1; (global void) +0:68 Convert uint to double (temp double) +0:68 'u' (temp uint) 0:68 'i' (temp int) -0:68 'b' (temp bool) -0:69 Function Call: foo2(i1;d1; (global void) -0:69 'i' (temp int) -0:69 'd' (temp double) -0:70 Function Call: foo2(i1;u1; (global void) -0:70 'i' (temp int) -0:70 'u' (temp uint) -0:71 Function Call: foo2(i1;i1; (global void) -0:71 'i' (temp int) -0:71 'i' (temp int) -0:72 Function Call: foo2(i1;f1; (global void) -0:72 'i' (temp int) -0:72 'f' (temp float) -0:74 Function Call: foo3(b1; (global void) -0:74 'b' (temp bool) -0:75 Function Call: foo3(b1; (global void) -0:75 Convert double to bool (temp bool) -0:75 'd' (temp double) -0:76 Function Call: foo3(b1; (global void) -0:76 Convert uint to bool (temp bool) -0:76 'u' (temp uint) -0:77 Function Call: foo3(b1; (global void) -0:77 Convert int to bool (temp bool) -0:77 'i' (temp int) -0:78 Function Call: foo3(b1; (global void) -0:78 Convert float to bool (temp bool) -0:78 'f' (temp float) -0:80 Function Call: foo4(u1; (global void) -0:80 Convert bool to uint (temp uint) -0:80 'b' (temp bool) -0:81 Function Call: foo4(u1; (global void) -0:81 Convert double to uint (temp uint) -0:81 'd' (temp double) -0:82 Function Call: foo4(u1; (global void) -0:82 'u' (temp uint) -0:83 Function Call: foo4(u1; (global void) -0:83 Convert int to uint (temp uint) -0:83 'i' (temp int) -0:84 Function Call: foo4(u1; (global void) -0:84 Convert float to uint (temp uint) -0:84 'f' (temp float) -0:86 Function Call: foo5(i1; (global void) -0:86 Convert bool to int (temp int) -0:86 'b' (temp bool) -0:87 Function Call: foo5(i1; (global void) -0:87 Convert double to int (temp int) -0:87 'd' (temp double) -0:88 Function Call: foo5(i1; (global void) -0:88 Convert uint to int (temp int) -0:88 'u' (temp uint) -0:89 Function Call: foo5(i1; (global void) -0:89 'i' (temp int) -0:90 Function Call: foo5(i1; (global void) -0:90 Convert float to int (temp int) -0:90 'f' (temp float) -0:92 Function Call: foo6(f1; (global void) -0:92 Convert bool to float (temp float) -0:92 'b' (temp bool) -0:93 Function Call: foo6(f1; (global void) -0:93 Convert double to float (temp float) -0:93 'd' (temp double) -0:94 Function Call: foo6(f1; (global void) -0:94 Convert uint to float (temp float) -0:94 'u' (temp uint) -0:95 Function Call: foo6(f1; (global void) -0:95 Convert int to float (temp float) -0:95 'i' (temp int) -0:96 Function Call: foo6(f1; (global void) -0:96 'f' (temp float) -0:98 Function Call: foo7(d1; (global void) -0:98 Convert bool to double (temp double) -0:98 'b' (temp bool) -0:99 Function Call: foo7(d1; (global void) -0:99 'd' (temp double) -0:100 Function Call: foo7(d1; (global void) -0:100 Convert uint to double (temp double) -0:100 'u' (temp uint) -0:101 Function Call: foo7(d1; (global void) -0:101 Convert int to double (temp double) -0:101 'i' (temp int) -0:102 Function Call: foo7(d1; (global void) -0:102 Convert float to double (temp double) -0:102 'f' (temp float) -0:104 Function Call: foo8(f1; (global void) -0:104 Convert bool to float (temp float) -0:104 'b' (temp bool) -0:105 Function Call: foo8(f1; (global void) -0:105 Convert uint to float (temp float) -0:105 'u' (temp uint) -0:106 Function Call: foo8(f1; (global void) -0:106 Convert int to float (temp float) -0:106 'i' (temp int) -0:108 Function Call: foo9(u1; (global void) -0:108 Convert bool to uint (temp uint) -0:108 'b' (temp bool) -0:109 Function Call: foo9(u1; (global void) -0:109 Convert float to uint (temp uint) -0:109 'f' (temp float) -0:110 Function Call: foo9(u1; (global void) -0:110 Convert double to uint (temp uint) -0:110 'd' (temp double) -0:112 Function Call: foo10(i1; (global void) -0:112 Convert uint to int (temp int) -0:112 'u' (temp uint) -0:113 Function Call: foo10(i1; (global void) -0:113 Convert float to int (temp int) -0:113 'f' (temp float) -0:114 Function Call: foo10(i1; (global void) -0:114 Convert double to int (temp int) -0:114 'd' (temp double) -0:116 Branch: Return with expression -0:116 'input' (in 4-component vector of float) +0:69 Function Call: foo1(d1;f1; (global void) +0:69 Convert uint to double (temp double) +0:69 'u' (temp uint) +0:69 'f' (temp float) +0:71 Function Call: foo1(d1;b1; (global void) +0:71 Convert int to double (temp double) +0:71 'i' (temp int) +0:71 'b' (temp bool) +0:72 Function Call: foo1(d1;d1; (global void) +0:72 Convert int to double (temp double) +0:72 'i' (temp int) +0:72 'd' (temp double) +0:73 Function Call: foo1(d1;u1; (global void) +0:73 Convert int to double (temp double) +0:73 'i' (temp int) +0:73 'u' (temp uint) +0:74 Function Call: foo1(d1;i1; (global void) +0:74 Convert int to double (temp double) +0:74 'i' (temp int) +0:74 'i' (temp int) +0:75 Function Call: foo1(d1;f1; (global void) +0:75 Convert int to double (temp double) +0:75 'i' (temp int) +0:75 'f' (temp float) +0:77 Function Call: foo2(i1;b1; (global void) +0:77 Convert uint to int (temp int) +0:77 'u' (temp uint) +0:77 'b' (temp bool) +0:78 Function Call: foo2(i1;d1; (global void) +0:78 Convert uint to int (temp int) +0:78 'u' (temp uint) +0:78 'd' (temp double) +0:79 Function Call: foo2(i1;u1; (global void) +0:79 Convert uint to int (temp int) +0:79 'u' (temp uint) +0:79 'u' (temp uint) +0:80 Function Call: foo2(i1;i1; (global void) +0:80 Convert uint to int (temp int) +0:80 'u' (temp uint) +0:80 'i' (temp int) +0:81 Function Call: foo2(i1;f1; (global void) +0:81 Convert uint to int (temp int) +0:81 'u' (temp uint) +0:81 'f' (temp float) +0:83 Function Call: foo2(i1;b1; (global void) +0:83 'i' (temp int) +0:83 'b' (temp bool) +0:84 Function Call: foo2(i1;d1; (global void) +0:84 'i' (temp int) +0:84 'd' (temp double) +0:85 Function Call: foo2(i1;u1; (global void) +0:85 'i' (temp int) +0:85 'u' (temp uint) +0:86 Function Call: foo2(i1;i1; (global void) +0:86 'i' (temp int) +0:86 'i' (temp int) +0:87 Function Call: foo2(i1;f1; (global void) +0:87 'i' (temp int) +0:87 'f' (temp float) +0:89 Function Call: foo3(b1; (global void) +0:89 'b' (temp bool) +0:90 Function Call: foo3(b1; (global void) +0:90 Convert double to bool (temp bool) +0:90 'd' (temp double) +0:91 Function Call: foo3(b1; (global void) +0:91 Convert uint to bool (temp bool) +0:91 'u' (temp uint) +0:92 Function Call: foo3(b1; (global void) +0:92 Convert int to bool (temp bool) +0:92 'i' (temp int) +0:93 Function Call: foo3(b1; (global void) +0:93 Convert float to bool (temp bool) +0:93 'f' (temp float) +0:95 Function Call: foo4(u1; (global void) +0:95 Convert bool to uint (temp uint) +0:95 'b' (temp bool) +0:96 Function Call: foo4(u1; (global void) +0:96 Convert double to uint (temp uint) +0:96 'd' (temp double) +0:97 Function Call: foo4(u1; (global void) +0:97 'u' (temp uint) +0:98 Function Call: foo4(u1; (global void) +0:98 Convert int to uint (temp uint) +0:98 'i' (temp int) +0:99 Function Call: foo4(u1; (global void) +0:99 Convert float to uint (temp uint) +0:99 'f' (temp float) +0:101 Function Call: foo5(i1; (global void) +0:101 Convert bool to int (temp int) +0:101 'b' (temp bool) +0:102 Function Call: foo5(i1; (global void) +0:102 Convert double to int (temp int) +0:102 'd' (temp double) +0:103 Function Call: foo5(i1; (global void) +0:103 Convert uint to int (temp int) +0:103 'u' (temp uint) +0:104 Function Call: foo5(i1; (global void) +0:104 'i' (temp int) +0:105 Function Call: foo5(i1; (global void) +0:105 Convert float to int (temp int) +0:105 'f' (temp float) +0:107 Function Call: foo6(f1; (global void) +0:107 Convert bool to float (temp float) +0:107 'b' (temp bool) +0:108 Function Call: foo6(f1; (global void) +0:108 Convert double to float (temp float) +0:108 'd' (temp double) +0:109 Function Call: foo6(f1; (global void) +0:109 Convert uint to float (temp float) +0:109 'u' (temp uint) +0:110 Function Call: foo6(f1; (global void) +0:110 Convert int to float (temp float) +0:110 'i' (temp int) +0:111 Function Call: foo6(f1; (global void) +0:111 'f' (temp float) +0:113 Function Call: foo7(d1; (global void) +0:113 Convert bool to double (temp double) +0:113 'b' (temp bool) +0:114 Function Call: foo7(d1; (global void) +0:114 'd' (temp double) +0:115 Function Call: foo7(d1; (global void) +0:115 Convert uint to double (temp double) +0:115 'u' (temp uint) +0:116 Function Call: foo7(d1; (global void) +0:116 Convert int to double (temp double) +0:116 'i' (temp int) +0:117 Function Call: foo7(d1; (global void) +0:117 Convert float to double (temp double) +0:117 'f' (temp float) +0:119 Function Call: foo8(f1; (global void) +0:119 Convert bool to float (temp float) +0:119 'b' (temp bool) +0:120 Function Call: foo8(f1; (global void) +0:120 Convert uint to float (temp float) +0:120 'u' (temp uint) +0:121 Function Call: foo8(f1; (global void) +0:121 Convert int to float (temp float) +0:121 'i' (temp int) +0:123 Function Call: foo9(i1; (global void) +0:123 Convert bool to int (temp int) +0:123 'b' (temp bool) +0:124 Function Call: foo9(u1; (global void) +0:124 Convert float to uint (temp uint) +0:124 'f' (temp float) +0:125 Function Call: foo9(u1; (global void) +0:125 Convert double to uint (temp uint) +0:125 'd' (temp double) +0:127 Function Call: foo10(i1; (global void) +0:127 Convert uint to int (temp int) +0:127 'u' (temp uint) +0:128 Function Call: foo10(i1; (global void) +0:128 Convert float to int (temp int) +0:128 'f' (temp float) +0:129 Function Call: foo10(i1; (global void) +0:129 Convert double to int (temp int) +0:129 'd' (temp double) +0:131 Function Call: foo11(u1; (global void) +0:131 Convert bool to uint (temp uint) +0:131 'b' (temp bool) +0:132 Function Call: foo11(d1; (global void) +0:132 Convert float to double (temp double) +0:132 'f' (temp float) +0:133 Function Call: foo12(vd3; (global void) +0:133 Convert float to double (temp 3-component vector of double) +0:133 Construct vec3 (temp 3-component vector of float) +0:133 'f' (temp float) +0:134 Function Call: foo16(vu2; (global void) +0:? Convert int to uint (temp 2-component vector of uint) +0:? Construct ivec2 (temp 2-component vector of int) +0:134 'i' (temp int) +0:134 'i' (temp int) +0:136 Function Call: foo13(vf3; (global void) +0:136 Construct vec3 (in 3-component vector of float) +0:136 'f' (temp float) +0:137 Function Call: foo14(vi1; (global void) +0:137 Construct int (in 1-component vector of int) +0:137 Construct ivec4 (temp 4-component vector of int) +0:137 'i' (temp int) +0:138 Function Call: foo15(vb1; (global void) +0:138 Construct bool (in 1-component vector of bool) +0:138 'b' (temp bool) +0:139 Function Call: foo15(vb1; (global void) +0:139 Construct bool (in 1-component vector of bool) +0:139 Construct bvec3 (temp 3-component vector of bool) +0:139 'b' (temp bool) +0:141 Branch: Return with expression +0:141 'input' (in 4-component vector of float) 0:? Linker Objects -Missing functionality: missing user function; linker needs to catch that // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 369 +// Id's are bound by 507 Capability Shader Capability Float64 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 366 + EntryPoint Fragment 4 "PixelShaderFunction" 504 ExecutionMode 4 OriginUpperLeft Name 4 "PixelShaderFunction" Name 13 "foo1(d1;b1;" @@ -601,97 +760,148 @@ Missing functionality: missing user function; linker needs to catch that Name 79 "b" Name 84 "foo7(d1;" Name 83 "b" - Name 86 "d" - Name 87 "b" - Name 88 "param" - Name 90 "param" - Name 93 "param" - Name 95 "param" - Name 98 "u" - Name 99 "param" - Name 101 "param" - Name 104 "i" - Name 105 "param" - Name 107 "param" - Name 110 "f" - Name 111 "param" - Name 113 "param" - Name 118 "param" - Name 119 "param" - Name 124 "param" - Name 125 "param" - Name 130 "param" - Name 131 "param" - Name 136 "param" - Name 137 "param" - Name 142 "param" - Name 143 "param" - Name 148 "param" - Name 149 "param" - Name 154 "param" - Name 155 "param" - Name 160 "param" - Name 161 "param" - Name 166 "param" - Name 167 "param" - Name 172 "param" - Name 173 "param" - Name 178 "param" - Name 179 "param" - Name 184 "param" - Name 185 "param" - Name 190 "param" - Name 191 "param" - Name 196 "param" - Name 197 "param" - Name 202 "param" - Name 203 "param" - Name 208 "param" - Name 209 "param" - Name 214 "param" - Name 215 "param" - Name 220 "param" - Name 221 "param" - Name 226 "param" - Name 227 "param" - Name 232 "param" - Name 233 "param" + Name 87 "foo8(f1;" + Name 86 "" + Name 90 "foo8(d1;" + Name 89 "" + Name 93 "foo9(i1;" + Name 92 "" + Name 96 "foo9(u1;" + Name 95 "" + Name 99 "foo10(b1;" + Name 98 "" + Name 102 "foo10(i1;" + Name 101 "" + Name 108 "foo11(vf3;" + Name 107 "" + Name 111 "foo11(d1;" + Name 110 "" + Name 117 "foo11(vi3;" + Name 116 "" + Name 120 "foo11(u1;" + Name 119 "" + Name 123 "foo12(vf1;" + Name 122 "" + Name 129 "foo12(vd3;" + Name 128 "" + Name 132 "foo16(u1;" + Name 131 "" + Name 138 "foo16(vu2;" + Name 137 "" + Name 141 "foo13(vf3;" + Name 140 "" + Name 144 "foo14(vi1;" + Name 143 "" + Name 147 "foo15(vb1;" + Name 146 "" + Name 149 "d" + Name 150 "b" + Name 151 "param" + Name 153 "param" + Name 156 "param" + Name 158 "param" + Name 161 "u" + Name 162 "param" + Name 164 "param" + Name 167 "i" + Name 168 "param" + Name 170 "param" + Name 173 "f" + Name 174 "param" + Name 176 "param" + Name 181 "param" + Name 182 "param" + Name 187 "param" + Name 188 "param" + Name 193 "param" + Name 194 "param" + Name 199 "param" + Name 200 "param" + Name 205 "param" + Name 206 "param" + Name 211 "param" + Name 212 "param" + Name 217 "param" + Name 218 "param" + Name 223 "param" + Name 224 "param" + Name 229 "param" + Name 230 "param" + Name 235 "param" Name 236 "param" - Name 238 "param" Name 241 "param" - Name 243 "param" - Name 246 "param" + Name 242 "param" + Name 247 "param" Name 248 "param" - Name 251 "param" Name 253 "param" - Name 256 "param" - Name 258 "param" - Name 261 "param" - Name 267 "param" + Name 254 "param" + Name 259 "param" + Name 260 "param" + Name 265 "param" + Name 266 "param" + Name 271 "param" Name 272 "param" - Name 276 "param" - Name 281 "param" - Name 286 "param" + Name 277 "param" + Name 278 "param" + Name 283 "param" + Name 284 "param" + Name 289 "param" Name 290 "param" - Name 292 "param" - Name 297 "param" + Name 295 "param" + Name 296 "param" + Name 299 "param" Name 301 "param" - Name 307 "param" + Name 304 "param" + Name 306 "param" + Name 309 "param" Name 311 "param" - Name 315 "param" - Name 317 "param" - Name 322 "param" - Name 327 "param" - Name 331 "param" + Name 314 "param" + Name 316 "param" + Name 319 "param" + Name 321 "param" + Name 324 "param" + Name 330 "param" Name 335 "param" Name 339 "param" - Name 341 "param" - Name 347 "param" + Name 344 "param" Name 349 "param" - Name 354 "param" - Name 358 "param" - Name 362 "param" - Name 366 "input" + Name 353 "param" + Name 355 "param" + Name 360 "param" + Name 364 "param" + Name 370 "param" + Name 374 "param" + Name 378 "param" + Name 380 "param" + Name 385 "param" + Name 390 "param" + Name 394 "param" + Name 398 "param" + Name 402 "param" + Name 404 "param" + Name 410 "param" + Name 412 "param" + Name 417 "param" + Name 421 "param" + Name 425 "param" + Name 429 "param" + Name 433 "param" + Name 437 "param" + Name 441 "param" + Name 445 "param" + Name 449 "param" + Name 453 "param" + Name 457 "param" + Name 461 "param" + Name 465 "param" + Name 469 "param" + Name 474 "param" + Name 481 "param" + Name 485 "param" + Name 491 "param" + Name 494 "param" + Name 500 "param" + Name 504 "input" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 64 @@ -719,376 +929,480 @@ Missing functionality: missing user function; linker needs to catch that 74: TypeFunction 2 23(ptr) 78: TypeFunction 2 30(ptr) 82: TypeFunction 2 7(ptr) - 265: 6(float) Constant 0 0 - 270: 15(int) Constant 0 - 279: 29(float) Constant 0 - 284: 15(int) Constant 1 - 304: 22(int) Constant 0 - 305: 22(int) Constant 1 - 325: 29(float) Constant 1065353216 - 345: 6(float) Constant 0 1072693248 - 364: TypeVector 29(float) 4 - 365: TypePointer Input 364(fvec4) - 366(input): 365(ptr) Variable Input + 104: TypeVector 29(float) 3 + 105: TypePointer Function 104(fvec3) + 106: TypeFunction 2 105(ptr) + 113: TypeVector 22(int) 3 + 114: TypePointer Function 113(ivec3) + 115: TypeFunction 2 114(ptr) + 125: TypeVector 6(float) 3 + 126: TypePointer Function 125(fvec3) + 127: TypeFunction 2 126(ptr) + 134: TypeVector 15(int) 2 + 135: TypePointer Function 134(ivec2) + 136: TypeFunction 2 135(ptr) + 328: 6(float) Constant 0 0 + 333: 15(int) Constant 0 + 342: 29(float) Constant 0 + 347: 15(int) Constant 1 + 367: 22(int) Constant 0 + 368: 22(int) Constant 1 + 388: 29(float) Constant 1065353216 + 408: 6(float) Constant 0 1072693248 + 478: TypeVector 22(int) 2 + 488: TypeVector 22(int) 4 + 497: TypeVector 8(bool) 3 + 502: TypeVector 29(float) 4 + 503: TypePointer Input 502(fvec4) + 504(input): 503(ptr) Variable Input 4(PixelShaderFunction): 2 Function None 3 5: Label - 86(d): 7(ptr) Variable Function - 87(b): 9(ptr) Variable Function - 88(param): 7(ptr) Variable Function - 90(param): 9(ptr) Variable Function - 93(param): 7(ptr) Variable Function - 95(param): 7(ptr) Variable Function - 98(u): 16(ptr) Variable Function - 99(param): 7(ptr) Variable Function - 101(param): 16(ptr) Variable Function - 104(i): 23(ptr) Variable Function - 105(param): 7(ptr) Variable Function - 107(param): 23(ptr) Variable Function - 110(f): 30(ptr) Variable Function - 111(param): 7(ptr) Variable Function - 113(param): 30(ptr) Variable Function - 118(param): 7(ptr) Variable Function - 119(param): 9(ptr) Variable Function - 124(param): 7(ptr) Variable Function - 125(param): 7(ptr) Variable Function - 130(param): 7(ptr) Variable Function - 131(param): 16(ptr) Variable Function - 136(param): 7(ptr) Variable Function - 137(param): 23(ptr) Variable Function - 142(param): 7(ptr) Variable Function - 143(param): 30(ptr) Variable Function - 148(param): 7(ptr) Variable Function - 149(param): 9(ptr) Variable Function - 154(param): 7(ptr) Variable Function - 155(param): 7(ptr) Variable Function - 160(param): 7(ptr) Variable Function - 161(param): 16(ptr) Variable Function - 166(param): 7(ptr) Variable Function - 167(param): 23(ptr) Variable Function - 172(param): 7(ptr) Variable Function - 173(param): 30(ptr) Variable Function - 178(param): 7(ptr) Variable Function - 179(param): 9(ptr) Variable Function - 184(param): 7(ptr) Variable Function - 185(param): 7(ptr) Variable Function - 190(param): 7(ptr) Variable Function - 191(param): 16(ptr) Variable Function - 196(param): 7(ptr) Variable Function - 197(param): 23(ptr) Variable Function - 202(param): 7(ptr) Variable Function - 203(param): 30(ptr) Variable Function - 208(param): 23(ptr) Variable Function - 209(param): 9(ptr) Variable Function - 214(param): 23(ptr) Variable Function - 215(param): 7(ptr) Variable Function - 220(param): 23(ptr) Variable Function - 221(param): 16(ptr) Variable Function - 226(param): 23(ptr) Variable Function - 227(param): 23(ptr) Variable Function - 232(param): 23(ptr) Variable Function - 233(param): 30(ptr) Variable Function - 236(param): 23(ptr) Variable Function - 238(param): 9(ptr) Variable Function - 241(param): 23(ptr) Variable Function - 243(param): 7(ptr) Variable Function - 246(param): 23(ptr) Variable Function - 248(param): 16(ptr) Variable Function - 251(param): 23(ptr) Variable Function - 253(param): 23(ptr) Variable Function - 256(param): 23(ptr) Variable Function - 258(param): 30(ptr) Variable Function - 261(param): 9(ptr) Variable Function - 267(param): 9(ptr) Variable Function + 149(d): 7(ptr) Variable Function + 150(b): 9(ptr) Variable Function + 151(param): 7(ptr) Variable Function + 153(param): 9(ptr) Variable Function + 156(param): 7(ptr) Variable Function + 158(param): 7(ptr) Variable Function + 161(u): 16(ptr) Variable Function + 162(param): 7(ptr) Variable Function + 164(param): 16(ptr) Variable Function + 167(i): 23(ptr) Variable Function + 168(param): 7(ptr) Variable Function + 170(param): 23(ptr) Variable Function + 173(f): 30(ptr) Variable Function + 174(param): 7(ptr) Variable Function + 176(param): 30(ptr) Variable Function + 181(param): 7(ptr) Variable Function + 182(param): 9(ptr) Variable Function + 187(param): 7(ptr) Variable Function + 188(param): 7(ptr) Variable Function + 193(param): 7(ptr) Variable Function + 194(param): 16(ptr) Variable Function + 199(param): 7(ptr) Variable Function + 200(param): 23(ptr) Variable Function + 205(param): 7(ptr) Variable Function + 206(param): 30(ptr) Variable Function + 211(param): 7(ptr) Variable Function + 212(param): 9(ptr) Variable Function + 217(param): 7(ptr) Variable Function + 218(param): 7(ptr) Variable Function + 223(param): 7(ptr) Variable Function + 224(param): 16(ptr) Variable Function + 229(param): 7(ptr) Variable Function + 230(param): 23(ptr) Variable Function + 235(param): 7(ptr) Variable Function + 236(param): 30(ptr) Variable Function + 241(param): 7(ptr) Variable Function + 242(param): 9(ptr) Variable Function + 247(param): 7(ptr) Variable Function + 248(param): 7(ptr) Variable Function + 253(param): 7(ptr) Variable Function + 254(param): 16(ptr) Variable Function + 259(param): 7(ptr) Variable Function + 260(param): 23(ptr) Variable Function + 265(param): 7(ptr) Variable Function + 266(param): 30(ptr) Variable Function + 271(param): 23(ptr) Variable Function 272(param): 9(ptr) Variable Function - 276(param): 9(ptr) Variable Function - 281(param): 9(ptr) Variable Function - 286(param): 16(ptr) Variable Function - 290(param): 16(ptr) Variable Function - 292(param): 16(ptr) Variable Function - 297(param): 16(ptr) Variable Function - 301(param): 16(ptr) Variable Function - 307(param): 23(ptr) Variable Function - 311(param): 23(ptr) Variable Function - 315(param): 23(ptr) Variable Function - 317(param): 23(ptr) Variable Function - 322(param): 23(ptr) Variable Function - 327(param): 30(ptr) Variable Function - 331(param): 30(ptr) Variable Function - 335(param): 30(ptr) Variable Function - 339(param): 30(ptr) Variable Function - 341(param): 30(ptr) Variable Function - 347(param): 7(ptr) Variable Function - 349(param): 7(ptr) Variable Function - 354(param): 7(ptr) Variable Function - 358(param): 7(ptr) Variable Function - 362(param): 7(ptr) Variable Function - 89: 6(float) Load 86(d) - Store 88(param) 89 - 91: 8(bool) Load 87(b) - Store 90(param) 91 - 92: 2 FunctionCall 13(foo1(d1;b1;) 88(param) 90(param) - 94: 6(float) Load 86(d) - Store 93(param) 94 - 96: 6(float) Load 86(d) - Store 95(param) 96 - 97: 2 FunctionCall 39(foo1(d1;d1;) 93(param) 95(param) - 100: 6(float) Load 86(d) - Store 99(param) 100 - 102: 15(int) Load 98(u) - Store 101(param) 102 - 103: 2 FunctionCall 20(foo1(d1;u1;) 99(param) 101(param) - 106: 6(float) Load 86(d) - Store 105(param) 106 - 108: 22(int) Load 104(i) - Store 107(param) 108 - 109: 2 FunctionCall 27(foo1(d1;i1;) 105(param) 107(param) - 112: 6(float) Load 86(d) - Store 111(param) 112 - 114: 29(float) Load 110(f) - Store 113(param) 114 - 115: 2 FunctionCall 34(foo1(d1;f1;) 111(param) 113(param) - 116: 29(float) Load 110(f) - 117: 6(float) FConvert 116 - Store 118(param) 117 - 120: 8(bool) Load 87(b) - Store 119(param) 120 - 121: 2 FunctionCall 13(foo1(d1;b1;) 118(param) 119(param) - 122: 29(float) Load 110(f) - 123: 6(float) FConvert 122 - Store 124(param) 123 - 126: 6(float) Load 86(d) - Store 125(param) 126 - 127: 2 FunctionCall 39(foo1(d1;d1;) 124(param) 125(param) - 128: 29(float) Load 110(f) - 129: 6(float) FConvert 128 - Store 130(param) 129 - 132: 15(int) Load 98(u) - Store 131(param) 132 - 133: 2 FunctionCall 20(foo1(d1;u1;) 130(param) 131(param) - 134: 29(float) Load 110(f) - 135: 6(float) FConvert 134 - Store 136(param) 135 - 138: 22(int) Load 104(i) - Store 137(param) 138 - 139: 2 FunctionCall 27(foo1(d1;i1;) 136(param) 137(param) - 140: 29(float) Load 110(f) - 141: 6(float) FConvert 140 - Store 142(param) 141 - 144: 29(float) Load 110(f) - Store 143(param) 144 - 145: 2 FunctionCall 34(foo1(d1;f1;) 142(param) 143(param) - 146: 15(int) Load 98(u) - 147: 6(float) ConvertUToF 146 - Store 148(param) 147 - 150: 8(bool) Load 87(b) - Store 149(param) 150 - 151: 2 FunctionCall 13(foo1(d1;b1;) 148(param) 149(param) - 152: 15(int) Load 98(u) - 153: 6(float) ConvertUToF 152 - Store 154(param) 153 - 156: 6(float) Load 86(d) - Store 155(param) 156 - 157: 2 FunctionCall 39(foo1(d1;d1;) 154(param) 155(param) - 158: 15(int) Load 98(u) - 159: 6(float) ConvertUToF 158 - Store 160(param) 159 - 162: 15(int) Load 98(u) - Store 161(param) 162 - 163: 2 FunctionCall 20(foo1(d1;u1;) 160(param) 161(param) - 164: 15(int) Load 98(u) - 165: 6(float) ConvertUToF 164 - Store 166(param) 165 - 168: 22(int) Load 104(i) - Store 167(param) 168 - 169: 2 FunctionCall 27(foo1(d1;i1;) 166(param) 167(param) - 170: 15(int) Load 98(u) - 171: 6(float) ConvertUToF 170 - Store 172(param) 171 - 174: 29(float) Load 110(f) - Store 173(param) 174 - 175: 2 FunctionCall 34(foo1(d1;f1;) 172(param) 173(param) - 176: 22(int) Load 104(i) - 177: 6(float) ConvertSToF 176 - Store 178(param) 177 - 180: 8(bool) Load 87(b) - Store 179(param) 180 - 181: 2 FunctionCall 13(foo1(d1;b1;) 178(param) 179(param) - 182: 22(int) Load 104(i) - 183: 6(float) ConvertSToF 182 - Store 184(param) 183 - 186: 6(float) Load 86(d) - Store 185(param) 186 - 187: 2 FunctionCall 39(foo1(d1;d1;) 184(param) 185(param) - 188: 22(int) Load 104(i) - 189: 6(float) ConvertSToF 188 - Store 190(param) 189 - 192: 15(int) Load 98(u) - Store 191(param) 192 - 193: 2 FunctionCall 20(foo1(d1;u1;) 190(param) 191(param) - 194: 22(int) Load 104(i) - 195: 6(float) ConvertSToF 194 - Store 196(param) 195 - 198: 22(int) Load 104(i) - Store 197(param) 198 - 199: 2 FunctionCall 27(foo1(d1;i1;) 196(param) 197(param) - 200: 22(int) Load 104(i) - 201: 6(float) ConvertSToF 200 - Store 202(param) 201 - 204: 29(float) Load 110(f) - Store 203(param) 204 - 205: 2 FunctionCall 34(foo1(d1;f1;) 202(param) 203(param) - 206: 15(int) Load 98(u) - 207: 22(int) Bitcast 206 - Store 208(param) 207 - 210: 8(bool) Load 87(b) - Store 209(param) 210 - 211: 2 FunctionCall 44(foo2(i1;b1;) 208(param) 209(param) - 212: 15(int) Load 98(u) - 213: 22(int) Bitcast 212 - Store 214(param) 213 - 216: 6(float) Load 86(d) - Store 215(param) 216 - 217: 2 FunctionCall 64(foo2(i1;d1;) 214(param) 215(param) - 218: 15(int) Load 98(u) - 219: 22(int) Bitcast 218 - Store 220(param) 219 - 222: 15(int) Load 98(u) - Store 221(param) 222 - 223: 2 FunctionCall 49(foo2(i1;u1;) 220(param) 221(param) - 224: 15(int) Load 98(u) - 225: 22(int) Bitcast 224 - Store 226(param) 225 - 228: 22(int) Load 104(i) - Store 227(param) 228 - 229: 2 FunctionCall 54(foo2(i1;i1;) 226(param) 227(param) - 230: 15(int) Load 98(u) - 231: 22(int) Bitcast 230 - Store 232(param) 231 - 234: 29(float) Load 110(f) - Store 233(param) 234 - 235: 2 FunctionCall 59(foo2(i1;f1;) 232(param) 233(param) - 237: 22(int) Load 104(i) + 277(param): 23(ptr) Variable Function + 278(param): 7(ptr) Variable Function + 283(param): 23(ptr) Variable Function + 284(param): 16(ptr) Variable Function + 289(param): 23(ptr) Variable Function + 290(param): 23(ptr) Variable Function + 295(param): 23(ptr) Variable Function + 296(param): 30(ptr) Variable Function + 299(param): 23(ptr) Variable Function + 301(param): 9(ptr) Variable Function + 304(param): 23(ptr) Variable Function + 306(param): 7(ptr) Variable Function + 309(param): 23(ptr) Variable Function + 311(param): 16(ptr) Variable Function + 314(param): 23(ptr) Variable Function + 316(param): 23(ptr) Variable Function + 319(param): 23(ptr) Variable Function + 321(param): 30(ptr) Variable Function + 324(param): 9(ptr) Variable Function + 330(param): 9(ptr) Variable Function + 335(param): 9(ptr) Variable Function + 339(param): 9(ptr) Variable Function + 344(param): 9(ptr) Variable Function + 349(param): 16(ptr) Variable Function + 353(param): 16(ptr) Variable Function + 355(param): 16(ptr) Variable Function + 360(param): 16(ptr) Variable Function + 364(param): 16(ptr) Variable Function + 370(param): 23(ptr) Variable Function + 374(param): 23(ptr) Variable Function + 378(param): 23(ptr) Variable Function + 380(param): 23(ptr) Variable Function + 385(param): 23(ptr) Variable Function + 390(param): 30(ptr) Variable Function + 394(param): 30(ptr) Variable Function + 398(param): 30(ptr) Variable Function + 402(param): 30(ptr) Variable Function + 404(param): 30(ptr) Variable Function + 410(param): 7(ptr) Variable Function + 412(param): 7(ptr) Variable Function + 417(param): 7(ptr) Variable Function + 421(param): 7(ptr) Variable Function + 425(param): 7(ptr) Variable Function + 429(param): 30(ptr) Variable Function + 433(param): 30(ptr) Variable Function + 437(param): 30(ptr) Variable Function + 441(param): 23(ptr) Variable Function + 445(param): 16(ptr) Variable Function + 449(param): 16(ptr) Variable Function + 453(param): 23(ptr) Variable Function + 457(param): 23(ptr) Variable Function + 461(param): 23(ptr) Variable Function + 465(param): 16(ptr) Variable Function + 469(param): 7(ptr) Variable Function + 474(param): 126(ptr) Variable Function + 481(param): 135(ptr) Variable Function + 485(param): 105(ptr) Variable Function + 491(param): 23(ptr) Variable Function + 494(param): 9(ptr) Variable Function + 500(param): 9(ptr) Variable Function + 152: 6(float) Load 149(d) + Store 151(param) 152 + 154: 8(bool) Load 150(b) + Store 153(param) 154 + 155: 2 FunctionCall 13(foo1(d1;b1;) 151(param) 153(param) + 157: 6(float) Load 149(d) + Store 156(param) 157 + 159: 6(float) Load 149(d) + Store 158(param) 159 + 160: 2 FunctionCall 39(foo1(d1;d1;) 156(param) 158(param) + 163: 6(float) Load 149(d) + Store 162(param) 163 + 165: 15(int) Load 161(u) + Store 164(param) 165 + 166: 2 FunctionCall 20(foo1(d1;u1;) 162(param) 164(param) + 169: 6(float) Load 149(d) + Store 168(param) 169 + 171: 22(int) Load 167(i) + Store 170(param) 171 + 172: 2 FunctionCall 27(foo1(d1;i1;) 168(param) 170(param) + 175: 6(float) Load 149(d) + Store 174(param) 175 + 177: 29(float) Load 173(f) + Store 176(param) 177 + 178: 2 FunctionCall 34(foo1(d1;f1;) 174(param) 176(param) + 179: 29(float) Load 173(f) + 180: 6(float) FConvert 179 + Store 181(param) 180 + 183: 8(bool) Load 150(b) + Store 182(param) 183 + 184: 2 FunctionCall 13(foo1(d1;b1;) 181(param) 182(param) + 185: 29(float) Load 173(f) + 186: 6(float) FConvert 185 + Store 187(param) 186 + 189: 6(float) Load 149(d) + Store 188(param) 189 + 190: 2 FunctionCall 39(foo1(d1;d1;) 187(param) 188(param) + 191: 29(float) Load 173(f) + 192: 6(float) FConvert 191 + Store 193(param) 192 + 195: 15(int) Load 161(u) + Store 194(param) 195 + 196: 2 FunctionCall 20(foo1(d1;u1;) 193(param) 194(param) + 197: 29(float) Load 173(f) + 198: 6(float) FConvert 197 + Store 199(param) 198 + 201: 22(int) Load 167(i) + Store 200(param) 201 + 202: 2 FunctionCall 27(foo1(d1;i1;) 199(param) 200(param) + 203: 29(float) Load 173(f) + 204: 6(float) FConvert 203 + Store 205(param) 204 + 207: 29(float) Load 173(f) + Store 206(param) 207 + 208: 2 FunctionCall 34(foo1(d1;f1;) 205(param) 206(param) + 209: 15(int) Load 161(u) + 210: 6(float) ConvertUToF 209 + Store 211(param) 210 + 213: 8(bool) Load 150(b) + Store 212(param) 213 + 214: 2 FunctionCall 13(foo1(d1;b1;) 211(param) 212(param) + 215: 15(int) Load 161(u) + 216: 6(float) ConvertUToF 215 + Store 217(param) 216 + 219: 6(float) Load 149(d) + Store 218(param) 219 + 220: 2 FunctionCall 39(foo1(d1;d1;) 217(param) 218(param) + 221: 15(int) Load 161(u) + 222: 6(float) ConvertUToF 221 + Store 223(param) 222 + 225: 15(int) Load 161(u) + Store 224(param) 225 + 226: 2 FunctionCall 20(foo1(d1;u1;) 223(param) 224(param) + 227: 15(int) Load 161(u) + 228: 6(float) ConvertUToF 227 + Store 229(param) 228 + 231: 22(int) Load 167(i) + Store 230(param) 231 + 232: 2 FunctionCall 27(foo1(d1;i1;) 229(param) 230(param) + 233: 15(int) Load 161(u) + 234: 6(float) ConvertUToF 233 + Store 235(param) 234 + 237: 29(float) Load 173(f) Store 236(param) 237 - 239: 8(bool) Load 87(b) - Store 238(param) 239 - 240: 2 FunctionCall 44(foo2(i1;b1;) 236(param) 238(param) - 242: 22(int) Load 104(i) - Store 241(param) 242 - 244: 6(float) Load 86(d) - Store 243(param) 244 - 245: 2 FunctionCall 64(foo2(i1;d1;) 241(param) 243(param) - 247: 22(int) Load 104(i) - Store 246(param) 247 - 249: 15(int) Load 98(u) + 238: 2 FunctionCall 34(foo1(d1;f1;) 235(param) 236(param) + 239: 22(int) Load 167(i) + 240: 6(float) ConvertSToF 239 + Store 241(param) 240 + 243: 8(bool) Load 150(b) + Store 242(param) 243 + 244: 2 FunctionCall 13(foo1(d1;b1;) 241(param) 242(param) + 245: 22(int) Load 167(i) + 246: 6(float) ConvertSToF 245 + Store 247(param) 246 + 249: 6(float) Load 149(d) Store 248(param) 249 - 250: 2 FunctionCall 49(foo2(i1;u1;) 246(param) 248(param) - 252: 22(int) Load 104(i) - Store 251(param) 252 - 254: 22(int) Load 104(i) - Store 253(param) 254 - 255: 2 FunctionCall 54(foo2(i1;i1;) 251(param) 253(param) - 257: 22(int) Load 104(i) - Store 256(param) 257 - 259: 29(float) Load 110(f) - Store 258(param) 259 - 260: 2 FunctionCall 59(foo2(i1;f1;) 256(param) 258(param) - 262: 8(bool) Load 87(b) - Store 261(param) 262 - 263: 2 FunctionCall 68(foo3(b1;) 261(param) - 264: 6(float) Load 86(d) - 266: 8(bool) FOrdNotEqual 264 265 - Store 267(param) 266 - 268: 2 FunctionCall 68(foo3(b1;) 267(param) - 269: 15(int) Load 98(u) - 271: 8(bool) INotEqual 269 270 - Store 272(param) 271 - 273: 2 FunctionCall 68(foo3(b1;) 272(param) - 274: 22(int) Load 104(i) - 275: 8(bool) INotEqual 274 270 - Store 276(param) 275 - 277: 2 FunctionCall 68(foo3(b1;) 276(param) - 278: 29(float) Load 110(f) - 280: 8(bool) FOrdNotEqual 278 279 - Store 281(param) 280 - 282: 2 FunctionCall 68(foo3(b1;) 281(param) - 283: 8(bool) Load 87(b) - 285: 15(int) Select 283 284 270 - Store 286(param) 285 - 287: 2 FunctionCall 72(foo4(u1;) 286(param) - 288: 6(float) Load 86(d) - 289: 15(int) ConvertFToU 288 - Store 290(param) 289 - 291: 2 FunctionCall 72(foo4(u1;) 290(param) - 293: 15(int) Load 98(u) - Store 292(param) 293 - 294: 2 FunctionCall 72(foo4(u1;) 292(param) - 295: 22(int) Load 104(i) - 296: 15(int) Bitcast 295 - Store 297(param) 296 - 298: 2 FunctionCall 72(foo4(u1;) 297(param) - 299: 29(float) Load 110(f) - 300: 15(int) ConvertFToU 299 - Store 301(param) 300 - 302: 2 FunctionCall 72(foo4(u1;) 301(param) - 303: 8(bool) Load 87(b) - 306: 22(int) Select 303 305 304 - Store 307(param) 306 - 308: 2 FunctionCall 76(foo5(i1;) 307(param) - 309: 6(float) Load 86(d) - 310: 22(int) ConvertFToS 309 - Store 311(param) 310 - 312: 2 FunctionCall 76(foo5(i1;) 311(param) - 313: 15(int) Load 98(u) - 314: 22(int) Bitcast 313 - Store 315(param) 314 - 316: 2 FunctionCall 76(foo5(i1;) 315(param) - 318: 22(int) Load 104(i) - Store 317(param) 318 - 319: 2 FunctionCall 76(foo5(i1;) 317(param) - 320: 29(float) Load 110(f) - 321: 22(int) ConvertFToS 320 - Store 322(param) 321 - 323: 2 FunctionCall 76(foo5(i1;) 322(param) - 324: 8(bool) Load 87(b) - 326: 29(float) Select 324 325 279 - Store 327(param) 326 - 328: 2 FunctionCall 80(foo6(f1;) 327(param) - 329: 6(float) Load 86(d) - 330: 29(float) FConvert 329 - Store 331(param) 330 - 332: 2 FunctionCall 80(foo6(f1;) 331(param) - 333: 15(int) Load 98(u) - 334: 29(float) ConvertUToF 333 + 250: 2 FunctionCall 39(foo1(d1;d1;) 247(param) 248(param) + 251: 22(int) Load 167(i) + 252: 6(float) ConvertSToF 251 + Store 253(param) 252 + 255: 15(int) Load 161(u) + Store 254(param) 255 + 256: 2 FunctionCall 20(foo1(d1;u1;) 253(param) 254(param) + 257: 22(int) Load 167(i) + 258: 6(float) ConvertSToF 257 + Store 259(param) 258 + 261: 22(int) Load 167(i) + Store 260(param) 261 + 262: 2 FunctionCall 27(foo1(d1;i1;) 259(param) 260(param) + 263: 22(int) Load 167(i) + 264: 6(float) ConvertSToF 263 + Store 265(param) 264 + 267: 29(float) Load 173(f) + Store 266(param) 267 + 268: 2 FunctionCall 34(foo1(d1;f1;) 265(param) 266(param) + 269: 15(int) Load 161(u) + 270: 22(int) Bitcast 269 + Store 271(param) 270 + 273: 8(bool) Load 150(b) + Store 272(param) 273 + 274: 2 FunctionCall 44(foo2(i1;b1;) 271(param) 272(param) + 275: 15(int) Load 161(u) + 276: 22(int) Bitcast 275 + Store 277(param) 276 + 279: 6(float) Load 149(d) + Store 278(param) 279 + 280: 2 FunctionCall 64(foo2(i1;d1;) 277(param) 278(param) + 281: 15(int) Load 161(u) + 282: 22(int) Bitcast 281 + Store 283(param) 282 + 285: 15(int) Load 161(u) + Store 284(param) 285 + 286: 2 FunctionCall 49(foo2(i1;u1;) 283(param) 284(param) + 287: 15(int) Load 161(u) + 288: 22(int) Bitcast 287 + Store 289(param) 288 + 291: 22(int) Load 167(i) + Store 290(param) 291 + 292: 2 FunctionCall 54(foo2(i1;i1;) 289(param) 290(param) + 293: 15(int) Load 161(u) + 294: 22(int) Bitcast 293 + Store 295(param) 294 + 297: 29(float) Load 173(f) + Store 296(param) 297 + 298: 2 FunctionCall 59(foo2(i1;f1;) 295(param) 296(param) + 300: 22(int) Load 167(i) + Store 299(param) 300 + 302: 8(bool) Load 150(b) + Store 301(param) 302 + 303: 2 FunctionCall 44(foo2(i1;b1;) 299(param) 301(param) + 305: 22(int) Load 167(i) + Store 304(param) 305 + 307: 6(float) Load 149(d) + Store 306(param) 307 + 308: 2 FunctionCall 64(foo2(i1;d1;) 304(param) 306(param) + 310: 22(int) Load 167(i) + Store 309(param) 310 + 312: 15(int) Load 161(u) + Store 311(param) 312 + 313: 2 FunctionCall 49(foo2(i1;u1;) 309(param) 311(param) + 315: 22(int) Load 167(i) + Store 314(param) 315 + 317: 22(int) Load 167(i) + Store 316(param) 317 + 318: 2 FunctionCall 54(foo2(i1;i1;) 314(param) 316(param) + 320: 22(int) Load 167(i) + Store 319(param) 320 + 322: 29(float) Load 173(f) + Store 321(param) 322 + 323: 2 FunctionCall 59(foo2(i1;f1;) 319(param) 321(param) + 325: 8(bool) Load 150(b) + Store 324(param) 325 + 326: 2 FunctionCall 68(foo3(b1;) 324(param) + 327: 6(float) Load 149(d) + 329: 8(bool) FOrdNotEqual 327 328 + Store 330(param) 329 + 331: 2 FunctionCall 68(foo3(b1;) 330(param) + 332: 15(int) Load 161(u) + 334: 8(bool) INotEqual 332 333 Store 335(param) 334 - 336: 2 FunctionCall 80(foo6(f1;) 335(param) - 337: 22(int) Load 104(i) - 338: 29(float) ConvertSToF 337 + 336: 2 FunctionCall 68(foo3(b1;) 335(param) + 337: 22(int) Load 167(i) + 338: 8(bool) INotEqual 337 333 Store 339(param) 338 - 340: 2 FunctionCall 80(foo6(f1;) 339(param) - 342: 29(float) Load 110(f) - Store 341(param) 342 - 343: 2 FunctionCall 80(foo6(f1;) 341(param) - 344: 8(bool) Load 87(b) - 346: 6(float) Select 344 345 265 - Store 347(param) 346 - 348: 2 FunctionCall 84(foo7(d1;) 347(param) - 350: 6(float) Load 86(d) - Store 349(param) 350 - 351: 2 FunctionCall 84(foo7(d1;) 349(param) - 352: 15(int) Load 98(u) - 353: 6(float) ConvertUToF 352 - Store 354(param) 353 - 355: 2 FunctionCall 84(foo7(d1;) 354(param) - 356: 22(int) Load 104(i) - 357: 6(float) ConvertSToF 356 - Store 358(param) 357 - 359: 2 FunctionCall 84(foo7(d1;) 358(param) - 360: 29(float) Load 110(f) - 361: 6(float) FConvert 360 - Store 362(param) 361 - 363: 2 FunctionCall 84(foo7(d1;) 362(param) - 367: 364(fvec4) Load 366(input) - ReturnValue 367 + 340: 2 FunctionCall 68(foo3(b1;) 339(param) + 341: 29(float) Load 173(f) + 343: 8(bool) FOrdNotEqual 341 342 + Store 344(param) 343 + 345: 2 FunctionCall 68(foo3(b1;) 344(param) + 346: 8(bool) Load 150(b) + 348: 15(int) Select 346 347 333 + Store 349(param) 348 + 350: 2 FunctionCall 72(foo4(u1;) 349(param) + 351: 6(float) Load 149(d) + 352: 15(int) ConvertFToU 351 + Store 353(param) 352 + 354: 2 FunctionCall 72(foo4(u1;) 353(param) + 356: 15(int) Load 161(u) + Store 355(param) 356 + 357: 2 FunctionCall 72(foo4(u1;) 355(param) + 358: 22(int) Load 167(i) + 359: 15(int) Bitcast 358 + Store 360(param) 359 + 361: 2 FunctionCall 72(foo4(u1;) 360(param) + 362: 29(float) Load 173(f) + 363: 15(int) ConvertFToU 362 + Store 364(param) 363 + 365: 2 FunctionCall 72(foo4(u1;) 364(param) + 366: 8(bool) Load 150(b) + 369: 22(int) Select 366 368 367 + Store 370(param) 369 + 371: 2 FunctionCall 76(foo5(i1;) 370(param) + 372: 6(float) Load 149(d) + 373: 22(int) ConvertFToS 372 + Store 374(param) 373 + 375: 2 FunctionCall 76(foo5(i1;) 374(param) + 376: 15(int) Load 161(u) + 377: 22(int) Bitcast 376 + Store 378(param) 377 + 379: 2 FunctionCall 76(foo5(i1;) 378(param) + 381: 22(int) Load 167(i) + Store 380(param) 381 + 382: 2 FunctionCall 76(foo5(i1;) 380(param) + 383: 29(float) Load 173(f) + 384: 22(int) ConvertFToS 383 + Store 385(param) 384 + 386: 2 FunctionCall 76(foo5(i1;) 385(param) + 387: 8(bool) Load 150(b) + 389: 29(float) Select 387 388 342 + Store 390(param) 389 + 391: 2 FunctionCall 80(foo6(f1;) 390(param) + 392: 6(float) Load 149(d) + 393: 29(float) FConvert 392 + Store 394(param) 393 + 395: 2 FunctionCall 80(foo6(f1;) 394(param) + 396: 15(int) Load 161(u) + 397: 29(float) ConvertUToF 396 + Store 398(param) 397 + 399: 2 FunctionCall 80(foo6(f1;) 398(param) + 400: 22(int) Load 167(i) + 401: 29(float) ConvertSToF 400 + Store 402(param) 401 + 403: 2 FunctionCall 80(foo6(f1;) 402(param) + 405: 29(float) Load 173(f) + Store 404(param) 405 + 406: 2 FunctionCall 80(foo6(f1;) 404(param) + 407: 8(bool) Load 150(b) + 409: 6(float) Select 407 408 328 + Store 410(param) 409 + 411: 2 FunctionCall 84(foo7(d1;) 410(param) + 413: 6(float) Load 149(d) + Store 412(param) 413 + 414: 2 FunctionCall 84(foo7(d1;) 412(param) + 415: 15(int) Load 161(u) + 416: 6(float) ConvertUToF 415 + Store 417(param) 416 + 418: 2 FunctionCall 84(foo7(d1;) 417(param) + 419: 22(int) Load 167(i) + 420: 6(float) ConvertSToF 419 + Store 421(param) 420 + 422: 2 FunctionCall 84(foo7(d1;) 421(param) + 423: 29(float) Load 173(f) + 424: 6(float) FConvert 423 + Store 425(param) 424 + 426: 2 FunctionCall 84(foo7(d1;) 425(param) + 427: 8(bool) Load 150(b) + 428: 29(float) Select 427 388 342 + Store 429(param) 428 + 430: 2 FunctionCall 87(foo8(f1;) 429(param) + 431: 15(int) Load 161(u) + 432: 29(float) ConvertUToF 431 + Store 433(param) 432 + 434: 2 FunctionCall 87(foo8(f1;) 433(param) + 435: 22(int) Load 167(i) + 436: 29(float) ConvertSToF 435 + Store 437(param) 436 + 438: 2 FunctionCall 87(foo8(f1;) 437(param) + 439: 8(bool) Load 150(b) + 440: 22(int) Select 439 368 367 + Store 441(param) 440 + 442: 2 FunctionCall 93(foo9(i1;) 441(param) + 443: 29(float) Load 173(f) + 444: 15(int) ConvertFToU 443 + Store 445(param) 444 + 446: 2 FunctionCall 96(foo9(u1;) 445(param) + 447: 6(float) Load 149(d) + 448: 15(int) ConvertFToU 447 + Store 449(param) 448 + 450: 2 FunctionCall 96(foo9(u1;) 449(param) + 451: 15(int) Load 161(u) + 452: 22(int) Bitcast 451 + Store 453(param) 452 + 454: 2 FunctionCall 102(foo10(i1;) 453(param) + 455: 29(float) Load 173(f) + 456: 22(int) ConvertFToS 455 + Store 457(param) 456 + 458: 2 FunctionCall 102(foo10(i1;) 457(param) + 459: 6(float) Load 149(d) + 460: 22(int) ConvertFToS 459 + Store 461(param) 460 + 462: 2 FunctionCall 102(foo10(i1;) 461(param) + 463: 8(bool) Load 150(b) + 464: 15(int) Select 463 347 333 + Store 465(param) 464 + 466: 2 FunctionCall 120(foo11(u1;) 465(param) + 467: 29(float) Load 173(f) + 468: 6(float) FConvert 467 + Store 469(param) 468 + 470: 2 FunctionCall 111(foo11(d1;) 469(param) + 471: 29(float) Load 173(f) + 472: 104(fvec3) CompositeConstruct 471 471 471 + 473: 125(fvec3) FConvert 472 + Store 474(param) 473 + 475: 2 FunctionCall 129(foo12(vd3;) 474(param) + 476: 22(int) Load 167(i) + 477: 22(int) Load 167(i) + 479: 478(ivec2) CompositeConstruct 476 477 + 480: 134(ivec2) Bitcast 479 + Store 481(param) 480 + 482: 2 FunctionCall 138(foo16(vu2;) 481(param) + 483: 29(float) Load 173(f) + 484: 104(fvec3) CompositeConstruct 483 483 483 + Store 485(param) 484 + 486: 2 FunctionCall 141(foo13(vf3;) 485(param) + 487: 22(int) Load 167(i) + 489: 488(ivec4) CompositeConstruct 487 487 487 487 + 490: 22(int) CompositeExtract 489 0 + Store 491(param) 490 + 492: 2 FunctionCall 144(foo14(vi1;) 491(param) + 493: 8(bool) Load 150(b) + Store 494(param) 493 + 495: 2 FunctionCall 147(foo15(vb1;) 494(param) + 496: 8(bool) Load 150(b) + 498: 497(bvec3) CompositeConstruct 496 496 496 + 499: 8(bool) CompositeExtract 498 0 + Store 500(param) 499 + 501: 2 FunctionCall 147(foo15(vb1;) 500(param) + 505: 502(fvec4) Load 504(input) + ReturnValue 505 FunctionEnd 13(foo1(d1;b1;): 2 Function None 10 11(a): 7(ptr) FunctionParameter @@ -1175,3 +1489,88 @@ Missing functionality: missing user function; linker needs to catch that 85: Label Return FunctionEnd + 87(foo8(f1;): 2 Function None 78 + 86: 30(ptr) FunctionParameter + 88: Label + Return + FunctionEnd + 90(foo8(d1;): 2 Function None 82 + 89: 7(ptr) FunctionParameter + 91: Label + Return + FunctionEnd + 93(foo9(i1;): 2 Function None 74 + 92: 23(ptr) FunctionParameter + 94: Label + Return + FunctionEnd + 96(foo9(u1;): 2 Function None 70 + 95: 16(ptr) FunctionParameter + 97: Label + Return + FunctionEnd + 99(foo10(b1;): 2 Function None 66 + 98: 9(ptr) FunctionParameter + 100: Label + Return + FunctionEnd + 102(foo10(i1;): 2 Function None 74 + 101: 23(ptr) FunctionParameter + 103: Label + Return + FunctionEnd + 108(foo11(vf3;): 2 Function None 106 + 107: 105(ptr) FunctionParameter + 109: Label + Return + FunctionEnd + 111(foo11(d1;): 2 Function None 82 + 110: 7(ptr) FunctionParameter + 112: Label + Return + FunctionEnd + 117(foo11(vi3;): 2 Function None 115 + 116: 114(ptr) FunctionParameter + 118: Label + Return + FunctionEnd + 120(foo11(u1;): 2 Function None 70 + 119: 16(ptr) FunctionParameter + 121: Label + Return + FunctionEnd + 123(foo12(vf1;): 2 Function None 78 + 122: 30(ptr) FunctionParameter + 124: Label + Return + FunctionEnd + 129(foo12(vd3;): 2 Function None 127 + 128: 126(ptr) FunctionParameter + 130: Label + Return + FunctionEnd + 132(foo16(u1;): 2 Function None 70 + 131: 16(ptr) FunctionParameter + 133: Label + Return + FunctionEnd + 138(foo16(vu2;): 2 Function None 136 + 137: 135(ptr) FunctionParameter + 139: Label + Return + FunctionEnd + 141(foo13(vf3;): 2 Function None 106 + 140: 105(ptr) FunctionParameter + 142: Label + Return + FunctionEnd + 144(foo14(vi1;): 2 Function None 74 + 143: 23(ptr) FunctionParameter + 145: Label + Return + FunctionEnd + 147(foo15(vb1;): 2 Function None 66 + 146: 9(ptr) FunctionParameter + 148: Label + Return + FunctionEnd diff --git a/Test/hlsl.overload.frag b/Test/hlsl.overload.frag index 2202ae0b1..b5ddf4932 100644 --- a/Test/hlsl.overload.frag +++ b/Test/hlsl.overload.frag @@ -1,117 +1,142 @@ // function selection under type conversion -void foo1(double a, bool b) {} -void foo1(double a, uint b) {} -void foo1(double a, int b) {} -void foo1(double a, float b) {} +void foo1(double a, bool b) {} +void foo1(double a, uint b) {} +void foo1(double a, int b) {} +void foo1(double a, float b) {} void foo1(double a, double b){} // uint -> int -void foo2(int a, bool b) {} -void foo2(int a, uint b) {} -void foo2(int a, int b) {} -void foo2(int a, float b) {} +void foo2(int a, bool b) {} +void foo2(int a, uint b) {} +void foo2(int a, int b) {} +void foo2(int a, float b) {} void foo2(int a, double b){} // everything can promote -void foo3(bool b) {} -void foo4(uint b) {} -void foo5(int b) {} -void foo6(float b) {} +void foo3(bool b) {} +void foo4(uint b) {} +void foo5(int b) {} +void foo6(float b) {} void foo7(double b){} // shorter forward chain better than longer or backward chain -void foo8(float); -void foo8(double); -void foo9(int); -void foo9(uint); -void foo10(bool); -void foo10(int); +void foo8(float) {} +void foo8(double) {} +void foo9(int) {} +void foo9(uint) {} +void foo10(bool) {} +void foo10(int) {} + +// shape change is worse +void foo11(float3) {} +void foo11(double) {} +void foo11(int3) {} +void foo11(uint) {} +void foo12(float1) {} +void foo12(double3) {} +void foo16(uint) {} +void foo16(uint2) {} + +// shape change +void foo13(float3) {} +void foo14(int1) {} +void foo15(bool1) {} float4 PixelShaderFunction(float4 input) : COLOR0 { - bool b; - double d; - uint u; - int i; - float f; + bool b; + double d; + uint u; + int i; + float f; + + foo1(d, b); + foo1(d, d); + foo1(d, u); + foo1(d, i); + foo1(d, f); + + foo1(f, b); + foo1(f, d); + foo1(f, u); + foo1(f, i); + foo1(f, f); + + foo1(u, b); + foo1(u, d); + foo1(u, u); + foo1(u, i); + foo1(u, f); + + foo1(i, b); + foo1(i, d); + foo1(i, u); + foo1(i, i); + foo1(i, f); + + foo2(u, b); + foo2(u, d); + foo2(u, u); + foo2(u, i); + foo2(u, f); + + foo2(i, b); + foo2(i, d); + foo2(i, u); + foo2(i, i); + foo2(i, f); + + foo3(b); + foo3(d); + foo3(u); + foo3(i); + foo3(f); + + foo4(b); + foo4(d); + foo4(u); + foo4(i); + foo4(f); + + foo5(b); + foo5(d); + foo5(u); + foo5(i); + foo5(f); + + foo6(b); + foo6(d); + foo6(u); + foo6(i); + foo6(f); + + foo7(b); + foo7(d); + foo7(u); + foo7(i); + foo7(f); + + foo8(b); + foo8(u); + foo8(i); + + foo9(b); + foo9(f); + foo9(d); + + foo10(u); + foo10(f); + foo10(d); + + foo11(b); + foo11(f); + foo12(float3(f)); + foo16(int2(i,i)); + + foo13(f); + foo14(int4(i)); + foo15(b); + foo15(bool3(b)); - foo1(d, b); - foo1(d, d); - foo1(d, u); - foo1(d, i); - foo1(d, f); - - foo1(f, b); - foo1(f, d); - foo1(f, u); - foo1(f, i); - foo1(f, f); - - foo1(u, b); - foo1(u, d); - foo1(u, u); - foo1(u, i); - foo1(u, f); - - foo1(i, b); - foo1(i, d); - foo1(i, u); - foo1(i, i); - foo1(i, f); - - foo2(u, b); - foo2(u, d); - foo2(u, u); - foo2(u, i); - foo2(u, f); - - foo2(i, b); - foo2(i, d); - foo2(i, u); - foo2(i, i); - foo2(i, f); - - foo3(b); - foo3(d); - foo3(u); - foo3(i); - foo3(f); - - foo4(b); - foo4(d); - foo4(u); - foo4(i); - foo4(f); - - foo5(b); - foo5(d); - foo5(u); - foo5(i); - foo5(f); - - foo6(b); - foo6(d); - foo6(u); - foo6(i); - foo6(f); - - foo7(b); - foo7(d); - foo7(u); - foo7(i); - foo7(f); - - foo8(b); - foo8(u); - foo8(i); - - foo9(b); - foo9(f); - foo9(d); - - foo10(u); - foo10(f); - foo10(d); - return input; } diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index b239be15f..1fa5428a7 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 "Overload400-PrecQual.1434" +#define GLSLANG_REVISION "Overload400-PrecQual.1438" #define GLSLANG_DATE "25-Aug-2016" diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index 325f84f89..ee9c251a2 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -702,6 +702,7 @@ TIntermTyped* TIntermediate::addShapeConversion(TOperator op, const TType& type, case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: + case EOpFunctionCall: break; default: return node; @@ -715,9 +716,11 @@ TIntermTyped* TIntermediate::addShapeConversion(TOperator op, const TType& type, // The new node that handles the conversion TOperator constructorOp = mapTypeToConstructorOp(type); - // scalar -> smeared -> vector - if (type.isVector() && node->getType().isScalar()) - return setAggregateOperator(node, constructorOp, type, node->getLoc()); + // scalar -> smeared -> vector, or + // bigger vector -> smaller vector or scalar + if ((type.isVector() && node->getType().isScalar()) || + (node->getVectorSize() > type.getVectorSize() && type.isVector())) + return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); return node; } @@ -731,6 +734,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat if (profile == EEsProfile || version == 110) return false; + // TODO: Move more policies into language-specific handlers. // Some languages allow more general (or potentially, more specific) conversions under some conditions. if (source == EShSourceHlsl) { const bool fromConvertable = (from == EbtFloat || from == EbtDouble || from == EbtInt || from == EbtUint || from == EbtBool); diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 07eb00ff0..f4a712894 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -2001,6 +2001,7 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI // In-qualified arguments just need an extra node added above the argument to // convert to the correct type. arg = intermediate.addConversion(EOpFunctionCall, *function[i].type, arg); + arg = intermediate.addShapeConversion(EOpFunctionCall, *function[i].type, arg); if (arg) { if (function.getParamCount() == 1) arguments = arg; @@ -3565,9 +3566,25 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu auto convertible = [this](const TType& from, const TType& to) { if (from == to) return true; - if (from.isArray() || to.isArray() || ! from.sameElementShape(to)) + + // no aggregate conversions + if (from.isArray() || to.isArray() || + from.isStruct() || to.isStruct()) return false; - return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType(), EOpFunctionCall); + + // basic types have to be convertible + if (! intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType(), EOpFunctionCall)) + return false; + + // shapes have to be convertible + if ((from.isScalar() && to.isScalar()) || + (from.isScalar() && to.isVector()) || + (from.isVector() && to.isVector() && from.getVectorSize() >= to.getVectorSize())) + return true; + + // TODO: what are the matrix rules? they go here + + return false; }; // Is 'to2' a better conversion than 'to1'? @@ -3580,33 +3597,41 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu if (from == to1) return false; - // float -> double is better than any other float conversion - if (from.getBasicType() == EbtFloat) { - if (to2.getBasicType() == EbtDouble && to1.getBasicType() != EbtDouble) + // shape changes are always worse + if (from.isScalar() || from.isVector()) { + if (from.getVectorSize() == to2.getVectorSize() && + from.getVectorSize() != to1.getVectorSize()) return true; + if (from.getVectorSize() == to1.getVectorSize() && + from.getVectorSize() != to2.getVectorSize()) + return false; } - // int -> uint is better than any other int conversion - if (from.getBasicType() == EbtInt) { - if (to2.getBasicType() == EbtUint && to1.getBasicType() != EbtUint) - return true; - } + // Might or might not be changing shape, which means basic type might + // or might not match, so within that, the question is how big a + // basic-type conversion is being done. + // + // Use a hierarchy of domains, translated to order of magnitude + // in a linearized view: + // - floating-point vs. integer + // - 32 vs. 64 bit (or width in general) + // - bool vs. non bool + // - signed vs. not signed + auto linearize = [](const TBasicType& basicType) { + switch (basicType) { + case EbtBool: return 1; + case EbtInt: return 10; + case EbtUint: return 11; + case EbtInt64: return 20; + case EbtUint64: return 21; + case EbtFloat: return 100; + case EbtDouble: return 110; + default: return 0; + } + }; - // TODO: these should be replaced by a more generic "shorter chain is better than longer chain" rule - - // -> float is better than -> double - if (to2.getBasicType() == EbtFloat && to1.getBasicType() == EbtDouble) - return true; - - // -> int is better than -> bool - if ((to2.getBasicType() == EbtInt || to2.getBasicType() == EbtUint) && to1.getBasicType() == EbtBool) - return true; - - // -> uint is better than -> int - if (to2.getBasicType() == EbtUint && to1.getBasicType() == EbtInt) - return true; - - return false; + return std::abs(linearize(to2.getBasicType()) - linearize(from.getBasicType())) < + std::abs(linearize(to1.getBasicType()) - linearize(from.getBasicType())); }; // for ambiguity reporting