var g_v2 : vec2 = vec2(1.0); var g_v3 : vec3 = vec3(1.0); var g_v4 : vec4 = vec4(1.0); fn from_immediate_bool() { var v2 : vec2 = vec2(true); var v3 : vec3 = vec3(true); var v4 : vec4 = vec4(true); } fn from_immediate_f32() { var v2 : vec2 = vec2(1.0); var v3 : vec3 = vec3(1.0); var v4 : vec4 = vec4(1.0); } fn from_immediate_i32() { var v2 : vec2 = vec2(1); var v3 : vec3 = vec3(1); var v4 : vec4 = vec4(1); } fn from_immediate_u32() { var v2 : vec2 = vec2(1u); var v3 : vec3 = vec3(1u); var v4 : vec4 = vec4(1u); } fn from_expression_bool() { var v2 : vec2 = vec2(true); var v3 : vec3 = vec3(true); var v4 : vec4 = vec4(true); } fn from_expression_f32() { var v2 : vec2 = vec2((1.0 + 2.0)); var v3 : vec3 = vec3((1.0 + 2.0)); var v4 : vec4 = vec4((1.0 + 2.0)); } fn from_expression_i32() { var v2 : vec2 = vec2((1 + 2)); var v3 : vec3 = vec3((1 + 2)); var v4 : vec4 = vec4((1 + 2)); } fn from_expression_u32() { var v2 : vec2 = vec2((1u + 2u)); var v3 : vec3 = vec3((1u + 2u)); var v4 : vec4 = vec4((1u + 2u)); } fn get_bool() -> bool { return true; } fn get_f32() -> f32 { return 1.0; } fn get_i32() -> i32 { return 1; } fn get_u32() -> u32 { return 1u; } fn from_call_bool() { var v2 : vec2 = vec2(get_bool()); var v3 : vec3 = vec3(get_bool()); var v4 : vec4 = vec4(get_bool()); } fn from_call_f32() { var v2 : vec2 = vec2(get_f32()); var v3 : vec3 = vec3(get_f32()); var v4 : vec4 = vec4(get_f32()); } fn from_call_i32() { var v2 : vec2 = vec2(get_i32()); var v3 : vec3 = vec3(get_i32()); var v4 : vec4 = vec4(get_i32()); } fn from_call_u32() { var v2 : vec2 = vec2(get_u32()); var v3 : vec3 = vec3(get_u32()); var v4 : vec4 = vec4(get_u32()); } fn with_swizzle() { var a = vec2(1.0).y; var b = vec3(1.0).z; var c = vec4(1.0).w; } [[stage(fragment)]] fn main() -> [[location(0)]] vec4 { return vec4(0.0, 0.0, 0.0, 0.0); }