1static float2 var = float2(1.0, 2.0); 2 3struct type1 4{ 5 int memFun1(int3 var) 6 { 7 return var.z + this.var + var2; 8 } 9 int memFun2(int a) 10 { 11 int3 var = int3(1,2,3); 12 return var.z + (int)bar.y + this.var2; 13 } 14 float2 bar; 15 int var; 16 int var2; 17}; 18 19float4 main() : SV_Target0 20{ 21 type1 T; 22 T.bar = var; 23 T.var = 7; 24 T.var2 = 9; 25 int i = T.memFun1(int3(10,11,12)); 26 i += T.memFun2(17); 27 28 return float4(i,i,i,i); 29} 30