4 float4 Color : SV_Target0;
19 void Fn_F3(float3 x) { }
20 void Fn_I3(int3 x) { }
21 void Fn_U3(uint3 x) { }
22 void Fn_B3(bool3 x) { }
23 void Fn_D3(double3 x) { }
25 // ----------- Test implicit conversions on function returns -----------
26 float3 Fn_R_F3I(out float3 p) { p = i3; return i3; }
27 float3 Fn_R_F3U(out float3 p) { p = u3; return u3; }
28 float3 Fn_R_F3B(out float3 p) { p = b3; return b3; }
29 float3 Fn_R_F3D(out float3 p) { p = d3; return d3; } // valid, but loss of precision on downconversion.
31 int3 Fn_R_I3U(out int3 p) { p = u3; return u3; }
32 int3 Fn_R_I3B(out int3 p) { p = b3; return b3; }
33 int3 Fn_R_I3F(out int3 p) { p = f3; return f3; }
34 int3 Fn_R_I3D(out int3 p) { p = d3; return d3; } // valid, but loss of precision on downconversion.
36 uint3 Fn_R_U3I(out uint3 p) { p = i3; return i3; }
37 uint3 Fn_R_U3F(out uint3 p) { p = f3; return f3; }
38 uint3 Fn_R_U3B(out uint3 p) { p = b3; return b3; }
39 uint3 Fn_R_U3D(out uint3 p) { p = d3; return d3; } // valid, but loss of precision on downconversion.
41 bool3 Fn_R_B3I(out bool3 p) { p = i3; return i3; }
42 bool3 Fn_R_B3U(out bool3 p) { p = u3; return u3; }
43 bool3 Fn_R_B3F(out bool3 p) { p = f3; return f3; }
44 bool3 Fn_R_B3D(out bool3 p) { p = d3; return d3; }
46 double3 Fn_R_D3I(out double3 p) { p = i3; return i3; }
47 double3 Fn_R_D3U(out double3 p) { p = u3; return u3; }
48 double3 Fn_R_D3B(out double3 p) { p = b3; return b3; }
49 double3 Fn_R_D3F(out double3 p) { p = f3; return f3; }
53 // ----------- assignment conversions -----------
57 float3 r03 = d3; // valid, but loss of precision on downconversion.
62 int3 r13 = d3; // valid, but loss of precision on downconversion.
67 uint3 r23 = d3; // valid, but loss of precision on downconversion.
79 // ----------- assign ops: vector times vector -----------
83 r03 *= d3; // valid, but loss of precision on downconversion.
88 r13 *= d3; // valid, but loss of precision on downconversion.
93 r23 *= d3; // valid, but loss of precision on downconversion.
95 // No mul operator for bools
102 // ----------- assign ops: vector times scalar -----------
106 r03 *= ds; // valid, but loss of precision on downconversion.
111 r13 *= ds; // valid, but loss of precision on downconversion.
116 r23 *= ds; // valid, but loss of precision on downconversion.
118 // No mul operator for bools
126 #define FN_OVERLOADS 0 // change to 1 when overloads under promotions are in place
133 Fn_F3(d3); // valid, but loss of precision on downconversion.
139 Fn_I3(d3); // valid, but loss of precision on downconversion.
145 Fn_U3(d3); // valid, but loss of precision on downconversion.
163 Fn_F3(d3.x); // valid, but loss of precision on downconversion.
169 Fn_I3(d3.x); // valid, but loss of precision on downconversion.
175 Fn_U3(d3.x); // valid, but loss of precision on downconversion.
191 const float sf = 1.2;
193 int c1 = si * sf; // 3.6 (not 3!)
194 int c2 = sf * si; // 3.6 (not 3!)
196 float4 outval = float4(si * sf, sf*si, c1, c2);
199 psout.Color = outval;