diff --git a/test/tint/builtins/gen/gen.wgsl.tmpl b/test/tint/builtins/gen/gen.wgsl.tmpl index 9799b0a36c..8c08c570a1 100644 --- a/test/tint/builtins/gen/gen.wgsl.tmpl +++ b/test/tint/builtins/gen/gen.wgsl.tmpl @@ -115,14 +115,18 @@ struct UB { fn {{$permutation}}() { {{/* Build the parameters either as 'var' or inline values */ -}} {{- range $i, $p := $overload.Parameters -}} -{{- $class := Eval "StorageClass" $p.Type -}} +{{- $class := Eval "StorageClass" $p.Type -}} +{{- $is_abstract := IsAbstract $p.Type -}} {{- if eq "function" $class -}} {{- if eq "ptr" $p.Type.Target.Name -}} +{{template "Type" index $p.Type.TemplateArguments 1}}; {{- /*indent*/}} var arg_{{$i}}: {{template "Type" index $p.Type.TemplateArguments 1}}; {{ $args.Put $i (printf "&arg_%v" $i) -}} {{- else if and (not $p.IsConst) (eq "var" $mode) -}} -{{- /*indent*/}} var arg_{{$i}} = {{Eval "ArgumentValue" $p}}; -{{ $args.Put $i (printf "arg_%v" $i) -}} +{{- if $is_abstract }} const arg_{{$i}} = {{Eval "ArgumentValue" $p}}; +{{ else }} var arg_{{$i}} = {{Eval "ArgumentValue" $p}}; +{{ end }} +{{- $args.Put $i (printf "arg_%v" $i) -}} {{- else -}} {{- $args.Put $i (Eval "ArgumentValue" $p) -}} {{- end -}} @@ -198,6 +202,7 @@ fn compute_main() { {{- end -}} {{ end -}} + {{- /* ------------------------------------------------------------------ */ -}} {{- define "StorageClass" -}} {{- /* Returns the storage class for the given Fully Qualified Name */ -}} @@ -222,12 +227,12 @@ fn compute_main() { {{- /* Emit the default for the storage class */ -}} {{- /* https://gpuweb.github.io/gpuweb/wgsl/#storage-class */ -}} {{- $storage := Eval "StorageClass" . -}} -{{- if eq $storage "function" -}}read_write -{{- else if eq $storage "private" -}}read_write +{{- if eq $storage "function" -}}read_write +{{- else if eq $storage "private" -}}read_write {{- else if eq $storage "workgroup" -}}read_write -{{- else if eq $storage "uniform" -}}read -{{- else if eq $storage "storage" -}}read -{{- else if eq $storage "handle" -}}read +{{- else if eq $storage "uniform" -}}read +{{- else if eq $storage "storage" -}}read +{{- else if eq $storage "handle" -}}read {{- end -}} {{- end -}} {{- end -}} @@ -245,10 +250,23 @@ fn compute_main() { {{- if eq .Name "level" -}}0 {{- else -}}1 {{- end -}} -{{- else if eq $ty.Target.Name "u32" -}}1u -{{- else if eq $ty.Target.Name "f32" -}}1.0 -{{- else -}}{{template "Type" $ty}}() -{{- end -}} +{{- else if eq $ty.Target.Name "u32" -}}1u +{{- else if eq $ty.Target.Name "f32" -}}1.f +{{- else if eq $ty.Target.Name "fa" -}}1 +{{- else if eq $ty.Target.Name "ia" -}}1.0 +{{- else if eq $ty.Target.Name "bool" -}}true +{{- else if eq $ty.Target.Name "vec" -}} +{{- $el := Eval "ArgumentValue" "Type" (index $ty.TemplateArguments 1) "Name" ""}} +{{- template "Type" $ty}}({{$el}}) +{{- else if eq $ty.Target.Name "mat" -}}{{template "Type" $ty}}( +{{- $el := Eval "ArgumentValue" "Type" (index $ty.TemplateArguments 2) "Name" ""}} +{{- range $col := Iterate (index $ty.TemplateArguments 0) }} +{{- range $row := Iterate (index $ty.TemplateArguments 1) }} +{{- if or $col $row -}}, {{end}}{{$el}} +{{- end -}} +{{- end -}}) +{{- else -}}{{template "Type" $ty}}() +{{- end -}} {{- end -}} @@ -257,7 +275,12 @@ fn compute_main() { {{- /* Emits the WGSL for the Fully Qualified Name argument */ -}} {{- /* ------------------------------------------------------------------ */ -}} {{- if IsType .Target -}} -{{- if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" index .TemplateArguments 1}}> +{{- if IsAbstract . -}} +{{- if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}} +{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}} +{{- else -}} +{{- end -}} +{{- else if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" index .TemplateArguments 1}}> {{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" index .TemplateArguments 2}}> {{- else -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}} {{- end -}} diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl b/test/tint/builtins/gen/literal/abs/002533.wgsl index d3c51c9aec..240c8792d3 100644 --- a/test/tint/builtins/gen/literal/abs/002533.wgsl +++ b/test/tint/builtins/gen/literal/abs/002533.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<4, f32>) -> vec<4, f32> fn abs_002533() { - var res: vec4 = abs(vec4()); + var res: vec4 = abs(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.dxc.hlsl index 40198e072e..478b532ca1 100644 --- a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_002533() { - float4 res = abs((0.0f).xxxx); + float4 res = abs((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.fxc.hlsl index 40198e072e..478b532ca1 100644 --- a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_002533() { - float4 res = abs((0.0f).xxxx); + float4 res = abs((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.glsl index d3b54a54f1..2e7bac5003 100644 --- a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_002533() { - vec4 res = abs(vec4(0.0f)); + vec4 res = abs(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_002533() { - vec4 res = abs(vec4(0.0f)); + vec4 res = abs(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_002533() { - vec4 res = abs(vec4(0.0f)); + vec4 res = abs(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.msl index d1c346b0bb..f9acb2de71 100644 --- a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_002533() { - float4 res = fabs(float4(0.0f)); + float4 res = fabs(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.spvasm index 7a113676d0..432dad0c24 100644 --- a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %abs_002533 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 FAbs %5 + %13 = OpExtInst %v4float %14 FAbs %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %abs_002533 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %abs_002533 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %abs_002533 + %27 = OpLabel + %28 = OpFunctionCall %void %abs_002533 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %abs_002533 + %30 = OpLabel + %31 = OpFunctionCall %void %abs_002533 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.wgsl index 9e957d4cb8..f459d547df 100644 --- a/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/002533.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_002533() { - var res : vec4 = abs(vec4()); + var res : vec4 = abs(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl b/test/tint/builtins/gen/literal/abs/005174.wgsl index c6032b3e5e..c7fb08ca55 100644 --- a/test/tint/builtins/gen/literal/abs/005174.wgsl +++ b/test/tint/builtins/gen/literal/abs/005174.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<3, f32>) -> vec<3, f32> fn abs_005174() { - var res: vec3 = abs(vec3()); + var res: vec3 = abs(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.dxc.hlsl index c439a7de41..083f7d1e7d 100644 --- a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_005174() { - float3 res = abs((0.0f).xxx); + float3 res = abs((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.fxc.hlsl index c439a7de41..083f7d1e7d 100644 --- a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_005174() { - float3 res = abs((0.0f).xxx); + float3 res = abs((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.glsl index 61ee184ecf..e1c3952dfe 100644 --- a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_005174() { - vec3 res = abs(vec3(0.0f)); + vec3 res = abs(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_005174() { - vec3 res = abs(vec3(0.0f)); + vec3 res = abs(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_005174() { - vec3 res = abs(vec3(0.0f)); + vec3 res = abs(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.msl index 7148a5c9da..91163ee7de 100644 --- a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_005174() { - float3 res = fabs(float3(0.0f)); + float3 res = fabs(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.spvasm index a5282ba82c..e1fc03a280 100644 --- a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %abs_005174 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 FAbs %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 FAbs %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %abs_005174 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %abs_005174 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %abs_005174 + %29 = OpLabel + %30 = OpFunctionCall %void %abs_005174 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_005174 + %32 = OpLabel + %33 = OpFunctionCall %void %abs_005174 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.wgsl index f3e949455b..eab83d2446 100644 --- a/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/005174.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_005174() { - var res : vec3 = abs(vec3()); + var res : vec3 = abs(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl b/test/tint/builtins/gen/literal/abs/1ce782.wgsl index 8076d8e424..9cc994fb91 100644 --- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl +++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<4, u32>) -> vec<4, u32> fn abs_1ce782() { - var res: vec4 = abs(vec4()); + var res: vec4 = abs(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.dxc.hlsl index 2d34282891..6b8b5acc39 100644 --- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_1ce782() { - uint4 res = abs((0u).xxxx); + uint4 res = abs((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.fxc.hlsl index 2d34282891..6b8b5acc39 100644 --- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_1ce782() { - uint4 res = abs((0u).xxxx); + uint4 res = abs((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.glsl index 175e413ac0..44f37c70eb 100644 --- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_1ce782() { - uvec4 res = uvec4(0u); + uvec4 res = uvec4(1u); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_1ce782() { - uvec4 res = uvec4(0u); + uvec4 res = uvec4(1u); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_1ce782() { - uvec4 res = uvec4(0u); + uvec4 res = uvec4(1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.msl index 2029d3c2a4..007f7099e8 100644 --- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_1ce782() { - uint4 res = abs(uint4(0u)); + uint4 res = abs(uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.spvasm index f39c38cd8f..5ae24ba9e2 100644 --- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,35 +32,37 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %16 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v4uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_1ce782 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %16 - OpStore %res %16 + %res = OpVariable %_ptr_Function_v4uint Function %20 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %abs_1ce782 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %abs_1ce782 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %abs_1ce782 + %30 = OpLabel + %31 = OpFunctionCall %void %abs_1ce782 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_1ce782 + %33 = OpLabel + %34 = OpFunctionCall %void %abs_1ce782 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.wgsl index cc92a173f8..54fc56ab9e 100644 --- a/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/1ce782.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_1ce782() { - var res : vec4 = abs(vec4()); + var res : vec4 = abs(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl index d8d5cfd4a0..16e4d31ca0 100644 --- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl +++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<2, f32>) -> vec<2, f32> fn abs_1e9d53() { - var res: vec2 = abs(vec2()); + var res: vec2 = abs(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.dxc.hlsl index 602c31aae0..f0c45a3bc5 100644 --- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_1e9d53() { - float2 res = abs((0.0f).xx); + float2 res = abs((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.fxc.hlsl index 602c31aae0..f0c45a3bc5 100644 --- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_1e9d53() { - float2 res = abs((0.0f).xx); + float2 res = abs((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.glsl index 0e7d45089a..1f6f521a76 100644 --- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_1e9d53() { - vec2 res = abs(vec2(0.0f)); + vec2 res = abs(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_1e9d53() { - vec2 res = abs(vec2(0.0f)); + vec2 res = abs(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_1e9d53() { - vec2 res = abs(vec2(0.0f)); + vec2 res = abs(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.msl index 697d3a8c60..b05e09313c 100644 --- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_1e9d53() { - float2 res = fabs(float2(0.0f)); + float2 res = fabs(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.spvasm index b6cba316b5..237652fb6f 100644 --- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %abs_1e9d53 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 FAbs %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 FAbs %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %abs_1e9d53 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %abs_1e9d53 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %abs_1e9d53 + %29 = OpLabel + %30 = OpFunctionCall %void %abs_1e9d53 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_1e9d53 + %32 = OpLabel + %33 = OpFunctionCall %void %abs_1e9d53 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.wgsl index 5e5072d1f9..b197e4e57a 100644 --- a/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/1e9d53.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_1e9d53() { - var res : vec2 = abs(vec2()); + var res : vec2 = abs(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl index aa6b91f00b..8a8ebb4b43 100644 --- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl +++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<3, i32>) -> vec<3, i32> fn abs_5ad50a() { - var res: vec3 = abs(vec3()); + var res: vec3 = abs(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.dxc.hlsl index b2487339f2..1741eca72d 100644 --- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_5ad50a() { - int3 res = abs((0).xxx); + int3 res = abs((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.fxc.hlsl index b2487339f2..1741eca72d 100644 --- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_5ad50a() { - int3 res = abs((0).xxx); + int3 res = abs((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.glsl index 37c0c7e2d2..d0e6e5f88a 100644 --- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_5ad50a() { - ivec3 res = abs(ivec3(0)); + ivec3 res = abs(ivec3(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_5ad50a() { - ivec3 res = abs(ivec3(0)); + ivec3 res = abs(ivec3(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_5ad50a() { - ivec3 res = abs(ivec3(0)); + ivec3 res = abs(ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.msl index b71c07eb99..d9c31fc3f1 100644 --- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_5ad50a() { - int3 res = abs(int3(0)); + int3 res = abs(int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.spvasm index 7928d05c16..e9d0147023 100644 --- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %17 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_5ad50a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %17 - %13 = OpExtInst %v3int %16 SAbs %17 + %res = OpVariable %_ptr_Function_v3int Function %21 + %13 = OpExtInst %v3int %16 SAbs %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %abs_5ad50a +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %abs_5ad50a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %abs_5ad50a + %31 = OpLabel + %32 = OpFunctionCall %void %abs_5ad50a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %abs_5ad50a + %34 = OpLabel + %35 = OpFunctionCall %void %abs_5ad50a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.wgsl index 7ed9352326..e76207127f 100644 --- a/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/5ad50a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_5ad50a() { - var res : vec3 = abs(vec3()); + var res : vec3 = abs(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl b/test/tint/builtins/gen/literal/abs/7326de.wgsl index 6d9857a65a..77ade9fc9d 100644 --- a/test/tint/builtins/gen/literal/abs/7326de.wgsl +++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<3, u32>) -> vec<3, u32> fn abs_7326de() { - var res: vec3 = abs(vec3()); + var res: vec3 = abs(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.dxc.hlsl index 2e994a2725..9eeb70b6cb 100644 --- a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_7326de() { - uint3 res = abs((0u).xxx); + uint3 res = abs((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.fxc.hlsl index 2e994a2725..9eeb70b6cb 100644 --- a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_7326de() { - uint3 res = abs((0u).xxx); + uint3 res = abs((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.glsl index e417867a76..412720d8a5 100644 --- a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_7326de() { - uvec3 res = uvec3(0u); + uvec3 res = uvec3(1u); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_7326de() { - uvec3 res = uvec3(0u); + uvec3 res = uvec3(1u); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_7326de() { - uvec3 res = uvec3(0u); + uvec3 res = uvec3(1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.msl index 1a98a0d668..4d75de9c25 100644 --- a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_7326de() { - uint3 res = abs(uint3(0u)); + uint3 res = abs(uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.spvasm index 3891964afc..455a8969ee 100644 --- a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,35 +32,37 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %16 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v3uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_7326de = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %16 - OpStore %res %16 + %res = OpVariable %_ptr_Function_v3uint Function %20 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %abs_7326de +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %abs_7326de OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %abs_7326de + %30 = OpLabel + %31 = OpFunctionCall %void %abs_7326de OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_7326de + %33 = OpLabel + %34 = OpFunctionCall %void %abs_7326de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.wgsl index d7d7be17a6..26962e2968 100644 --- a/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/7326de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_7326de() { - var res : vec3 = abs(vec3()); + var res : vec3 = abs(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl index f49e2f3dd8..a62c2ab90e 100644 --- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl +++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<2, u32>) -> vec<2, u32> fn abs_7f28e6() { - var res: vec2 = abs(vec2()); + var res: vec2 = abs(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.dxc.hlsl index 82c82ee31c..ede7f1ed39 100644 --- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_7f28e6() { - uint2 res = abs((0u).xx); + uint2 res = abs((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.fxc.hlsl index 82c82ee31c..ede7f1ed39 100644 --- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_7f28e6() { - uint2 res = abs((0u).xx); + uint2 res = abs((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.glsl index 97b437bb19..fe70a48043 100644 --- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_7f28e6() { - uvec2 res = uvec2(0u); + uvec2 res = uvec2(1u); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_7f28e6() { - uvec2 res = uvec2(0u); + uvec2 res = uvec2(1u); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_7f28e6() { - uvec2 res = uvec2(0u); + uvec2 res = uvec2(1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.msl index dc367907f0..9e46018c92 100644 --- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_7f28e6() { - uint2 res = abs(uint2(0u)); + uint2 res = abs(uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.spvasm index caed8a0c52..659eeb56fb 100644 --- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,35 +32,37 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %16 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v2uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_7f28e6 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %16 - OpStore %res %16 + %res = OpVariable %_ptr_Function_v2uint Function %20 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %abs_7f28e6 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %abs_7f28e6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %abs_7f28e6 + %30 = OpLabel + %31 = OpFunctionCall %void %abs_7f28e6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_7f28e6 + %33 = OpLabel + %34 = OpFunctionCall %void %abs_7f28e6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.wgsl index 6b2658c08b..f66e54e94f 100644 --- a/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/7f28e6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_7f28e6() { - var res : vec2 = abs(vec2()); + var res : vec2 = abs(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl index 6cc6230a9a..c70133b48e 100644 --- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl +++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<2, i32>) -> vec<2, i32> fn abs_7faa9e() { - var res: vec2 = abs(vec2()); + var res: vec2 = abs(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.dxc.hlsl index a9575ee6e7..86d86427a6 100644 --- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_7faa9e() { - int2 res = abs((0).xx); + int2 res = abs((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.fxc.hlsl index a9575ee6e7..86d86427a6 100644 --- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_7faa9e() { - int2 res = abs((0).xx); + int2 res = abs((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.glsl index dfd614c622..600cc7885d 100644 --- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_7faa9e() { - ivec2 res = abs(ivec2(0)); + ivec2 res = abs(ivec2(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_7faa9e() { - ivec2 res = abs(ivec2(0)); + ivec2 res = abs(ivec2(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_7faa9e() { - ivec2 res = abs(ivec2(0)); + ivec2 res = abs(ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.msl index af851389df..c46f48db88 100644 --- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_7faa9e() { - int2 res = abs(int2(0)); + int2 res = abs(int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.spvasm index 61f20548f1..1fbfa3a38d 100644 --- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %17 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_7faa9e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %17 - %13 = OpExtInst %v2int %16 SAbs %17 + %res = OpVariable %_ptr_Function_v2int Function %21 + %13 = OpExtInst %v2int %16 SAbs %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %abs_7faa9e +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %abs_7faa9e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %abs_7faa9e + %31 = OpLabel + %32 = OpFunctionCall %void %abs_7faa9e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %abs_7faa9e + %34 = OpLabel + %35 = OpFunctionCall %void %abs_7faa9e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.wgsl index d2b29b2a80..7c3f4b4776 100644 --- a/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/7faa9e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_7faa9e() { - var res : vec2 = abs(vec2()); + var res : vec2 = abs(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl index fe7c446781..6753aea1f5 100644 --- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl +++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<4, i32>) -> vec<4, i32> fn abs_9c80a6() { - var res: vec4 = abs(vec4()); + var res: vec4 = abs(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.dxc.hlsl index 0beb965a4c..bce474dddf 100644 --- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_9c80a6() { - int4 res = abs((0).xxxx); + int4 res = abs((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.fxc.hlsl index 0beb965a4c..bce474dddf 100644 --- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_9c80a6() { - int4 res = abs((0).xxxx); + int4 res = abs((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.glsl index c4dc1ed456..aefe8c8eb7 100644 --- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_9c80a6() { - ivec4 res = abs(ivec4(0)); + ivec4 res = abs(ivec4(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void abs_9c80a6() { - ivec4 res = abs(ivec4(0)); + ivec4 res = abs(ivec4(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void abs_9c80a6() { - ivec4 res = abs(ivec4(0)); + ivec4 res = abs(ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.msl index d1d822cd7d..833671a204 100644 --- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_9c80a6() { - int4 res = abs(int4(0)); + int4 res = abs(int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.spvasm index b880d604cb..50b4cec728 100644 --- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %17 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_9c80a6 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %17 - %13 = OpExtInst %v4int %16 SAbs %17 + %res = OpVariable %_ptr_Function_v4int Function %21 + %13 = OpExtInst %v4int %16 SAbs %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %abs_9c80a6 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %abs_9c80a6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %abs_9c80a6 + %31 = OpLabel + %32 = OpFunctionCall %void %abs_9c80a6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %abs_9c80a6 + %34 = OpLabel + %35 = OpFunctionCall %void %abs_9c80a6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.wgsl index 46af62a4e9..029f98e152 100644 --- a/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/9c80a6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_9c80a6() { - var res : vec4 = abs(vec4()); + var res : vec4 = abs(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/b96037.wgsl b/test/tint/builtins/gen/literal/abs/b96037.wgsl index 9299117d2b..cedfdb374f 100644 --- a/test/tint/builtins/gen/literal/abs/b96037.wgsl +++ b/test/tint/builtins/gen/literal/abs/b96037.wgsl @@ -25,7 +25,7 @@ // fn abs(f32) -> f32 fn abs_b96037() { - var res: f32 = abs(1.0); + var res: f32 = abs(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.wgsl index f9b972bb10..be38612056 100644 --- a/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/abs/b96037.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_b96037() { - var res : f32 = abs(1.0); + var res : f32 = abs(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/489247.wgsl b/test/tint/builtins/gen/literal/acos/489247.wgsl index 3ff4a38505..e35a4a981f 100644 --- a/test/tint/builtins/gen/literal/acos/489247.wgsl +++ b/test/tint/builtins/gen/literal/acos/489247.wgsl @@ -25,7 +25,7 @@ // fn acos(f32) -> f32 fn acos_489247() { - var res: f32 = acos(1.0); + var res: f32 = acos(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.wgsl index b2d78e1e52..3a8d40042f 100644 --- a/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/489247.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_489247() { - var res : f32 = acos(1.0); + var res : f32 = acos(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl index 13d836a6d3..16bb4187d6 100644 --- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl +++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl @@ -25,7 +25,7 @@ // fn acos(vec<4, f32>) -> vec<4, f32> fn acos_8e2acf() { - var res: vec4 = acos(vec4()); + var res: vec4 = acos(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.dxc.hlsl index cb76fd6d75..7877019c8c 100644 --- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_8e2acf() { - float4 res = acos((0.0f).xxxx); + float4 res = acos((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.fxc.hlsl index cb76fd6d75..7877019c8c 100644 --- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void acos_8e2acf() { - float4 res = acos((0.0f).xxxx); + float4 res = acos((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.glsl index 8181a2006d..d411a319c0 100644 --- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void acos_8e2acf() { - vec4 res = acos(vec4(0.0f)); + vec4 res = acos(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void acos_8e2acf() { - vec4 res = acos(vec4(0.0f)); + vec4 res = acos(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void acos_8e2acf() { - vec4 res = acos(vec4(0.0f)); + vec4 res = acos(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.msl index d46c4d972b..4dfc1a7b36 100644 --- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_8e2acf() { - float4 res = acos(float4(0.0f)); + float4 res = acos(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.spvasm index 53fd784082..d0c94e013d 100644 --- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %acos_8e2acf = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Acos %5 + %13 = OpExtInst %v4float %14 Acos %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %acos_8e2acf +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %acos_8e2acf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %acos_8e2acf + %27 = OpLabel + %28 = OpFunctionCall %void %acos_8e2acf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %acos_8e2acf + %30 = OpLabel + %31 = OpFunctionCall %void %acos_8e2acf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.wgsl index 2703d5bc22..8f38b086d8 100644 --- a/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/8e2acf.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_8e2acf() { - var res : vec4 = acos(vec4()); + var res : vec4 = acos(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl b/test/tint/builtins/gen/literal/acos/a610c4.wgsl index 27d6d3eca4..121f746f8e 100644 --- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl +++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl @@ -25,7 +25,7 @@ // fn acos(vec<3, f32>) -> vec<3, f32> fn acos_a610c4() { - var res: vec3 = acos(vec3()); + var res: vec3 = acos(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.dxc.hlsl index f76f3e9582..ff28d8324f 100644 --- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_a610c4() { - float3 res = acos((0.0f).xxx); + float3 res = acos((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.fxc.hlsl index f76f3e9582..ff28d8324f 100644 --- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void acos_a610c4() { - float3 res = acos((0.0f).xxx); + float3 res = acos((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.glsl index 5ef29753d2..4b34d3826b 100644 --- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void acos_a610c4() { - vec3 res = acos(vec3(0.0f)); + vec3 res = acos(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void acos_a610c4() { - vec3 res = acos(vec3(0.0f)); + vec3 res = acos(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void acos_a610c4() { - vec3 res = acos(vec3(0.0f)); + vec3 res = acos(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.msl index 3d85c17786..4af410f6ef 100644 --- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_a610c4() { - float3 res = acos(float3(0.0f)); + float3 res = acos(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.spvasm index eaf58ce686..6ddef0d0c5 100644 --- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %acos_a610c4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Acos %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Acos %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %acos_a610c4 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %acos_a610c4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %acos_a610c4 + %29 = OpLabel + %30 = OpFunctionCall %void %acos_a610c4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %acos_a610c4 + %32 = OpLabel + %33 = OpFunctionCall %void %acos_a610c4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.wgsl index e6e820b4ae..14105fe989 100644 --- a/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/a610c4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_a610c4() { - var res : vec3 = acos(vec3()); + var res : vec3 = acos(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl b/test/tint/builtins/gen/literal/acos/dfc915.wgsl index 58a06dd7a1..ac7cda6549 100644 --- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl +++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl @@ -25,7 +25,7 @@ // fn acos(vec<2, f32>) -> vec<2, f32> fn acos_dfc915() { - var res: vec2 = acos(vec2()); + var res: vec2 = acos(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.dxc.hlsl index 785cef0d0f..fe14cb41d9 100644 --- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_dfc915() { - float2 res = acos((0.0f).xx); + float2 res = acos((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.fxc.hlsl index 785cef0d0f..fe14cb41d9 100644 --- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void acos_dfc915() { - float2 res = acos((0.0f).xx); + float2 res = acos((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.glsl index c55a73f705..a2119fcca3 100644 --- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void acos_dfc915() { - vec2 res = acos(vec2(0.0f)); + vec2 res = acos(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void acos_dfc915() { - vec2 res = acos(vec2(0.0f)); + vec2 res = acos(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void acos_dfc915() { - vec2 res = acos(vec2(0.0f)); + vec2 res = acos(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.msl index 75dd630f30..7673132bc5 100644 --- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_dfc915() { - float2 res = acos(float2(0.0f)); + float2 res = acos(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.spvasm index 346031df35..983a055d50 100644 --- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %acos_dfc915 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Acos %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Acos %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %acos_dfc915 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %acos_dfc915 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %acos_dfc915 + %29 = OpLabel + %30 = OpFunctionCall %void %acos_dfc915 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %acos_dfc915 + %32 = OpLabel + %33 = OpFunctionCall %void %acos_dfc915 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.wgsl index f76f516879..fcc29cfcf9 100644 --- a/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acos/dfc915.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_dfc915() { - var res : vec2 = acos(vec2()); + var res : vec2 = acos(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl b/test/tint/builtins/gen/literal/acosh/640883.wgsl index 4ddbfebb65..c167098331 100644 --- a/test/tint/builtins/gen/literal/acosh/640883.wgsl +++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl @@ -25,7 +25,7 @@ // fn acosh(vec<2, f32>) -> vec<2, f32> fn acosh_640883() { - var res: vec2 = acosh(vec2()); + var res: vec2 = acosh(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.dxc.hlsl index 501bac6775..182337e895 100644 --- a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_acosh(float2 x) { } void acosh_640883() { - float2 res = tint_acosh((0.0f).xx); + float2 res = tint_acosh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.fxc.hlsl index 501bac6775..182337e895 100644 --- a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_acosh(float2 x) { } void acosh_640883() { - float2 res = tint_acosh((0.0f).xx); + float2 res = tint_acosh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.glsl index 63ce47de30..723cdd9b9b 100644 --- a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec2 tint_acosh(vec2 x) { } void acosh_640883() { - vec2 res = tint_acosh(vec2(0.0f)); + vec2 res = tint_acosh(vec2(1.0f)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ vec2 tint_acosh(vec2 x) { } void acosh_640883() { - vec2 res = tint_acosh(vec2(0.0f)); + vec2 res = tint_acosh(vec2(1.0f)); } void fragment_main() { @@ -47,7 +47,7 @@ vec2 tint_acosh(vec2 x) { } void acosh_640883() { - vec2 res = tint_acosh(vec2(0.0f)); + vec2 res = tint_acosh(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.msl index a44a7f0b7d..9cb8bee76f 100644 --- a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.msl @@ -6,7 +6,7 @@ float2 tint_acosh(float2 x) { } void acosh_640883() { - float2 res = tint_acosh(float2(0.0f)); + float2 res = tint_acosh(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.spvasm index 1714087971..3f4c1b0f7c 100644 --- a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.spvasm @@ -53,7 +53,7 @@ %acosh_640883 = OpFunction %void None %23 %26 = OpLabel %res = OpVariable %_ptr_Function_v2float Function %20 - %27 = OpFunctionCall %v2float %tint_acosh %20 + %27 = OpFunctionCall %v2float %tint_acosh %16 OpStore %res %27 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.wgsl index 2d9deff40f..fdec9ee1e7 100644 --- a/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/640883.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_640883() { - var res : vec2 = acosh(vec2()); + var res : vec2 = acosh(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl index 50321d4830..98283cd519 100644 --- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl +++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl @@ -25,7 +25,7 @@ // fn acosh(vec<4, f32>) -> vec<4, f32> fn acosh_d51ccb() { - var res: vec4 = acosh(vec4()); + var res: vec4 = acosh(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.dxc.hlsl index 45048facce..8e57d580fa 100644 --- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_acosh(float4 x) { } void acosh_d51ccb() { - float4 res = tint_acosh((0.0f).xxxx); + float4 res = tint_acosh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.fxc.hlsl index 45048facce..8e57d580fa 100644 --- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_acosh(float4 x) { } void acosh_d51ccb() { - float4 res = tint_acosh((0.0f).xxxx); + float4 res = tint_acosh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.glsl index 666cd6e9ab..ade7867f0c 100644 --- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec4 tint_acosh(vec4 x) { } void acosh_d51ccb() { - vec4 res = tint_acosh(vec4(0.0f)); + vec4 res = tint_acosh(vec4(1.0f)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ vec4 tint_acosh(vec4 x) { } void acosh_d51ccb() { - vec4 res = tint_acosh(vec4(0.0f)); + vec4 res = tint_acosh(vec4(1.0f)); } void fragment_main() { @@ -47,7 +47,7 @@ vec4 tint_acosh(vec4 x) { } void acosh_d51ccb() { - vec4 res = tint_acosh(vec4(0.0f)); + vec4 res = tint_acosh(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.msl index 3c51e80a22..2848580bf3 100644 --- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.msl @@ -6,7 +6,7 @@ float4 tint_acosh(float4 x) { } void acosh_d51ccb() { - float4 res = tint_acosh(float4(0.0f)); + float4 res = tint_acosh(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.spvasm index 82394d3326..dc1f0bf8f0 100644 --- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.spvasm @@ -51,7 +51,7 @@ %acosh_d51ccb = OpFunction %void None %21 %24 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %25 = OpFunctionCall %v4float %tint_acosh %5 + %25 = OpFunctionCall %v4float %tint_acosh %15 OpStore %res %25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.wgsl index 12bfb756e7..012cbb7453 100644 --- a/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/d51ccb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_d51ccb() { - var res : vec4 = acosh(vec4()); + var res : vec4 = acosh(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl index fd2f81cb65..f82379a4c6 100644 --- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl +++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl @@ -25,7 +25,7 @@ // fn acosh(vec<3, f32>) -> vec<3, f32> fn acosh_e38f5c() { - var res: vec3 = acosh(vec3()); + var res: vec3 = acosh(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.dxc.hlsl index 7a8e945ce0..13aeed61a8 100644 --- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_acosh(float3 x) { } void acosh_e38f5c() { - float3 res = tint_acosh((0.0f).xxx); + float3 res = tint_acosh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.fxc.hlsl index 7a8e945ce0..13aeed61a8 100644 --- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_acosh(float3 x) { } void acosh_e38f5c() { - float3 res = tint_acosh((0.0f).xxx); + float3 res = tint_acosh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.glsl index 455a32638f..f66323199f 100644 --- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec3 tint_acosh(vec3 x) { } void acosh_e38f5c() { - vec3 res = tint_acosh(vec3(0.0f)); + vec3 res = tint_acosh(vec3(1.0f)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ vec3 tint_acosh(vec3 x) { } void acosh_e38f5c() { - vec3 res = tint_acosh(vec3(0.0f)); + vec3 res = tint_acosh(vec3(1.0f)); } void fragment_main() { @@ -47,7 +47,7 @@ vec3 tint_acosh(vec3 x) { } void acosh_e38f5c() { - vec3 res = tint_acosh(vec3(0.0f)); + vec3 res = tint_acosh(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.msl index c7e2ecccf5..950549f74a 100644 --- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.msl @@ -6,7 +6,7 @@ float3 tint_acosh(float3 x) { } void acosh_e38f5c() { - float3 res = tint_acosh(float3(0.0f)); + float3 res = tint_acosh(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.spvasm index e1ae39709e..1063f49c3f 100644 --- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.spvasm @@ -53,7 +53,7 @@ %acosh_e38f5c = OpFunction %void None %23 %26 = OpLabel %res = OpVariable %_ptr_Function_v3float Function %20 - %27 = OpFunctionCall %v3float %tint_acosh %20 + %27 = OpFunctionCall %v3float %tint_acosh %16 OpStore %res %27 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.wgsl index f06782252e..e902873f07 100644 --- a/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/e38f5c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_e38f5c() { - var res : vec3 = acosh(vec3()); + var res : vec3 = acosh(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl b/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl index c665ea41e1..caaffd9a49 100644 --- a/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl +++ b/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl @@ -25,7 +25,7 @@ // fn acosh(f32) -> f32 fn acosh_ecf2d1() { - var res: f32 = acosh(1.0); + var res: f32 = acosh(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.wgsl index 083c996984..5b4d017ebf 100644 --- a/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/acosh/ecf2d1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_ecf2d1() { - var res : f32 = acosh(1.0); + var res : f32 = acosh(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl b/test/tint/builtins/gen/literal/all/353d6a.wgsl index 678b0ce637..c06055ca69 100644 --- a/test/tint/builtins/gen/literal/all/353d6a.wgsl +++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl @@ -25,7 +25,7 @@ // fn all(bool) -> bool fn all_353d6a() { - var res: bool = all(bool()); + var res: bool = all(true); } @vertex diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.dxc.hlsl index 30f57aa976..47ffe9f5e6 100644 --- a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_353d6a() { - bool res = all(false); + bool res = all(true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.fxc.hlsl index 30f57aa976..47ffe9f5e6 100644 --- a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_353d6a() { - bool res = all(false); + bool res = all(true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.glsl index 180d4b4c0d..72817235cc 100644 --- a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_353d6a() { - bool res = false; + bool res = true; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void all_353d6a() { - bool res = false; + bool res = true; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void all_353d6a() { - bool res = false; + bool res = true; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.msl b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.msl index 1bad262511..d661e0c530 100644 --- a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_353d6a() { - bool res = all(false); + bool res = all(true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.spvasm index c167a957e3..ce7b6fe9d8 100644 --- a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 33 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,35 +31,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %15 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %18 = OpTypeFunction %v4float + %18 = OpConstantNull %bool + %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_353d6a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_bool Function %18 + OpStore %res %true OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %all_353d6a +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %all_353d6a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %all_353d6a + %28 = OpLabel + %29 = OpFunctionCall %void %all_353d6a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %all_353d6a + %31 = OpLabel + %32 = OpFunctionCall %void %all_353d6a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.wgsl index 2cab924c56..b3632e24aa 100644 --- a/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/all/353d6a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_353d6a() { - var res : bool = all(bool()); + var res : bool = all(true); } @vertex diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl b/test/tint/builtins/gen/literal/all/986c7b.wgsl index 1c89cb30db..deebffba37 100644 --- a/test/tint/builtins/gen/literal/all/986c7b.wgsl +++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl @@ -25,7 +25,7 @@ // fn all(vec<4, bool>) -> bool fn all_986c7b() { - var res: bool = all(vec4()); + var res: bool = all(vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.dxc.hlsl index a5132c87a6..d426a74362 100644 --- a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_986c7b() { - bool res = all((false).xxxx); + bool res = all((true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.fxc.hlsl index a5132c87a6..d426a74362 100644 --- a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_986c7b() { - bool res = all((false).xxxx); + bool res = all((true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.glsl index 3a2912cb91..e8bd17d04b 100644 --- a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_986c7b() { - bool res = all(bvec4(false)); + bool res = all(bvec4(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void all_986c7b() { - bool res = all(bvec4(false)); + bool res = all(bvec4(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void all_986c7b() { - bool res = all(bvec4(false)); + bool res = all(bvec4(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.msl b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.msl index a5648b95d1..6465c14724 100644 --- a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_986c7b() { - bool res = all(bool4(false)); + bool res = all(bool4(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.spvasm index 03f7f57395..1a1b1c594c 100644 --- a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,37 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %16 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_bool = OpTypePointer Function %bool - %19 = OpConstantNull %bool - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_986c7b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %19 - %13 = OpAll %bool %16 + %res = OpVariable %_ptr_Function_bool Function %20 + %13 = OpAll %bool %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %all_986c7b +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %all_986c7b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %all_986c7b + %30 = OpLabel + %31 = OpFunctionCall %void %all_986c7b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %all_986c7b + %33 = OpLabel + %34 = OpFunctionCall %void %all_986c7b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.wgsl index c6d562beef..f9b0cbec19 100644 --- a/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/all/986c7b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_986c7b() { - var res : bool = all(vec4()); + var res : bool = all(vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl b/test/tint/builtins/gen/literal/all/bd2dba.wgsl index df0672c2c4..0333a5babf 100644 --- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl +++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl @@ -25,7 +25,7 @@ // fn all(vec<3, bool>) -> bool fn all_bd2dba() { - var res: bool = all(vec3()); + var res: bool = all(vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.dxc.hlsl index 15cdeeff5b..3b9e55e2ab 100644 --- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_bd2dba() { - bool res = all((false).xxx); + bool res = all((true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.fxc.hlsl index 15cdeeff5b..3b9e55e2ab 100644 --- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_bd2dba() { - bool res = all((false).xxx); + bool res = all((true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.glsl index e1108b9831..d37d4a8c6f 100644 --- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_bd2dba() { - bool res = all(bvec3(false)); + bool res = all(bvec3(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void all_bd2dba() { - bool res = all(bvec3(false)); + bool res = all(bvec3(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void all_bd2dba() { - bool res = all(bvec3(false)); + bool res = all(bvec3(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.msl b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.msl index ad5232453b..49413efbdc 100644 --- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_bd2dba() { - bool res = all(bool3(false)); + bool res = all(bool3(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.spvasm index 14e2aee02a..2d82b87f56 100644 --- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,37 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %16 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_bool = OpTypePointer Function %bool - %19 = OpConstantNull %bool - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_bd2dba = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %19 - %13 = OpAll %bool %16 + %res = OpVariable %_ptr_Function_bool Function %20 + %13 = OpAll %bool %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %all_bd2dba +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %all_bd2dba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %all_bd2dba + %30 = OpLabel + %31 = OpFunctionCall %void %all_bd2dba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %all_bd2dba + %33 = OpLabel + %34 = OpFunctionCall %void %all_bd2dba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.wgsl index 062840b1ab..8a12e5123e 100644 --- a/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/all/bd2dba.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_bd2dba() { - var res : bool = all(vec3()); + var res : bool = all(vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl b/test/tint/builtins/gen/literal/all/f46790.wgsl index 3d5b39fdb6..8f8e2edcb1 100644 --- a/test/tint/builtins/gen/literal/all/f46790.wgsl +++ b/test/tint/builtins/gen/literal/all/f46790.wgsl @@ -25,7 +25,7 @@ // fn all(vec<2, bool>) -> bool fn all_f46790() { - var res: bool = all(vec2()); + var res: bool = all(vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.dxc.hlsl index 6bfb9a7030..edc68272aa 100644 --- a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_f46790() { - bool res = all((false).xx); + bool res = all((true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.fxc.hlsl index 6bfb9a7030..edc68272aa 100644 --- a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_f46790() { - bool res = all((false).xx); + bool res = all((true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.glsl b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.glsl index ba3e95081e..2a50d2b25c 100644 --- a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_f46790() { - bool res = all(bvec2(false)); + bool res = all(bvec2(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void all_f46790() { - bool res = all(bvec2(false)); + bool res = all(bvec2(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void all_f46790() { - bool res = all(bvec2(false)); + bool res = all(bvec2(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.msl b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.msl index 1d4420c339..71d9104c41 100644 --- a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_f46790() { - bool res = all(bool2(false)); + bool res = all(bool2(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.spvasm index 915f2f5443..e9e5bbdd78 100644 --- a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,37 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %16 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v2bool %true %true %_ptr_Function_bool = OpTypePointer Function %bool - %19 = OpConstantNull %bool - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_f46790 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %19 - %13 = OpAll %bool %16 + %res = OpVariable %_ptr_Function_bool Function %20 + %13 = OpAll %bool %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %all_f46790 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %all_f46790 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %all_f46790 + %30 = OpLabel + %31 = OpFunctionCall %void %all_f46790 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %all_f46790 + %33 = OpLabel + %34 = OpFunctionCall %void %all_f46790 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.wgsl index 27bdf58a37..71a4a0bd73 100644 --- a/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/all/f46790.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_f46790() { - var res : bool = all(vec2()); + var res : bool = all(vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl b/test/tint/builtins/gen/literal/any/083428.wgsl index 81ce45122c..bfb1e856d0 100644 --- a/test/tint/builtins/gen/literal/any/083428.wgsl +++ b/test/tint/builtins/gen/literal/any/083428.wgsl @@ -25,7 +25,7 @@ // fn any(vec<4, bool>) -> bool fn any_083428() { - var res: bool = any(vec4()); + var res: bool = any(vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.dxc.hlsl index 386fe95349..48b53a0e8f 100644 --- a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_083428() { - bool res = any((false).xxxx); + bool res = any((true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.fxc.hlsl index 386fe95349..48b53a0e8f 100644 --- a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_083428() { - bool res = any((false).xxxx); + bool res = any((true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.glsl b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.glsl index a703a0b415..d18e34ebe5 100644 --- a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_083428() { - bool res = any(bvec4(false)); + bool res = any(bvec4(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void any_083428() { - bool res = any(bvec4(false)); + bool res = any(bvec4(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void any_083428() { - bool res = any(bvec4(false)); + bool res = any(bvec4(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.msl b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.msl index 28a71e3a27..cd3b74ad4f 100644 --- a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_083428() { - bool res = any(bool4(false)); + bool res = any(bool4(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.spvasm index 52d4977d5f..f098cb3aaf 100644 --- a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,37 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %16 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_bool = OpTypePointer Function %bool - %19 = OpConstantNull %bool - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_083428 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %19 - %13 = OpAny %bool %16 + %res = OpVariable %_ptr_Function_bool Function %20 + %13 = OpAny %bool %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %any_083428 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %any_083428 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %any_083428 + %30 = OpLabel + %31 = OpFunctionCall %void %any_083428 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %any_083428 + %33 = OpLabel + %34 = OpFunctionCall %void %any_083428 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.wgsl index 7f58549c31..c569341f3c 100644 --- a/test/tint/builtins/gen/literal/any/083428.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/any/083428.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_083428() { - var res : bool = any(vec4()); + var res : bool = any(vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl b/test/tint/builtins/gen/literal/any/0e3e58.wgsl index ddcf052922..9607cc83bb 100644 --- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl +++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl @@ -25,7 +25,7 @@ // fn any(vec<2, bool>) -> bool fn any_0e3e58() { - var res: bool = any(vec2()); + var res: bool = any(vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.dxc.hlsl index 4ed4c65aab..87779eb50f 100644 --- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_0e3e58() { - bool res = any((false).xx); + bool res = any((true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.fxc.hlsl index 4ed4c65aab..87779eb50f 100644 --- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_0e3e58() { - bool res = any((false).xx); + bool res = any((true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.glsl b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.glsl index 9ab5cb1c84..c7d2258c14 100644 --- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_0e3e58() { - bool res = any(bvec2(false)); + bool res = any(bvec2(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void any_0e3e58() { - bool res = any(bvec2(false)); + bool res = any(bvec2(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void any_0e3e58() { - bool res = any(bvec2(false)); + bool res = any(bvec2(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.msl b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.msl index b70ef8f653..6a25f46119 100644 --- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_0e3e58() { - bool res = any(bool2(false)); + bool res = any(bool2(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.spvasm index 868dec0154..13d694bf06 100644 --- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,37 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %16 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v2bool %true %true %_ptr_Function_bool = OpTypePointer Function %bool - %19 = OpConstantNull %bool - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_0e3e58 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %19 - %13 = OpAny %bool %16 + %res = OpVariable %_ptr_Function_bool Function %20 + %13 = OpAny %bool %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %any_0e3e58 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %any_0e3e58 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %any_0e3e58 + %30 = OpLabel + %31 = OpFunctionCall %void %any_0e3e58 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %any_0e3e58 + %33 = OpLabel + %34 = OpFunctionCall %void %any_0e3e58 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.wgsl index d553b64f08..79a3155deb 100644 --- a/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/any/0e3e58.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_0e3e58() { - var res : bool = any(vec2()); + var res : bool = any(vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl b/test/tint/builtins/gen/literal/any/2ab91a.wgsl index 463da0f5e8..d16cb542db 100644 --- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl +++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl @@ -25,7 +25,7 @@ // fn any(bool) -> bool fn any_2ab91a() { - var res: bool = any(bool()); + var res: bool = any(true); } @vertex diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.dxc.hlsl index 9c108e7b00..0f2427bd15 100644 --- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_2ab91a() { - bool res = any(false); + bool res = any(true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.fxc.hlsl index 9c108e7b00..0f2427bd15 100644 --- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_2ab91a() { - bool res = any(false); + bool res = any(true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.glsl index 1ea6828c24..cdd5b69b0e 100644 --- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_2ab91a() { - bool res = false; + bool res = true; } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void any_2ab91a() { - bool res = false; + bool res = true; } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void any_2ab91a() { - bool res = false; + bool res = true; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.msl b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.msl index 903fba8c01..5eaba911ac 100644 --- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_2ab91a() { - bool res = any(false); + bool res = any(true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.spvasm index cd7afce764..29c1dbc9fa 100644 --- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 33 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,35 +31,36 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %15 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %18 = OpTypeFunction %v4float + %18 = OpConstantNull %bool + %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_2ab91a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %15 - OpStore %res %15 + %res = OpVariable %_ptr_Function_bool Function %18 + OpStore %res %true OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %any_2ab91a +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %any_2ab91a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %any_2ab91a + %28 = OpLabel + %29 = OpFunctionCall %void %any_2ab91a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %any_2ab91a + %31 = OpLabel + %32 = OpFunctionCall %void %any_2ab91a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.wgsl index 7300c560fd..9b27b89969 100644 --- a/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/any/2ab91a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_2ab91a() { - var res : bool = any(bool()); + var res : bool = any(true); } @vertex diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl b/test/tint/builtins/gen/literal/any/e755c1.wgsl index 2a40218bcf..23a389de5d 100644 --- a/test/tint/builtins/gen/literal/any/e755c1.wgsl +++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl @@ -25,7 +25,7 @@ // fn any(vec<3, bool>) -> bool fn any_e755c1() { - var res: bool = any(vec3()); + var res: bool = any(vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.dxc.hlsl index 4ca729eb2c..4a502e9852 100644 --- a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_e755c1() { - bool res = any((false).xxx); + bool res = any((true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.fxc.hlsl index 4ca729eb2c..4a502e9852 100644 --- a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_e755c1() { - bool res = any((false).xxx); + bool res = any((true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.glsl index 4d5e8775ae..2ac492b97c 100644 --- a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_e755c1() { - bool res = any(bvec3(false)); + bool res = any(bvec3(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void any_e755c1() { - bool res = any(bvec3(false)); + bool res = any(bvec3(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void any_e755c1() { - bool res = any(bvec3(false)); + bool res = any(bvec3(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.msl b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.msl index d8148350a0..5f3737326b 100644 --- a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_e755c1() { - bool res = any(bool3(false)); + bool res = any(bool3(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.spvasm index 7e196b0819..8322df97e7 100644 --- a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,37 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %16 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_bool = OpTypePointer Function %bool - %19 = OpConstantNull %bool - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_e755c1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %19 - %13 = OpAny %bool %16 + %res = OpVariable %_ptr_Function_bool Function %20 + %13 = OpAny %bool %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %any_e755c1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %any_e755c1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %any_e755c1 + %30 = OpLabel + %31 = OpFunctionCall %void %any_e755c1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %any_e755c1 + %33 = OpLabel + %34 = OpFunctionCall %void %any_e755c1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.wgsl index dfbbe680af..228cc320cc 100644 --- a/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/any/e755c1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_e755c1() { - var res : bool = any(vec3()); + var res : bool = any(vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl b/test/tint/builtins/gen/literal/asin/064953.wgsl index f220fee0f8..fa46d383de 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl @@ -25,7 +25,7 @@ // fn asin(vec<4, f32>) -> vec<4, f32> fn asin_064953() { - var res: vec4 = asin(vec4()); + var res: vec4 = asin(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl index 6014e668f4..2f0e625ef4 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 res = asin((0.0f).xxxx); + float4 res = asin((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl index 6014e668f4..2f0e625ef4 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 res = asin((0.0f).xxxx); + float4 res = asin((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl index 32288e1a2f..6e901b78b6 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_064953() { - vec4 res = asin(vec4(0.0f)); + vec4 res = asin(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_064953() { - vec4 res = asin(vec4(0.0f)); + vec4 res = asin(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_064953() { - vec4 res = asin(vec4(0.0f)); + vec4 res = asin(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl index 8000af5e18..6d44ff4bdc 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_064953() { - float4 res = asin(float4(0.0f)); + float4 res = asin(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm index dec5ed964f..22d29e1046 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %asin_064953 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Asin %5 + %13 = OpExtInst %v4float %14 Asin %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %asin_064953 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %asin_064953 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %asin_064953 + %27 = OpLabel + %28 = OpFunctionCall %void %asin_064953 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %asin_064953 + %30 = OpLabel + %31 = OpFunctionCall %void %asin_064953 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl index 6dadefdbf1..319b1fca53 100644 --- a/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/064953.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_064953() { - var res : vec4 = asin(vec4()); + var res : vec4 = asin(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl index c57c3a12ab..bbb3bace91 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl @@ -25,7 +25,7 @@ // fn asin(vec<2, f32>) -> vec<2, f32> fn asin_7b6a44() { - var res: vec2 = asin(vec2()); + var res: vec2 = asin(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl index bd20f3d568..1320016593 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 res = asin((0.0f).xx); + float2 res = asin((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl index bd20f3d568..1320016593 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 res = asin((0.0f).xx); + float2 res = asin((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl index ba3c81d85f..6502a341ae 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_7b6a44() { - vec2 res = asin(vec2(0.0f)); + vec2 res = asin(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_7b6a44() { - vec2 res = asin(vec2(0.0f)); + vec2 res = asin(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_7b6a44() { - vec2 res = asin(vec2(0.0f)); + vec2 res = asin(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl index 28eb3ee62a..97216e5224 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_7b6a44() { - float2 res = asin(float2(0.0f)); + float2 res = asin(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm index c52137efc9..20c033200a 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %asin_7b6a44 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Asin %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Asin %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %asin_7b6a44 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %asin_7b6a44 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %asin_7b6a44 + %29 = OpLabel + %30 = OpFunctionCall %void %asin_7b6a44 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_7b6a44 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_7b6a44 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl index f45d522bd8..c1c0a65868 100644 --- a/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/7b6a44.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_7b6a44() { - var res : vec2 = asin(vec2()); + var res : vec2 = asin(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl index b266449bbc..5fc68dbf31 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl @@ -25,7 +25,7 @@ // fn asin(vec<3, f32>) -> vec<3, f32> fn asin_8cd9c9() { - var res: vec3 = asin(vec3()); + var res: vec3 = asin(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl index 7e56518c47..4527a339c1 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 res = asin((0.0f).xxx); + float3 res = asin((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl index 7e56518c47..4527a339c1 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 res = asin((0.0f).xxx); + float3 res = asin((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl index 0093e6cf17..7b3565cfd8 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_8cd9c9() { - vec3 res = asin(vec3(0.0f)); + vec3 res = asin(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asin_8cd9c9() { - vec3 res = asin(vec3(0.0f)); + vec3 res = asin(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asin_8cd9c9() { - vec3 res = asin(vec3(0.0f)); + vec3 res = asin(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl index 627ab34558..9d5a38440b 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_8cd9c9() { - float3 res = asin(float3(0.0f)); + float3 res = asin(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm index ca0dad6224..92319f2235 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %asin_8cd9c9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Asin %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Asin %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %asin_8cd9c9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %asin_8cd9c9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %asin_8cd9c9 + %29 = OpLabel + %30 = OpFunctionCall %void %asin_8cd9c9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_8cd9c9 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_8cd9c9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl index 6a6b96ade9..5000fc053a 100644 --- a/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/8cd9c9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_8cd9c9() { - var res : vec3 = asin(vec3()); + var res : vec3 = asin(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl index 5c7a0b516e..b971d19c35 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl @@ -25,7 +25,7 @@ // fn asin(f32) -> f32 fn asin_c0c272() { - var res: f32 = asin(1.0); + var res: f32 = asin(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl index 731845e0f0..d7dc41ef17 100644 --- a/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asin/c0c272.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_c0c272() { - var res : f32 = asin(1.0); + var res : f32 = asin(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/157447.wgsl b/test/tint/builtins/gen/literal/asinh/157447.wgsl index 5bfe3198df..b39e368a67 100644 --- a/test/tint/builtins/gen/literal/asinh/157447.wgsl +++ b/test/tint/builtins/gen/literal/asinh/157447.wgsl @@ -25,7 +25,7 @@ // fn asinh(f32) -> f32 fn asinh_157447() { - var res: f32 = asinh(1.0); + var res: f32 = asinh(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.wgsl index 06f65fa957..eef4f77eec 100644 --- a/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/157447.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_157447() { - var res : f32 = asinh(1.0); + var res : f32 = asinh(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl index 16cee357c9..7ffb3d8fc9 100644 --- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl +++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl @@ -25,7 +25,7 @@ // fn asinh(vec<3, f32>) -> vec<3, f32> fn asinh_2265ee() { - var res: vec3 = asinh(vec3()); + var res: vec3 = asinh(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.dxc.hlsl index bbfc0f061c..e5eaaee309 100644 --- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_sinh(float3 x) { } void asinh_2265ee() { - float3 res = tint_sinh((0.0f).xxx); + float3 res = tint_sinh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.fxc.hlsl index bbfc0f061c..e5eaaee309 100644 --- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_sinh(float3 x) { } void asinh_2265ee() { - float3 res = tint_sinh((0.0f).xxx); + float3 res = tint_sinh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.glsl index 32439ee818..0ba85e1a27 100644 --- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asinh_2265ee() { - vec3 res = asinh(vec3(0.0f)); + vec3 res = asinh(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asinh_2265ee() { - vec3 res = asinh(vec3(0.0f)); + vec3 res = asinh(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asinh_2265ee() { - vec3 res = asinh(vec3(0.0f)); + vec3 res = asinh(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.msl index c90e625de2..22d9cb58a8 100644 --- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_2265ee() { - float3 res = asinh(float3(0.0f)); + float3 res = asinh(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.spvasm index e831a53ccb..febe7eb638 100644 --- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %asinh_2265ee = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Asinh %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Asinh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %asinh_2265ee +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %asinh_2265ee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %asinh_2265ee + %29 = OpLabel + %30 = OpFunctionCall %void %asinh_2265ee OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asinh_2265ee + %32 = OpLabel + %33 = OpFunctionCall %void %asinh_2265ee OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.wgsl index 75dc8da935..a0961afb56 100644 --- a/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/2265ee.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_2265ee() { - var res : vec3 = asinh(vec3()); + var res : vec3 = asinh(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl index 7fffb2f8da..a00d849aa6 100644 --- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl +++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl @@ -25,7 +25,7 @@ // fn asinh(vec<2, f32>) -> vec<2, f32> fn asinh_4a2226() { - var res: vec2 = asinh(vec2()); + var res: vec2 = asinh(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.dxc.hlsl index b5697b0773..09e6588add 100644 --- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_sinh(float2 x) { } void asinh_4a2226() { - float2 res = tint_sinh((0.0f).xx); + float2 res = tint_sinh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.fxc.hlsl index b5697b0773..09e6588add 100644 --- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_sinh(float2 x) { } void asinh_4a2226() { - float2 res = tint_sinh((0.0f).xx); + float2 res = tint_sinh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.glsl index 9b150ed164..5e90c211e3 100644 --- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asinh_4a2226() { - vec2 res = asinh(vec2(0.0f)); + vec2 res = asinh(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asinh_4a2226() { - vec2 res = asinh(vec2(0.0f)); + vec2 res = asinh(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asinh_4a2226() { - vec2 res = asinh(vec2(0.0f)); + vec2 res = asinh(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.msl index 31a98b24c8..db1110d5e8 100644 --- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_4a2226() { - float2 res = asinh(float2(0.0f)); + float2 res = asinh(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.spvasm index ec38403c84..e5d74ca9bb 100644 --- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %asinh_4a2226 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Asinh %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Asinh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %asinh_4a2226 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %asinh_4a2226 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %asinh_4a2226 + %29 = OpLabel + %30 = OpFunctionCall %void %asinh_4a2226 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asinh_4a2226 + %32 = OpLabel + %33 = OpFunctionCall %void %asinh_4a2226 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.wgsl index 368816739b..d4a07c101f 100644 --- a/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/4a2226.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_4a2226() { - var res : vec2 = asinh(vec2()); + var res : vec2 = asinh(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl index cc24f81267..5be6b6ed4e 100644 --- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl +++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl @@ -25,7 +25,7 @@ // fn asinh(vec<4, f32>) -> vec<4, f32> fn asinh_8d2e51() { - var res: vec4 = asinh(vec4()); + var res: vec4 = asinh(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.dxc.hlsl index 63c730420a..b7a3794fa5 100644 --- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_sinh(float4 x) { } void asinh_8d2e51() { - float4 res = tint_sinh((0.0f).xxxx); + float4 res = tint_sinh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.fxc.hlsl index 63c730420a..b7a3794fa5 100644 --- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_sinh(float4 x) { } void asinh_8d2e51() { - float4 res = tint_sinh((0.0f).xxxx); + float4 res = tint_sinh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.glsl index 449bd91506..8e4482dd79 100644 --- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asinh_8d2e51() { - vec4 res = asinh(vec4(0.0f)); + vec4 res = asinh(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void asinh_8d2e51() { - vec4 res = asinh(vec4(0.0f)); + vec4 res = asinh(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void asinh_8d2e51() { - vec4 res = asinh(vec4(0.0f)); + vec4 res = asinh(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.msl index c38c327100..f0796b90c9 100644 --- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_8d2e51() { - float4 res = asinh(float4(0.0f)); + float4 res = asinh(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.spvasm index 6d9d10ab8c..4295aba050 100644 --- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %asinh_8d2e51 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Asinh %5 + %13 = OpExtInst %v4float %14 Asinh %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %asinh_8d2e51 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %asinh_8d2e51 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %asinh_8d2e51 + %27 = OpLabel + %28 = OpFunctionCall %void %asinh_8d2e51 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %asinh_8d2e51 + %30 = OpLabel + %31 = OpFunctionCall %void %asinh_8d2e51 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.wgsl index a6b17cf137..feeb8f5a89 100644 --- a/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/asinh/8d2e51.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_8d2e51() { - var res : vec4 = asinh(vec4()); + var res : vec4 = asinh(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/02979a.wgsl b/test/tint/builtins/gen/literal/atan/02979a.wgsl index 84a31897de..a37d5bd7ae 100644 --- a/test/tint/builtins/gen/literal/atan/02979a.wgsl +++ b/test/tint/builtins/gen/literal/atan/02979a.wgsl @@ -25,7 +25,7 @@ // fn atan(f32) -> f32 fn atan_02979a() { - var res: f32 = atan(1.0); + var res: f32 = atan(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.wgsl index 5e33806edc..b96a3dac8a 100644 --- a/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/02979a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_02979a() { - var res : f32 = atan(1.0); + var res : f32 = atan(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl b/test/tint/builtins/gen/literal/atan/331e6d.wgsl index 7e8bf08c27..46494a8d5b 100644 --- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl +++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl @@ -25,7 +25,7 @@ // fn atan(vec<3, f32>) -> vec<3, f32> fn atan_331e6d() { - var res: vec3 = atan(vec3()); + var res: vec3 = atan(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.dxc.hlsl index 121c738db1..14fc1787ec 100644 --- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_331e6d() { - float3 res = atan((0.0f).xxx); + float3 res = atan((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.fxc.hlsl index 121c738db1..14fc1787ec 100644 --- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan_331e6d() { - float3 res = atan((0.0f).xxx); + float3 res = atan((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.glsl index 594add76a8..373702b54d 100644 --- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan_331e6d() { - vec3 res = atan(vec3(0.0f)); + vec3 res = atan(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void atan_331e6d() { - vec3 res = atan(vec3(0.0f)); + vec3 res = atan(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void atan_331e6d() { - vec3 res = atan(vec3(0.0f)); + vec3 res = atan(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.msl index 2abc788c07..a05319cac1 100644 --- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_331e6d() { - float3 res = atan(float3(0.0f)); + float3 res = atan(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.spvasm index 1cf1035f86..186619cfbc 100644 --- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %atan_331e6d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Atan %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Atan %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %atan_331e6d +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %atan_331e6d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %atan_331e6d + %29 = OpLabel + %30 = OpFunctionCall %void %atan_331e6d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan_331e6d + %32 = OpLabel + %33 = OpFunctionCall %void %atan_331e6d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.wgsl index def3810738..ed2fba12a8 100644 --- a/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/331e6d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_331e6d() { - var res : vec3 = atan(vec3()); + var res : vec3 = atan(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl b/test/tint/builtins/gen/literal/atan/a8b696.wgsl index 4ea6dec83e..edb5e926ec 100644 --- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl +++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl @@ -25,7 +25,7 @@ // fn atan(vec<4, f32>) -> vec<4, f32> fn atan_a8b696() { - var res: vec4 = atan(vec4()); + var res: vec4 = atan(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.dxc.hlsl index 1e5177666f..3d5dd23514 100644 --- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_a8b696() { - float4 res = atan((0.0f).xxxx); + float4 res = atan((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.fxc.hlsl index 1e5177666f..3d5dd23514 100644 --- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan_a8b696() { - float4 res = atan((0.0f).xxxx); + float4 res = atan((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.glsl index e1ef79df2d..a0d75a18ee 100644 --- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan_a8b696() { - vec4 res = atan(vec4(0.0f)); + vec4 res = atan(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void atan_a8b696() { - vec4 res = atan(vec4(0.0f)); + vec4 res = atan(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void atan_a8b696() { - vec4 res = atan(vec4(0.0f)); + vec4 res = atan(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.msl index 903ffce336..35885ed3e5 100644 --- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_a8b696() { - float4 res = atan(float4(0.0f)); + float4 res = atan(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.spvasm index b60e13665f..10cdf7b9c3 100644 --- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %atan_a8b696 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Atan %5 + %13 = OpExtInst %v4float %14 Atan %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %atan_a8b696 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %atan_a8b696 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %atan_a8b696 + %27 = OpLabel + %28 = OpFunctionCall %void %atan_a8b696 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %atan_a8b696 + %30 = OpLabel + %31 = OpFunctionCall %void %atan_a8b696 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.wgsl index 007981ddc3..63e2ff4f87 100644 --- a/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/a8b696.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_a8b696() { - var res : vec4 = atan(vec4()); + var res : vec4 = atan(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl index 2cb00b6e9d..500111313b 100644 --- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl +++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl @@ -25,7 +25,7 @@ // fn atan(vec<2, f32>) -> vec<2, f32> fn atan_ad96e4() { - var res: vec2 = atan(vec2()); + var res: vec2 = atan(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.dxc.hlsl index d4fcc10e44..7b94859fa4 100644 --- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_ad96e4() { - float2 res = atan((0.0f).xx); + float2 res = atan((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.fxc.hlsl index d4fcc10e44..7b94859fa4 100644 --- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan_ad96e4() { - float2 res = atan((0.0f).xx); + float2 res = atan((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.glsl index 89dfe35886..640b7a3daa 100644 --- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan_ad96e4() { - vec2 res = atan(vec2(0.0f)); + vec2 res = atan(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void atan_ad96e4() { - vec2 res = atan(vec2(0.0f)); + vec2 res = atan(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void atan_ad96e4() { - vec2 res = atan(vec2(0.0f)); + vec2 res = atan(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.msl index ccb46e3ddc..d3f11d5205 100644 --- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_ad96e4() { - float2 res = atan(float2(0.0f)); + float2 res = atan(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.spvasm index b8a56569e4..3bc1779963 100644 --- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %atan_ad96e4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Atan %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Atan %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %atan_ad96e4 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %atan_ad96e4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %atan_ad96e4 + %29 = OpLabel + %30 = OpFunctionCall %void %atan_ad96e4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan_ad96e4 + %32 = OpLabel + %33 = OpFunctionCall %void %atan_ad96e4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.wgsl index d2622df3d2..68ad03adc5 100644 --- a/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan/ad96e4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_ad96e4() { - var res : vec2 = atan(vec2()); + var res : vec2 = atan(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl index 204c83a67e..d80b92e0fd 100644 --- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl +++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl @@ -25,7 +25,7 @@ // fn atan2(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn atan2_57fb13() { - var res: vec2 = atan2(vec2(), vec2()); + var res: vec2 = atan2(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.dxc.hlsl index e851d81c41..be134c9d50 100644 --- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan2_57fb13() { - float2 res = atan2((0.0f).xx, (0.0f).xx); + float2 res = atan2((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.fxc.hlsl index e851d81c41..be134c9d50 100644 --- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan2_57fb13() { - float2 res = atan2((0.0f).xx, (0.0f).xx); + float2 res = atan2((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.glsl index ce4a3fae79..7fcea008c3 100644 --- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan2_57fb13() { - vec2 res = atan(vec2(0.0f), vec2(0.0f)); + vec2 res = atan(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void atan2_57fb13() { - vec2 res = atan(vec2(0.0f), vec2(0.0f)); + vec2 res = atan(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void atan2_57fb13() { - vec2 res = atan(vec2(0.0f), vec2(0.0f)); + vec2 res = atan(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.msl index 7d3ac1fd07..2f51682830 100644 --- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan2_57fb13() { - float2 res = atan2(float2(0.0f), float2(0.0f)); + float2 res = atan2(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.spvasm index 5fea69d590..b50b11d607 100644 --- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %atan2_57fb13 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Atan2 %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Atan2 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %atan2_57fb13 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %atan2_57fb13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %atan2_57fb13 + %29 = OpLabel + %30 = OpFunctionCall %void %atan2_57fb13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan2_57fb13 + %32 = OpLabel + %33 = OpFunctionCall %void %atan2_57fb13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.wgsl index 57193fb8c6..027f5780a6 100644 --- a/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/57fb13.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan2_57fb13() { - var res : vec2 = atan2(vec2(), vec2()); + var res : vec2 = atan2(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/96057c.wgsl b/test/tint/builtins/gen/literal/atan2/96057c.wgsl index 5327ebbc3d..bce5694d79 100644 --- a/test/tint/builtins/gen/literal/atan2/96057c.wgsl +++ b/test/tint/builtins/gen/literal/atan2/96057c.wgsl @@ -25,7 +25,7 @@ // fn atan2(f32, f32) -> f32 fn atan2_96057c() { - var res: f32 = atan2(1.0, 1.0); + var res: f32 = atan2(1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.wgsl index 9a2817d222..ab7825e44d 100644 --- a/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/96057c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan2_96057c() { - var res : f32 = atan2(1.0, 1.0); + var res : f32 = atan2(1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl index 5822a6b20a..db9b9622df 100644 --- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl +++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl @@ -25,7 +25,7 @@ // fn atan2(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn atan2_a70d0d() { - var res: vec3 = atan2(vec3(), vec3()); + var res: vec3 = atan2(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.dxc.hlsl index 78e97ccd0b..9ef81dcac6 100644 --- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan2_a70d0d() { - float3 res = atan2((0.0f).xxx, (0.0f).xxx); + float3 res = atan2((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.fxc.hlsl index 78e97ccd0b..9ef81dcac6 100644 --- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan2_a70d0d() { - float3 res = atan2((0.0f).xxx, (0.0f).xxx); + float3 res = atan2((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.glsl index 199e4b39a4..9383f00484 100644 --- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan2_a70d0d() { - vec3 res = atan(vec3(0.0f), vec3(0.0f)); + vec3 res = atan(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void atan2_a70d0d() { - vec3 res = atan(vec3(0.0f), vec3(0.0f)); + vec3 res = atan(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void atan2_a70d0d() { - vec3 res = atan(vec3(0.0f), vec3(0.0f)); + vec3 res = atan(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.msl index 0e88ba2d05..27d8133412 100644 --- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan2_a70d0d() { - float3 res = atan2(float3(0.0f), float3(0.0f)); + float3 res = atan2(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.spvasm index 7b9579a927..076da641b1 100644 --- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %atan2_a70d0d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Atan2 %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Atan2 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %atan2_a70d0d +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %atan2_a70d0d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %atan2_a70d0d + %29 = OpLabel + %30 = OpFunctionCall %void %atan2_a70d0d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan2_a70d0d + %32 = OpLabel + %33 = OpFunctionCall %void %atan2_a70d0d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.wgsl index 99d3201eec..2195128c60 100644 --- a/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/a70d0d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan2_a70d0d() { - var res : vec3 = atan2(vec3(), vec3()); + var res : vec3 = atan2(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl index 08c2bdf94e..760dbd9aa9 100644 --- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl +++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl @@ -25,7 +25,7 @@ // fn atan2(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn atan2_ae713e() { - var res: vec4 = atan2(vec4(), vec4()); + var res: vec4 = atan2(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.dxc.hlsl index 90f0e5fc1d..c479b2ba4a 100644 --- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan2_ae713e() { - float4 res = atan2((0.0f).xxxx, (0.0f).xxxx); + float4 res = atan2((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.fxc.hlsl index 90f0e5fc1d..c479b2ba4a 100644 --- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan2_ae713e() { - float4 res = atan2((0.0f).xxxx, (0.0f).xxxx); + float4 res = atan2((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.glsl index afe5cf1568..3a58d7c5b2 100644 --- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan2_ae713e() { - vec4 res = atan(vec4(0.0f), vec4(0.0f)); + vec4 res = atan(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void atan2_ae713e() { - vec4 res = atan(vec4(0.0f), vec4(0.0f)); + vec4 res = atan(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void atan2_ae713e() { - vec4 res = atan(vec4(0.0f), vec4(0.0f)); + vec4 res = atan(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.msl index 5d7fa01f1a..fb28698a40 100644 --- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan2_ae713e() { - float4 res = atan2(float4(0.0f), float4(0.0f)); + float4 res = atan2(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.spvasm index 60b09d46f4..2d299bd394 100644 --- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %atan2_ae713e = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Atan2 %5 %5 + %13 = OpExtInst %v4float %14 Atan2 %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %atan2_ae713e +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %atan2_ae713e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %atan2_ae713e + %27 = OpLabel + %28 = OpFunctionCall %void %atan2_ae713e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %atan2_ae713e + %30 = OpLabel + %31 = OpFunctionCall %void %atan2_ae713e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.wgsl index dc1a474db7..9565523614 100644 --- a/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atan2/ae713e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan2_ae713e() { - var res : vec4 = atan2(vec4(), vec4()); + var res : vec4 = atan2(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl b/test/tint/builtins/gen/literal/atanh/440cca.wgsl index 81c6677512..b698480a03 100644 --- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl +++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl @@ -25,7 +25,7 @@ // fn atanh(vec<3, f32>) -> vec<3, f32> fn atanh_440cca() { - var res: vec3 = atanh(vec3()); + var res: vec3 = atanh(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.dxc.hlsl index 800037569a..62b4e58561 100644 --- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_atanh(float3 x) { } void atanh_440cca() { - float3 res = tint_atanh((0.0f).xxx); + float3 res = tint_atanh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.fxc.hlsl index 800037569a..62b4e58561 100644 --- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_atanh(float3 x) { } void atanh_440cca() { - float3 res = tint_atanh((0.0f).xxx); + float3 res = tint_atanh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.glsl index b2265e7979..b94d529143 100644 --- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec3 tint_atanh(vec3 x) { } void atanh_440cca() { - vec3 res = tint_atanh(vec3(0.0f)); + vec3 res = tint_atanh(vec3(1.0f)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ vec3 tint_atanh(vec3 x) { } void atanh_440cca() { - vec3 res = tint_atanh(vec3(0.0f)); + vec3 res = tint_atanh(vec3(1.0f)); } void fragment_main() { @@ -47,7 +47,7 @@ vec3 tint_atanh(vec3 x) { } void atanh_440cca() { - vec3 res = tint_atanh(vec3(0.0f)); + vec3 res = tint_atanh(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.msl index 64790982f9..3d3664918a 100644 --- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.msl @@ -6,7 +6,7 @@ float3 tint_atanh(float3 x) { } void atanh_440cca() { - float3 res = tint_atanh(float3(0.0f)); + float3 res = tint_atanh(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.spvasm index 4179974122..c2c163db22 100644 --- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.spvasm @@ -53,7 +53,7 @@ %atanh_440cca = OpFunction %void None %23 %26 = OpLabel %res = OpVariable %_ptr_Function_v3float Function %20 - %27 = OpFunctionCall %v3float %tint_atanh %20 + %27 = OpFunctionCall %v3float %tint_atanh %16 OpStore %res %27 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.wgsl index 341b6d50ee..44260807bc 100644 --- a/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/440cca.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_440cca() { - var res : vec3 = atanh(vec3()); + var res : vec3 = atanh(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/7997d8.wgsl b/test/tint/builtins/gen/literal/atanh/7997d8.wgsl index 7c531677b1..9f3e4ad4c5 100644 --- a/test/tint/builtins/gen/literal/atanh/7997d8.wgsl +++ b/test/tint/builtins/gen/literal/atanh/7997d8.wgsl @@ -25,7 +25,7 @@ // fn atanh(f32) -> f32 fn atanh_7997d8() { - var res: f32 = atanh(1.0); + var res: f32 = atanh(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.wgsl index 5c4f64ea50..dcf31c2a9e 100644 --- a/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/7997d8.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_7997d8() { - var res : f32 = atanh(1.0); + var res : f32 = atanh(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl index 696109fc12..e67224b8d5 100644 --- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl +++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl @@ -25,7 +25,7 @@ // fn atanh(vec<2, f32>) -> vec<2, f32> fn atanh_c0e634() { - var res: vec2 = atanh(vec2()); + var res: vec2 = atanh(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.dxc.hlsl index cccac6e2af..961f86a870 100644 --- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_atanh(float2 x) { } void atanh_c0e634() { - float2 res = tint_atanh((0.0f).xx); + float2 res = tint_atanh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.fxc.hlsl index cccac6e2af..961f86a870 100644 --- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_atanh(float2 x) { } void atanh_c0e634() { - float2 res = tint_atanh((0.0f).xx); + float2 res = tint_atanh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.glsl index 6f39b1dd79..af242ca8a4 100644 --- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec2 tint_atanh(vec2 x) { } void atanh_c0e634() { - vec2 res = tint_atanh(vec2(0.0f)); + vec2 res = tint_atanh(vec2(1.0f)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ vec2 tint_atanh(vec2 x) { } void atanh_c0e634() { - vec2 res = tint_atanh(vec2(0.0f)); + vec2 res = tint_atanh(vec2(1.0f)); } void fragment_main() { @@ -47,7 +47,7 @@ vec2 tint_atanh(vec2 x) { } void atanh_c0e634() { - vec2 res = tint_atanh(vec2(0.0f)); + vec2 res = tint_atanh(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.msl index 962748a3a4..d5c6b49b1f 100644 --- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.msl @@ -6,7 +6,7 @@ float2 tint_atanh(float2 x) { } void atanh_c0e634() { - float2 res = tint_atanh(float2(0.0f)); + float2 res = tint_atanh(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.spvasm index a0c656a291..4cc3fa4871 100644 --- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.spvasm @@ -53,7 +53,7 @@ %atanh_c0e634 = OpFunction %void None %23 %26 = OpLabel %res = OpVariable %_ptr_Function_v2float Function %20 - %27 = OpFunctionCall %v2float %tint_atanh %20 + %27 = OpFunctionCall %v2float %tint_atanh %16 OpStore %res %27 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.wgsl index 3bea7e3fdd..c36353610a 100644 --- a/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/c0e634.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_c0e634() { - var res : vec2 = atanh(vec2()); + var res : vec2 = atanh(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl index 3e48bd2231..bc5f3dcf59 100644 --- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl +++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl @@ -25,7 +25,7 @@ // fn atanh(vec<4, f32>) -> vec<4, f32> fn atanh_f3e01b() { - var res: vec4 = atanh(vec4()); + var res: vec4 = atanh(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.dxc.hlsl index b0f5b464d8..fcae34abcf 100644 --- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_atanh(float4 x) { } void atanh_f3e01b() { - float4 res = tint_atanh((0.0f).xxxx); + float4 res = tint_atanh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.fxc.hlsl index b0f5b464d8..fcae34abcf 100644 --- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_atanh(float4 x) { } void atanh_f3e01b() { - float4 res = tint_atanh((0.0f).xxxx); + float4 res = tint_atanh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.glsl index 219c975ca4..a2cda73ae4 100644 --- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec4 tint_atanh(vec4 x) { } void atanh_f3e01b() { - vec4 res = tint_atanh(vec4(0.0f)); + vec4 res = tint_atanh(vec4(1.0f)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ vec4 tint_atanh(vec4 x) { } void atanh_f3e01b() { - vec4 res = tint_atanh(vec4(0.0f)); + vec4 res = tint_atanh(vec4(1.0f)); } void fragment_main() { @@ -47,7 +47,7 @@ vec4 tint_atanh(vec4 x) { } void atanh_f3e01b() { - vec4 res = tint_atanh(vec4(0.0f)); + vec4 res = tint_atanh(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.msl index 4ffd4e6690..9bf9bd81f4 100644 --- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.msl @@ -6,7 +6,7 @@ float4 tint_atanh(float4 x) { } void atanh_f3e01b() { - float4 res = tint_atanh(float4(0.0f)); + float4 res = tint_atanh(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.spvasm index 845b1117cf..6086ee2c12 100644 --- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.spvasm @@ -51,7 +51,7 @@ %atanh_f3e01b = OpFunction %void None %21 %24 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %25 = OpFunctionCall %v4float %tint_atanh %5 + %25 = OpFunctionCall %v4float %tint_atanh %15 OpStore %res %25 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.wgsl index 3a8e718633..f3ad468495 100644 --- a/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/atanh/f3e01b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_f3e01b() { - var res : vec4 = atanh(vec4()); + var res : vec4 = atanh(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl b/test/tint/builtins/gen/literal/ceil/34064b.wgsl index 24a4535947..9b6e6bccab 100644 --- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl +++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl @@ -25,7 +25,7 @@ // fn ceil(vec<3, f32>) -> vec<3, f32> fn ceil_34064b() { - var res: vec3 = ceil(vec3()); + var res: vec3 = ceil(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.dxc.hlsl index 289f83b9a3..2e8c4cef2f 100644 --- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_34064b() { - float3 res = ceil((0.0f).xxx); + float3 res = ceil((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.fxc.hlsl index 289f83b9a3..2e8c4cef2f 100644 --- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ceil_34064b() { - float3 res = ceil((0.0f).xxx); + float3 res = ceil((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.glsl index f84576f819..35f80ffc0b 100644 --- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ceil_34064b() { - vec3 res = ceil(vec3(0.0f)); + vec3 res = ceil(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ceil_34064b() { - vec3 res = ceil(vec3(0.0f)); + vec3 res = ceil(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ceil_34064b() { - vec3 res = ceil(vec3(0.0f)); + vec3 res = ceil(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.msl index 67750519f4..0840f0273d 100644 --- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_34064b() { - float3 res = ceil(float3(0.0f)); + float3 res = ceil(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.spvasm index 792920fba9..018e998ec3 100644 --- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %ceil_34064b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Ceil %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Ceil %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %ceil_34064b +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %ceil_34064b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %ceil_34064b + %29 = OpLabel + %30 = OpFunctionCall %void %ceil_34064b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ceil_34064b + %32 = OpLabel + %33 = OpFunctionCall %void %ceil_34064b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.wgsl index 36539d6c84..9c572bc84b 100644 --- a/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/34064b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_34064b() { - var res : vec3 = ceil(vec3()); + var res : vec3 = ceil(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/678655.wgsl b/test/tint/builtins/gen/literal/ceil/678655.wgsl index 71813ff14a..d245506b11 100644 --- a/test/tint/builtins/gen/literal/ceil/678655.wgsl +++ b/test/tint/builtins/gen/literal/ceil/678655.wgsl @@ -25,7 +25,7 @@ // fn ceil(f32) -> f32 fn ceil_678655() { - var res: f32 = ceil(1.0); + var res: f32 = ceil(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.wgsl index bf111b7567..db1c9bbbeb 100644 --- a/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/678655.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_678655() { - var res : f32 = ceil(1.0); + var res : f32 = ceil(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl b/test/tint/builtins/gen/literal/ceil/96f597.wgsl index 582a96c95d..9bcfa0c773 100644 --- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl +++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl @@ -25,7 +25,7 @@ // fn ceil(vec<2, f32>) -> vec<2, f32> fn ceil_96f597() { - var res: vec2 = ceil(vec2()); + var res: vec2 = ceil(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.dxc.hlsl index 2672a8954d..01138db7e9 100644 --- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_96f597() { - float2 res = ceil((0.0f).xx); + float2 res = ceil((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.fxc.hlsl index 2672a8954d..01138db7e9 100644 --- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ceil_96f597() { - float2 res = ceil((0.0f).xx); + float2 res = ceil((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.glsl index eb63086915..c38418dd27 100644 --- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ceil_96f597() { - vec2 res = ceil(vec2(0.0f)); + vec2 res = ceil(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ceil_96f597() { - vec2 res = ceil(vec2(0.0f)); + vec2 res = ceil(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ceil_96f597() { - vec2 res = ceil(vec2(0.0f)); + vec2 res = ceil(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.msl index b5de93ad94..d0a6c92adc 100644 --- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_96f597() { - float2 res = ceil(float2(0.0f)); + float2 res = ceil(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.spvasm index 0552e49590..2eab970379 100644 --- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %ceil_96f597 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Ceil %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Ceil %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %ceil_96f597 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %ceil_96f597 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %ceil_96f597 + %29 = OpLabel + %30 = OpFunctionCall %void %ceil_96f597 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ceil_96f597 + %32 = OpLabel + %33 = OpFunctionCall %void %ceil_96f597 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.wgsl index 8a226271df..fd58dc153f 100644 --- a/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/96f597.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_96f597() { - var res : vec2 = ceil(vec2()); + var res : vec2 = ceil(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl index fa466e9e88..f6ba24ae88 100644 --- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl +++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl @@ -25,7 +25,7 @@ // fn ceil(vec<4, f32>) -> vec<4, f32> fn ceil_b74c16() { - var res: vec4 = ceil(vec4()); + var res: vec4 = ceil(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.dxc.hlsl index 9aa50a436b..94df849e8d 100644 --- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_b74c16() { - float4 res = ceil((0.0f).xxxx); + float4 res = ceil((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.fxc.hlsl index 9aa50a436b..94df849e8d 100644 --- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ceil_b74c16() { - float4 res = ceil((0.0f).xxxx); + float4 res = ceil((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.glsl index da3b29ece0..d64a7371a9 100644 --- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ceil_b74c16() { - vec4 res = ceil(vec4(0.0f)); + vec4 res = ceil(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ceil_b74c16() { - vec4 res = ceil(vec4(0.0f)); + vec4 res = ceil(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ceil_b74c16() { - vec4 res = ceil(vec4(0.0f)); + vec4 res = ceil(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.msl index ad695406bb..71679e6f4d 100644 --- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_b74c16() { - float4 res = ceil(float4(0.0f)); + float4 res = ceil(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.spvasm index 74407d3d0d..c673475331 100644 --- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %ceil_b74c16 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Ceil %5 + %13 = OpExtInst %v4float %14 Ceil %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %ceil_b74c16 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %ceil_b74c16 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %ceil_b74c16 + %27 = OpLabel + %28 = OpFunctionCall %void %ceil_b74c16 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %ceil_b74c16 + %30 = OpLabel + %31 = OpFunctionCall %void %ceil_b74c16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.wgsl index 138281ce6f..d3785332e2 100644 --- a/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ceil/b74c16.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_b74c16() { - var res : vec4 = ceil(vec4()); + var res : vec4 = ceil(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl index 08142ac809..7b9f4ec48a 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn clamp_0acf8f() { - var res: vec2 = clamp(vec2(), vec2(), vec2()); + var res: vec2 = clamp(vec2(1.f), vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl index 09bbd56edf..2123bfb5b1 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_0acf8f() { - float2 res = clamp((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = clamp((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl index 09bbd56edf..2123bfb5b1 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_0acf8f() { - float2 res = clamp((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = clamp((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl index 2fc94245f0..ee477be64d 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_0acf8f() { - vec2 res = clamp(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = clamp(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_0acf8f() { - vec2 res = clamp(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = clamp(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_0acf8f() { - vec2 res = clamp(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = clamp(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl index 19f2f4871f..75969fd7d5 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_0acf8f() { - float2 res = clamp(float2(0.0f), float2(0.0f), float2(0.0f)); + float2 res = clamp(float2(1.0f), float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm index 45dd69b282..d4e1c0c8c6 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %clamp_0acf8f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 NClamp %16 %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 NClamp %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %clamp_0acf8f +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %clamp_0acf8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_0acf8f + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_0acf8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_0acf8f + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_0acf8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.wgsl index bf10a7b1f8..a555d79c1c 100644 --- a/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/0acf8f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_0acf8f() { - var res : vec2 = clamp(vec2(), vec2(), vec2()); + var res : vec2 = clamp(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl index 38b9f23c68..f82366ba3d 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<4, i32>, vec<4, i32>, vec<4, i32>) -> vec<4, i32> fn clamp_1a32e3() { - var res: vec4 = clamp(vec4(), vec4(), vec4()); + var res: vec4 = clamp(vec4(1), vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl index 8d30b440db..3e882bba25 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_1a32e3() { - int4 res = clamp((0).xxxx, (0).xxxx, (0).xxxx); + int4 res = clamp((1).xxxx, (1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl index 8d30b440db..3e882bba25 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_1a32e3() { - int4 res = clamp((0).xxxx, (0).xxxx, (0).xxxx); + int4 res = clamp((1).xxxx, (1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl index 15c29aef60..89aa3efdb4 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_1a32e3() { - ivec4 res = clamp(ivec4(0), ivec4(0), ivec4(0)); + ivec4 res = clamp(ivec4(1), ivec4(1), ivec4(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_1a32e3() { - ivec4 res = clamp(ivec4(0), ivec4(0), ivec4(0)); + ivec4 res = clamp(ivec4(1), ivec4(1), ivec4(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_1a32e3() { - ivec4 res = clamp(ivec4(0), ivec4(0), ivec4(0)); + ivec4 res = clamp(ivec4(1), ivec4(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl index 9ffc14a110..d3f1153380 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_1a32e3() { - int4 res = clamp(int4(0), int4(0), int4(0)); + int4 res = clamp(int4(1), int4(1), int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm index cf5e3d9938..36b90df4e4 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %17 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_1a32e3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %17 - %13 = OpExtInst %v4int %16 SClamp %17 %17 %17 + %res = OpVariable %_ptr_Function_v4int Function %21 + %13 = OpExtInst %v4int %16 SClamp %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_1a32e3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_1a32e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_1a32e3 + %31 = OpLabel + %32 = OpFunctionCall %void %clamp_1a32e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_1a32e3 + %34 = OpLabel + %35 = OpFunctionCall %void %clamp_1a32e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.wgsl index c27d9565b5..cfd0a482f0 100644 --- a/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/1a32e3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_1a32e3() { - var res : vec4 = clamp(vec4(), vec4(), vec4()); + var res : vec4 = clamp(vec4(1), vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl index 2b4686ee71..edfee6a028 100644 --- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl +++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl @@ -25,7 +25,7 @@ // fn clamp(f32, f32, f32) -> f32 fn clamp_2bd567() { - var res: f32 = clamp(1.0, 1.0, 1.0); + var res: f32 = clamp(1.f, 1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.wgsl index 9076b3aea1..146e458531 100644 --- a/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/2bd567.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_2bd567() { - var res : f32 = clamp(1.0, 1.0, 1.0); + var res : f32 = clamp(1.0f, 1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl index 948afcaaee..2a793d6334 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn clamp_2bde41() { - var res: vec4 = clamp(vec4(), vec4(), vec4()); + var res: vec4 = clamp(vec4(1.f), vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl index 91b78407dc..fd00ee5780 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_2bde41() { - float4 res = clamp((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = clamp((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl index 91b78407dc..fd00ee5780 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_2bde41() { - float4 res = clamp((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = clamp((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl index 11c5f03cae..c09a4d4a6c 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_2bde41() { - vec4 res = clamp(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = clamp(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_2bde41() { - vec4 res = clamp(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = clamp(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_2bde41() { - vec4 res = clamp(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = clamp(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl index 801e95a9f9..99dad26f8b 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_2bde41() { - float4 res = clamp(float4(0.0f), float4(0.0f), float4(0.0f)); + float4 res = clamp(float4(1.0f), float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm index ec4cbb10aa..d280181d2c 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %clamp_2bde41 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 NClamp %5 %5 %5 + %13 = OpExtInst %v4float %14 NClamp %16 %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %clamp_2bde41 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %clamp_2bde41 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %clamp_2bde41 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_2bde41 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_2bde41 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_2bde41 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.wgsl index e4bf23f818..370e66b1fd 100644 --- a/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/2bde41.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_2bde41() { - var res : vec4 = clamp(vec4(), vec4(), vec4()); + var res : vec4 = clamp(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl index 07ef786cd5..d4071f2957 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<3, u32>, vec<3, u32>, vec<3, u32>) -> vec<3, u32> fn clamp_548fc7() { - var res: vec3 = clamp(vec3(), vec3(), vec3()); + var res: vec3 = clamp(vec3(1u), vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl index 1c88b562ea..c82f956962 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_548fc7() { - uint3 res = clamp((0u).xxx, (0u).xxx, (0u).xxx); + uint3 res = clamp((1u).xxx, (1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl index 1c88b562ea..c82f956962 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_548fc7() { - uint3 res = clamp((0u).xxx, (0u).xxx, (0u).xxx); + uint3 res = clamp((1u).xxx, (1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl index 8da40040f9..1bdba35984 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_548fc7() { - uvec3 res = clamp(uvec3(0u), uvec3(0u), uvec3(0u)); + uvec3 res = clamp(uvec3(1u), uvec3(1u), uvec3(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_548fc7() { - uvec3 res = clamp(uvec3(0u), uvec3(0u), uvec3(0u)); + uvec3 res = clamp(uvec3(1u), uvec3(1u), uvec3(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_548fc7() { - uvec3 res = clamp(uvec3(0u), uvec3(0u), uvec3(0u)); + uvec3 res = clamp(uvec3(1u), uvec3(1u), uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl index 7118ba6ce4..b4fac8a9dc 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_548fc7() { - uint3 res = clamp(uint3(0u), uint3(0u), uint3(0u)); + uint3 res = clamp(uint3(1u), uint3(1u), uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm index de8d5726c1..1870f99b9c 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %17 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_548fc7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %17 - %13 = OpExtInst %v3uint %16 UClamp %17 %17 %17 + %res = OpVariable %_ptr_Function_v3uint Function %21 + %13 = OpExtInst %v3uint %16 UClamp %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_548fc7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_548fc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_548fc7 + %31 = OpLabel + %32 = OpFunctionCall %void %clamp_548fc7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_548fc7 + %34 = OpLabel + %35 = OpFunctionCall %void %clamp_548fc7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.wgsl index 14f57ec5f5..27abecacc6 100644 --- a/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/548fc7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_548fc7() { - var res : vec3 = clamp(vec3(), vec3(), vec3()); + var res : vec3 = clamp(vec3(1u), vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl index 638f8cc3f0..7a98c9930c 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<3, i32>, vec<3, i32>, vec<3, i32>) -> vec<3, i32> fn clamp_5f0819() { - var res: vec3 = clamp(vec3(), vec3(), vec3()); + var res: vec3 = clamp(vec3(1), vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl index e0946cf0aa..dff0c45f3c 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_5f0819() { - int3 res = clamp((0).xxx, (0).xxx, (0).xxx); + int3 res = clamp((1).xxx, (1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl index e0946cf0aa..dff0c45f3c 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_5f0819() { - int3 res = clamp((0).xxx, (0).xxx, (0).xxx); + int3 res = clamp((1).xxx, (1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl index e09e9001fc..24f7c6cfe4 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_5f0819() { - ivec3 res = clamp(ivec3(0), ivec3(0), ivec3(0)); + ivec3 res = clamp(ivec3(1), ivec3(1), ivec3(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_5f0819() { - ivec3 res = clamp(ivec3(0), ivec3(0), ivec3(0)); + ivec3 res = clamp(ivec3(1), ivec3(1), ivec3(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_5f0819() { - ivec3 res = clamp(ivec3(0), ivec3(0), ivec3(0)); + ivec3 res = clamp(ivec3(1), ivec3(1), ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl index 544d17764d..cf5f95996c 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_5f0819() { - int3 res = clamp(int3(0), int3(0), int3(0)); + int3 res = clamp(int3(1), int3(1), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm index 93b61e959c..aae96e8d85 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %17 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_5f0819 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %17 - %13 = OpExtInst %v3int %16 SClamp %17 %17 %17 + %res = OpVariable %_ptr_Function_v3int Function %21 + %13 = OpExtInst %v3int %16 SClamp %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_5f0819 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_5f0819 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_5f0819 + %31 = OpLabel + %32 = OpFunctionCall %void %clamp_5f0819 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_5f0819 + %34 = OpLabel + %35 = OpFunctionCall %void %clamp_5f0819 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.wgsl index 6266b183ea..84b9e1df0a 100644 --- a/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/5f0819.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_5f0819() { - var res : vec3 = clamp(vec3(), vec3(), vec3()); + var res : vec3 = clamp(vec3(1), vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl index b090e35b57..78dfe2fa6f 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<2, i32>, vec<2, i32>, vec<2, i32>) -> vec<2, i32> fn clamp_6c1749() { - var res: vec2 = clamp(vec2(), vec2(), vec2()); + var res: vec2 = clamp(vec2(1), vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl index 66724c6a17..c34c61239c 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_6c1749() { - int2 res = clamp((0).xx, (0).xx, (0).xx); + int2 res = clamp((1).xx, (1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl index 66724c6a17..c34c61239c 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_6c1749() { - int2 res = clamp((0).xx, (0).xx, (0).xx); + int2 res = clamp((1).xx, (1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl index 4add75cf6d..c13cd39758 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_6c1749() { - ivec2 res = clamp(ivec2(0), ivec2(0), ivec2(0)); + ivec2 res = clamp(ivec2(1), ivec2(1), ivec2(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_6c1749() { - ivec2 res = clamp(ivec2(0), ivec2(0), ivec2(0)); + ivec2 res = clamp(ivec2(1), ivec2(1), ivec2(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_6c1749() { - ivec2 res = clamp(ivec2(0), ivec2(0), ivec2(0)); + ivec2 res = clamp(ivec2(1), ivec2(1), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl index fd20f66722..6c3904a1d7 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_6c1749() { - int2 res = clamp(int2(0), int2(0), int2(0)); + int2 res = clamp(int2(1), int2(1), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm index 01c1fd615b..c309f64ad9 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %17 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_6c1749 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %17 - %13 = OpExtInst %v2int %16 SClamp %17 %17 %17 + %res = OpVariable %_ptr_Function_v2int Function %21 + %13 = OpExtInst %v2int %16 SClamp %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_6c1749 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_6c1749 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_6c1749 + %31 = OpLabel + %32 = OpFunctionCall %void %clamp_6c1749 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_6c1749 + %34 = OpLabel + %35 = OpFunctionCall %void %clamp_6c1749 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.wgsl index e1153a2dcd..3e5ebf5edf 100644 --- a/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/6c1749.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_6c1749() { - var res : vec2 = clamp(vec2(), vec2(), vec2()); + var res : vec2 = clamp(vec2(1), vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl index ca4aa60ca6..f43405250a 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<2, u32>, vec<2, u32>, vec<2, u32>) -> vec<2, u32> fn clamp_7706d7() { - var res: vec2 = clamp(vec2(), vec2(), vec2()); + var res: vec2 = clamp(vec2(1u), vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl index 57649dd986..c97d2a3735 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_7706d7() { - uint2 res = clamp((0u).xx, (0u).xx, (0u).xx); + uint2 res = clamp((1u).xx, (1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl index 57649dd986..c97d2a3735 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_7706d7() { - uint2 res = clamp((0u).xx, (0u).xx, (0u).xx); + uint2 res = clamp((1u).xx, (1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl index 5578471e20..f682c662ec 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_7706d7() { - uvec2 res = clamp(uvec2(0u), uvec2(0u), uvec2(0u)); + uvec2 res = clamp(uvec2(1u), uvec2(1u), uvec2(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_7706d7() { - uvec2 res = clamp(uvec2(0u), uvec2(0u), uvec2(0u)); + uvec2 res = clamp(uvec2(1u), uvec2(1u), uvec2(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_7706d7() { - uvec2 res = clamp(uvec2(0u), uvec2(0u), uvec2(0u)); + uvec2 res = clamp(uvec2(1u), uvec2(1u), uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl index 97b583be7f..d842f6d686 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_7706d7() { - uint2 res = clamp(uint2(0u), uint2(0u), uint2(0u)); + uint2 res = clamp(uint2(1u), uint2(1u), uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm index 8c388c4542..47b0b39f83 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %17 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_7706d7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %17 - %13 = OpExtInst %v2uint %16 UClamp %17 %17 %17 + %res = OpVariable %_ptr_Function_v2uint Function %21 + %13 = OpExtInst %v2uint %16 UClamp %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_7706d7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_7706d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_7706d7 + %31 = OpLabel + %32 = OpFunctionCall %void %clamp_7706d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_7706d7 + %34 = OpLabel + %35 = OpFunctionCall %void %clamp_7706d7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.wgsl index 33837ee43c..a614443fff 100644 --- a/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/7706d7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_7706d7() { - var res : vec2 = clamp(vec2(), vec2(), vec2()); + var res : vec2 = clamp(vec2(1u), vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl index ae1ee11404..52be5e5df0 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn clamp_867397() { - var res: vec3 = clamp(vec3(), vec3(), vec3()); + var res: vec3 = clamp(vec3(1.f), vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl index 686dced891..7ba11abb56 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_867397() { - float3 res = clamp((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = clamp((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl index 686dced891..7ba11abb56 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_867397() { - float3 res = clamp((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = clamp((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl index 792b15fb71..3eed556179 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_867397() { - vec3 res = clamp(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = clamp(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_867397() { - vec3 res = clamp(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = clamp(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_867397() { - vec3 res = clamp(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = clamp(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl index 7bf7bae55d..88c885b4d1 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_867397() { - float3 res = clamp(float3(0.0f), float3(0.0f), float3(0.0f)); + float3 res = clamp(float3(1.0f), float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm index 0c0e7c3ce6..98dd02e349 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %clamp_867397 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 NClamp %16 %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 NClamp %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %clamp_867397 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %clamp_867397 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_867397 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_867397 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %clamp_867397 + %32 = OpLabel + %33 = OpFunctionCall %void %clamp_867397 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.wgsl index 9f0b0f56e2..e1dcadf4b3 100644 --- a/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/867397.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_867397() { - var res : vec3 = clamp(vec3(), vec3(), vec3()); + var res : vec3 = clamp(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl index 844362607f..65a29cd111 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl @@ -25,7 +25,7 @@ // fn clamp(vec<4, u32>, vec<4, u32>, vec<4, u32>) -> vec<4, u32> fn clamp_bd43ce() { - var res: vec4 = clamp(vec4(), vec4(), vec4()); + var res: vec4 = clamp(vec4(1u), vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl index c3f2aea07a..e93fe0068b 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void clamp_bd43ce() { - uint4 res = clamp((0u).xxxx, (0u).xxxx, (0u).xxxx); + uint4 res = clamp((1u).xxxx, (1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl index c3f2aea07a..e93fe0068b 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void clamp_bd43ce() { - uint4 res = clamp((0u).xxxx, (0u).xxxx, (0u).xxxx); + uint4 res = clamp((1u).xxxx, (1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl index 5e8edd11da..76aebae975 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void clamp_bd43ce() { - uvec4 res = clamp(uvec4(0u), uvec4(0u), uvec4(0u)); + uvec4 res = clamp(uvec4(1u), uvec4(1u), uvec4(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void clamp_bd43ce() { - uvec4 res = clamp(uvec4(0u), uvec4(0u), uvec4(0u)); + uvec4 res = clamp(uvec4(1u), uvec4(1u), uvec4(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void clamp_bd43ce() { - uvec4 res = clamp(uvec4(0u), uvec4(0u), uvec4(0u)); + uvec4 res = clamp(uvec4(1u), uvec4(1u), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl index 8f41464710..c9c7bc5f47 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void clamp_bd43ce() { - uint4 res = clamp(uint4(0u), uint4(0u), uint4(0u)); + uint4 res = clamp(uint4(1u), uint4(1u), uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm index 9b84322972..984b292933 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %17 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_bd43ce = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %17 - %13 = OpExtInst %v4uint %16 UClamp %17 %17 %17 + %res = OpVariable %_ptr_Function_v4uint Function %21 + %13 = OpExtInst %v4uint %16 UClamp %18 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %clamp_bd43ce +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %clamp_bd43ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %clamp_bd43ce + %31 = OpLabel + %32 = OpFunctionCall %void %clamp_bd43ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_bd43ce + %34 = OpLabel + %35 = OpFunctionCall %void %clamp_bd43ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.wgsl index 7be89df276..2b4ad4233a 100644 --- a/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/clamp/bd43ce.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn clamp_bd43ce() { - var res : vec4 = clamp(vec4(), vec4(), vec4()); + var res : vec4 = clamp(vec4(1u), vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl b/test/tint/builtins/gen/literal/cos/16dc15.wgsl index cdbc9c1e81..f87d75a5f4 100644 --- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl +++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl @@ -25,7 +25,7 @@ // fn cos(vec<3, f32>) -> vec<3, f32> fn cos_16dc15() { - var res: vec3 = cos(vec3()); + var res: vec3 = cos(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.dxc.hlsl index 611ff73e84..1a92b74610 100644 --- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_16dc15() { - float3 res = cos((0.0f).xxx); + float3 res = cos((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.fxc.hlsl index 611ff73e84..1a92b74610 100644 --- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cos_16dc15() { - float3 res = cos((0.0f).xxx); + float3 res = cos((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.glsl index 31aca9f563..9d03c9ebb7 100644 --- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cos_16dc15() { - vec3 res = cos(vec3(0.0f)); + vec3 res = cos(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void cos_16dc15() { - vec3 res = cos(vec3(0.0f)); + vec3 res = cos(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void cos_16dc15() { - vec3 res = cos(vec3(0.0f)); + vec3 res = cos(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.msl index e593fc725e..e93c8db520 100644 --- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_16dc15() { - float3 res = cos(float3(0.0f)); + float3 res = cos(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.spvasm index 713e8ee18b..6909542830 100644 --- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %cos_16dc15 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Cos %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Cos %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cos_16dc15 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cos_16dc15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cos_16dc15 + %29 = OpLabel + %30 = OpFunctionCall %void %cos_16dc15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cos_16dc15 + %32 = OpLabel + %33 = OpFunctionCall %void %cos_16dc15 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.wgsl index d4b9449c00..ef3e9a25e8 100644 --- a/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/16dc15.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_16dc15() { - var res : vec3 = cos(vec3()); + var res : vec3 = cos(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl b/test/tint/builtins/gen/literal/cos/29d66d.wgsl index 5caf5f3394..147bfb85d5 100644 --- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl +++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl @@ -25,7 +25,7 @@ // fn cos(vec<4, f32>) -> vec<4, f32> fn cos_29d66d() { - var res: vec4 = cos(vec4()); + var res: vec4 = cos(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.dxc.hlsl index ebb04a4d39..c0cdea9312 100644 --- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_29d66d() { - float4 res = cos((0.0f).xxxx); + float4 res = cos((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.fxc.hlsl index ebb04a4d39..c0cdea9312 100644 --- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cos_29d66d() { - float4 res = cos((0.0f).xxxx); + float4 res = cos((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.glsl index 38b3b1f95a..9dfa5c949f 100644 --- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cos_29d66d() { - vec4 res = cos(vec4(0.0f)); + vec4 res = cos(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void cos_29d66d() { - vec4 res = cos(vec4(0.0f)); + vec4 res = cos(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void cos_29d66d() { - vec4 res = cos(vec4(0.0f)); + vec4 res = cos(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.msl index 1e288cbf43..055aad554a 100644 --- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_29d66d() { - float4 res = cos(float4(0.0f)); + float4 res = cos(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.spvasm index e6389c640e..2b5cebc1a9 100644 --- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %cos_29d66d = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Cos %5 + %13 = OpExtInst %v4float %14 Cos %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %cos_29d66d +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %cos_29d66d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %cos_29d66d + %27 = OpLabel + %28 = OpFunctionCall %void %cos_29d66d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cos_29d66d + %30 = OpLabel + %31 = OpFunctionCall %void %cos_29d66d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.wgsl index 8ec11e5e87..fe681bef56 100644 --- a/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/29d66d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_29d66d() { - var res : vec4 = cos(vec4()); + var res : vec4 = cos(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl b/test/tint/builtins/gen/literal/cos/c3b486.wgsl index 30c718f894..c9288a3133 100644 --- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl +++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl @@ -25,7 +25,7 @@ // fn cos(vec<2, f32>) -> vec<2, f32> fn cos_c3b486() { - var res: vec2 = cos(vec2()); + var res: vec2 = cos(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.dxc.hlsl index 6704985256..c6ad101ccc 100644 --- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_c3b486() { - float2 res = cos((0.0f).xx); + float2 res = cos((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.fxc.hlsl index 6704985256..c6ad101ccc 100644 --- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cos_c3b486() { - float2 res = cos((0.0f).xx); + float2 res = cos((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.glsl index 06d925e002..c55e085334 100644 --- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cos_c3b486() { - vec2 res = cos(vec2(0.0f)); + vec2 res = cos(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void cos_c3b486() { - vec2 res = cos(vec2(0.0f)); + vec2 res = cos(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void cos_c3b486() { - vec2 res = cos(vec2(0.0f)); + vec2 res = cos(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.msl index a1e0e6bb93..1bf56af6f1 100644 --- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_c3b486() { - float2 res = cos(float2(0.0f)); + float2 res = cos(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.spvasm index 9de36a8ac4..5ab12d312c 100644 --- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %cos_c3b486 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Cos %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Cos %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cos_c3b486 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cos_c3b486 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cos_c3b486 + %29 = OpLabel + %30 = OpFunctionCall %void %cos_c3b486 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cos_c3b486 + %32 = OpLabel + %33 = OpFunctionCall %void %cos_c3b486 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.wgsl index 888becfa56..57052ea7ce 100644 --- a/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/c3b486.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_c3b486() { - var res : vec2 = cos(vec2()); + var res : vec2 = cos(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/c5c28e.wgsl b/test/tint/builtins/gen/literal/cos/c5c28e.wgsl index 8293d1b506..4d053c2981 100644 --- a/test/tint/builtins/gen/literal/cos/c5c28e.wgsl +++ b/test/tint/builtins/gen/literal/cos/c5c28e.wgsl @@ -25,7 +25,7 @@ // fn cos(f32) -> f32 fn cos_c5c28e() { - var res: f32 = cos(1.0); + var res: f32 = cos(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.wgsl index 28bc70e261..5b9b508d85 100644 --- a/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cos/c5c28e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_c5c28e() { - var res : f32 = cos(1.0); + var res : f32 = cos(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl b/test/tint/builtins/gen/literal/cosh/377652.wgsl index e462cddcc5..de9691608d 100644 --- a/test/tint/builtins/gen/literal/cosh/377652.wgsl +++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl @@ -25,7 +25,7 @@ // fn cosh(vec<3, f32>) -> vec<3, f32> fn cosh_377652() { - var res: vec3 = cosh(vec3()); + var res: vec3 = cosh(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.dxc.hlsl index ca3e141e0c..d707c4b5cf 100644 --- a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_377652() { - float3 res = cosh((0.0f).xxx); + float3 res = cosh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.fxc.hlsl index ca3e141e0c..d707c4b5cf 100644 --- a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cosh_377652() { - float3 res = cosh((0.0f).xxx); + float3 res = cosh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.glsl index e4bf7bcd11..838edd05fa 100644 --- a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cosh_377652() { - vec3 res = cosh(vec3(0.0f)); + vec3 res = cosh(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void cosh_377652() { - vec3 res = cosh(vec3(0.0f)); + vec3 res = cosh(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void cosh_377652() { - vec3 res = cosh(vec3(0.0f)); + vec3 res = cosh(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.msl index 218f15392c..22932f1ef7 100644 --- a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_377652() { - float3 res = cosh(float3(0.0f)); + float3 res = cosh(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.spvasm index 6e940e5114..33b3840e7d 100644 --- a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %cosh_377652 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Cosh %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Cosh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cosh_377652 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cosh_377652 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cosh_377652 + %29 = OpLabel + %30 = OpFunctionCall %void %cosh_377652 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cosh_377652 + %32 = OpLabel + %33 = OpFunctionCall %void %cosh_377652 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.wgsl index 953b20772a..250df0b12d 100644 --- a/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/377652.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_377652() { - var res : vec3 = cosh(vec3()); + var res : vec3 = cosh(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl b/test/tint/builtins/gen/literal/cosh/c13756.wgsl index cb58944291..2e70f2d571 100644 --- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl +++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl @@ -25,7 +25,7 @@ // fn cosh(vec<2, f32>) -> vec<2, f32> fn cosh_c13756() { - var res: vec2 = cosh(vec2()); + var res: vec2 = cosh(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.dxc.hlsl index 6f536857e8..61f7c95da9 100644 --- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_c13756() { - float2 res = cosh((0.0f).xx); + float2 res = cosh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.fxc.hlsl index 6f536857e8..61f7c95da9 100644 --- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cosh_c13756() { - float2 res = cosh((0.0f).xx); + float2 res = cosh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.glsl index a59e41341e..76e33c1d16 100644 --- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cosh_c13756() { - vec2 res = cosh(vec2(0.0f)); + vec2 res = cosh(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void cosh_c13756() { - vec2 res = cosh(vec2(0.0f)); + vec2 res = cosh(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void cosh_c13756() { - vec2 res = cosh(vec2(0.0f)); + vec2 res = cosh(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.msl index 69e464b8bf..95449a54b2 100644 --- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_c13756() { - float2 res = cosh(float2(0.0f)); + float2 res = cosh(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.spvasm index 2a7229c793..a250a0f184 100644 --- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %cosh_c13756 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Cosh %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Cosh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cosh_c13756 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cosh_c13756 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cosh_c13756 + %29 = OpLabel + %30 = OpFunctionCall %void %cosh_c13756 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cosh_c13756 + %32 = OpLabel + %33 = OpFunctionCall %void %cosh_c13756 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.wgsl index efd35c13f8..497dbbd4ef 100644 --- a/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/c13756.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_c13756() { - var res : vec2 = cosh(vec2()); + var res : vec2 = cosh(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/da92dd.wgsl b/test/tint/builtins/gen/literal/cosh/da92dd.wgsl index 261223993d..2a95a23f37 100644 --- a/test/tint/builtins/gen/literal/cosh/da92dd.wgsl +++ b/test/tint/builtins/gen/literal/cosh/da92dd.wgsl @@ -25,7 +25,7 @@ // fn cosh(f32) -> f32 fn cosh_da92dd() { - var res: f32 = cosh(1.0); + var res: f32 = cosh(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.wgsl index 79c75e648d..fb310c1aee 100644 --- a/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/da92dd.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_da92dd() { - var res : f32 = cosh(1.0); + var res : f32 = cosh(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl index afc084158b..705b29299b 100644 --- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl +++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl @@ -25,7 +25,7 @@ // fn cosh(vec<4, f32>) -> vec<4, f32> fn cosh_e0c1de() { - var res: vec4 = cosh(vec4()); + var res: vec4 = cosh(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.dxc.hlsl index abed30ea44..713b746cc1 100644 --- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_e0c1de() { - float4 res = cosh((0.0f).xxxx); + float4 res = cosh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.fxc.hlsl index abed30ea44..713b746cc1 100644 --- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cosh_e0c1de() { - float4 res = cosh((0.0f).xxxx); + float4 res = cosh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.glsl index 0cf7d85e36..a7038c289d 100644 --- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cosh_e0c1de() { - vec4 res = cosh(vec4(0.0f)); + vec4 res = cosh(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void cosh_e0c1de() { - vec4 res = cosh(vec4(0.0f)); + vec4 res = cosh(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void cosh_e0c1de() { - vec4 res = cosh(vec4(0.0f)); + vec4 res = cosh(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.msl index b04468d47f..8879f54425 100644 --- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_e0c1de() { - float4 res = cosh(float4(0.0f)); + float4 res = cosh(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.spvasm index b26a1cab19..67b1b4c55e 100644 --- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %cosh_e0c1de = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Cosh %5 + %13 = OpExtInst %v4float %14 Cosh %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %cosh_e0c1de +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %cosh_e0c1de OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %cosh_e0c1de + %27 = OpLabel + %28 = OpFunctionCall %void %cosh_e0c1de OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %cosh_e0c1de + %30 = OpLabel + %31 = OpFunctionCall %void %cosh_e0c1de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.wgsl index 47456626ea..f2a273b4fd 100644 --- a/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cosh/e0c1de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_e0c1de() { - var res : vec4 = cosh(vec4()); + var res : vec4 = cosh(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl index 16d7040756..d747ae3f49 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<2, u32>) -> vec<2, u32> fn countLeadingZeros_70783f() { - var res: vec2 = countLeadingZeros(vec2()); + var res: vec2 = countLeadingZeros(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl index 917c08ed2f..60ae7159e9 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_leading_zeros(uint2 v) { } void countLeadingZeros_70783f() { - uint2 res = tint_count_leading_zeros((0u).xx); + uint2 res = tint_count_leading_zeros((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl index 917c08ed2f..60ae7159e9 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_leading_zeros(uint2 v) { } void countLeadingZeros_70783f() { - uint2 res = tint_count_leading_zeros((0u).xx); + uint2 res = tint_count_leading_zeros((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.glsl index 0b2ab6c531..09b8cfe3d0 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_count_leading_zeros(uvec2 v) { } void countLeadingZeros_70783f() { - uvec2 res = tint_count_leading_zeros(uvec2(0u)); + uvec2 res = tint_count_leading_zeros(uvec2(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec2 tint_count_leading_zeros(uvec2 v) { } void countLeadingZeros_70783f() { - uvec2 res = tint_count_leading_zeros(uvec2(0u)); + uvec2 res = tint_count_leading_zeros(uvec2(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec2 tint_count_leading_zeros(uvec2 v) { } void countLeadingZeros_70783f() { - uvec2 res = tint_count_leading_zeros(uvec2(0u)); + uvec2 res = tint_count_leading_zeros(uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.msl b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.msl index cca2e38e82..9758cd3383 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_70783f() { - uint2 res = clz(uint2(0u)); + uint2 res = clz(uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.spvasm index 76252b2ef1..aa1288499b 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.spvasm @@ -107,7 +107,7 @@ %countLeadingZeros_70783f = OpFunction %void None %73 %76 = OpLabel %res = OpVariable %_ptr_Function_v2uint Function %18 - %77 = OpFunctionCall %v2uint %tint_count_leading_zeros %18 + %77 = OpFunctionCall %v2uint %tint_count_leading_zeros %63 OpStore %res %77 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.wgsl index 00f65ce048..6d34dec9e4 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/70783f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_70783f() { - var res : vec2 = countLeadingZeros(vec2()); + var res : vec2 = countLeadingZeros(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl index 4838028eb9..28e56ccb2c 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<3, i32>) -> vec<3, i32> fn countLeadingZeros_7c38a6() { - var res: vec3 = countLeadingZeros(vec3()); + var res: vec3 = countLeadingZeros(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl index fa2102da87..fbc0183ce7 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_leading_zeros(int3 v) { } void countLeadingZeros_7c38a6() { - int3 res = tint_count_leading_zeros((0).xxx); + int3 res = tint_count_leading_zeros((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl index fa2102da87..fbc0183ce7 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_leading_zeros(int3 v) { } void countLeadingZeros_7c38a6() { - int3 res = tint_count_leading_zeros((0).xxx); + int3 res = tint_count_leading_zeros((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.glsl index 89d2e75995..daf451ff67 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_count_leading_zeros(ivec3 v) { } void countLeadingZeros_7c38a6() { - ivec3 res = tint_count_leading_zeros(ivec3(0)); + ivec3 res = tint_count_leading_zeros(ivec3(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec3 tint_count_leading_zeros(ivec3 v) { } void countLeadingZeros_7c38a6() { - ivec3 res = tint_count_leading_zeros(ivec3(0)); + ivec3 res = tint_count_leading_zeros(ivec3(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec3 tint_count_leading_zeros(ivec3 v) { } void countLeadingZeros_7c38a6() { - ivec3 res = tint_count_leading_zeros(ivec3(0)); + ivec3 res = tint_count_leading_zeros(ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.msl b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.msl index 9cd1b87258..dcab0ad5dd 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_7c38a6() { - int3 res = clz(int3(0)); + int3 res = clz(int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.spvasm index f710c4e253..b68f4a6f97 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 97 +; Bound: 99 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -62,9 +62,11 @@ %65 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %75 = OpTypeFunction %void - %80 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %81 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %83 = OpTypeFunction %v4float + %84 = OpConstantNull %v3int + %85 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_leading_zeros = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -112,30 +114,30 @@ OpFunctionEnd %countLeadingZeros_7c38a6 = OpFunction %void None %75 %78 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %80 - %79 = OpFunctionCall %v3int %tint_count_leading_zeros %80 + %res = OpVariable %_ptr_Function_v3int Function %84 + %79 = OpFunctionCall %v3int %tint_count_leading_zeros %81 OpStore %res %79 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %83 - %85 = OpLabel - %86 = OpFunctionCall %void %countLeadingZeros_7c38a6 +%vertex_main_inner = OpFunction %v4float None %85 + %87 = OpLabel + %88 = OpFunctionCall %void %countLeadingZeros_7c38a6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %75 - %88 = OpLabel - %89 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %89 + %90 = OpLabel + %91 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %91 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %75 - %92 = OpLabel - %93 = OpFunctionCall %void %countLeadingZeros_7c38a6 + %94 = OpLabel + %95 = OpFunctionCall %void %countLeadingZeros_7c38a6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %75 - %95 = OpLabel - %96 = OpFunctionCall %void %countLeadingZeros_7c38a6 + %97 = OpLabel + %98 = OpFunctionCall %void %countLeadingZeros_7c38a6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.wgsl index 866762f085..59dff9117b 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/7c38a6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_7c38a6() { - var res : vec3 = countLeadingZeros(vec3()); + var res : vec3 = countLeadingZeros(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl index 745f6d0a7a..7346c37f97 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<2, i32>) -> vec<2, i32> fn countLeadingZeros_858d40() { - var res: vec2 = countLeadingZeros(vec2()); + var res: vec2 = countLeadingZeros(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl index dd780a09e4..0dbc22b034 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_leading_zeros(int2 v) { } void countLeadingZeros_858d40() { - int2 res = tint_count_leading_zeros((0).xx); + int2 res = tint_count_leading_zeros((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl index dd780a09e4..0dbc22b034 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_leading_zeros(int2 v) { } void countLeadingZeros_858d40() { - int2 res = tint_count_leading_zeros((0).xx); + int2 res = tint_count_leading_zeros((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.glsl index 408a00a3db..875e499f4f 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_count_leading_zeros(ivec2 v) { } void countLeadingZeros_858d40() { - ivec2 res = tint_count_leading_zeros(ivec2(0)); + ivec2 res = tint_count_leading_zeros(ivec2(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec2 tint_count_leading_zeros(ivec2 v) { } void countLeadingZeros_858d40() { - ivec2 res = tint_count_leading_zeros(ivec2(0)); + ivec2 res = tint_count_leading_zeros(ivec2(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec2 tint_count_leading_zeros(ivec2 v) { } void countLeadingZeros_858d40() { - ivec2 res = tint_count_leading_zeros(ivec2(0)); + ivec2 res = tint_count_leading_zeros(ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.msl b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.msl index 51249fd66a..aad89f72be 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_858d40() { - int2 res = clz(int2(0)); + int2 res = clz(int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.spvasm index 67d9ae4bdb..ab5c154fbb 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 97 +; Bound: 99 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -62,9 +62,11 @@ %65 = OpConstantComposite %v2uint %uint_1 %uint_1 %void = OpTypeVoid %75 = OpTypeFunction %void - %80 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %81 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %83 = OpTypeFunction %v4float + %84 = OpConstantNull %v2int + %85 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_leading_zeros = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -112,30 +114,30 @@ OpFunctionEnd %countLeadingZeros_858d40 = OpFunction %void None %75 %78 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %80 - %79 = OpFunctionCall %v2int %tint_count_leading_zeros %80 + %res = OpVariable %_ptr_Function_v2int Function %84 + %79 = OpFunctionCall %v2int %tint_count_leading_zeros %81 OpStore %res %79 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %83 - %85 = OpLabel - %86 = OpFunctionCall %void %countLeadingZeros_858d40 +%vertex_main_inner = OpFunction %v4float None %85 + %87 = OpLabel + %88 = OpFunctionCall %void %countLeadingZeros_858d40 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %75 - %88 = OpLabel - %89 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %89 + %90 = OpLabel + %91 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %91 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %75 - %92 = OpLabel - %93 = OpFunctionCall %void %countLeadingZeros_858d40 + %94 = OpLabel + %95 = OpFunctionCall %void %countLeadingZeros_858d40 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %75 - %95 = OpLabel - %96 = OpFunctionCall %void %countLeadingZeros_858d40 + %97 = OpLabel + %98 = OpFunctionCall %void %countLeadingZeros_858d40 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.wgsl index f5c838ade3..632c168826 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/858d40.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_858d40() { - var res : vec2 = countLeadingZeros(vec2()); + var res : vec2 = countLeadingZeros(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl index ff43e9cd50..fb45fca7ec 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<3, u32>) -> vec<3, u32> fn countLeadingZeros_ab6345() { - var res: vec3 = countLeadingZeros(vec3()); + var res: vec3 = countLeadingZeros(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl index 1d7e5ff7da..56e471a049 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_leading_zeros(uint3 v) { } void countLeadingZeros_ab6345() { - uint3 res = tint_count_leading_zeros((0u).xxx); + uint3 res = tint_count_leading_zeros((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl index 1d7e5ff7da..56e471a049 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_leading_zeros(uint3 v) { } void countLeadingZeros_ab6345() { - uint3 res = tint_count_leading_zeros((0u).xxx); + uint3 res = tint_count_leading_zeros((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.glsl index 58f7a24705..bc8be9cdb9 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_count_leading_zeros(uvec3 v) { } void countLeadingZeros_ab6345() { - uvec3 res = tint_count_leading_zeros(uvec3(0u)); + uvec3 res = tint_count_leading_zeros(uvec3(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec3 tint_count_leading_zeros(uvec3 v) { } void countLeadingZeros_ab6345() { - uvec3 res = tint_count_leading_zeros(uvec3(0u)); + uvec3 res = tint_count_leading_zeros(uvec3(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec3 tint_count_leading_zeros(uvec3 v) { } void countLeadingZeros_ab6345() { - uvec3 res = tint_count_leading_zeros(uvec3(0u)); + uvec3 res = tint_count_leading_zeros(uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.msl b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.msl index 805defdb40..85d4ca8c52 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_ab6345() { - uint3 res = clz(uint3(0u)); + uint3 res = clz(uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.spvasm index 60b0dbd8c5..94f2f81e93 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.spvasm @@ -107,7 +107,7 @@ %countLeadingZeros_ab6345 = OpFunction %void None %73 %76 = OpLabel %res = OpVariable %_ptr_Function_v3uint Function %18 - %77 = OpFunctionCall %v3uint %tint_count_leading_zeros %18 + %77 = OpFunctionCall %v3uint %tint_count_leading_zeros %63 OpStore %res %77 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.wgsl index 05ba162c48..c7bc319ed0 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/ab6345.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_ab6345() { - var res : vec3 = countLeadingZeros(vec3()); + var res : vec3 = countLeadingZeros(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl index 03d018eb4b..de494f6994 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<4, i32>) -> vec<4, i32> fn countLeadingZeros_eab32b() { - var res: vec4 = countLeadingZeros(vec4()); + var res: vec4 = countLeadingZeros(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl index 14484d6aff..fdbeffdd05 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_leading_zeros(int4 v) { } void countLeadingZeros_eab32b() { - int4 res = tint_count_leading_zeros((0).xxxx); + int4 res = tint_count_leading_zeros((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl index 14484d6aff..fdbeffdd05 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_leading_zeros(int4 v) { } void countLeadingZeros_eab32b() { - int4 res = tint_count_leading_zeros((0).xxxx); + int4 res = tint_count_leading_zeros((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.glsl index 01427b60fd..ce67a9ecf7 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_count_leading_zeros(ivec4 v) { } void countLeadingZeros_eab32b() { - ivec4 res = tint_count_leading_zeros(ivec4(0)); + ivec4 res = tint_count_leading_zeros(ivec4(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec4 tint_count_leading_zeros(ivec4 v) { } void countLeadingZeros_eab32b() { - ivec4 res = tint_count_leading_zeros(ivec4(0)); + ivec4 res = tint_count_leading_zeros(ivec4(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec4 tint_count_leading_zeros(ivec4 v) { } void countLeadingZeros_eab32b() { - ivec4 res = tint_count_leading_zeros(ivec4(0)); + ivec4 res = tint_count_leading_zeros(ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.msl b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.msl index a85b6e0789..2e2f4b629e 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_eab32b() { - int4 res = clz(int4(0)); + int4 res = clz(int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.spvasm index 48b74acc76..c7f146d529 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 97 +; Bound: 99 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -62,9 +62,11 @@ %65 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %75 = OpTypeFunction %void - %80 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %81 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %83 = OpTypeFunction %v4float + %84 = OpConstantNull %v4int + %85 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_leading_zeros = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -112,30 +114,30 @@ OpFunctionEnd %countLeadingZeros_eab32b = OpFunction %void None %75 %78 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %80 - %79 = OpFunctionCall %v4int %tint_count_leading_zeros %80 + %res = OpVariable %_ptr_Function_v4int Function %84 + %79 = OpFunctionCall %v4int %tint_count_leading_zeros %81 OpStore %res %79 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %83 - %85 = OpLabel - %86 = OpFunctionCall %void %countLeadingZeros_eab32b +%vertex_main_inner = OpFunction %v4float None %85 + %87 = OpLabel + %88 = OpFunctionCall %void %countLeadingZeros_eab32b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %75 - %88 = OpLabel - %89 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %89 + %90 = OpLabel + %91 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %91 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %75 - %92 = OpLabel - %93 = OpFunctionCall %void %countLeadingZeros_eab32b + %94 = OpLabel + %95 = OpFunctionCall %void %countLeadingZeros_eab32b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %75 - %95 = OpLabel - %96 = OpFunctionCall %void %countLeadingZeros_eab32b + %97 = OpLabel + %98 = OpFunctionCall %void %countLeadingZeros_eab32b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.wgsl index dc7c03c4eb..08ee7ea057 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/eab32b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_eab32b() { - var res : vec4 = countLeadingZeros(vec4()); + var res : vec4 = countLeadingZeros(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl index ae1e44979b..8054e4adff 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<4, u32>) -> vec<4, u32> fn countLeadingZeros_f70103() { - var res: vec4 = countLeadingZeros(vec4()); + var res: vec4 = countLeadingZeros(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl index a486ea0227..8c9cbad028 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_leading_zeros(uint4 v) { } void countLeadingZeros_f70103() { - uint4 res = tint_count_leading_zeros((0u).xxxx); + uint4 res = tint_count_leading_zeros((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl index a486ea0227..8c9cbad028 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_leading_zeros(uint4 v) { } void countLeadingZeros_f70103() { - uint4 res = tint_count_leading_zeros((0u).xxxx); + uint4 res = tint_count_leading_zeros((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.glsl index 9c298efb52..b7e35486dc 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_count_leading_zeros(uvec4 v) { } void countLeadingZeros_f70103() { - uvec4 res = tint_count_leading_zeros(uvec4(0u)); + uvec4 res = tint_count_leading_zeros(uvec4(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec4 tint_count_leading_zeros(uvec4 v) { } void countLeadingZeros_f70103() { - uvec4 res = tint_count_leading_zeros(uvec4(0u)); + uvec4 res = tint_count_leading_zeros(uvec4(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec4 tint_count_leading_zeros(uvec4 v) { } void countLeadingZeros_f70103() { - uvec4 res = tint_count_leading_zeros(uvec4(0u)); + uvec4 res = tint_count_leading_zeros(uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.msl b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.msl index aedee4c9d0..04f050440b 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_f70103() { - uint4 res = clz(uint4(0u)); + uint4 res = clz(uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.spvasm index 4a96690ccf..86d8a21f96 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.spvasm @@ -107,7 +107,7 @@ %countLeadingZeros_f70103 = OpFunction %void None %73 %76 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %18 - %77 = OpFunctionCall %v4uint %tint_count_leading_zeros %18 + %77 = OpFunctionCall %v4uint %tint_count_leading_zeros %63 OpStore %res %77 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.wgsl index 17d7078d77..2877eb6893 100644 --- a/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countLeadingZeros/f70103.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_f70103() { - var res : vec4 = countLeadingZeros(vec4()); + var res : vec4 = countLeadingZeros(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl index 00e4e39c02..c0da91c1cd 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<4, u32>) -> vec<4, u32> fn countOneBits_0d0e46() { - var res: vec4 = countOneBits(vec4()); + var res: vec4 = countOneBits(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.dxc.hlsl index 6f716c3d0b..800331e426 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0d0e46() { - uint4 res = countbits((0u).xxxx); + uint4 res = countbits((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.fxc.hlsl index 6f716c3d0b..800331e426 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0d0e46() { - uint4 res = countbits((0u).xxxx); + uint4 res = countbits((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.glsl index 092ed67447..85f302a948 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_0d0e46() { - uvec4 res = uvec4(bitCount(uvec4(0u))); + uvec4 res = uvec4(bitCount(uvec4(1u))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void countOneBits_0d0e46() { - uvec4 res = uvec4(bitCount(uvec4(0u))); + uvec4 res = uvec4(bitCount(uvec4(1u))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void countOneBits_0d0e46() { - uvec4 res = uvec4(bitCount(uvec4(0u))); + uvec4 res = uvec4(bitCount(uvec4(1u))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.msl b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.msl index b61ed001a2..05f5254685 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_0d0e46() { - uint4 res = popcount(uint4(0u)); + uint4 res = popcount(uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.spvasm index 12785a8bdd..09bb571913 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %16 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v4uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_0d0e46 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %16 - %13 = OpBitCount %v4uint %16 + %res = OpVariable %_ptr_Function_v4uint Function %20 + %13 = OpBitCount %v4uint %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %countOneBits_0d0e46 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %countOneBits_0d0e46 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %countOneBits_0d0e46 + %30 = OpLabel + %31 = OpFunctionCall %void %countOneBits_0d0e46 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %countOneBits_0d0e46 + %33 = OpLabel + %34 = OpFunctionCall %void %countOneBits_0d0e46 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.wgsl index d5c977e858..ce4168b207 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/0d0e46.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_0d0e46() { - var res : vec4 = countOneBits(vec4()); + var res : vec4 = countOneBits(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl index 5b64377894..ea0584d0e3 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<4, i32>) -> vec<4, i32> fn countOneBits_0f7980() { - var res: vec4 = countOneBits(vec4()); + var res: vec4 = countOneBits(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.dxc.hlsl index bd8fe9e0be..e66db7a2c4 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0f7980() { - int4 res = asint(countbits(asuint((0).xxxx))); + int4 res = asint(countbits(asuint((1).xxxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.fxc.hlsl index bd8fe9e0be..e66db7a2c4 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0f7980() { - int4 res = asint(countbits(asuint((0).xxxx))); + int4 res = asint(countbits(asuint((1).xxxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.glsl index 5ccbb6c01c..52a742ed1c 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_0f7980() { - ivec4 res = ivec4(bitCount(ivec4(0))); + ivec4 res = ivec4(bitCount(ivec4(1))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void countOneBits_0f7980() { - ivec4 res = ivec4(bitCount(ivec4(0))); + ivec4 res = ivec4(bitCount(ivec4(1))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void countOneBits_0f7980() { - ivec4 res = ivec4(bitCount(ivec4(0))); + ivec4 res = ivec4(bitCount(ivec4(1))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.msl b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.msl index 7f864ac50c..aedf298941 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_0f7980() { - int4 res = popcount(int4(0)); + int4 res = popcount(int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.spvasm index 77811f8682..a4617719a5 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %16 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v4int + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_0f7980 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %16 - %13 = OpBitCount %v4int %16 + %res = OpVariable %_ptr_Function_v4int Function %20 + %13 = OpBitCount %v4int %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %countOneBits_0f7980 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %countOneBits_0f7980 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %countOneBits_0f7980 + %30 = OpLabel + %31 = OpFunctionCall %void %countOneBits_0f7980 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %countOneBits_0f7980 + %33 = OpLabel + %34 = OpFunctionCall %void %countOneBits_0f7980 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.wgsl index 4e506ef8fc..5e2cb7a782 100644 --- a/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/0f7980.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_0f7980() { - var res : vec4 = countOneBits(vec4()); + var res : vec4 = countOneBits(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl index d493b7c11c..92d9a0e9e4 100644 --- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<3, i32>) -> vec<3, i32> fn countOneBits_65d2ae() { - var res: vec3 = countOneBits(vec3()); + var res: vec3 = countOneBits(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.dxc.hlsl index 769e38be7e..790ebc70bc 100644 --- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_65d2ae() { - int3 res = asint(countbits(asuint((0).xxx))); + int3 res = asint(countbits(asuint((1).xxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.fxc.hlsl index 769e38be7e..790ebc70bc 100644 --- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_65d2ae() { - int3 res = asint(countbits(asuint((0).xxx))); + int3 res = asint(countbits(asuint((1).xxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.glsl index 3ad83bd11c..811ee03298 100644 --- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_65d2ae() { - ivec3 res = ivec3(bitCount(ivec3(0))); + ivec3 res = ivec3(bitCount(ivec3(1))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void countOneBits_65d2ae() { - ivec3 res = ivec3(bitCount(ivec3(0))); + ivec3 res = ivec3(bitCount(ivec3(1))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void countOneBits_65d2ae() { - ivec3 res = ivec3(bitCount(ivec3(0))); + ivec3 res = ivec3(bitCount(ivec3(1))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.msl b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.msl index dcedaa50a1..c092cfc627 100644 --- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_65d2ae() { - int3 res = popcount(int3(0)); + int3 res = popcount(int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.spvasm index 8ee1c7a8af..0ff478ecae 100644 --- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %16 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v3int + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_65d2ae = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %16 - %13 = OpBitCount %v3int %16 + %res = OpVariable %_ptr_Function_v3int Function %20 + %13 = OpBitCount %v3int %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %countOneBits_65d2ae +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %countOneBits_65d2ae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %countOneBits_65d2ae + %30 = OpLabel + %31 = OpFunctionCall %void %countOneBits_65d2ae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %countOneBits_65d2ae + %33 = OpLabel + %34 = OpFunctionCall %void %countOneBits_65d2ae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.wgsl index 6cabccb85a..5de2da7d29 100644 --- a/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/65d2ae.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_65d2ae() { - var res : vec3 = countOneBits(vec3()); + var res : vec3 = countOneBits(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl index 60360d3aee..5b81562a31 100644 --- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<3, u32>) -> vec<3, u32> fn countOneBits_690cfc() { - var res: vec3 = countOneBits(vec3()); + var res: vec3 = countOneBits(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.dxc.hlsl index 987a6f20ee..2b15a93cab 100644 --- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_690cfc() { - uint3 res = countbits((0u).xxx); + uint3 res = countbits((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.fxc.hlsl index 987a6f20ee..2b15a93cab 100644 --- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_690cfc() { - uint3 res = countbits((0u).xxx); + uint3 res = countbits((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.glsl index 67b9273d7c..c3309dafa4 100644 --- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_690cfc() { - uvec3 res = uvec3(bitCount(uvec3(0u))); + uvec3 res = uvec3(bitCount(uvec3(1u))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void countOneBits_690cfc() { - uvec3 res = uvec3(bitCount(uvec3(0u))); + uvec3 res = uvec3(bitCount(uvec3(1u))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void countOneBits_690cfc() { - uvec3 res = uvec3(bitCount(uvec3(0u))); + uvec3 res = uvec3(bitCount(uvec3(1u))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.msl b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.msl index 4038a5010e..32a6ebba7e 100644 --- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_690cfc() { - uint3 res = popcount(uint3(0u)); + uint3 res = popcount(uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.spvasm index 258fc66f90..2fd3033ebb 100644 --- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %16 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v3uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_690cfc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %16 - %13 = OpBitCount %v3uint %16 + %res = OpVariable %_ptr_Function_v3uint Function %20 + %13 = OpBitCount %v3uint %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %countOneBits_690cfc +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %countOneBits_690cfc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %countOneBits_690cfc + %30 = OpLabel + %31 = OpFunctionCall %void %countOneBits_690cfc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %countOneBits_690cfc + %33 = OpLabel + %34 = OpFunctionCall %void %countOneBits_690cfc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.wgsl index 8347470061..79967b1e33 100644 --- a/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/690cfc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_690cfc() { - var res : vec3 = countOneBits(vec3()); + var res : vec3 = countOneBits(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl index 136829aaeb..a8799aec2b 100644 --- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<2, u32>) -> vec<2, u32> fn countOneBits_94fd81() { - var res: vec2 = countOneBits(vec2()); + var res: vec2 = countOneBits(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.dxc.hlsl index 055ea5b432..218f0f8295 100644 --- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_94fd81() { - uint2 res = countbits((0u).xx); + uint2 res = countbits((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.fxc.hlsl index 055ea5b432..218f0f8295 100644 --- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_94fd81() { - uint2 res = countbits((0u).xx); + uint2 res = countbits((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.glsl index 3ec504d82f..ed00b85e42 100644 --- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_94fd81() { - uvec2 res = uvec2(bitCount(uvec2(0u))); + uvec2 res = uvec2(bitCount(uvec2(1u))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void countOneBits_94fd81() { - uvec2 res = uvec2(bitCount(uvec2(0u))); + uvec2 res = uvec2(bitCount(uvec2(1u))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void countOneBits_94fd81() { - uvec2 res = uvec2(bitCount(uvec2(0u))); + uvec2 res = uvec2(bitCount(uvec2(1u))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.msl b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.msl index d9263d2c41..15740da01f 100644 --- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_94fd81() { - uint2 res = popcount(uint2(0u)); + uint2 res = popcount(uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.spvasm index 2ac577e0f9..7504893158 100644 --- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %16 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v2uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_94fd81 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %16 - %13 = OpBitCount %v2uint %16 + %res = OpVariable %_ptr_Function_v2uint Function %20 + %13 = OpBitCount %v2uint %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %countOneBits_94fd81 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %countOneBits_94fd81 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %countOneBits_94fd81 + %30 = OpLabel + %31 = OpFunctionCall %void %countOneBits_94fd81 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %countOneBits_94fd81 + %33 = OpLabel + %34 = OpFunctionCall %void %countOneBits_94fd81 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.wgsl index 51b9380856..d82e957b89 100644 --- a/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/94fd81.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_94fd81() { - var res : vec2 = countOneBits(vec2()); + var res : vec2 = countOneBits(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl index 983e4713b6..79e1a0af77 100644 --- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<2, i32>) -> vec<2, i32> fn countOneBits_af90e2() { - var res: vec2 = countOneBits(vec2()); + var res: vec2 = countOneBits(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.dxc.hlsl index 6c1a431a02..31d15d4e56 100644 --- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_af90e2() { - int2 res = asint(countbits(asuint((0).xx))); + int2 res = asint(countbits(asuint((1).xx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.fxc.hlsl index 6c1a431a02..31d15d4e56 100644 --- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_af90e2() { - int2 res = asint(countbits(asuint((0).xx))); + int2 res = asint(countbits(asuint((1).xx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.glsl index e76abcb8fc..c1509a80a4 100644 --- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_af90e2() { - ivec2 res = ivec2(bitCount(ivec2(0))); + ivec2 res = ivec2(bitCount(ivec2(1))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void countOneBits_af90e2() { - ivec2 res = ivec2(bitCount(ivec2(0))); + ivec2 res = ivec2(bitCount(ivec2(1))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void countOneBits_af90e2() { - ivec2 res = ivec2(bitCount(ivec2(0))); + ivec2 res = ivec2(bitCount(ivec2(1))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.msl b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.msl index 2bc7fb2e55..d4f525d3fc 100644 --- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_af90e2() { - int2 res = popcount(int2(0)); + int2 res = popcount(int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.spvasm index 88f59920bc..50566337db 100644 --- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %16 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v2int + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_af90e2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %16 - %13 = OpBitCount %v2int %16 + %res = OpVariable %_ptr_Function_v2int Function %20 + %13 = OpBitCount %v2int %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %countOneBits_af90e2 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %countOneBits_af90e2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %countOneBits_af90e2 + %30 = OpLabel + %31 = OpFunctionCall %void %countOneBits_af90e2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %countOneBits_af90e2 + %33 = OpLabel + %34 = OpFunctionCall %void %countOneBits_af90e2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.wgsl index f0c48d370c..6caee65d06 100644 --- a/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countOneBits/af90e2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_af90e2() { - var res : vec2 = countOneBits(vec2()); + var res : vec2 = countOneBits(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl index 94c3464d03..6355c59e34 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<2, u32>) -> vec<2, u32> fn countTrailingZeros_1ad138() { - var res: vec2 = countTrailingZeros(vec2()); + var res: vec2 = countTrailingZeros(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl index 41ea33276e..a61337c9c6 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_trailing_zeros(uint2 v) { } void countTrailingZeros_1ad138() { - uint2 res = tint_count_trailing_zeros((0u).xx); + uint2 res = tint_count_trailing_zeros((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl index 41ea33276e..a61337c9c6 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_trailing_zeros(uint2 v) { } void countTrailingZeros_1ad138() { - uint2 res = tint_count_trailing_zeros((0u).xx); + uint2 res = tint_count_trailing_zeros((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.glsl index b8b3bbc421..c6bd3d4719 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_count_trailing_zeros(uvec2 v) { } void countTrailingZeros_1ad138() { - uvec2 res = tint_count_trailing_zeros(uvec2(0u)); + uvec2 res = tint_count_trailing_zeros(uvec2(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec2 tint_count_trailing_zeros(uvec2 v) { } void countTrailingZeros_1ad138() { - uvec2 res = tint_count_trailing_zeros(uvec2(0u)); + uvec2 res = tint_count_trailing_zeros(uvec2(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec2 tint_count_trailing_zeros(uvec2 v) { } void countTrailingZeros_1ad138() { - uvec2 res = tint_count_trailing_zeros(uvec2(0u)); + uvec2 res = tint_count_trailing_zeros(uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.msl b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.msl index 878eb349af..527fe903a8 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_1ad138() { - uint2 res = ctz(uint2(0u)); + uint2 res = ctz(uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.spvasm index 76c89217ca..d2ea81d5a2 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.spvasm @@ -110,7 +110,7 @@ %countTrailingZeros_1ad138 = OpFunction %void None %76 %79 = OpLabel %res = OpVariable %_ptr_Function_v2uint Function %18 - %80 = OpFunctionCall %v2uint %tint_count_trailing_zeros %18 + %80 = OpFunctionCall %v2uint %tint_count_trailing_zeros %65 OpStore %res %80 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.wgsl index a6642f4f19..0f6d2b9310 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1ad138.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_1ad138() { - var res : vec2 = countTrailingZeros(vec2()); + var res : vec2 = countTrailingZeros(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl index 44fdeab283..d6a86e2c35 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<4, i32>) -> vec<4, i32> fn countTrailingZeros_1dc84a() { - var res: vec4 = countTrailingZeros(vec4()); + var res: vec4 = countTrailingZeros(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl index 4acdebb75d..2855d6d847 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_trailing_zeros(int4 v) { } void countTrailingZeros_1dc84a() { - int4 res = tint_count_trailing_zeros((0).xxxx); + int4 res = tint_count_trailing_zeros((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl index 4acdebb75d..2855d6d847 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_trailing_zeros(int4 v) { } void countTrailingZeros_1dc84a() { - int4 res = tint_count_trailing_zeros((0).xxxx); + int4 res = tint_count_trailing_zeros((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.glsl index eac4b405bb..004dfe3cea 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_count_trailing_zeros(ivec4 v) { } void countTrailingZeros_1dc84a() { - ivec4 res = tint_count_trailing_zeros(ivec4(0)); + ivec4 res = tint_count_trailing_zeros(ivec4(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec4 tint_count_trailing_zeros(ivec4 v) { } void countTrailingZeros_1dc84a() { - ivec4 res = tint_count_trailing_zeros(ivec4(0)); + ivec4 res = tint_count_trailing_zeros(ivec4(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec4 tint_count_trailing_zeros(ivec4 v) { } void countTrailingZeros_1dc84a() { - ivec4 res = tint_count_trailing_zeros(ivec4(0)); + ivec4 res = tint_count_trailing_zeros(ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.msl b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.msl index 29504f3340..216718b46b 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_1dc84a() { - int4 res = ctz(int4(0)); + int4 res = ctz(int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.spvasm index 2987af583d..85d0c58bb9 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 100 +; Bound: 102 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -60,9 +60,11 @@ %67 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %78 = OpTypeFunction %void - %83 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %84 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %86 = OpTypeFunction %v4float + %87 = OpConstantNull %v4int + %88 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_trailing_zeros = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -115,30 +117,30 @@ OpFunctionEnd %countTrailingZeros_1dc84a = OpFunction %void None %78 %81 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %83 - %82 = OpFunctionCall %v4int %tint_count_trailing_zeros %83 + %res = OpVariable %_ptr_Function_v4int Function %87 + %82 = OpFunctionCall %v4int %tint_count_trailing_zeros %84 OpStore %res %82 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %86 - %88 = OpLabel - %89 = OpFunctionCall %void %countTrailingZeros_1dc84a +%vertex_main_inner = OpFunction %v4float None %88 + %90 = OpLabel + %91 = OpFunctionCall %void %countTrailingZeros_1dc84a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %78 - %91 = OpLabel - %92 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %92 + %93 = OpLabel + %94 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %94 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %78 - %95 = OpLabel - %96 = OpFunctionCall %void %countTrailingZeros_1dc84a + %97 = OpLabel + %98 = OpFunctionCall %void %countTrailingZeros_1dc84a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %78 - %98 = OpLabel - %99 = OpFunctionCall %void %countTrailingZeros_1dc84a + %100 = OpLabel + %101 = OpFunctionCall %void %countTrailingZeros_1dc84a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.wgsl index 30c67410ce..2beaa556ab 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/1dc84a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_1dc84a() { - var res : vec4 = countTrailingZeros(vec4()); + var res : vec4 = countTrailingZeros(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl index 4c0db1c52a..f83fe14ef2 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<2, i32>) -> vec<2, i32> fn countTrailingZeros_327c37() { - var res: vec2 = countTrailingZeros(vec2()); + var res: vec2 = countTrailingZeros(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl index 55bb1c3cbf..a63a8463e7 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_trailing_zeros(int2 v) { } void countTrailingZeros_327c37() { - int2 res = tint_count_trailing_zeros((0).xx); + int2 res = tint_count_trailing_zeros((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl index 55bb1c3cbf..a63a8463e7 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_trailing_zeros(int2 v) { } void countTrailingZeros_327c37() { - int2 res = tint_count_trailing_zeros((0).xx); + int2 res = tint_count_trailing_zeros((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.glsl index f984ba03f7..b321de88c1 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_count_trailing_zeros(ivec2 v) { } void countTrailingZeros_327c37() { - ivec2 res = tint_count_trailing_zeros(ivec2(0)); + ivec2 res = tint_count_trailing_zeros(ivec2(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec2 tint_count_trailing_zeros(ivec2 v) { } void countTrailingZeros_327c37() { - ivec2 res = tint_count_trailing_zeros(ivec2(0)); + ivec2 res = tint_count_trailing_zeros(ivec2(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec2 tint_count_trailing_zeros(ivec2 v) { } void countTrailingZeros_327c37() { - ivec2 res = tint_count_trailing_zeros(ivec2(0)); + ivec2 res = tint_count_trailing_zeros(ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.msl b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.msl index dbce4a98f8..c0e1ed6d75 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_327c37() { - int2 res = ctz(int2(0)); + int2 res = ctz(int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.spvasm index 46be26fb92..456ba27494 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 100 +; Bound: 102 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -60,9 +60,11 @@ %67 = OpConstantComposite %v2uint %uint_1 %uint_1 %void = OpTypeVoid %78 = OpTypeFunction %void - %83 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %84 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %86 = OpTypeFunction %v4float + %87 = OpConstantNull %v2int + %88 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_trailing_zeros = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -115,30 +117,30 @@ OpFunctionEnd %countTrailingZeros_327c37 = OpFunction %void None %78 %81 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %83 - %82 = OpFunctionCall %v2int %tint_count_trailing_zeros %83 + %res = OpVariable %_ptr_Function_v2int Function %87 + %82 = OpFunctionCall %v2int %tint_count_trailing_zeros %84 OpStore %res %82 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %86 - %88 = OpLabel - %89 = OpFunctionCall %void %countTrailingZeros_327c37 +%vertex_main_inner = OpFunction %v4float None %88 + %90 = OpLabel + %91 = OpFunctionCall %void %countTrailingZeros_327c37 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %78 - %91 = OpLabel - %92 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %92 + %93 = OpLabel + %94 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %94 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %78 - %95 = OpLabel - %96 = OpFunctionCall %void %countTrailingZeros_327c37 + %97 = OpLabel + %98 = OpFunctionCall %void %countTrailingZeros_327c37 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %78 - %98 = OpLabel - %99 = OpFunctionCall %void %countTrailingZeros_327c37 + %100 = OpLabel + %101 = OpFunctionCall %void %countTrailingZeros_327c37 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.wgsl index 852e01c23c..4ae6604c86 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/327c37.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_327c37() { - var res : vec2 = countTrailingZeros(vec2()); + var res : vec2 = countTrailingZeros(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl index 5076bef6ed..5f61bee1a7 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<3, u32>) -> vec<3, u32> fn countTrailingZeros_8ed26f() { - var res: vec3 = countTrailingZeros(vec3()); + var res: vec3 = countTrailingZeros(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl index b1c882cf1c..39dbf0af8c 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_trailing_zeros(uint3 v) { } void countTrailingZeros_8ed26f() { - uint3 res = tint_count_trailing_zeros((0u).xxx); + uint3 res = tint_count_trailing_zeros((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl index b1c882cf1c..39dbf0af8c 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_trailing_zeros(uint3 v) { } void countTrailingZeros_8ed26f() { - uint3 res = tint_count_trailing_zeros((0u).xxx); + uint3 res = tint_count_trailing_zeros((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.glsl index a6f056ef51..083c857d11 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_count_trailing_zeros(uvec3 v) { } void countTrailingZeros_8ed26f() { - uvec3 res = tint_count_trailing_zeros(uvec3(0u)); + uvec3 res = tint_count_trailing_zeros(uvec3(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec3 tint_count_trailing_zeros(uvec3 v) { } void countTrailingZeros_8ed26f() { - uvec3 res = tint_count_trailing_zeros(uvec3(0u)); + uvec3 res = tint_count_trailing_zeros(uvec3(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec3 tint_count_trailing_zeros(uvec3 v) { } void countTrailingZeros_8ed26f() { - uvec3 res = tint_count_trailing_zeros(uvec3(0u)); + uvec3 res = tint_count_trailing_zeros(uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.msl b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.msl index 14b7ddcd34..4b8e6a8e16 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_8ed26f() { - uint3 res = ctz(uint3(0u)); + uint3 res = ctz(uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.spvasm index ccb9e6f9a8..55a38aa329 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.spvasm @@ -110,7 +110,7 @@ %countTrailingZeros_8ed26f = OpFunction %void None %76 %79 = OpLabel %res = OpVariable %_ptr_Function_v3uint Function %18 - %80 = OpFunctionCall %v3uint %tint_count_trailing_zeros %18 + %80 = OpFunctionCall %v3uint %tint_count_trailing_zeros %65 OpStore %res %80 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.wgsl index a308abf326..dbb40bbaa1 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/8ed26f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_8ed26f() { - var res : vec3 = countTrailingZeros(vec3()); + var res : vec3 = countTrailingZeros(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl index 78706ca2e7..88092c6dc7 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<3, i32>) -> vec<3, i32> fn countTrailingZeros_acfacb() { - var res: vec3 = countTrailingZeros(vec3()); + var res: vec3 = countTrailingZeros(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl index 4518caff7d..6cf84fef8f 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_trailing_zeros(int3 v) { } void countTrailingZeros_acfacb() { - int3 res = tint_count_trailing_zeros((0).xxx); + int3 res = tint_count_trailing_zeros((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl index 4518caff7d..6cf84fef8f 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_trailing_zeros(int3 v) { } void countTrailingZeros_acfacb() { - int3 res = tint_count_trailing_zeros((0).xxx); + int3 res = tint_count_trailing_zeros((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.glsl index 411c89f97b..6a7019880e 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_count_trailing_zeros(ivec3 v) { } void countTrailingZeros_acfacb() { - ivec3 res = tint_count_trailing_zeros(ivec3(0)); + ivec3 res = tint_count_trailing_zeros(ivec3(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec3 tint_count_trailing_zeros(ivec3 v) { } void countTrailingZeros_acfacb() { - ivec3 res = tint_count_trailing_zeros(ivec3(0)); + ivec3 res = tint_count_trailing_zeros(ivec3(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec3 tint_count_trailing_zeros(ivec3 v) { } void countTrailingZeros_acfacb() { - ivec3 res = tint_count_trailing_zeros(ivec3(0)); + ivec3 res = tint_count_trailing_zeros(ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.msl b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.msl index 619895df4f..9b8028bca9 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_acfacb() { - int3 res = ctz(int3(0)); + int3 res = ctz(int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.spvasm index 9c2dda8b09..32f7b958a0 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 100 +; Bound: 102 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -60,9 +60,11 @@ %67 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %78 = OpTypeFunction %void - %83 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %84 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %86 = OpTypeFunction %v4float + %87 = OpConstantNull %v3int + %88 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_trailing_zeros = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -115,30 +117,30 @@ OpFunctionEnd %countTrailingZeros_acfacb = OpFunction %void None %78 %81 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %83 - %82 = OpFunctionCall %v3int %tint_count_trailing_zeros %83 + %res = OpVariable %_ptr_Function_v3int Function %87 + %82 = OpFunctionCall %v3int %tint_count_trailing_zeros %84 OpStore %res %82 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %86 - %88 = OpLabel - %89 = OpFunctionCall %void %countTrailingZeros_acfacb +%vertex_main_inner = OpFunction %v4float None %88 + %90 = OpLabel + %91 = OpFunctionCall %void %countTrailingZeros_acfacb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %78 - %91 = OpLabel - %92 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %92 + %93 = OpLabel + %94 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %94 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %78 - %95 = OpLabel - %96 = OpFunctionCall %void %countTrailingZeros_acfacb + %97 = OpLabel + %98 = OpFunctionCall %void %countTrailingZeros_acfacb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %78 - %98 = OpLabel - %99 = OpFunctionCall %void %countTrailingZeros_acfacb + %100 = OpLabel + %101 = OpFunctionCall %void %countTrailingZeros_acfacb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.wgsl index d7c6363827..147489f895 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/acfacb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_acfacb() { - var res : vec3 = countTrailingZeros(vec3()); + var res : vec3 = countTrailingZeros(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl index 1c576e1341..af0505cbb2 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<4, u32>) -> vec<4, u32> fn countTrailingZeros_d2b4a0() { - var res: vec4 = countTrailingZeros(vec4()); + var res: vec4 = countTrailingZeros(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl index aed23ef744..8504bb8fe8 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_trailing_zeros(uint4 v) { } void countTrailingZeros_d2b4a0() { - uint4 res = tint_count_trailing_zeros((0u).xxxx); + uint4 res = tint_count_trailing_zeros((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl index aed23ef744..8504bb8fe8 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_trailing_zeros(uint4 v) { } void countTrailingZeros_d2b4a0() { - uint4 res = tint_count_trailing_zeros((0u).xxxx); + uint4 res = tint_count_trailing_zeros((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.glsl index 805b7d67ea..12fcaa31cf 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_count_trailing_zeros(uvec4 v) { } void countTrailingZeros_d2b4a0() { - uvec4 res = tint_count_trailing_zeros(uvec4(0u)); + uvec4 res = tint_count_trailing_zeros(uvec4(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec4 tint_count_trailing_zeros(uvec4 v) { } void countTrailingZeros_d2b4a0() { - uvec4 res = tint_count_trailing_zeros(uvec4(0u)); + uvec4 res = tint_count_trailing_zeros(uvec4(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec4 tint_count_trailing_zeros(uvec4 v) { } void countTrailingZeros_d2b4a0() { - uvec4 res = tint_count_trailing_zeros(uvec4(0u)); + uvec4 res = tint_count_trailing_zeros(uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.msl b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.msl index b042a36657..79d1f25e29 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_d2b4a0() { - uint4 res = ctz(uint4(0u)); + uint4 res = ctz(uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.spvasm index 21b14de6ed..74bcb410fd 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.spvasm @@ -110,7 +110,7 @@ %countTrailingZeros_d2b4a0 = OpFunction %void None %76 %79 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %18 - %80 = OpFunctionCall %v4uint %tint_count_trailing_zeros %18 + %80 = OpFunctionCall %v4uint %tint_count_trailing_zeros %65 OpStore %res %80 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.wgsl index d49ffcb82b..7f6c8d0801 100644 --- a/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/countTrailingZeros/d2b4a0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_d2b4a0() { - var res : vec4 = countTrailingZeros(vec4()); + var res : vec4 = countTrailingZeros(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl index 586a019ed2..b50af018ce 100644 --- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl +++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl @@ -25,7 +25,7 @@ // fn degrees(vec<4, f32>) -> vec<4, f32> fn degrees_0d170c() { - var res: vec4 = degrees(vec4()); + var res: vec4 = degrees(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.dxc.hlsl index 70e9a6f3d1..2cd2296e5c 100644 --- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_degrees(float4 param_0) { } void degrees_0d170c() { - float4 res = tint_degrees((0.0f).xxxx); + float4 res = tint_degrees((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.fxc.hlsl index 70e9a6f3d1..2cd2296e5c 100644 --- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_degrees(float4 param_0) { } void degrees_0d170c() { - float4 res = tint_degrees((0.0f).xxxx); + float4 res = tint_degrees((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.glsl index 12590e83e1..79b5dc9fa5 100644 --- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec4 tint_degrees(vec4 param_0) { void degrees_0d170c() { - vec4 res = tint_degrees(vec4(0.0f)); + vec4 res = tint_degrees(vec4(1.0f)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ vec4 tint_degrees(vec4 param_0) { void degrees_0d170c() { - vec4 res = tint_degrees(vec4(0.0f)); + vec4 res = tint_degrees(vec4(1.0f)); } void fragment_main() { @@ -50,7 +50,7 @@ vec4 tint_degrees(vec4 param_0) { void degrees_0d170c() { - vec4 res = tint_degrees(vec4(0.0f)); + vec4 res = tint_degrees(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.msl index 213adf069b..8dc825c600 100644 --- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.msl @@ -7,7 +7,7 @@ float4 tint_degrees(float4 param_0) { } void degrees_0d170c() { - float4 res = tint_degrees(float4(0.0f)); + float4 res = tint_degrees(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.spvasm index f59e539322..738ca27315 100644 --- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %degrees_0d170c = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Degrees %5 + %13 = OpExtInst %v4float %14 Degrees %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %degrees_0d170c +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %degrees_0d170c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %degrees_0d170c + %27 = OpLabel + %28 = OpFunctionCall %void %degrees_0d170c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %degrees_0d170c + %30 = OpLabel + %31 = OpFunctionCall %void %degrees_0d170c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.wgsl index 0a9cf40d0b..c387999a30 100644 --- a/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/0d170c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_0d170c() { - var res : vec4 = degrees(vec4()); + var res : vec4 = degrees(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl index 69bba35bbb..45ce4651e8 100644 --- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl +++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl @@ -25,7 +25,7 @@ // fn degrees(vec<2, f32>) -> vec<2, f32> fn degrees_1ad5df() { - var res: vec2 = degrees(vec2()); + var res: vec2 = degrees(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.dxc.hlsl index 334d00091c..f8315be982 100644 --- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_degrees(float2 param_0) { } void degrees_1ad5df() { - float2 res = tint_degrees((0.0f).xx); + float2 res = tint_degrees((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.fxc.hlsl index 334d00091c..f8315be982 100644 --- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_degrees(float2 param_0) { } void degrees_1ad5df() { - float2 res = tint_degrees((0.0f).xx); + float2 res = tint_degrees((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.glsl index bf6f83831a..6369ae31e7 100644 --- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec2 tint_degrees(vec2 param_0) { void degrees_1ad5df() { - vec2 res = tint_degrees(vec2(0.0f)); + vec2 res = tint_degrees(vec2(1.0f)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ vec2 tint_degrees(vec2 param_0) { void degrees_1ad5df() { - vec2 res = tint_degrees(vec2(0.0f)); + vec2 res = tint_degrees(vec2(1.0f)); } void fragment_main() { @@ -50,7 +50,7 @@ vec2 tint_degrees(vec2 param_0) { void degrees_1ad5df() { - vec2 res = tint_degrees(vec2(0.0f)); + vec2 res = tint_degrees(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.msl index ca1cc3754a..e46d2ff6e5 100644 --- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.msl @@ -7,7 +7,7 @@ float2 tint_degrees(float2 param_0) { } void degrees_1ad5df() { - float2 res = tint_degrees(float2(0.0f)); + float2 res = tint_degrees(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.spvasm index 132b8ea59f..573f04d66c 100644 --- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %degrees_1ad5df = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Degrees %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Degrees %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %degrees_1ad5df +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %degrees_1ad5df OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %degrees_1ad5df + %29 = OpLabel + %30 = OpFunctionCall %void %degrees_1ad5df OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %degrees_1ad5df + %32 = OpLabel + %33 = OpFunctionCall %void %degrees_1ad5df OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.wgsl index 6a028eb242..518eca43f7 100644 --- a/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/1ad5df.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_1ad5df() { - var res : vec2 = degrees(vec2()); + var res : vec2 = degrees(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl b/test/tint/builtins/gen/literal/degrees/2af623.wgsl index ab5ff4fe4a..f1717fa168 100644 --- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl +++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl @@ -25,7 +25,7 @@ // fn degrees(vec<3, f32>) -> vec<3, f32> fn degrees_2af623() { - var res: vec3 = degrees(vec3()); + var res: vec3 = degrees(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.dxc.hlsl index f64923af6f..292fa3a209 100644 --- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_degrees(float3 param_0) { } void degrees_2af623() { - float3 res = tint_degrees((0.0f).xxx); + float3 res = tint_degrees((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.fxc.hlsl index f64923af6f..292fa3a209 100644 --- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_degrees(float3 param_0) { } void degrees_2af623() { - float3 res = tint_degrees((0.0f).xxx); + float3 res = tint_degrees((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.glsl index bcc2318841..dabb728bb3 100644 --- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec3 tint_degrees(vec3 param_0) { void degrees_2af623() { - vec3 res = tint_degrees(vec3(0.0f)); + vec3 res = tint_degrees(vec3(1.0f)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ vec3 tint_degrees(vec3 param_0) { void degrees_2af623() { - vec3 res = tint_degrees(vec3(0.0f)); + vec3 res = tint_degrees(vec3(1.0f)); } void fragment_main() { @@ -50,7 +50,7 @@ vec3 tint_degrees(vec3 param_0) { void degrees_2af623() { - vec3 res = tint_degrees(vec3(0.0f)); + vec3 res = tint_degrees(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.msl index 5bfc5ff6b3..4874bbb432 100644 --- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.msl @@ -7,7 +7,7 @@ float3 tint_degrees(float3 param_0) { } void degrees_2af623() { - float3 res = tint_degrees(float3(0.0f)); + float3 res = tint_degrees(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.spvasm index b9a9995af5..160a383197 100644 --- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %degrees_2af623 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Degrees %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Degrees %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %degrees_2af623 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %degrees_2af623 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %degrees_2af623 + %29 = OpLabel + %30 = OpFunctionCall %void %degrees_2af623 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %degrees_2af623 + %32 = OpLabel + %33 = OpFunctionCall %void %degrees_2af623 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.wgsl index 8044f002d6..b26cdbfcd1 100644 --- a/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/2af623.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_2af623() { - var res : vec3 = degrees(vec3()); + var res : vec3 = degrees(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/51f705.wgsl b/test/tint/builtins/gen/literal/degrees/51f705.wgsl index dc1bf3b406..a8fcae74d9 100644 --- a/test/tint/builtins/gen/literal/degrees/51f705.wgsl +++ b/test/tint/builtins/gen/literal/degrees/51f705.wgsl @@ -25,7 +25,7 @@ // fn degrees(f32) -> f32 fn degrees_51f705() { - var res: f32 = degrees(1.0); + var res: f32 = degrees(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.wgsl index af56927c08..a1f9f7f2b4 100644 --- a/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/degrees/51f705.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_51f705() { - var res : f32 = degrees(1.0); + var res : f32 = degrees(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl index f3c7931752..70e79b8fee 100644 --- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl +++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl @@ -25,7 +25,7 @@ // fn determinant(mat<3, 3, f32>) -> f32 fn determinant_2b62ba() { - var res: f32 = determinant(mat3x3()); + var res: f32 = determinant(mat3x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.dxc.hlsl index a40e5cd145..c9482d7f19 100644 --- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_2b62ba() { - float res = determinant(float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx)); + float res = determinant(float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.fxc.hlsl index a40e5cd145..c9482d7f19 100644 --- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void determinant_2b62ba() { - float res = determinant(float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx)); + float res = determinant(float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.glsl index 748013d666..d801fb8be7 100644 --- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void determinant_2b62ba() { - float res = determinant(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))); + float res = determinant(mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void determinant_2b62ba() { - float res = determinant(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))); + float res = determinant(mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void determinant_2b62ba() { - float res = determinant(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))); + float res = determinant(mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.msl index 50972bfca8..725abfc8cc 100644 --- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_2b62ba() { - float res = determinant(float3x3(float3(0.0f), float3(0.0f), float3(0.0f))); + float res = determinant(float3x3(float3(1.0f), float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.spvasm index 142bf18930..9673dd3c0d 100644 --- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,37 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 - %17 = OpConstantNull %mat3v3float -%_ptr_Function_float = OpTypePointer Function %float - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %19 = OpConstantComposite %mat3v3float %18 %18 %18 +%_ptr_Function_float = OpTypePointer Function %float + %22 = OpTypeFunction %v4float %determinant_2b62ba = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Determinant %17 + %13 = OpExtInst %float %14 Determinant %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %determinant_2b62ba +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %determinant_2b62ba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %determinant_2b62ba + %30 = OpLabel + %31 = OpFunctionCall %void %determinant_2b62ba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %determinant_2b62ba + %33 = OpLabel + %34 = OpFunctionCall %void %determinant_2b62ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.wgsl index f18858fc08..fc1d5c688a 100644 --- a/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/determinant/2b62ba.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn determinant_2b62ba() { - var res : f32 = determinant(mat3x3()); + var res : f32 = determinant(mat3x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl index 0f65ef3fe1..21ce22765c 100644 --- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl +++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl @@ -25,7 +25,7 @@ // fn determinant(mat<4, 4, f32>) -> f32 fn determinant_a0a87c() { - var res: f32 = determinant(mat4x4()); + var res: f32 = determinant(mat4x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.dxc.hlsl index ece355fcfb..0857fc602e 100644 --- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_a0a87c() { - float res = determinant(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)); + float res = determinant(float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.fxc.hlsl index ece355fcfb..0857fc602e 100644 --- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void determinant_a0a87c() { - float res = determinant(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)); + float res = determinant(float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.glsl index 92c1ca4af0..3d93e51b2c 100644 --- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void determinant_a0a87c() { - float res = determinant(mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); + float res = determinant(mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void determinant_a0a87c() { - float res = determinant(mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); + float res = determinant(mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void determinant_a0a87c() { - float res = determinant(mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); + float res = determinant(mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.msl index 65ce75a8e6..9ee1b47ef2 100644 --- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_a0a87c() { - float res = determinant(float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f))); + float res = determinant(float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.spvasm index 8662898be0..57d1c71295 100644 --- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %mat4v4float = OpTypeMatrix %v4float 4 - %16 = OpConstantNull %mat4v4float -%_ptr_Function_float = OpTypePointer Function %float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %18 = OpConstantComposite %mat4v4float %17 %17 %17 %17 +%_ptr_Function_float = OpTypePointer Function %float + %21 = OpTypeFunction %v4float %determinant_a0a87c = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Determinant %16 + %13 = OpExtInst %float %14 Determinant %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %determinant_a0a87c +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %determinant_a0a87c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %determinant_a0a87c + %29 = OpLabel + %30 = OpFunctionCall %void %determinant_a0a87c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %determinant_a0a87c + %32 = OpLabel + %33 = OpFunctionCall %void %determinant_a0a87c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.wgsl index ed1f785810..ddd8ee9c58 100644 --- a/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/determinant/a0a87c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn determinant_a0a87c() { - var res : f32 = determinant(mat4x4()); + var res : f32 = determinant(mat4x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl b/test/tint/builtins/gen/literal/determinant/e19305.wgsl index 99c571c757..3521bd3b9d 100644 --- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl +++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl @@ -25,7 +25,7 @@ // fn determinant(mat<2, 2, f32>) -> f32 fn determinant_e19305() { - var res: f32 = determinant(mat2x2()); + var res: f32 = determinant(mat2x2(1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.dxc.hlsl index 6824b0d146..0c372a3a13 100644 --- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_e19305() { - float res = determinant(float2x2((0.0f).xx, (0.0f).xx)); + float res = determinant(float2x2((1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.fxc.hlsl index 6824b0d146..0c372a3a13 100644 --- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void determinant_e19305() { - float res = determinant(float2x2((0.0f).xx, (0.0f).xx)); + float res = determinant(float2x2((1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.glsl index 4e63bbf7a6..cccb7b6faf 100644 --- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void determinant_e19305() { - float res = determinant(mat2(vec2(0.0f), vec2(0.0f))); + float res = determinant(mat2(vec2(1.0f), vec2(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void determinant_e19305() { - float res = determinant(mat2(vec2(0.0f), vec2(0.0f))); + float res = determinant(mat2(vec2(1.0f), vec2(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void determinant_e19305() { - float res = determinant(mat2(vec2(0.0f), vec2(0.0f))); + float res = determinant(mat2(vec2(1.0f), vec2(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.msl index 58b03f5904..47b8bed88e 100644 --- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_e19305() { - float res = determinant(float2x2(float2(0.0f), float2(0.0f))); + float res = determinant(float2x2(float2(1.0f), float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.spvasm index 5efdade524..441f89e453 100644 --- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,37 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 - %17 = OpConstantNull %mat2v2float -%_ptr_Function_float = OpTypePointer Function %float - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 + %19 = OpConstantComposite %mat2v2float %18 %18 +%_ptr_Function_float = OpTypePointer Function %float + %22 = OpTypeFunction %v4float %determinant_e19305 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Determinant %17 + %13 = OpExtInst %float %14 Determinant %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %determinant_e19305 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %determinant_e19305 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %determinant_e19305 + %30 = OpLabel + %31 = OpFunctionCall %void %determinant_e19305 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %determinant_e19305 + %33 = OpLabel + %34 = OpFunctionCall %void %determinant_e19305 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.wgsl index 23c1aa0874..ae1eead09b 100644 --- a/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/determinant/e19305.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn determinant_e19305() { - var res : f32 = determinant(mat2x2()); + var res : f32 = determinant(mat2x2(1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl b/test/tint/builtins/gen/literal/distance/0657d4.wgsl index aae2064272..c3d3fc77d1 100644 --- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl +++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl @@ -25,7 +25,7 @@ // fn distance(vec<3, f32>, vec<3, f32>) -> f32 fn distance_0657d4() { - var res: f32 = distance(vec3(), vec3()); + var res: f32 = distance(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.dxc.hlsl index b33531d883..192c04661d 100644 --- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void distance_0657d4() { - float res = distance((0.0f).xxx, (0.0f).xxx); + float res = distance((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.fxc.hlsl index b33531d883..192c04661d 100644 --- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void distance_0657d4() { - float res = distance((0.0f).xxx, (0.0f).xxx); + float res = distance((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.glsl index 93947205bd..4792eb818c 100644 --- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void distance_0657d4() { - float res = distance(vec3(0.0f), vec3(0.0f)); + float res = distance(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void distance_0657d4() { - float res = distance(vec3(0.0f), vec3(0.0f)); + float res = distance(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void distance_0657d4() { - float res = distance(vec3(0.0f), vec3(0.0f)); + float res = distance(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.msl index 22adbc9545..b61c9fbed5 100644 --- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void distance_0657d4() { - float res = distance(float3(0.0f), float3(0.0f)); + float res = distance(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.spvasm index 433da6a460..6b0a28ae20 100644 --- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.spvasm @@ -32,26 +32,26 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_float = OpTypePointer Function %float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %20 = OpTypeFunction %v4float %distance_0657d4 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Distance %16 %16 + %13 = OpExtInst %float %14 Distance %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %distance_0657d4 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %distance_0657d4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.wgsl index ca065c7d1f..2cec35098f 100644 --- a/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/0657d4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn distance_0657d4() { - var res : f32 = distance(vec3(), vec3()); + var res : f32 = distance(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl b/test/tint/builtins/gen/literal/distance/9646ea.wgsl index 3770c60e85..4a559f3cde 100644 --- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl +++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl @@ -25,7 +25,7 @@ // fn distance(vec<4, f32>, vec<4, f32>) -> f32 fn distance_9646ea() { - var res: f32 = distance(vec4(), vec4()); + var res: f32 = distance(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.dxc.hlsl index b1e093276e..629f3ab707 100644 --- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void distance_9646ea() { - float res = distance((0.0f).xxxx, (0.0f).xxxx); + float res = distance((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.fxc.hlsl index b1e093276e..629f3ab707 100644 --- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void distance_9646ea() { - float res = distance((0.0f).xxxx, (0.0f).xxxx); + float res = distance((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.glsl index 02ce2b851d..ee04153ea0 100644 --- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void distance_9646ea() { - float res = distance(vec4(0.0f), vec4(0.0f)); + float res = distance(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void distance_9646ea() { - float res = distance(vec4(0.0f), vec4(0.0f)); + float res = distance(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void distance_9646ea() { - float res = distance(vec4(0.0f), vec4(0.0f)); + float res = distance(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.msl index 1c9effcda4..0d90ab3102 100644 --- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void distance_9646ea() { - float res = distance(float4(0.0f), float4(0.0f)); + float res = distance(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.spvasm index 18840fee80..2956c308af 100644 --- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_float = OpTypePointer Function %float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %19 = OpTypeFunction %v4float %distance_9646ea = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Distance %5 %5 + %13 = OpExtInst %float %14 Distance %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %distance_9646ea +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %distance_9646ea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %distance_9646ea + %27 = OpLabel + %28 = OpFunctionCall %void %distance_9646ea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %distance_9646ea + %30 = OpLabel + %31 = OpFunctionCall %void %distance_9646ea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.wgsl index db90e03081..4a3d9dae03 100644 --- a/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/9646ea.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn distance_9646ea() { - var res : f32 = distance(vec4(), vec4()); + var res : f32 = distance(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl b/test/tint/builtins/gen/literal/distance/aa4055.wgsl index ead354446c..fd8b894f08 100644 --- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl +++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl @@ -25,7 +25,7 @@ // fn distance(vec<2, f32>, vec<2, f32>) -> f32 fn distance_aa4055() { - var res: f32 = distance(vec2(), vec2()); + var res: f32 = distance(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.dxc.hlsl index cf9fc17b4b..948efd08f9 100644 --- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void distance_aa4055() { - float res = distance((0.0f).xx, (0.0f).xx); + float res = distance((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.fxc.hlsl index cf9fc17b4b..948efd08f9 100644 --- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void distance_aa4055() { - float res = distance((0.0f).xx, (0.0f).xx); + float res = distance((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.glsl index d155adb058..9a2c485c2b 100644 --- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void distance_aa4055() { - float res = distance(vec2(0.0f), vec2(0.0f)); + float res = distance(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void distance_aa4055() { - float res = distance(vec2(0.0f), vec2(0.0f)); + float res = distance(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void distance_aa4055() { - float res = distance(vec2(0.0f), vec2(0.0f)); + float res = distance(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.msl index 9303f3a7a9..990edc41cd 100644 --- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void distance_aa4055() { - float res = distance(float2(0.0f), float2(0.0f)); + float res = distance(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.spvasm index c5976c6d04..f1cda7e177 100644 --- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.spvasm @@ -32,26 +32,26 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_float = OpTypePointer Function %float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %20 = OpTypeFunction %v4float %distance_aa4055 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Distance %16 %16 + %13 = OpExtInst %float %14 Distance %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %distance_aa4055 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %distance_aa4055 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.wgsl index 79c35899d5..bfec354da3 100644 --- a/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/aa4055.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn distance_aa4055() { - var res : f32 = distance(vec2(), vec2()); + var res : f32 = distance(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/cfed73.wgsl b/test/tint/builtins/gen/literal/distance/cfed73.wgsl index 5a13c21502..caec4f19c0 100644 --- a/test/tint/builtins/gen/literal/distance/cfed73.wgsl +++ b/test/tint/builtins/gen/literal/distance/cfed73.wgsl @@ -25,7 +25,7 @@ // fn distance(f32, f32) -> f32 fn distance_cfed73() { - var res: f32 = distance(1.0, 1.0); + var res: f32 = distance(1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.wgsl index 482fc28db9..4cf21ef495 100644 --- a/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/distance/cfed73.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn distance_cfed73() { - var res : f32 = distance(1.0, 1.0); + var res : f32 = distance(1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl b/test/tint/builtins/gen/literal/dot/0c577b.wgsl index a735d41819..a44adccbe6 100644 --- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl +++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<4, f32>, vec<4, f32>) -> f32 fn dot_0c577b() { - var res: f32 = dot(vec4(), vec4()); + var res: f32 = dot(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.dxc.hlsl index 6bc8df3fec..ddbdbd46ec 100644 --- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_0c577b() { - float res = dot((0.0f).xxxx, (0.0f).xxxx); + float res = dot((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.fxc.hlsl index 6bc8df3fec..ddbdbd46ec 100644 --- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_0c577b() { - float res = dot((0.0f).xxxx, (0.0f).xxxx); + float res = dot((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.glsl index b37f9a3908..bc4518f455 100644 --- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void dot_0c577b() { - float res = dot(vec4(0.0f), vec4(0.0f)); + float res = dot(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void dot_0c577b() { - float res = dot(vec4(0.0f), vec4(0.0f)); + float res = dot(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void dot_0c577b() { - float res = dot(vec4(0.0f), vec4(0.0f)); + float res = dot(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.msl index 179265a2bb..f4501c00b8 100644 --- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dot_0c577b() { - float res = dot(float4(0.0f), float4(0.0f)); + float res = dot(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.spvasm index 9723182e8d..b64095ef36 100644 --- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -30,35 +30,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_float = OpTypePointer Function %float - %16 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %18 = OpTypeFunction %v4float %dot_0c577b = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpDot %float %5 %5 + %13 = OpDot %float %15 %15 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %16 - %18 = OpLabel - %19 = OpFunctionCall %void %dot_0c577b +%vertex_main_inner = OpFunction %v4float None %18 + %20 = OpLabel + %21 = OpFunctionCall %void %dot_0c577b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %21 = OpLabel - %22 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %22 + %23 = OpLabel + %24 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %24 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %void %dot_0c577b + %26 = OpLabel + %27 = OpFunctionCall %void %dot_0c577b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %dot_0c577b + %29 = OpLabel + %30 = OpFunctionCall %void %dot_0c577b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.wgsl index ab76066305..f3729326e3 100644 --- a/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/0c577b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_0c577b() { - var res : f32 = dot(vec4(), vec4()); + var res : f32 = dot(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl b/test/tint/builtins/gen/literal/dot/7548a0.wgsl index ffa3fdf96c..b7133a6676 100644 --- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl +++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<3, u32>, vec<3, u32>) -> u32 fn dot_7548a0() { - var res: u32 = dot(vec3(), vec3()); + var res: u32 = dot(vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.dxc.hlsl index 324b559b32..cd0f853b12 100644 --- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_7548a0() { - uint res = dot((0u).xxx, (0u).xxx); + uint res = dot((1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.fxc.hlsl index 324b559b32..cd0f853b12 100644 --- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_7548a0() { - uint res = dot((0u).xxx, (0u).xxx); + uint res = dot((1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.glsl index c3420c6bd7..6b184f8f5d 100644 --- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.glsl @@ -5,7 +5,7 @@ uint tint_int_dot(uvec3 a, uvec3 b) { } void dot_7548a0() { - uint res = tint_int_dot(uvec3(0u), uvec3(0u)); + uint res = tint_int_dot(uvec3(1u), uvec3(1u)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ uint tint_int_dot(uvec3 a, uvec3 b) { } void dot_7548a0() { - uint res = tint_int_dot(uvec3(0u), uvec3(0u)); + uint res = tint_int_dot(uvec3(1u), uvec3(1u)); } void fragment_main() { @@ -47,7 +47,7 @@ uint tint_int_dot(uvec3 a, uvec3 b) { } void dot_7548a0() { - uint res = tint_int_dot(uvec3(0u), uvec3(0u)); + uint res = tint_int_dot(uvec3(1u), uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.msl index 5972b3ff52..47aee0ff3c 100644 --- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.msl @@ -7,7 +7,7 @@ T tint_dot3(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; } void dot_7548a0() { - uint res = tint_dot3(uint3(0u), uint3(0u)); + uint res = tint_dot3(uint3(1u), uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.spvasm index 7d10efb8f1..2043848f40 100644 --- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,47 +32,48 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %16 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint - %30 = OpTypeFunction %v4float + %30 = OpConstantNull %uint + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_7548a0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %29 - %17 = OpCompositeExtract %uint %16 0 - %18 = OpCompositeExtract %uint %16 0 - %19 = OpIMul %uint %17 %18 - %20 = OpCompositeExtract %uint %16 1 - %21 = OpCompositeExtract %uint %16 1 - %22 = OpIMul %uint %20 %21 - %23 = OpIAdd %uint %19 %22 - %24 = OpCompositeExtract %uint %16 2 - %25 = OpCompositeExtract %uint %16 2 - %26 = OpIMul %uint %24 %25 - %13 = OpIAdd %uint %23 %26 + %res = OpVariable %_ptr_Function_uint Function %30 + %18 = OpCompositeExtract %uint %17 0 + %19 = OpCompositeExtract %uint %17 0 + %20 = OpIMul %uint %18 %19 + %21 = OpCompositeExtract %uint %17 1 + %22 = OpCompositeExtract %uint %17 1 + %23 = OpIMul %uint %21 %22 + %24 = OpIAdd %uint %20 %23 + %25 = OpCompositeExtract %uint %17 2 + %26 = OpCompositeExtract %uint %17 2 + %27 = OpIMul %uint %25 %26 + %13 = OpIAdd %uint %24 %27 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %dot_7548a0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %dot_7548a0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %dot_7548a0 + %40 = OpLabel + %41 = OpFunctionCall %void %dot_7548a0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %dot_7548a0 + %43 = OpLabel + %44 = OpFunctionCall %void %dot_7548a0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.wgsl index 9e56b7b949..61d149656b 100644 --- a/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/7548a0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_7548a0() { - var res : u32 = dot(vec3(), vec3()); + var res : u32 = dot(vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl b/test/tint/builtins/gen/literal/dot/883f0e.wgsl index c15829e53c..0e92ce864c 100644 --- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl +++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<2, f32>, vec<2, f32>) -> f32 fn dot_883f0e() { - var res: f32 = dot(vec2(), vec2()); + var res: f32 = dot(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.dxc.hlsl index 508f9a4dc3..4e4cbb5ed8 100644 --- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_883f0e() { - float res = dot((0.0f).xx, (0.0f).xx); + float res = dot((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.fxc.hlsl index 508f9a4dc3..4e4cbb5ed8 100644 --- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_883f0e() { - float res = dot((0.0f).xx, (0.0f).xx); + float res = dot((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.glsl index c5011b8650..6ab33ae703 100644 --- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void dot_883f0e() { - float res = dot(vec2(0.0f), vec2(0.0f)); + float res = dot(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void dot_883f0e() { - float res = dot(vec2(0.0f), vec2(0.0f)); + float res = dot(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void dot_883f0e() { - float res = dot(vec2(0.0f), vec2(0.0f)); + float res = dot(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.msl index 554b7deea4..44510c4a7c 100644 --- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dot_883f0e() { - float res = dot(float2(0.0f), float2(0.0f)); + float res = dot(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.spvasm index 921e8919b3..e1cf73c227 100644 --- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.spvasm @@ -31,26 +31,26 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %15 = OpConstantNull %v2float -%_ptr_Function_float = OpTypePointer Function %float - %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %19 = OpTypeFunction %v4float %dot_883f0e = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpDot %float %15 %15 + %13 = OpDot %float %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %dot_883f0e +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %dot_883f0e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.wgsl index b1b745cd78..4d6a4bd1ca 100644 --- a/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/883f0e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_883f0e() { - var res : f32 = dot(vec2(), vec2()); + var res : f32 = dot(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl index 8d7999b0f5..94465b34fc 100644 --- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl +++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<2, u32>, vec<2, u32>) -> u32 fn dot_97c7ee() { - var res: u32 = dot(vec2(), vec2()); + var res: u32 = dot(vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.dxc.hlsl index d98dc0ca3f..9237756a2e 100644 --- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_97c7ee() { - uint res = dot((0u).xx, (0u).xx); + uint res = dot((1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.fxc.hlsl index d98dc0ca3f..9237756a2e 100644 --- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_97c7ee() { - uint res = dot((0u).xx, (0u).xx); + uint res = dot((1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.glsl index 45bb902595..c61da39599 100644 --- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.glsl @@ -5,7 +5,7 @@ uint tint_int_dot(uvec2 a, uvec2 b) { } void dot_97c7ee() { - uint res = tint_int_dot(uvec2(0u), uvec2(0u)); + uint res = tint_int_dot(uvec2(1u), uvec2(1u)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ uint tint_int_dot(uvec2 a, uvec2 b) { } void dot_97c7ee() { - uint res = tint_int_dot(uvec2(0u), uvec2(0u)); + uint res = tint_int_dot(uvec2(1u), uvec2(1u)); } void fragment_main() { @@ -47,7 +47,7 @@ uint tint_int_dot(uvec2 a, uvec2 b) { } void dot_97c7ee() { - uint res = tint_int_dot(uvec2(0u), uvec2(0u)); + uint res = tint_int_dot(uvec2(1u), uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.msl index bf89820776..6565bb85a4 100644 --- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.msl @@ -7,7 +7,7 @@ T tint_dot2(vec a, vec b) { return a[0]*b[0] + a[1]*b[1]; } void dot_97c7ee() { - uint res = tint_dot2(uint2(0u), uint2(0u)); + uint res = tint_dot2(uint2(1u), uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.spvasm index 6cc49f91c2..079b868089 100644 --- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,43 +32,44 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %16 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint - %26 = OpTypeFunction %v4float + %26 = OpConstantNull %uint + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_97c7ee = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %25 - %17 = OpCompositeExtract %uint %16 0 - %18 = OpCompositeExtract %uint %16 0 - %19 = OpIMul %uint %17 %18 - %20 = OpCompositeExtract %uint %16 1 - %21 = OpCompositeExtract %uint %16 1 - %22 = OpIMul %uint %20 %21 - %13 = OpIAdd %uint %19 %22 + %res = OpVariable %_ptr_Function_uint Function %26 + %18 = OpCompositeExtract %uint %17 0 + %19 = OpCompositeExtract %uint %17 0 + %20 = OpIMul %uint %18 %19 + %21 = OpCompositeExtract %uint %17 1 + %22 = OpCompositeExtract %uint %17 1 + %23 = OpIMul %uint %21 %22 + %13 = OpIAdd %uint %20 %23 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %dot_97c7ee +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %dot_97c7ee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %dot_97c7ee + %36 = OpLabel + %37 = OpFunctionCall %void %dot_97c7ee OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %dot_97c7ee + %39 = OpLabel + %40 = OpFunctionCall %void %dot_97c7ee OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.wgsl index 73607bdb11..9c2729b35e 100644 --- a/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/97c7ee.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_97c7ee() { - var res : u32 = dot(vec2(), vec2()); + var res : u32 = dot(vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl b/test/tint/builtins/gen/literal/dot/ba4246.wgsl index 9a99619ce4..4e6c547200 100644 --- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl +++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<3, f32>, vec<3, f32>) -> f32 fn dot_ba4246() { - var res: f32 = dot(vec3(), vec3()); + var res: f32 = dot(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.dxc.hlsl index e5a4ddca10..6a9325cd1b 100644 --- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_ba4246() { - float res = dot((0.0f).xxx, (0.0f).xxx); + float res = dot((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.fxc.hlsl index e5a4ddca10..6a9325cd1b 100644 --- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_ba4246() { - float res = dot((0.0f).xxx, (0.0f).xxx); + float res = dot((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.glsl index 9854f92795..101b193471 100644 --- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void dot_ba4246() { - float res = dot(vec3(0.0f), vec3(0.0f)); + float res = dot(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void dot_ba4246() { - float res = dot(vec3(0.0f), vec3(0.0f)); + float res = dot(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void dot_ba4246() { - float res = dot(vec3(0.0f), vec3(0.0f)); + float res = dot(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.msl index 972cd2ed5a..be8c5ad201 100644 --- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dot_ba4246() { - float res = dot(float3(0.0f), float3(0.0f)); + float res = dot(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.spvasm index 326501a658..3ab148083f 100644 --- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.spvasm @@ -31,26 +31,26 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %15 = OpConstantNull %v3float -%_ptr_Function_float = OpTypePointer Function %float - %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %19 = OpTypeFunction %v4float %dot_ba4246 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpDot %float %15 %15 + %13 = OpDot %float %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %dot_ba4246 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %dot_ba4246 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.wgsl index a0d779cb1b..8e8e00f0ae 100644 --- a/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/ba4246.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_ba4246() { - var res : f32 = dot(vec3(), vec3()); + var res : f32 = dot(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl b/test/tint/builtins/gen/literal/dot/e994c7.wgsl index 72196eee9c..709f120e33 100644 --- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl +++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<4, u32>, vec<4, u32>) -> u32 fn dot_e994c7() { - var res: u32 = dot(vec4(), vec4()); + var res: u32 = dot(vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.dxc.hlsl index bee04d1904..65c2053d80 100644 --- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_e994c7() { - uint res = dot((0u).xxxx, (0u).xxxx); + uint res = dot((1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.fxc.hlsl index bee04d1904..65c2053d80 100644 --- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_e994c7() { - uint res = dot((0u).xxxx, (0u).xxxx); + uint res = dot((1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.glsl index 68262d7099..c430e32a7e 100644 --- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.glsl @@ -5,7 +5,7 @@ uint tint_int_dot(uvec4 a, uvec4 b) { } void dot_e994c7() { - uint res = tint_int_dot(uvec4(0u), uvec4(0u)); + uint res = tint_int_dot(uvec4(1u), uvec4(1u)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ uint tint_int_dot(uvec4 a, uvec4 b) { } void dot_e994c7() { - uint res = tint_int_dot(uvec4(0u), uvec4(0u)); + uint res = tint_int_dot(uvec4(1u), uvec4(1u)); } void fragment_main() { @@ -47,7 +47,7 @@ uint tint_int_dot(uvec4 a, uvec4 b) { } void dot_e994c7() { - uint res = tint_int_dot(uvec4(0u), uvec4(0u)); + uint res = tint_int_dot(uvec4(1u), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.msl index 306ca8c9e3..1939acd798 100644 --- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.msl @@ -7,7 +7,7 @@ T tint_dot4(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]; } void dot_e994c7() { - uint res = tint_dot4(uint4(0u), uint4(0u)); + uint res = tint_dot4(uint4(1u), uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.spvasm index d852f9945f..8a993d8681 100644 --- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,51 +32,52 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %16 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_uint = OpTypePointer Function %uint - %33 = OpConstantNull %uint - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %uint + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_e994c7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %33 - %17 = OpCompositeExtract %uint %16 0 - %18 = OpCompositeExtract %uint %16 0 - %19 = OpIMul %uint %17 %18 - %20 = OpCompositeExtract %uint %16 1 - %21 = OpCompositeExtract %uint %16 1 - %22 = OpIMul %uint %20 %21 - %23 = OpIAdd %uint %19 %22 - %24 = OpCompositeExtract %uint %16 2 - %25 = OpCompositeExtract %uint %16 2 - %26 = OpIMul %uint %24 %25 - %27 = OpIAdd %uint %23 %26 - %28 = OpCompositeExtract %uint %16 3 - %29 = OpCompositeExtract %uint %16 3 - %30 = OpIMul %uint %28 %29 - %13 = OpIAdd %uint %27 %30 + %res = OpVariable %_ptr_Function_uint Function %34 + %18 = OpCompositeExtract %uint %17 0 + %19 = OpCompositeExtract %uint %17 0 + %20 = OpIMul %uint %18 %19 + %21 = OpCompositeExtract %uint %17 1 + %22 = OpCompositeExtract %uint %17 1 + %23 = OpIMul %uint %21 %22 + %24 = OpIAdd %uint %20 %23 + %25 = OpCompositeExtract %uint %17 2 + %26 = OpCompositeExtract %uint %17 2 + %27 = OpIMul %uint %25 %26 + %28 = OpIAdd %uint %24 %27 + %29 = OpCompositeExtract %uint %17 3 + %30 = OpCompositeExtract %uint %17 3 + %31 = OpIMul %uint %29 %30 + %13 = OpIAdd %uint %28 %31 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %dot_e994c7 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %dot_e994c7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %dot_e994c7 + %44 = OpLabel + %45 = OpFunctionCall %void %dot_e994c7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %46 = OpLabel - %47 = OpFunctionCall %void %dot_e994c7 + %47 = OpLabel + %48 = OpFunctionCall %void %dot_e994c7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.wgsl index fd7c439834..f1a91b6185 100644 --- a/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/e994c7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_e994c7() { - var res : u32 = dot(vec4(), vec4()); + var res : u32 = dot(vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl index 16a4704b67..0684ced25a 100644 --- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl +++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<4, i32>, vec<4, i32>) -> i32 fn dot_ef6b1d() { - var res: i32 = dot(vec4(), vec4()); + var res: i32 = dot(vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.dxc.hlsl index 2dc8f5f837..570b419f4a 100644 --- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_ef6b1d() { - int res = dot((0).xxxx, (0).xxxx); + int res = dot((1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.fxc.hlsl index 2dc8f5f837..570b419f4a 100644 --- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_ef6b1d() { - int res = dot((0).xxxx, (0).xxxx); + int res = dot((1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.glsl index 0594e64c7f..a6ec4b0080 100644 --- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.glsl @@ -5,7 +5,7 @@ int tint_int_dot(ivec4 a, ivec4 b) { } void dot_ef6b1d() { - int res = tint_int_dot(ivec4(0), ivec4(0)); + int res = tint_int_dot(ivec4(1), ivec4(1)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ int tint_int_dot(ivec4 a, ivec4 b) { } void dot_ef6b1d() { - int res = tint_int_dot(ivec4(0), ivec4(0)); + int res = tint_int_dot(ivec4(1), ivec4(1)); } void fragment_main() { @@ -47,7 +47,7 @@ int tint_int_dot(ivec4 a, ivec4 b) { } void dot_ef6b1d() { - int res = tint_int_dot(ivec4(0), ivec4(0)); + int res = tint_int_dot(ivec4(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.msl index d89e2ffdc1..e5e2f0777c 100644 --- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.msl @@ -7,7 +7,7 @@ T tint_dot4(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]; } void dot_ef6b1d() { - int res = tint_dot4(int4(0), int4(0)); + int res = tint_dot4(int4(1), int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.spvasm index db22cad2df..3d8c3fb78c 100644 --- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,51 +32,52 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %16 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_int = OpTypePointer Function %int - %33 = OpConstantNull %int - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %int + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_ef6b1d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_int Function %33 - %17 = OpCompositeExtract %int %16 0 - %18 = OpCompositeExtract %int %16 0 - %19 = OpIMul %int %17 %18 - %20 = OpCompositeExtract %int %16 1 - %21 = OpCompositeExtract %int %16 1 - %22 = OpIMul %int %20 %21 - %23 = OpIAdd %int %19 %22 - %24 = OpCompositeExtract %int %16 2 - %25 = OpCompositeExtract %int %16 2 - %26 = OpIMul %int %24 %25 - %27 = OpIAdd %int %23 %26 - %28 = OpCompositeExtract %int %16 3 - %29 = OpCompositeExtract %int %16 3 - %30 = OpIMul %int %28 %29 - %13 = OpIAdd %int %27 %30 + %res = OpVariable %_ptr_Function_int Function %34 + %18 = OpCompositeExtract %int %17 0 + %19 = OpCompositeExtract %int %17 0 + %20 = OpIMul %int %18 %19 + %21 = OpCompositeExtract %int %17 1 + %22 = OpCompositeExtract %int %17 1 + %23 = OpIMul %int %21 %22 + %24 = OpIAdd %int %20 %23 + %25 = OpCompositeExtract %int %17 2 + %26 = OpCompositeExtract %int %17 2 + %27 = OpIMul %int %25 %26 + %28 = OpIAdd %int %24 %27 + %29 = OpCompositeExtract %int %17 3 + %30 = OpCompositeExtract %int %17 3 + %31 = OpIMul %int %29 %30 + %13 = OpIAdd %int %28 %31 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %dot_ef6b1d +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %dot_ef6b1d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %dot_ef6b1d + %44 = OpLabel + %45 = OpFunctionCall %void %dot_ef6b1d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %46 = OpLabel - %47 = OpFunctionCall %void %dot_ef6b1d + %47 = OpLabel + %48 = OpFunctionCall %void %dot_ef6b1d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.wgsl index c1dda84cf4..6f8f382031 100644 --- a/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/ef6b1d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_ef6b1d() { - var res : i32 = dot(vec4(), vec4()); + var res : i32 = dot(vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl b/test/tint/builtins/gen/literal/dot/f1312c.wgsl index 49e5c62771..d5753dac53 100644 --- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl +++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<3, i32>, vec<3, i32>) -> i32 fn dot_f1312c() { - var res: i32 = dot(vec3(), vec3()); + var res: i32 = dot(vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.dxc.hlsl index b9157e7944..b3fde1321e 100644 --- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_f1312c() { - int res = dot((0).xxx, (0).xxx); + int res = dot((1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.fxc.hlsl index b9157e7944..b3fde1321e 100644 --- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_f1312c() { - int res = dot((0).xxx, (0).xxx); + int res = dot((1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.glsl index 02985640ea..907adba6f9 100644 --- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.glsl @@ -5,7 +5,7 @@ int tint_int_dot(ivec3 a, ivec3 b) { } void dot_f1312c() { - int res = tint_int_dot(ivec3(0), ivec3(0)); + int res = tint_int_dot(ivec3(1), ivec3(1)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ int tint_int_dot(ivec3 a, ivec3 b) { } void dot_f1312c() { - int res = tint_int_dot(ivec3(0), ivec3(0)); + int res = tint_int_dot(ivec3(1), ivec3(1)); } void fragment_main() { @@ -47,7 +47,7 @@ int tint_int_dot(ivec3 a, ivec3 b) { } void dot_f1312c() { - int res = tint_int_dot(ivec3(0), ivec3(0)); + int res = tint_int_dot(ivec3(1), ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.msl index a4a95aeda5..5de6c94d43 100644 --- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.msl @@ -7,7 +7,7 @@ T tint_dot3(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; } void dot_f1312c() { - int res = tint_dot3(int3(0), int3(0)); + int res = tint_dot3(int3(1), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.spvasm index 45222d1ff8..121718d184 100644 --- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,47 +32,48 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %16 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int - %30 = OpTypeFunction %v4float + %30 = OpConstantNull %int + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_f1312c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_int Function %29 - %17 = OpCompositeExtract %int %16 0 - %18 = OpCompositeExtract %int %16 0 - %19 = OpIMul %int %17 %18 - %20 = OpCompositeExtract %int %16 1 - %21 = OpCompositeExtract %int %16 1 - %22 = OpIMul %int %20 %21 - %23 = OpIAdd %int %19 %22 - %24 = OpCompositeExtract %int %16 2 - %25 = OpCompositeExtract %int %16 2 - %26 = OpIMul %int %24 %25 - %13 = OpIAdd %int %23 %26 + %res = OpVariable %_ptr_Function_int Function %30 + %18 = OpCompositeExtract %int %17 0 + %19 = OpCompositeExtract %int %17 0 + %20 = OpIMul %int %18 %19 + %21 = OpCompositeExtract %int %17 1 + %22 = OpCompositeExtract %int %17 1 + %23 = OpIMul %int %21 %22 + %24 = OpIAdd %int %20 %23 + %25 = OpCompositeExtract %int %17 2 + %26 = OpCompositeExtract %int %17 2 + %27 = OpIMul %int %25 %26 + %13 = OpIAdd %int %24 %27 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %dot_f1312c +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %dot_f1312c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %dot_f1312c + %40 = OpLabel + %41 = OpFunctionCall %void %dot_f1312c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %dot_f1312c + %43 = OpLabel + %44 = OpFunctionCall %void %dot_f1312c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.wgsl index 7d9778eb0f..0550c5503c 100644 --- a/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/f1312c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_f1312c() { - var res : i32 = dot(vec3(), vec3()); + var res : i32 = dot(vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl index 8a256abd33..fe29564a55 100644 --- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl +++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl @@ -25,7 +25,7 @@ // fn dot(vec<2, i32>, vec<2, i32>) -> i32 fn dot_fc5f7c() { - var res: i32 = dot(vec2(), vec2()); + var res: i32 = dot(vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.dxc.hlsl index 92c44d6c35..8df1600626 100644 --- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dot_fc5f7c() { - int res = dot((0).xx, (0).xx); + int res = dot((1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.fxc.hlsl index 92c44d6c35..8df1600626 100644 --- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dot_fc5f7c() { - int res = dot((0).xx, (0).xx); + int res = dot((1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.glsl index 696f8d723a..9801dc592c 100644 --- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.glsl @@ -5,7 +5,7 @@ int tint_int_dot(ivec2 a, ivec2 b) { } void dot_fc5f7c() { - int res = tint_int_dot(ivec2(0), ivec2(0)); + int res = tint_int_dot(ivec2(1), ivec2(1)); } vec4 vertex_main() { @@ -29,7 +29,7 @@ int tint_int_dot(ivec2 a, ivec2 b) { } void dot_fc5f7c() { - int res = tint_int_dot(ivec2(0), ivec2(0)); + int res = tint_int_dot(ivec2(1), ivec2(1)); } void fragment_main() { @@ -47,7 +47,7 @@ int tint_int_dot(ivec2 a, ivec2 b) { } void dot_fc5f7c() { - int res = tint_int_dot(ivec2(0), ivec2(0)); + int res = tint_int_dot(ivec2(1), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.msl index 7659b6221d..6fbcb2ba11 100644 --- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.msl @@ -7,7 +7,7 @@ T tint_dot2(vec a, vec b) { return a[0]*b[0] + a[1]*b[1]; } void dot_fc5f7c() { - int res = tint_dot2(int2(0), int2(0)); + int res = tint_dot2(int2(1), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.spvasm index 6f05cef306..ea9acb45f5 100644 --- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,43 +32,44 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %16 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int - %26 = OpTypeFunction %v4float + %26 = OpConstantNull %int + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_fc5f7c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_int Function %25 - %17 = OpCompositeExtract %int %16 0 - %18 = OpCompositeExtract %int %16 0 - %19 = OpIMul %int %17 %18 - %20 = OpCompositeExtract %int %16 1 - %21 = OpCompositeExtract %int %16 1 - %22 = OpIMul %int %20 %21 - %13 = OpIAdd %int %19 %22 + %res = OpVariable %_ptr_Function_int Function %26 + %18 = OpCompositeExtract %int %17 0 + %19 = OpCompositeExtract %int %17 0 + %20 = OpIMul %int %18 %19 + %21 = OpCompositeExtract %int %17 1 + %22 = OpCompositeExtract %int %17 1 + %23 = OpIMul %int %21 %22 + %13 = OpIAdd %int %20 %23 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %dot_fc5f7c +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %dot_fc5f7c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %dot_fc5f7c + %36 = OpLabel + %37 = OpFunctionCall %void %dot_fc5f7c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %dot_fc5f7c + %39 = OpLabel + %40 = OpFunctionCall %void %dot_fc5f7c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.wgsl index 472b368d60..d1dd491ff6 100644 --- a/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dot/fc5f7c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dot_fc5f7c() { - var res : i32 = dot(vec2(), vec2()); + var res : i32 = dot(vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl index faf72f48a0..6edac39633 100644 --- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl @@ -25,7 +25,7 @@ // fn dpdx(vec<3, f32>) -> vec<3, f32> fn dpdx_0763f7() { - var res: vec3 = dpdx(vec3()); + var res: vec3 = dpdx(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.dxc.hlsl index a9470fb750..006f0ad5c3 100644 --- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdx_0763f7() { - float3 res = ddx((0.0f).xxx); + float3 res = ddx((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.fxc.hlsl index a9470fb750..006f0ad5c3 100644 --- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdx_0763f7() { - float3 res = ddx((0.0f).xxx); + float3 res = ddx((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.glsl index 41d238f028..13b51c3068 100644 --- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdx_0763f7() { - vec3 res = dFdx(vec3(0.0f)); + vec3 res = dFdx(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.msl index 017a499564..bb7c03a82a 100644 --- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdx_0763f7() { - float3 res = dfdx(float3(0.0f)); + float3 res = dfdx(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.spvasm index 4a1bd28b90..4aa28b4e4c 100644 --- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %dpdx_0763f7 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpDPdx %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpDPdx %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdx_0763f7 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdx_0763f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.wgsl index 8e119a58f6..01ce49fed2 100644 --- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_0763f7() { - var res : vec3 = dpdx(vec3()); + var res : vec3 = dpdx(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl index 86324e0768..06daa3bbc4 100644 --- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl @@ -25,7 +25,7 @@ // fn dpdx(vec<2, f32>) -> vec<2, f32> fn dpdx_99edb1() { - var res: vec2 = dpdx(vec2()); + var res: vec2 = dpdx(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.dxc.hlsl index 798e539c42..329f5be609 100644 --- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdx_99edb1() { - float2 res = ddx((0.0f).xx); + float2 res = ddx((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.fxc.hlsl index 798e539c42..329f5be609 100644 --- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdx_99edb1() { - float2 res = ddx((0.0f).xx); + float2 res = ddx((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.glsl index fd45bd82a4..54f5625d32 100644 --- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdx_99edb1() { - vec2 res = dFdx(vec2(0.0f)); + vec2 res = dFdx(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.msl index 258ec624b6..a7fe265145 100644 --- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdx_99edb1() { - float2 res = dfdx(float2(0.0f)); + float2 res = dfdx(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.spvasm index 7499b26422..0925757029 100644 --- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %dpdx_99edb1 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpDPdx %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpDPdx %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdx_99edb1 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdx_99edb1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.wgsl index b10e05e9d9..c04b9d5d63 100644 --- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_99edb1() { - var res : vec2 = dpdx(vec2()); + var res : vec2 = dpdx(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl index c55be8a470..3bcee1cd6a 100644 --- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl @@ -25,7 +25,7 @@ // fn dpdx(vec<4, f32>) -> vec<4, f32> fn dpdx_c487fa() { - var res: vec4 = dpdx(vec4()); + var res: vec4 = dpdx(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.dxc.hlsl index be71b6428c..5fe5a49560 100644 --- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdx_c487fa() { - float4 res = ddx((0.0f).xxxx); + float4 res = ddx((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.fxc.hlsl index be71b6428c..5fe5a49560 100644 --- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdx_c487fa() { - float4 res = ddx((0.0f).xxxx); + float4 res = ddx((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.glsl index 98a8bd0051..2f904628f2 100644 --- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdx_c487fa() { - vec4 res = dFdx(vec4(0.0f)); + vec4 res = dFdx(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.msl index 8071b345bf..3b79c397e0 100644 --- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdx_c487fa() { - float4 res = dfdx(float4(0.0f)); + float4 res = dfdx(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.spvasm index 3065b31241..e13bd9ebab 100644 --- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %dpdx_c487fa = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpDPdx %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpDPdx %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdx_c487fa + %14 = OpLabel + %15 = OpFunctionCall %void %dpdx_c487fa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.wgsl index a289889c5c..535c9f9b95 100644 --- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_c487fa() { - var res : vec4 = dpdx(vec4()); + var res : vec4 = dpdx(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl index 815eadc1b2..aba411548b 100644 --- a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl @@ -25,7 +25,7 @@ // fn dpdx(f32) -> f32 fn dpdx_e263de() { - var res: f32 = dpdx(1.0); + var res: f32 = dpdx(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.wgsl index 55b3525a7f..50afb2d1fa 100644 --- a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_e263de() { - var res : f32 = dpdx(1.0); + var res : f32 = dpdx(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl index d27e0bc11b..8648191dc4 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(f32) -> f32 fn dpdxCoarse_029152() { - var res: f32 = dpdxCoarse(1.0); + var res: f32 = dpdxCoarse(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.wgsl index 5a98eb8860..b9c3d00971 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_029152() { - var res : f32 = dpdxCoarse(1.0); + var res : f32 = dpdxCoarse(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl index 5bc2899b39..867c5125e9 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(vec<2, f32>) -> vec<2, f32> fn dpdxCoarse_9581cf() { - var res: vec2 = dpdxCoarse(vec2()); + var res: vec2 = dpdxCoarse(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl index 7a1615c5dc..90068fd1a5 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_9581cf() { - float2 res = ddx_coarse((0.0f).xx); + float2 res = ddx_coarse((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl index 7a1615c5dc..90068fd1a5 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_9581cf() { - float2 res = ddx_coarse((0.0f).xx); + float2 res = ddx_coarse((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.glsl index a8cd3ea75b..3edfdc459a 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxCoarse_9581cf() { - vec2 res = dFdx(vec2(0.0f)); + vec2 res = dFdx(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.msl index 364dd6b20d..ee68af836b 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxCoarse_9581cf() { - float2 res = dfdx(float2(0.0f)); + float2 res = dfdx(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.spvasm index 8113530178..e04bfea6d7 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %dpdxCoarse_9581cf = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpDPdxCoarse %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpDPdxCoarse %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdxCoarse_9581cf + %14 = OpLabel + %15 = OpFunctionCall %void %dpdxCoarse_9581cf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.wgsl index 068a7ba370..ab423ce21d 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_9581cf() { - var res : vec2 = dpdxCoarse(vec2()); + var res : vec2 = dpdxCoarse(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl index 032b5fd147..35b13db9b8 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(vec<4, f32>) -> vec<4, f32> fn dpdxCoarse_c28641() { - var res: vec4 = dpdxCoarse(vec4()); + var res: vec4 = dpdxCoarse(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl index 8a4c814aac..b58e7504e5 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_c28641() { - float4 res = ddx_coarse((0.0f).xxxx); + float4 res = ddx_coarse((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl index 8a4c814aac..b58e7504e5 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_c28641() { - float4 res = ddx_coarse((0.0f).xxxx); + float4 res = ddx_coarse((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.glsl index 47f54a4d40..d872d9ce2c 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxCoarse_c28641() { - vec4 res = dFdx(vec4(0.0f)); + vec4 res = dFdx(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.msl index bd2038c451..06a682558a 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxCoarse_c28641() { - float4 res = dfdx(float4(0.0f)); + float4 res = dfdx(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.spvasm index fbf633711a..9881a3302b 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %dpdxCoarse_c28641 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpDPdxCoarse %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpDPdxCoarse %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdxCoarse_c28641 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdxCoarse_c28641 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.wgsl index b2aa9ae5bb..73c918ef3d 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_c28641() { - var res : vec4 = dpdxCoarse(vec4()); + var res : vec4 = dpdxCoarse(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl index f792bea604..8cef1ac3c5 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(vec<3, f32>) -> vec<3, f32> fn dpdxCoarse_f64d7b() { - var res: vec3 = dpdxCoarse(vec3()); + var res: vec3 = dpdxCoarse(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl index a0a1d0373a..ac7bdfa276 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_f64d7b() { - float3 res = ddx_coarse((0.0f).xxx); + float3 res = ddx_coarse((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl index a0a1d0373a..ac7bdfa276 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_f64d7b() { - float3 res = ddx_coarse((0.0f).xxx); + float3 res = ddx_coarse((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.glsl index 5f96f8b8dd..7226ff36fa 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxCoarse_f64d7b() { - vec3 res = dFdx(vec3(0.0f)); + vec3 res = dFdx(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.msl index 8e524c5789..873a04fe55 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxCoarse_f64d7b() { - float3 res = dfdx(float3(0.0f)); + float3 res = dfdx(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.spvasm index 86b062848d..9929a2d0c4 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %dpdxCoarse_f64d7b = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpDPdxCoarse %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpDPdxCoarse %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdxCoarse_f64d7b + %14 = OpLabel + %15 = OpFunctionCall %void %dpdxCoarse_f64d7b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.wgsl index ae0ecba12c..dd55954234 100644 --- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_f64d7b() { - var res : vec3 = dpdxCoarse(vec3()); + var res : vec3 = dpdxCoarse(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl index 5d406de9b7..ccce54346e 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(vec<4, f32>) -> vec<4, f32> fn dpdxFine_8c5069() { - var res: vec4 = dpdxFine(vec4()); + var res: vec4 = dpdxFine(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.dxc.hlsl index 8904de8b0c..0fd9cbd2b9 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_8c5069() { - float4 res = ddx_fine((0.0f).xxxx); + float4 res = ddx_fine((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.fxc.hlsl index 8904de8b0c..0fd9cbd2b9 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_8c5069() { - float4 res = ddx_fine((0.0f).xxxx); + float4 res = ddx_fine((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.glsl index ef312f167b..642c5c9a6f 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxFine_8c5069() { - vec4 res = dFdx(vec4(0.0f)); + vec4 res = dFdx(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.msl index 4b24b81d03..8976e5a309 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxFine_8c5069() { - float4 res = dfdx(float4(0.0f)); + float4 res = dfdx(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.spvasm index 318a5cef2a..0539ee96a7 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %dpdxFine_8c5069 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpDPdxFine %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpDPdxFine %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdxFine_8c5069 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdxFine_8c5069 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.wgsl index 926635d70f..68ac49bbc2 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_8c5069() { - var res : vec4 = dpdxFine(vec4()); + var res : vec4 = dpdxFine(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl index b7212d9d6a..fd415a27ad 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(vec<2, f32>) -> vec<2, f32> fn dpdxFine_9631de() { - var res: vec2 = dpdxFine(vec2()); + var res: vec2 = dpdxFine(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.dxc.hlsl index e6f149b5ba..0cbd83cd10 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_9631de() { - float2 res = ddx_fine((0.0f).xx); + float2 res = ddx_fine((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.fxc.hlsl index e6f149b5ba..0cbd83cd10 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_9631de() { - float2 res = ddx_fine((0.0f).xx); + float2 res = ddx_fine((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.glsl index 262d045673..6e00045800 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxFine_9631de() { - vec2 res = dFdx(vec2(0.0f)); + vec2 res = dFdx(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.msl index c5c465cb58..c2c63db5f5 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxFine_9631de() { - float2 res = dfdx(float2(0.0f)); + float2 res = dfdx(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.spvasm index f015eb4e4c..fe6f1cd736 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %dpdxFine_9631de = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpDPdxFine %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpDPdxFine %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdxFine_9631de + %14 = OpLabel + %15 = OpFunctionCall %void %dpdxFine_9631de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.wgsl index d358417e12..cafb38223d 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_9631de() { - var res : vec2 = dpdxFine(vec2()); + var res : vec2 = dpdxFine(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl index 36381e46e4..65c65c872a 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(f32) -> f32 fn dpdxFine_f401a2() { - var res: f32 = dpdxFine(1.0); + var res: f32 = dpdxFine(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.wgsl index 5a3cd8ac06..03e57e92a1 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_f401a2() { - var res : f32 = dpdxFine(1.0); + var res : f32 = dpdxFine(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl index 4dc23ecd3e..507df99927 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(vec<3, f32>) -> vec<3, f32> fn dpdxFine_f92fb6() { - var res: vec3 = dpdxFine(vec3()); + var res: vec3 = dpdxFine(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl index 2c026f700b..8629bb24b2 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_f92fb6() { - float3 res = ddx_fine((0.0f).xxx); + float3 res = ddx_fine((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl index 2c026f700b..8629bb24b2 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_f92fb6() { - float3 res = ddx_fine((0.0f).xxx); + float3 res = ddx_fine((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.glsl index 6344b7b33b..a3783792e0 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxFine_f92fb6() { - vec3 res = dFdx(vec3(0.0f)); + vec3 res = dFdx(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.msl index 451171c478..c5c18447fb 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxFine_f92fb6() { - float3 res = dfdx(float3(0.0f)); + float3 res = dfdx(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.spvasm index cdc8be2ac0..d9b670f665 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %dpdxFine_f92fb6 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpDPdxFine %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpDPdxFine %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdxFine_f92fb6 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdxFine_f92fb6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.wgsl index f2391e8dbe..aebeb3d477 100644 --- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_f92fb6() { - var res : vec3 = dpdxFine(vec3()); + var res : vec3 = dpdxFine(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl index d5202943bd..5f2d59e61e 100644 --- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl @@ -25,7 +25,7 @@ // fn dpdy(vec<4, f32>) -> vec<4, f32> fn dpdy_699a05() { - var res: vec4 = dpdy(vec4()); + var res: vec4 = dpdy(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.dxc.hlsl index f1171a9e0c..178cd503b7 100644 --- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdy_699a05() { - float4 res = ddy((0.0f).xxxx); + float4 res = ddy((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.fxc.hlsl index f1171a9e0c..178cd503b7 100644 --- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdy_699a05() { - float4 res = ddy((0.0f).xxxx); + float4 res = ddy((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.glsl index ebda67f948..9baa62c6d5 100644 --- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdy_699a05() { - vec4 res = dFdy(vec4(0.0f)); + vec4 res = dFdy(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.msl index 9f9a6bb80f..d912666826 100644 --- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdy_699a05() { - float4 res = dfdy(float4(0.0f)); + float4 res = dfdy(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.spvasm index b135d448e3..82a555a08a 100644 --- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %dpdy_699a05 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpDPdy %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpDPdy %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdy_699a05 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdy_699a05 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.wgsl index a300cd9c1a..ec7c3a829e 100644 --- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_699a05() { - var res : vec4 = dpdy(vec4()); + var res : vec4 = dpdy(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl index 85d7b6efa0..336f2df57b 100644 --- a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl @@ -25,7 +25,7 @@ // fn dpdy(f32) -> f32 fn dpdy_7f8d84() { - var res: f32 = dpdy(1.0); + var res: f32 = dpdy(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.wgsl index edd98aaf09..6106dc9c8b 100644 --- a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_7f8d84() { - var res : f32 = dpdy(1.0); + var res : f32 = dpdy(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl index 5dab467783..dfff2c69ab 100644 --- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl @@ -25,7 +25,7 @@ // fn dpdy(vec<2, f32>) -> vec<2, f32> fn dpdy_a8b56e() { - var res: vec2 = dpdy(vec2()); + var res: vec2 = dpdy(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.dxc.hlsl index f654b022b3..917ee276ee 100644 --- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdy_a8b56e() { - float2 res = ddy((0.0f).xx); + float2 res = ddy((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.fxc.hlsl index f654b022b3..917ee276ee 100644 --- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdy_a8b56e() { - float2 res = ddy((0.0f).xx); + float2 res = ddy((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.glsl index e577258aaa..3c34a29e58 100644 --- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdy_a8b56e() { - vec2 res = dFdy(vec2(0.0f)); + vec2 res = dFdy(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.msl index bf9792eb7b..410597a181 100644 --- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdy_a8b56e() { - float2 res = dfdy(float2(0.0f)); + float2 res = dfdy(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.spvasm index 039cac5948..5b618affb6 100644 --- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %dpdy_a8b56e = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpDPdy %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpDPdy %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdy_a8b56e + %14 = OpLabel + %15 = OpFunctionCall %void %dpdy_a8b56e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.wgsl index 0286f63125..704c407ade 100644 --- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_a8b56e() { - var res : vec2 = dpdy(vec2()); + var res : vec2 = dpdy(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl index d722df2421..674adbd7d8 100644 --- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl @@ -25,7 +25,7 @@ // fn dpdy(vec<3, f32>) -> vec<3, f32> fn dpdy_feb40f() { - var res: vec3 = dpdy(vec3()); + var res: vec3 = dpdy(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.dxc.hlsl index e8c7005720..a468ceeead 100644 --- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdy_feb40f() { - float3 res = ddy((0.0f).xxx); + float3 res = ddy((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.fxc.hlsl index e8c7005720..a468ceeead 100644 --- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdy_feb40f() { - float3 res = ddy((0.0f).xxx); + float3 res = ddy((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.glsl index bace10efa7..9a429dc483 100644 --- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdy_feb40f() { - vec3 res = dFdy(vec3(0.0f)); + vec3 res = dFdy(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.msl index 837b41ace5..c3249a9c8f 100644 --- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdy_feb40f() { - float3 res = dfdy(float3(0.0f)); + float3 res = dfdy(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.spvasm index 47765fed1a..4fc2920e9c 100644 --- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %dpdy_feb40f = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpDPdy %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpDPdy %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdy_feb40f + %14 = OpLabel + %15 = OpFunctionCall %void %dpdy_feb40f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.wgsl index 9be2e1ec28..26ca0a7edf 100644 --- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_feb40f() { - var res : vec3 = dpdy(vec3()); + var res : vec3 = dpdy(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl index 75db504f43..627f9d103b 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(vec<2, f32>) -> vec<2, f32> fn dpdyCoarse_3e1ab4() { - var res: vec2 = dpdyCoarse(vec2()); + var res: vec2 = dpdyCoarse(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl index 2791bdea4f..57028761f4 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_3e1ab4() { - float2 res = ddy_coarse((0.0f).xx); + float2 res = ddy_coarse((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl index 2791bdea4f..57028761f4 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_3e1ab4() { - float2 res = ddy_coarse((0.0f).xx); + float2 res = ddy_coarse((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.glsl index 6da11de653..2838f06972 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyCoarse_3e1ab4() { - vec2 res = dFdy(vec2(0.0f)); + vec2 res = dFdy(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.msl index 1e3b2586c9..95dfcc8536 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyCoarse_3e1ab4() { - float2 res = dfdy(float2(0.0f)); + float2 res = dfdy(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.spvasm index 8a004f95b7..92025882ee 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %dpdyCoarse_3e1ab4 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpDPdyCoarse %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpDPdyCoarse %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdyCoarse_3e1ab4 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdyCoarse_3e1ab4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.wgsl index 8ce4a08900..5312afc019 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_3e1ab4() { - var res : vec2 = dpdyCoarse(vec2()); + var res : vec2 = dpdyCoarse(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl index ce185c1cf9..d6a170f471 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(vec<4, f32>) -> vec<4, f32> fn dpdyCoarse_445d24() { - var res: vec4 = dpdyCoarse(vec4()); + var res: vec4 = dpdyCoarse(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl index c2bef3a7d0..032fe5b0ed 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_445d24() { - float4 res = ddy_coarse((0.0f).xxxx); + float4 res = ddy_coarse((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl index c2bef3a7d0..032fe5b0ed 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_445d24() { - float4 res = ddy_coarse((0.0f).xxxx); + float4 res = ddy_coarse((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.glsl index d12e31470a..7975166ae2 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyCoarse_445d24() { - vec4 res = dFdy(vec4(0.0f)); + vec4 res = dFdy(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.msl index 5d36d60bb2..8625cff1b4 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyCoarse_445d24() { - float4 res = dfdy(float4(0.0f)); + float4 res = dfdy(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.spvasm index 2a04611f17..7a552f160d 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %dpdyCoarse_445d24 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpDPdyCoarse %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpDPdyCoarse %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdyCoarse_445d24 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdyCoarse_445d24 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.wgsl index 05ff718094..f96c8abe19 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_445d24() { - var res : vec4 = dpdyCoarse(vec4()); + var res : vec4 = dpdyCoarse(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl index ade83d5791..02de01568d 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(f32) -> f32 fn dpdyCoarse_870a7e() { - var res: f32 = dpdyCoarse(1.0); + var res: f32 = dpdyCoarse(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.wgsl index 23e06ae01e..cb6ebd4b3b 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_870a7e() { - var res : f32 = dpdyCoarse(1.0); + var res : f32 = dpdyCoarse(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl index a6ea5681ed..7eb8bbc9d4 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(vec<3, f32>) -> vec<3, f32> fn dpdyCoarse_ae1873() { - var res: vec3 = dpdyCoarse(vec3()); + var res: vec3 = dpdyCoarse(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl index 6c0aa14ac1..c41f57fd92 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_ae1873() { - float3 res = ddy_coarse((0.0f).xxx); + float3 res = ddy_coarse((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl index 6c0aa14ac1..c41f57fd92 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_ae1873() { - float3 res = ddy_coarse((0.0f).xxx); + float3 res = ddy_coarse((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.glsl index 7c4ab8db13..71426cdc29 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyCoarse_ae1873() { - vec3 res = dFdy(vec3(0.0f)); + vec3 res = dFdy(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.msl index c964819980..2cb000fc10 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyCoarse_ae1873() { - float3 res = dfdy(float3(0.0f)); + float3 res = dfdy(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.spvasm index f6c84c2c72..518e4e2730 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %dpdyCoarse_ae1873 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpDPdyCoarse %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpDPdyCoarse %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdyCoarse_ae1873 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdyCoarse_ae1873 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.wgsl index d2e5abefe9..a27742cb00 100644 --- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_ae1873() { - var res : vec3 = dpdyCoarse(vec3()); + var res : vec3 = dpdyCoarse(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl index 1ee89284e8..8e372e0c0f 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(vec<3, f32>) -> vec<3, f32> fn dpdyFine_1fb7ab() { - var res: vec3 = dpdyFine(vec3()); + var res: vec3 = dpdyFine(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl index 3cc37ac286..4bf3c52bc4 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_1fb7ab() { - float3 res = ddy_fine((0.0f).xxx); + float3 res = ddy_fine((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl index 3cc37ac286..4bf3c52bc4 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_1fb7ab() { - float3 res = ddy_fine((0.0f).xxx); + float3 res = ddy_fine((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.glsl index db84fd21f7..5e56f781b5 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyFine_1fb7ab() { - vec3 res = dFdy(vec3(0.0f)); + vec3 res = dFdy(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.msl index ee93c95a04..6152568263 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyFine_1fb7ab() { - float3 res = dfdy(float3(0.0f)); + float3 res = dfdy(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.spvasm index 30c1c860fe..e417bb6882 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %dpdyFine_1fb7ab = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpDPdyFine %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpDPdyFine %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdyFine_1fb7ab + %14 = OpLabel + %15 = OpFunctionCall %void %dpdyFine_1fb7ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.wgsl index c7ea17a73e..a8072552cc 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_1fb7ab() { - var res : vec3 = dpdyFine(vec3()); + var res : vec3 = dpdyFine(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl index 3517daad6d..b664cd4bee 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(f32) -> f32 fn dpdyFine_6eb673() { - var res: f32 = dpdyFine(1.0); + var res: f32 = dpdyFine(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.wgsl index 7857cc1476..4580d6a9a8 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_6eb673() { - var res : f32 = dpdyFine(1.0); + var res : f32 = dpdyFine(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl index 004ce70079..cf57287f72 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(vec<4, f32>) -> vec<4, f32> fn dpdyFine_d0a648() { - var res: vec4 = dpdyFine(vec4()); + var res: vec4 = dpdyFine(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.dxc.hlsl index b68dc61e92..b1ec8cdf94 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_d0a648() { - float4 res = ddy_fine((0.0f).xxxx); + float4 res = ddy_fine((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.fxc.hlsl index b68dc61e92..b1ec8cdf94 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_d0a648() { - float4 res = ddy_fine((0.0f).xxxx); + float4 res = ddy_fine((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.glsl index 354305555b..f074753250 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyFine_d0a648() { - vec4 res = dFdy(vec4(0.0f)); + vec4 res = dFdy(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.msl index 00a66fbfc2..ac690075a4 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyFine_d0a648() { - float4 res = dfdy(float4(0.0f)); + float4 res = dfdy(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.spvasm index 16a89278a8..44751d0558 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %dpdyFine_d0a648 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpDPdyFine %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpDPdyFine %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdyFine_d0a648 + %14 = OpLabel + %15 = OpFunctionCall %void %dpdyFine_d0a648 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.wgsl index f9d2a43866..4c8796f402 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_d0a648() { - var res : vec4 = dpdyFine(vec4()); + var res : vec4 = dpdyFine(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl index dcadf60067..192868e7be 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(vec<2, f32>) -> vec<2, f32> fn dpdyFine_df33aa() { - var res: vec2 = dpdyFine(vec2()); + var res: vec2 = dpdyFine(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.dxc.hlsl index d43f5599b4..7ad2997f17 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_df33aa() { - float2 res = ddy_fine((0.0f).xx); + float2 res = ddy_fine((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.fxc.hlsl index d43f5599b4..7ad2997f17 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_df33aa() { - float2 res = ddy_fine((0.0f).xx); + float2 res = ddy_fine((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.glsl index 4266041b68..502d6aac69 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyFine_df33aa() { - vec2 res = dFdy(vec2(0.0f)); + vec2 res = dFdy(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.msl index d82c6bd818..2685b93499 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyFine_df33aa() { - float2 res = dfdy(float2(0.0f)); + float2 res = dfdy(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.spvasm index 4d5346efaf..ad9cdf7b3e 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %dpdyFine_df33aa = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpDPdyFine %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpDPdyFine %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %dpdyFine_df33aa + %14 = OpLabel + %15 = OpFunctionCall %void %dpdyFine_df33aa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.wgsl index 21937517e4..77d8aaabf1 100644 --- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_df33aa() { - var res : vec2 = dpdyFine(vec2()); + var res : vec2 = dpdyFine(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl index 9c82f47df1..c55b9761f4 100644 --- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl +++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl @@ -25,7 +25,7 @@ // fn exp(vec<4, f32>) -> vec<4, f32> fn exp_0f70eb() { - var res: vec4 = exp(vec4()); + var res: vec4 = exp(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.dxc.hlsl index dea32eff40..bfdf17dd23 100644 --- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_0f70eb() { - float4 res = exp((0.0f).xxxx); + float4 res = exp((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.fxc.hlsl index dea32eff40..bfdf17dd23 100644 --- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp_0f70eb() { - float4 res = exp((0.0f).xxxx); + float4 res = exp((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.glsl index cca20805d2..aa694a1abc 100644 --- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp_0f70eb() { - vec4 res = exp(vec4(0.0f)); + vec4 res = exp(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void exp_0f70eb() { - vec4 res = exp(vec4(0.0f)); + vec4 res = exp(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void exp_0f70eb() { - vec4 res = exp(vec4(0.0f)); + vec4 res = exp(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.msl index 77dce91bcc..51985ab520 100644 --- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_0f70eb() { - float4 res = exp(float4(0.0f)); + float4 res = exp(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.spvasm index 0c249914c6..25e78f858e 100644 --- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %exp_0f70eb = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Exp %5 + %13 = OpExtInst %v4float %14 Exp %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %exp_0f70eb +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %exp_0f70eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %exp_0f70eb + %27 = OpLabel + %28 = OpFunctionCall %void %exp_0f70eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp_0f70eb + %30 = OpLabel + %31 = OpFunctionCall %void %exp_0f70eb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.wgsl index 5bc410e3b4..81aac1f24f 100644 --- a/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/0f70eb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_0f70eb() { - var res : vec4 = exp(vec4()); + var res : vec4 = exp(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl b/test/tint/builtins/gen/literal/exp/1951e7.wgsl index 00f36ed1e5..791e054ab7 100644 --- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl +++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl @@ -25,7 +25,7 @@ // fn exp(vec<2, f32>) -> vec<2, f32> fn exp_1951e7() { - var res: vec2 = exp(vec2()); + var res: vec2 = exp(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.dxc.hlsl index 73b3802362..776ab24ed4 100644 --- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_1951e7() { - float2 res = exp((0.0f).xx); + float2 res = exp((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.fxc.hlsl index 73b3802362..776ab24ed4 100644 --- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp_1951e7() { - float2 res = exp((0.0f).xx); + float2 res = exp((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.glsl index b1aab44cda..f2bbd7cea3 100644 --- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp_1951e7() { - vec2 res = exp(vec2(0.0f)); + vec2 res = exp(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void exp_1951e7() { - vec2 res = exp(vec2(0.0f)); + vec2 res = exp(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void exp_1951e7() { - vec2 res = exp(vec2(0.0f)); + vec2 res = exp(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.msl index f500ae38fe..f498a3e599 100644 --- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_1951e7() { - float2 res = exp(float2(0.0f)); + float2 res = exp(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.spvasm index 013e9bbbaa..adca51eb6f 100644 --- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %exp_1951e7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Exp %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Exp %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp_1951e7 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %exp_1951e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp_1951e7 + %29 = OpLabel + %30 = OpFunctionCall %void %exp_1951e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp_1951e7 + %32 = OpLabel + %33 = OpFunctionCall %void %exp_1951e7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.wgsl index 6fedb81372..92784cad3e 100644 --- a/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/1951e7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_1951e7() { - var res : vec2 = exp(vec2()); + var res : vec2 = exp(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/771fd2.wgsl b/test/tint/builtins/gen/literal/exp/771fd2.wgsl index 2a12ef67c1..ba3379695d 100644 --- a/test/tint/builtins/gen/literal/exp/771fd2.wgsl +++ b/test/tint/builtins/gen/literal/exp/771fd2.wgsl @@ -25,7 +25,7 @@ // fn exp(f32) -> f32 fn exp_771fd2() { - var res: f32 = exp(1.0); + var res: f32 = exp(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.wgsl index 3c86827f8e..2ce7fdd9c3 100644 --- a/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/771fd2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_771fd2() { - var res : f32 = exp(1.0); + var res : f32 = exp(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl b/test/tint/builtins/gen/literal/exp/d98450.wgsl index 7e10b9257e..965a05c8b3 100644 --- a/test/tint/builtins/gen/literal/exp/d98450.wgsl +++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl @@ -25,7 +25,7 @@ // fn exp(vec<3, f32>) -> vec<3, f32> fn exp_d98450() { - var res: vec3 = exp(vec3()); + var res: vec3 = exp(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.dxc.hlsl index a05e46aea0..a95aa4adb0 100644 --- a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_d98450() { - float3 res = exp((0.0f).xxx); + float3 res = exp((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.fxc.hlsl index a05e46aea0..a95aa4adb0 100644 --- a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp_d98450() { - float3 res = exp((0.0f).xxx); + float3 res = exp((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.glsl index d0b64ec65e..ded17bf9ed 100644 --- a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp_d98450() { - vec3 res = exp(vec3(0.0f)); + vec3 res = exp(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void exp_d98450() { - vec3 res = exp(vec3(0.0f)); + vec3 res = exp(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void exp_d98450() { - vec3 res = exp(vec3(0.0f)); + vec3 res = exp(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.msl index 0696f7ad7d..7671076f92 100644 --- a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_d98450() { - float3 res = exp(float3(0.0f)); + float3 res = exp(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.spvasm index 27dc1ac9eb..0cbf6acde7 100644 --- a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %exp_d98450 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Exp %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Exp %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp_d98450 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %exp_d98450 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp_d98450 + %29 = OpLabel + %30 = OpFunctionCall %void %exp_d98450 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp_d98450 + %32 = OpLabel + %33 = OpFunctionCall %void %exp_d98450 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.wgsl index 294c744d6d..ec3ce916b5 100644 --- a/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp/d98450.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_d98450() { - var res : vec3 = exp(vec3()); + var res : vec3 = exp(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl index d2205be7c5..69bc39de03 100644 --- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl +++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl @@ -25,7 +25,7 @@ // fn exp2(vec<3, f32>) -> vec<3, f32> fn exp2_1f8680() { - var res: vec3 = exp2(vec3()); + var res: vec3 = exp2(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.dxc.hlsl index 4f663ff254..398883207e 100644 --- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_1f8680() { - float3 res = exp2((0.0f).xxx); + float3 res = exp2((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.fxc.hlsl index 4f663ff254..398883207e 100644 --- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp2_1f8680() { - float3 res = exp2((0.0f).xxx); + float3 res = exp2((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.glsl index d3e1f70bef..a92cdd81cc 100644 --- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp2_1f8680() { - vec3 res = exp2(vec3(0.0f)); + vec3 res = exp2(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void exp2_1f8680() { - vec3 res = exp2(vec3(0.0f)); + vec3 res = exp2(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void exp2_1f8680() { - vec3 res = exp2(vec3(0.0f)); + vec3 res = exp2(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.msl index 5ffded1aab..04fd287379 100644 --- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_1f8680() { - float3 res = exp2(float3(0.0f)); + float3 res = exp2(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.spvasm index 9d62f480ff..87378ba895 100644 --- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %exp2_1f8680 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Exp2 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Exp2 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp2_1f8680 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %exp2_1f8680 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp2_1f8680 + %29 = OpLabel + %30 = OpFunctionCall %void %exp2_1f8680 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp2_1f8680 + %32 = OpLabel + %33 = OpFunctionCall %void %exp2_1f8680 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.wgsl index a9c57178ef..d2e3c7471b 100644 --- a/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/1f8680.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_1f8680() { - var res : vec3 = exp2(vec3()); + var res : vec3 = exp2(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl index 0bc44370c1..025cb78ab6 100644 --- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl +++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl @@ -25,7 +25,7 @@ // fn exp2(vec<4, f32>) -> vec<4, f32> fn exp2_a9d0a7() { - var res: vec4 = exp2(vec4()); + var res: vec4 = exp2(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.dxc.hlsl index 6ce5cb0584..e11264258e 100644 --- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_a9d0a7() { - float4 res = exp2((0.0f).xxxx); + float4 res = exp2((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.fxc.hlsl index 6ce5cb0584..e11264258e 100644 --- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp2_a9d0a7() { - float4 res = exp2((0.0f).xxxx); + float4 res = exp2((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.glsl index 1da316a9d6..64e9bfa914 100644 --- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp2_a9d0a7() { - vec4 res = exp2(vec4(0.0f)); + vec4 res = exp2(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void exp2_a9d0a7() { - vec4 res = exp2(vec4(0.0f)); + vec4 res = exp2(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void exp2_a9d0a7() { - vec4 res = exp2(vec4(0.0f)); + vec4 res = exp2(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.msl index 2658648add..7c35eb7618 100644 --- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_a9d0a7() { - float4 res = exp2(float4(0.0f)); + float4 res = exp2(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.spvasm index f3ac039e0d..21d06efdd8 100644 --- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %exp2_a9d0a7 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Exp2 %5 + %13 = OpExtInst %v4float %14 Exp2 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %exp2_a9d0a7 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %exp2_a9d0a7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %exp2_a9d0a7 + %27 = OpLabel + %28 = OpFunctionCall %void %exp2_a9d0a7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %exp2_a9d0a7 + %30 = OpLabel + %31 = OpFunctionCall %void %exp2_a9d0a7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.wgsl index 6b5cf9271e..7224b0c27e 100644 --- a/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/a9d0a7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_a9d0a7() { - var res : vec4 = exp2(vec4()); + var res : vec4 = exp2(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl index cf59359764..e857298efe 100644 --- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl +++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl @@ -25,7 +25,7 @@ // fn exp2(vec<2, f32>) -> vec<2, f32> fn exp2_d6777c() { - var res: vec2 = exp2(vec2()); + var res: vec2 = exp2(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.dxc.hlsl index 005c9b6a4c..6bec5e2446 100644 --- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_d6777c() { - float2 res = exp2((0.0f).xx); + float2 res = exp2((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.fxc.hlsl index 005c9b6a4c..6bec5e2446 100644 --- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp2_d6777c() { - float2 res = exp2((0.0f).xx); + float2 res = exp2((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.glsl index 77e9358b5b..9ab3430a47 100644 --- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp2_d6777c() { - vec2 res = exp2(vec2(0.0f)); + vec2 res = exp2(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void exp2_d6777c() { - vec2 res = exp2(vec2(0.0f)); + vec2 res = exp2(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void exp2_d6777c() { - vec2 res = exp2(vec2(0.0f)); + vec2 res = exp2(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.msl index 22a8a37f3c..befa16a257 100644 --- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_d6777c() { - float2 res = exp2(float2(0.0f)); + float2 res = exp2(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.spvasm index e852866298..f7d33f8440 100644 --- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %exp2_d6777c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Exp2 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Exp2 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp2_d6777c +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %exp2_d6777c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp2_d6777c + %29 = OpLabel + %30 = OpFunctionCall %void %exp2_d6777c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp2_d6777c + %32 = OpLabel + %33 = OpFunctionCall %void %exp2_d6777c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.wgsl index 03641946c3..636bec54db 100644 --- a/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/d6777c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_d6777c() { - var res : vec2 = exp2(vec2()); + var res : vec2 = exp2(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/dea523.wgsl b/test/tint/builtins/gen/literal/exp2/dea523.wgsl index ee1112cee9..0421e612f0 100644 --- a/test/tint/builtins/gen/literal/exp2/dea523.wgsl +++ b/test/tint/builtins/gen/literal/exp2/dea523.wgsl @@ -25,7 +25,7 @@ // fn exp2(f32) -> f32 fn exp2_dea523() { - var res: f32 = exp2(1.0); + var res: f32 = exp2(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.wgsl index 205a4b513f..c54cfc6f0c 100644 --- a/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/exp2/dea523.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_dea523() { - var res : f32 = exp2(1.0); + var res : f32 = exp2(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl index 3a8f4025a6..4e8b2d5509 100644 --- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<3, u32>, u32, u32) -> vec<3, u32> fn extractBits_12b197() { - var res: vec3 = extractBits(vec3(), 1u, 1u); + var res: vec3 = extractBits(vec3(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.dxc.hlsl index 74bbe23dd5..a151040739 100644 --- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ uint3 tint_extract_bits(uint3 v, uint offset, uint count) { } void extractBits_12b197() { - uint3 res = tint_extract_bits((0u).xxx, 1u, 1u); + uint3 res = tint_extract_bits((1u).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.fxc.hlsl index 74bbe23dd5..a151040739 100644 --- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ uint3 tint_extract_bits(uint3 v, uint offset, uint count) { } void extractBits_12b197() { - uint3 res = tint_extract_bits((0u).xxx, 1u, 1u); + uint3 res = tint_extract_bits((1u).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.glsl b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.glsl index ae3b503908..c40ed7d31a 100644 --- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec3 tint_extract_bits(uvec3 v, uint offset, uint count) { } void extractBits_12b197() { - uvec3 res = tint_extract_bits(uvec3(0u), 1u, 1u); + uvec3 res = tint_extract_bits(uvec3(1u), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ uvec3 tint_extract_bits(uvec3 v, uint offset, uint count) { } void extractBits_12b197() { - uvec3 res = tint_extract_bits(uvec3(0u), 1u, 1u); + uvec3 res = tint_extract_bits(uvec3(1u), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ uvec3 tint_extract_bits(uvec3 v, uint offset, uint count) { } void extractBits_12b197() { - uvec3 res = tint_extract_bits(uvec3(0u), 1u, 1u); + uvec3 res = tint_extract_bits(uvec3(1u), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.msl b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.msl index 2e07e23e2a..9a65f194c7 100644 --- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.msl @@ -8,7 +8,7 @@ uint3 tint_extract_bits(uint3 v, uint offset, uint count) { } void extractBits_12b197() { - uint3 res = tint_extract_bits(uint3(0u), 1u, 1u); + uint3 res = tint_extract_bits(uint3(1u), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.spvasm index 123c5e5c6e..6edac5a59d 100644 --- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader %18 = OpExtInstImport "GLSL.std.450" @@ -39,10 +39,11 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %24 = OpTypeFunction %void - %29 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %30 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v3uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v3uint None %9 %v = OpFunctionParameter %v3uint @@ -58,30 +59,30 @@ OpFunctionEnd %extractBits_12b197 = OpFunction %void None %24 %27 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %29 - %28 = OpFunctionCall %v3uint %tint_extract_bits %29 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v3uint Function %33 + %28 = OpFunctionCall %v3uint %tint_extract_bits %30 %uint_1 %uint_1 OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %extractBits_12b197 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %extractBits_12b197 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %42 = OpLabel - %43 = OpFunctionCall %void %extractBits_12b197 + %43 = OpLabel + %44 = OpFunctionCall %void %extractBits_12b197 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %45 = OpLabel - %46 = OpFunctionCall %void %extractBits_12b197 + %46 = OpLabel + %47 = OpFunctionCall %void %extractBits_12b197 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.wgsl index af852d47dc..ec9c1ab10b 100644 --- a/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/12b197.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_12b197() { - var res : vec3 = extractBits(vec3(), 1u, 1u); + var res : vec3 = extractBits(vec3(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl b/test/tint/builtins/gen/literal/extractBits/631377.wgsl index 155472eaa7..e6e407bf22 100644 --- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<4, u32>, u32, u32) -> vec<4, u32> fn extractBits_631377() { - var res: vec4 = extractBits(vec4(), 1u, 1u); + var res: vec4 = extractBits(vec4(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.dxc.hlsl index 151c7976cb..2b42e6a2dc 100644 --- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ uint4 tint_extract_bits(uint4 v, uint offset, uint count) { } void extractBits_631377() { - uint4 res = tint_extract_bits((0u).xxxx, 1u, 1u); + uint4 res = tint_extract_bits((1u).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.fxc.hlsl index 151c7976cb..2b42e6a2dc 100644 --- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ uint4 tint_extract_bits(uint4 v, uint offset, uint count) { } void extractBits_631377() { - uint4 res = tint_extract_bits((0u).xxxx, 1u, 1u); + uint4 res = tint_extract_bits((1u).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.glsl b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.glsl index 7bd05b08a3..b88b73bec0 100644 --- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec4 tint_extract_bits(uvec4 v, uint offset, uint count) { } void extractBits_631377() { - uvec4 res = tint_extract_bits(uvec4(0u), 1u, 1u); + uvec4 res = tint_extract_bits(uvec4(1u), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ uvec4 tint_extract_bits(uvec4 v, uint offset, uint count) { } void extractBits_631377() { - uvec4 res = tint_extract_bits(uvec4(0u), 1u, 1u); + uvec4 res = tint_extract_bits(uvec4(1u), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ uvec4 tint_extract_bits(uvec4 v, uint offset, uint count) { } void extractBits_631377() { - uvec4 res = tint_extract_bits(uvec4(0u), 1u, 1u); + uvec4 res = tint_extract_bits(uvec4(1u), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.msl b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.msl index 7f49492505..2190ecdb82 100644 --- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.msl @@ -8,7 +8,7 @@ uint4 tint_extract_bits(uint4 v, uint offset, uint count) { } void extractBits_631377() { - uint4 res = tint_extract_bits(uint4(0u), 1u, 1u); + uint4 res = tint_extract_bits(uint4(1u), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.spvasm index ed3df80cd9..6f34fb5f22 100644 --- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader %18 = OpExtInstImport "GLSL.std.450" @@ -39,10 +39,11 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %24 = OpTypeFunction %void - %29 = OpConstantNull %v4uint %uint_1 = OpConstant %uint 1 + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v4uint None %9 %v = OpFunctionParameter %v4uint @@ -58,30 +59,30 @@ OpFunctionEnd %extractBits_631377 = OpFunction %void None %24 %27 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %29 - %28 = OpFunctionCall %v4uint %tint_extract_bits %29 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v4uint Function %33 + %28 = OpFunctionCall %v4uint %tint_extract_bits %30 %uint_1 %uint_1 OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %extractBits_631377 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %extractBits_631377 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %42 = OpLabel - %43 = OpFunctionCall %void %extractBits_631377 + %43 = OpLabel + %44 = OpFunctionCall %void %extractBits_631377 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %45 = OpLabel - %46 = OpFunctionCall %void %extractBits_631377 + %46 = OpLabel + %47 = OpFunctionCall %void %extractBits_631377 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.wgsl index 1d78b802bd..24d0a72514 100644 --- a/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/631377.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_631377() { - var res : vec4 = extractBits(vec4(), 1u, 1u); + var res : vec4 = extractBits(vec4(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl index 3f9055cd8f..da929a9742 100644 --- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<2, i32>, u32, u32) -> vec<2, i32> fn extractBits_a99a8d() { - var res: vec2 = extractBits(vec2(), 1u, 1u); + var res: vec2 = extractBits(vec2(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.dxc.hlsl index 1030b22d76..301bcf66d3 100644 --- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ int2 tint_extract_bits(int2 v, uint offset, uint count) { } void extractBits_a99a8d() { - int2 res = tint_extract_bits((0).xx, 1u, 1u); + int2 res = tint_extract_bits((1).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.fxc.hlsl index 1030b22d76..301bcf66d3 100644 --- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ int2 tint_extract_bits(int2 v, uint offset, uint count) { } void extractBits_a99a8d() { - int2 res = tint_extract_bits((0).xx, 1u, 1u); + int2 res = tint_extract_bits((1).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.glsl index 609c281e36..fa42616ae8 100644 --- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec2 tint_extract_bits(ivec2 v, uint offset, uint count) { } void extractBits_a99a8d() { - ivec2 res = tint_extract_bits(ivec2(0), 1u, 1u); + ivec2 res = tint_extract_bits(ivec2(1), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ ivec2 tint_extract_bits(ivec2 v, uint offset, uint count) { } void extractBits_a99a8d() { - ivec2 res = tint_extract_bits(ivec2(0), 1u, 1u); + ivec2 res = tint_extract_bits(ivec2(1), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ ivec2 tint_extract_bits(ivec2 v, uint offset, uint count) { } void extractBits_a99a8d() { - ivec2 res = tint_extract_bits(ivec2(0), 1u, 1u); + ivec2 res = tint_extract_bits(ivec2(1), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.msl b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.msl index 4ce94850a0..915b684e7c 100644 --- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.msl @@ -8,7 +8,7 @@ int2 tint_extract_bits(int2 v, uint offset, uint count) { } void extractBits_a99a8d() { - int2 res = tint_extract_bits(int2(0), 1u, 1u); + int2 res = tint_extract_bits(int2(1), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.spvasm index 5dcee110aa..8f66972aac 100644 --- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -40,10 +40,12 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %30 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v2int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -59,30 +61,30 @@ OpFunctionEnd %extractBits_a99a8d = OpFunction %void None %25 %28 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %30 - %29 = OpFunctionCall %v2int %tint_extract_bits %30 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v2int Function %35 + %29 = OpFunctionCall %v2int %tint_extract_bits %31 %uint_1 %uint_1 OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %extractBits_a99a8d +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %extractBits_a99a8d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %43 = OpLabel - %44 = OpFunctionCall %void %extractBits_a99a8d + %45 = OpLabel + %46 = OpFunctionCall %void %extractBits_a99a8d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %46 = OpLabel - %47 = OpFunctionCall %void %extractBits_a99a8d + %48 = OpLabel + %49 = OpFunctionCall %void %extractBits_a99a8d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.wgsl index e73e25b907..17c6f49300 100644 --- a/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/a99a8d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_a99a8d() { - var res : vec2 = extractBits(vec2(), 1u, 1u); + var res : vec2 = extractBits(vec2(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl index 3ce524e966..b8bfaefff6 100644 --- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<3, i32>, u32, u32) -> vec<3, i32> fn extractBits_e04f5d() { - var res: vec3 = extractBits(vec3(), 1u, 1u); + var res: vec3 = extractBits(vec3(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.dxc.hlsl index f63a53ad3d..d140d24b36 100644 --- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ int3 tint_extract_bits(int3 v, uint offset, uint count) { } void extractBits_e04f5d() { - int3 res = tint_extract_bits((0).xxx, 1u, 1u); + int3 res = tint_extract_bits((1).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.fxc.hlsl index f63a53ad3d..d140d24b36 100644 --- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ int3 tint_extract_bits(int3 v, uint offset, uint count) { } void extractBits_e04f5d() { - int3 res = tint_extract_bits((0).xxx, 1u, 1u); + int3 res = tint_extract_bits((1).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.glsl index 7116733f35..de21ca0092 100644 --- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec3 tint_extract_bits(ivec3 v, uint offset, uint count) { } void extractBits_e04f5d() { - ivec3 res = tint_extract_bits(ivec3(0), 1u, 1u); + ivec3 res = tint_extract_bits(ivec3(1), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ ivec3 tint_extract_bits(ivec3 v, uint offset, uint count) { } void extractBits_e04f5d() { - ivec3 res = tint_extract_bits(ivec3(0), 1u, 1u); + ivec3 res = tint_extract_bits(ivec3(1), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ ivec3 tint_extract_bits(ivec3 v, uint offset, uint count) { } void extractBits_e04f5d() { - ivec3 res = tint_extract_bits(ivec3(0), 1u, 1u); + ivec3 res = tint_extract_bits(ivec3(1), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.msl b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.msl index c21c5087a6..c3a46730e0 100644 --- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.msl @@ -8,7 +8,7 @@ int3 tint_extract_bits(int3 v, uint offset, uint count) { } void extractBits_e04f5d() { - int3 res = tint_extract_bits(int3(0), 1u, 1u); + int3 res = tint_extract_bits(int3(1), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.spvasm index fedc92ebcb..043e515032 100644 --- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -40,10 +40,12 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %30 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v3int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -59,30 +61,30 @@ OpFunctionEnd %extractBits_e04f5d = OpFunction %void None %25 %28 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %30 - %29 = OpFunctionCall %v3int %tint_extract_bits %30 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v3int Function %35 + %29 = OpFunctionCall %v3int %tint_extract_bits %31 %uint_1 %uint_1 OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %extractBits_e04f5d +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %extractBits_e04f5d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %43 = OpLabel - %44 = OpFunctionCall %void %extractBits_e04f5d + %45 = OpLabel + %46 = OpFunctionCall %void %extractBits_e04f5d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %46 = OpLabel - %47 = OpFunctionCall %void %extractBits_e04f5d + %48 = OpLabel + %49 = OpFunctionCall %void %extractBits_e04f5d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.wgsl index 1441d070df..73a0526b23 100644 --- a/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/e04f5d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_e04f5d() { - var res : vec3 = extractBits(vec3(), 1u, 1u); + var res : vec3 = extractBits(vec3(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl index a77cf8830c..39316d2c51 100644 --- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<2, u32>, u32, u32) -> vec<2, u32> fn extractBits_f28f69() { - var res: vec2 = extractBits(vec2(), 1u, 1u); + var res: vec2 = extractBits(vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.dxc.hlsl index abae2bd188..2b1ac94265 100644 --- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ uint2 tint_extract_bits(uint2 v, uint offset, uint count) { } void extractBits_f28f69() { - uint2 res = tint_extract_bits((0u).xx, 1u, 1u); + uint2 res = tint_extract_bits((1u).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.fxc.hlsl index abae2bd188..2b1ac94265 100644 --- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ uint2 tint_extract_bits(uint2 v, uint offset, uint count) { } void extractBits_f28f69() { - uint2 res = tint_extract_bits((0u).xx, 1u, 1u); + uint2 res = tint_extract_bits((1u).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.glsl b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.glsl index 2141ce09bf..79a6a6cf07 100644 --- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec2 tint_extract_bits(uvec2 v, uint offset, uint count) { } void extractBits_f28f69() { - uvec2 res = tint_extract_bits(uvec2(0u), 1u, 1u); + uvec2 res = tint_extract_bits(uvec2(1u), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ uvec2 tint_extract_bits(uvec2 v, uint offset, uint count) { } void extractBits_f28f69() { - uvec2 res = tint_extract_bits(uvec2(0u), 1u, 1u); + uvec2 res = tint_extract_bits(uvec2(1u), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ uvec2 tint_extract_bits(uvec2 v, uint offset, uint count) { } void extractBits_f28f69() { - uvec2 res = tint_extract_bits(uvec2(0u), 1u, 1u); + uvec2 res = tint_extract_bits(uvec2(1u), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.msl b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.msl index 73755c8d44..f16211a3c0 100644 --- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.msl @@ -8,7 +8,7 @@ uint2 tint_extract_bits(uint2 v, uint offset, uint count) { } void extractBits_f28f69() { - uint2 res = tint_extract_bits(uint2(0u), 1u, 1u); + uint2 res = tint_extract_bits(uint2(1u), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.spvasm index 060801b95a..c1279b113d 100644 --- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader %18 = OpExtInstImport "GLSL.std.450" @@ -39,10 +39,11 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %24 = OpTypeFunction %void - %29 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %30 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v2uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v2uint None %9 %v = OpFunctionParameter %v2uint @@ -58,30 +59,30 @@ OpFunctionEnd %extractBits_f28f69 = OpFunction %void None %24 %27 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %29 - %28 = OpFunctionCall %v2uint %tint_extract_bits %29 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v2uint Function %33 + %28 = OpFunctionCall %v2uint %tint_extract_bits %30 %uint_1 %uint_1 OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %extractBits_f28f69 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %extractBits_f28f69 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %42 = OpLabel - %43 = OpFunctionCall %void %extractBits_f28f69 + %43 = OpLabel + %44 = OpFunctionCall %void %extractBits_f28f69 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %45 = OpLabel - %46 = OpFunctionCall %void %extractBits_f28f69 + %46 = OpLabel + %47 = OpFunctionCall %void %extractBits_f28f69 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.wgsl index 534ff14578..c2e8d7205b 100644 --- a/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/f28f69.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_f28f69() { - var res : vec2 = extractBits(vec2(), 1u, 1u); + var res : vec2 = extractBits(vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl index 99b1702614..1e66d96c09 100644 --- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<4, i32>, u32, u32) -> vec<4, i32> fn extractBits_fb850f() { - var res: vec4 = extractBits(vec4(), 1u, 1u); + var res: vec4 = extractBits(vec4(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.dxc.hlsl index 4e1fce08fb..249b9aaeb6 100644 --- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ int4 tint_extract_bits(int4 v, uint offset, uint count) { } void extractBits_fb850f() { - int4 res = tint_extract_bits((0).xxxx, 1u, 1u); + int4 res = tint_extract_bits((1).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.fxc.hlsl index 4e1fce08fb..249b9aaeb6 100644 --- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ int4 tint_extract_bits(int4 v, uint offset, uint count) { } void extractBits_fb850f() { - int4 res = tint_extract_bits((0).xxxx, 1u, 1u); + int4 res = tint_extract_bits((1).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.glsl index 99cbbb9423..e075fcd326 100644 --- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec4 tint_extract_bits(ivec4 v, uint offset, uint count) { } void extractBits_fb850f() { - ivec4 res = tint_extract_bits(ivec4(0), 1u, 1u); + ivec4 res = tint_extract_bits(ivec4(1), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ ivec4 tint_extract_bits(ivec4 v, uint offset, uint count) { } void extractBits_fb850f() { - ivec4 res = tint_extract_bits(ivec4(0), 1u, 1u); + ivec4 res = tint_extract_bits(ivec4(1), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ ivec4 tint_extract_bits(ivec4 v, uint offset, uint count) { } void extractBits_fb850f() { - ivec4 res = tint_extract_bits(ivec4(0), 1u, 1u); + ivec4 res = tint_extract_bits(ivec4(1), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.msl b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.msl index 364028f256..db0c9065df 100644 --- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.msl @@ -8,7 +8,7 @@ int4 tint_extract_bits(int4 v, uint offset, uint count) { } void extractBits_fb850f() { - int4 res = tint_extract_bits(int4(0), 1u, 1u); + int4 res = tint_extract_bits(int4(1), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.spvasm index f904fcbd2e..99cc4e4ea1 100644 --- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -40,10 +40,12 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %30 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -59,30 +61,30 @@ OpFunctionEnd %extractBits_fb850f = OpFunction %void None %25 %28 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %30 - %29 = OpFunctionCall %v4int %tint_extract_bits %30 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v4int Function %35 + %29 = OpFunctionCall %v4int %tint_extract_bits %31 %uint_1 %uint_1 OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %extractBits_fb850f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %extractBits_fb850f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %43 = OpLabel - %44 = OpFunctionCall %void %extractBits_fb850f + %45 = OpLabel + %46 = OpFunctionCall %void %extractBits_fb850f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %46 = OpLabel - %47 = OpFunctionCall %void %extractBits_fb850f + %48 = OpLabel + %49 = OpFunctionCall %void %extractBits_fb850f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.wgsl index 200817caa9..33f8b70d97 100644 --- a/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/extractBits/fb850f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_fb850f() { - var res : vec4 = extractBits(vec4(), 1u, 1u); + var res : vec4 = extractBits(vec4(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl index d69f29e1bf..30cf4bb89c 100644 --- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl @@ -25,7 +25,7 @@ // fn faceForward(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn faceForward_5afbd5() { - var res: vec3 = faceForward(vec3(), vec3(), vec3()); + var res: vec3 = faceForward(vec3(1.f), vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.dxc.hlsl index 207fd763b7..c5d01ddccc 100644 --- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void faceForward_5afbd5() { - float3 res = faceforward((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = faceforward((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.fxc.hlsl index 207fd763b7..c5d01ddccc 100644 --- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void faceForward_5afbd5() { - float3 res = faceforward((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = faceforward((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.glsl index 59202180c6..ffec67141c 100644 --- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void faceForward_5afbd5() { - vec3 res = faceforward(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = faceforward(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void faceForward_5afbd5() { - vec3 res = faceforward(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = faceforward(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void faceForward_5afbd5() { - vec3 res = faceforward(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = faceforward(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.msl index 1abd19f382..baddc993f0 100644 --- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void faceForward_5afbd5() { - float3 res = faceforward(float3(0.0f), float3(0.0f), float3(0.0f)); + float3 res = faceforward(float3(1.0f), float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.spvasm index e9db2a5cdf..de3affd3c7 100644 --- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %faceForward_5afbd5 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 FaceForward %16 %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 FaceForward %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %faceForward_5afbd5 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %faceForward_5afbd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %faceForward_5afbd5 + %29 = OpLabel + %30 = OpFunctionCall %void %faceForward_5afbd5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %faceForward_5afbd5 + %32 = OpLabel + %33 = OpFunctionCall %void %faceForward_5afbd5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.wgsl index 735e6b94e9..4e3a582cf5 100644 --- a/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/5afbd5.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn faceForward_5afbd5() { - var res : vec3 = faceForward(vec3(), vec3(), vec3()); + var res : vec3 = faceForward(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl index 6a56e12af8..88fb181533 100644 --- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl @@ -25,7 +25,7 @@ // fn faceForward(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn faceForward_b316e5() { - var res: vec4 = faceForward(vec4(), vec4(), vec4()); + var res: vec4 = faceForward(vec4(1.f), vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.dxc.hlsl index 2b1e71d379..ffe25eebf2 100644 --- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void faceForward_b316e5() { - float4 res = faceforward((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = faceforward((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.fxc.hlsl index 2b1e71d379..ffe25eebf2 100644 --- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void faceForward_b316e5() { - float4 res = faceforward((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = faceforward((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.glsl index 50e49c89cf..1055f4788f 100644 --- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void faceForward_b316e5() { - vec4 res = faceforward(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = faceforward(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void faceForward_b316e5() { - vec4 res = faceforward(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = faceforward(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void faceForward_b316e5() { - vec4 res = faceforward(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = faceforward(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.msl index a9d5b3f410..cc1e74c8bb 100644 --- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void faceForward_b316e5() { - float4 res = faceforward(float4(0.0f), float4(0.0f), float4(0.0f)); + float4 res = faceforward(float4(1.0f), float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.spvasm index 9481d7860d..ffd46e2249 100644 --- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %faceForward_b316e5 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 FaceForward %5 %5 %5 + %13 = OpExtInst %v4float %14 FaceForward %16 %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %faceForward_b316e5 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %faceForward_b316e5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %faceForward_b316e5 + %27 = OpLabel + %28 = OpFunctionCall %void %faceForward_b316e5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %faceForward_b316e5 + %30 = OpLabel + %31 = OpFunctionCall %void %faceForward_b316e5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.wgsl index 3288e97977..c6efdfc463 100644 --- a/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/b316e5.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn faceForward_b316e5() { - var res : vec4 = faceForward(vec4(), vec4(), vec4()); + var res : vec4 = faceForward(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl index 8052997971..bdced3f22e 100644 --- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl @@ -25,7 +25,7 @@ // fn faceForward(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn faceForward_e6908b() { - var res: vec2 = faceForward(vec2(), vec2(), vec2()); + var res: vec2 = faceForward(vec2(1.f), vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.dxc.hlsl index b29d9c4439..82a14e79f9 100644 --- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void faceForward_e6908b() { - float2 res = faceforward((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = faceforward((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.fxc.hlsl index b29d9c4439..82a14e79f9 100644 --- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void faceForward_e6908b() { - float2 res = faceforward((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = faceforward((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.glsl index f1845d11e8..78a59cca7b 100644 --- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void faceForward_e6908b() { - vec2 res = faceforward(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = faceforward(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void faceForward_e6908b() { - vec2 res = faceforward(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = faceforward(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void faceForward_e6908b() { - vec2 res = faceforward(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = faceforward(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.msl index 50bb2d7cd4..db005d9004 100644 --- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void faceForward_e6908b() { - float2 res = faceforward(float2(0.0f), float2(0.0f), float2(0.0f)); + float2 res = faceforward(float2(1.0f), float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.spvasm index 6d239937cf..8e1293d69d 100644 --- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %faceForward_e6908b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 FaceForward %16 %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 FaceForward %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %faceForward_e6908b +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %faceForward_e6908b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %faceForward_e6908b + %29 = OpLabel + %30 = OpFunctionCall %void %faceForward_e6908b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %faceForward_e6908b + %32 = OpLabel + %33 = OpFunctionCall %void %faceForward_e6908b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.wgsl index 0fb58779c1..ee21409bcd 100644 --- a/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/faceForward/e6908b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn faceForward_e6908b() { - var res : vec2 = faceForward(vec2(), vec2(), vec2()); + var res : vec2 = faceForward(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl index 5d12d31bec..577dbdc5b8 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<4, u32>) -> vec<4, u32> fn firstLeadingBit_000ff3() { - var res: vec4 = firstLeadingBit(vec4()); + var res: vec4 = firstLeadingBit(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl index a5731bf916..c2dceabafc 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_leading_bit(uint4 v) { } void firstLeadingBit_000ff3() { - uint4 res = tint_first_leading_bit((0u).xxxx); + uint4 res = tint_first_leading_bit((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl index a5731bf916..c2dceabafc 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_leading_bit(uint4 v) { } void firstLeadingBit_000ff3() { - uint4 res = tint_first_leading_bit((0u).xxxx); + uint4 res = tint_first_leading_bit((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.glsl index 2601481d15..6ba5463099 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_first_leading_bit(uvec4 v) { } void firstLeadingBit_000ff3() { - uvec4 res = tint_first_leading_bit(uvec4(0u)); + uvec4 res = tint_first_leading_bit(uvec4(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec4 tint_first_leading_bit(uvec4 v) { } void firstLeadingBit_000ff3() { - uvec4 res = tint_first_leading_bit(uvec4(0u)); + uvec4 res = tint_first_leading_bit(uvec4(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec4 tint_first_leading_bit(uvec4 v) { } void firstLeadingBit_000ff3() { - uvec4 res = tint_first_leading_bit(uvec4(0u)); + uvec4 res = tint_first_leading_bit(uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.msl index ae9ad43995..45a5d2bde7 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.msl @@ -17,7 +17,7 @@ uint4 tint_first_leading_bit(uint4 v) { } void firstLeadingBit_000ff3() { - uint4 res = tint_first_leading_bit(uint4(0u)); + uint4 res = tint_first_leading_bit(uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.spvasm index bf28342a23..8b00728127 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %firstLeadingBit_000ff3 = OpFunction %void None %77 %80 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %17 - %81 = OpFunctionCall %v4uint %tint_first_leading_bit %17 + %81 = OpFunctionCall %v4uint %tint_first_leading_bit %65 OpStore %res %81 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.wgsl index 4a71621f6c..01ed7cd5a2 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/000ff3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_000ff3() { - var res : vec4 = firstLeadingBit(vec4()); + var res : vec4 = firstLeadingBit(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl index 83aff3fdc8..eb3a51398f 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<3, i32>) -> vec<3, i32> fn firstLeadingBit_35053e() { - var res: vec3 = firstLeadingBit(vec3()); + var res: vec3 = firstLeadingBit(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl index bf4b94d23c..24d1789b60 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_leading_bit(int3 v) { } void firstLeadingBit_35053e() { - int3 res = tint_first_leading_bit((0).xxx); + int3 res = tint_first_leading_bit((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl index bf4b94d23c..24d1789b60 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_leading_bit(int3 v) { } void firstLeadingBit_35053e() { - int3 res = tint_first_leading_bit((0).xxx); + int3 res = tint_first_leading_bit((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.glsl index 77236c8382..d5eaa276c6 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_first_leading_bit(ivec3 v) { } void firstLeadingBit_35053e() { - ivec3 res = tint_first_leading_bit(ivec3(0)); + ivec3 res = tint_first_leading_bit(ivec3(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec3 tint_first_leading_bit(ivec3 v) { } void firstLeadingBit_35053e() { - ivec3 res = tint_first_leading_bit(ivec3(0)); + ivec3 res = tint_first_leading_bit(ivec3(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec3 tint_first_leading_bit(ivec3 v) { } void firstLeadingBit_35053e() { - ivec3 res = tint_first_leading_bit(ivec3(0)); + ivec3 res = tint_first_leading_bit(ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.msl index e453fa9bfc..ffaef381a9 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.msl @@ -17,7 +17,7 @@ int3 tint_first_leading_bit(int3 v) { } void firstLeadingBit_35053e() { - int3 res = tint_first_leading_bit(int3(0)); + int3 res = tint_first_leading_bit(int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.spvasm index 3d5832e7c8..3fc5befb9a 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 106 +; Bound: 108 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,8 +63,10 @@ %78 = OpConstantComposite %v3uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %85 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %91 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %92 = OpTypeFunction %v4float + %94 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_leading_bit = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -122,29 +124,29 @@ %firstLeadingBit_35053e = OpFunction %void None %85 %88 = OpLabel %res = OpVariable %_ptr_Function_v3int Function %18 - %89 = OpFunctionCall %v3int %tint_first_leading_bit %18 + %89 = OpFunctionCall %v3int %tint_first_leading_bit %91 OpStore %res %89 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %92 - %94 = OpLabel - %95 = OpFunctionCall %void %firstLeadingBit_35053e +%vertex_main_inner = OpFunction %v4float None %94 + %96 = OpLabel + %97 = OpFunctionCall %void %firstLeadingBit_35053e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %85 - %97 = OpLabel - %98 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %98 + %99 = OpLabel + %100 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %100 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %85 - %101 = OpLabel - %102 = OpFunctionCall %void %firstLeadingBit_35053e + %103 = OpLabel + %104 = OpFunctionCall %void %firstLeadingBit_35053e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %85 - %104 = OpLabel - %105 = OpFunctionCall %void %firstLeadingBit_35053e + %106 = OpLabel + %107 = OpFunctionCall %void %firstLeadingBit_35053e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.wgsl index 3656dfeabe..5e32586741 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/35053e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_35053e() { - var res : vec3 = firstLeadingBit(vec3()); + var res : vec3 = firstLeadingBit(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl index 48687ed788..ed088b4f36 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<3, u32>) -> vec<3, u32> fn firstLeadingBit_3fd7d0() { - var res: vec3 = firstLeadingBit(vec3()); + var res: vec3 = firstLeadingBit(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl index d7649e1e73..9da9693375 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_leading_bit(uint3 v) { } void firstLeadingBit_3fd7d0() { - uint3 res = tint_first_leading_bit((0u).xxx); + uint3 res = tint_first_leading_bit((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl index d7649e1e73..9da9693375 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_leading_bit(uint3 v) { } void firstLeadingBit_3fd7d0() { - uint3 res = tint_first_leading_bit((0u).xxx); + uint3 res = tint_first_leading_bit((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.glsl index 8536bb599b..0924cb174a 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_first_leading_bit(uvec3 v) { } void firstLeadingBit_3fd7d0() { - uvec3 res = tint_first_leading_bit(uvec3(0u)); + uvec3 res = tint_first_leading_bit(uvec3(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec3 tint_first_leading_bit(uvec3 v) { } void firstLeadingBit_3fd7d0() { - uvec3 res = tint_first_leading_bit(uvec3(0u)); + uvec3 res = tint_first_leading_bit(uvec3(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec3 tint_first_leading_bit(uvec3 v) { } void firstLeadingBit_3fd7d0() { - uvec3 res = tint_first_leading_bit(uvec3(0u)); + uvec3 res = tint_first_leading_bit(uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.msl index 8ade8dadff..9ed14ecba1 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.msl @@ -17,7 +17,7 @@ uint3 tint_first_leading_bit(uint3 v) { } void firstLeadingBit_3fd7d0() { - uint3 res = tint_first_leading_bit(uint3(0u)); + uint3 res = tint_first_leading_bit(uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.spvasm index 796a7f68c6..651285ff46 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %firstLeadingBit_3fd7d0 = OpFunction %void None %77 %80 = OpLabel %res = OpVariable %_ptr_Function_v3uint Function %17 - %81 = OpFunctionCall %v3uint %tint_first_leading_bit %17 + %81 = OpFunctionCall %v3uint %tint_first_leading_bit %65 OpStore %res %81 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.wgsl index b7e79857cf..70d440eab1 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/3fd7d0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_3fd7d0() { - var res : vec3 = firstLeadingBit(vec3()); + var res : vec3 = firstLeadingBit(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl index e5ffa789c1..a96a8c25aa 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<2, u32>) -> vec<2, u32> fn firstLeadingBit_6fe804() { - var res: vec2 = firstLeadingBit(vec2()); + var res: vec2 = firstLeadingBit(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl index 3fce822956..fc68e7617c 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_leading_bit(uint2 v) { } void firstLeadingBit_6fe804() { - uint2 res = tint_first_leading_bit((0u).xx); + uint2 res = tint_first_leading_bit((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl index 3fce822956..fc68e7617c 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_leading_bit(uint2 v) { } void firstLeadingBit_6fe804() { - uint2 res = tint_first_leading_bit((0u).xx); + uint2 res = tint_first_leading_bit((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.glsl index f4787ff844..e5c3839363 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_first_leading_bit(uvec2 v) { } void firstLeadingBit_6fe804() { - uvec2 res = tint_first_leading_bit(uvec2(0u)); + uvec2 res = tint_first_leading_bit(uvec2(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec2 tint_first_leading_bit(uvec2 v) { } void firstLeadingBit_6fe804() { - uvec2 res = tint_first_leading_bit(uvec2(0u)); + uvec2 res = tint_first_leading_bit(uvec2(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec2 tint_first_leading_bit(uvec2 v) { } void firstLeadingBit_6fe804() { - uvec2 res = tint_first_leading_bit(uvec2(0u)); + uvec2 res = tint_first_leading_bit(uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.msl index 8e714896ba..05d40cd87b 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.msl @@ -17,7 +17,7 @@ uint2 tint_first_leading_bit(uint2 v) { } void firstLeadingBit_6fe804() { - uint2 res = tint_first_leading_bit(uint2(0u)); + uint2 res = tint_first_leading_bit(uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.spvasm index b5b8dc3621..c21901191b 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %firstLeadingBit_6fe804 = OpFunction %void None %77 %80 = OpLabel %res = OpVariable %_ptr_Function_v2uint Function %17 - %81 = OpFunctionCall %v2uint %tint_first_leading_bit %17 + %81 = OpFunctionCall %v2uint %tint_first_leading_bit %65 OpStore %res %81 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.wgsl index 9a507e8825..3b5ed08634 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/6fe804.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_6fe804() { - var res : vec2 = firstLeadingBit(vec2()); + var res : vec2 = firstLeadingBit(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl index cd7ea4de82..75b21cf61b 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<2, i32>) -> vec<2, i32> fn firstLeadingBit_a622c2() { - var res: vec2 = firstLeadingBit(vec2()); + var res: vec2 = firstLeadingBit(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl index 0c970cf746..0d14118bba 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_leading_bit(int2 v) { } void firstLeadingBit_a622c2() { - int2 res = tint_first_leading_bit((0).xx); + int2 res = tint_first_leading_bit((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl index 0c970cf746..0d14118bba 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_leading_bit(int2 v) { } void firstLeadingBit_a622c2() { - int2 res = tint_first_leading_bit((0).xx); + int2 res = tint_first_leading_bit((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.glsl index 16125418a2..d08c21d37f 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_first_leading_bit(ivec2 v) { } void firstLeadingBit_a622c2() { - ivec2 res = tint_first_leading_bit(ivec2(0)); + ivec2 res = tint_first_leading_bit(ivec2(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec2 tint_first_leading_bit(ivec2 v) { } void firstLeadingBit_a622c2() { - ivec2 res = tint_first_leading_bit(ivec2(0)); + ivec2 res = tint_first_leading_bit(ivec2(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec2 tint_first_leading_bit(ivec2 v) { } void firstLeadingBit_a622c2() { - ivec2 res = tint_first_leading_bit(ivec2(0)); + ivec2 res = tint_first_leading_bit(ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.msl index 8ebf62d74e..f037236821 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.msl @@ -17,7 +17,7 @@ int2 tint_first_leading_bit(int2 v) { } void firstLeadingBit_a622c2() { - int2 res = tint_first_leading_bit(int2(0)); + int2 res = tint_first_leading_bit(int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.spvasm index c50c83d530..30f881164b 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 106 +; Bound: 108 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,8 +63,10 @@ %78 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %85 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %91 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %92 = OpTypeFunction %v4float + %94 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_leading_bit = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -122,29 +124,29 @@ %firstLeadingBit_a622c2 = OpFunction %void None %85 %88 = OpLabel %res = OpVariable %_ptr_Function_v2int Function %18 - %89 = OpFunctionCall %v2int %tint_first_leading_bit %18 + %89 = OpFunctionCall %v2int %tint_first_leading_bit %91 OpStore %res %89 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %92 - %94 = OpLabel - %95 = OpFunctionCall %void %firstLeadingBit_a622c2 +%vertex_main_inner = OpFunction %v4float None %94 + %96 = OpLabel + %97 = OpFunctionCall %void %firstLeadingBit_a622c2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %85 - %97 = OpLabel - %98 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %98 + %99 = OpLabel + %100 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %100 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %85 - %101 = OpLabel - %102 = OpFunctionCall %void %firstLeadingBit_a622c2 + %103 = OpLabel + %104 = OpFunctionCall %void %firstLeadingBit_a622c2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %85 - %104 = OpLabel - %105 = OpFunctionCall %void %firstLeadingBit_a622c2 + %106 = OpLabel + %107 = OpFunctionCall %void %firstLeadingBit_a622c2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.wgsl index 510239e664..469ca78410 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/a622c2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_a622c2() { - var res : vec2 = firstLeadingBit(vec2()); + var res : vec2 = firstLeadingBit(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl index aecb9dfa1e..2ec1e0ee11 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<4, i32>) -> vec<4, i32> fn firstLeadingBit_c1f940() { - var res: vec4 = firstLeadingBit(vec4()); + var res: vec4 = firstLeadingBit(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl index 01d41e24d9..0141012cbc 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_leading_bit(int4 v) { } void firstLeadingBit_c1f940() { - int4 res = tint_first_leading_bit((0).xxxx); + int4 res = tint_first_leading_bit((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl index 01d41e24d9..0141012cbc 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_leading_bit(int4 v) { } void firstLeadingBit_c1f940() { - int4 res = tint_first_leading_bit((0).xxxx); + int4 res = tint_first_leading_bit((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.glsl index 9639c39b29..54a22fe40e 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_first_leading_bit(ivec4 v) { } void firstLeadingBit_c1f940() { - ivec4 res = tint_first_leading_bit(ivec4(0)); + ivec4 res = tint_first_leading_bit(ivec4(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec4 tint_first_leading_bit(ivec4 v) { } void firstLeadingBit_c1f940() { - ivec4 res = tint_first_leading_bit(ivec4(0)); + ivec4 res = tint_first_leading_bit(ivec4(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec4 tint_first_leading_bit(ivec4 v) { } void firstLeadingBit_c1f940() { - ivec4 res = tint_first_leading_bit(ivec4(0)); + ivec4 res = tint_first_leading_bit(ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.msl index 440ad6e35a..dd07d58dd3 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.msl @@ -17,7 +17,7 @@ int4 tint_first_leading_bit(int4 v) { } void firstLeadingBit_c1f940() { - int4 res = tint_first_leading_bit(int4(0)); + int4 res = tint_first_leading_bit(int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.spvasm index ef84d93b7c..2840b3b55e 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 106 +; Bound: 108 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,8 +63,10 @@ %78 = OpConstantComposite %v4uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %85 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %91 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %92 = OpTypeFunction %v4float + %94 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_leading_bit = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -122,29 +124,29 @@ %firstLeadingBit_c1f940 = OpFunction %void None %85 %88 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %18 - %89 = OpFunctionCall %v4int %tint_first_leading_bit %18 + %89 = OpFunctionCall %v4int %tint_first_leading_bit %91 OpStore %res %89 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %92 - %94 = OpLabel - %95 = OpFunctionCall %void %firstLeadingBit_c1f940 +%vertex_main_inner = OpFunction %v4float None %94 + %96 = OpLabel + %97 = OpFunctionCall %void %firstLeadingBit_c1f940 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %85 - %97 = OpLabel - %98 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %98 + %99 = OpLabel + %100 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %100 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %85 - %101 = OpLabel - %102 = OpFunctionCall %void %firstLeadingBit_c1f940 + %103 = OpLabel + %104 = OpFunctionCall %void %firstLeadingBit_c1f940 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %85 - %104 = OpLabel - %105 = OpFunctionCall %void %firstLeadingBit_c1f940 + %106 = OpLabel + %107 = OpFunctionCall %void %firstLeadingBit_c1f940 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.wgsl index d9bc46cef7..f9e47414d1 100644 --- a/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstLeadingBit/c1f940.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_c1f940() { - var res : vec4 = firstLeadingBit(vec4()); + var res : vec4 = firstLeadingBit(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl index e241c813b2..d50b9e8e19 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<4, u32>) -> vec<4, u32> fn firstTrailingBit_110f2c() { - var res: vec4 = firstTrailingBit(vec4()); + var res: vec4 = firstTrailingBit(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl index 0bc8172044..4b15e1f6f7 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_trailing_bit(uint4 v) { } void firstTrailingBit_110f2c() { - uint4 res = tint_first_trailing_bit((0u).xxxx); + uint4 res = tint_first_trailing_bit((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl index 0bc8172044..4b15e1f6f7 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_trailing_bit(uint4 v) { } void firstTrailingBit_110f2c() { - uint4 res = tint_first_trailing_bit((0u).xxxx); + uint4 res = tint_first_trailing_bit((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.glsl index f99c361362..b9d3ec1a27 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_first_trailing_bit(uvec4 v) { } void firstTrailingBit_110f2c() { - uvec4 res = tint_first_trailing_bit(uvec4(0u)); + uvec4 res = tint_first_trailing_bit(uvec4(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec4 tint_first_trailing_bit(uvec4 v) { } void firstTrailingBit_110f2c() { - uvec4 res = tint_first_trailing_bit(uvec4(0u)); + uvec4 res = tint_first_trailing_bit(uvec4(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec4 tint_first_trailing_bit(uvec4 v) { } void firstTrailingBit_110f2c() { - uvec4 res = tint_first_trailing_bit(uvec4(0u)); + uvec4 res = tint_first_trailing_bit(uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.msl index f3a1a29f48..df5194c488 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.msl @@ -17,7 +17,7 @@ uint4 tint_first_trailing_bit(uint4 v) { } void firstTrailingBit_110f2c() { - uint4 res = tint_first_trailing_bit(uint4(0u)); + uint4 res = tint_first_trailing_bit(uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.spvasm index ddb3a41ab2..36c66d9aa3 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %firstTrailingBit_110f2c = OpFunction %void None %78 %81 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %18 - %82 = OpFunctionCall %v4uint %tint_first_trailing_bit %18 + %82 = OpFunctionCall %v4uint %tint_first_trailing_bit %65 OpStore %res %82 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.wgsl index 1ae02d1d01..3bf52331ee 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/110f2c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_110f2c() { - var res : vec4 = firstTrailingBit(vec4()); + var res : vec4 = firstTrailingBit(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl index a20ce53886..d3c119828d 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<2, u32>) -> vec<2, u32> fn firstTrailingBit_45eb10() { - var res: vec2 = firstTrailingBit(vec2()); + var res: vec2 = firstTrailingBit(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl index 20ecb35441..93af66bfe2 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_trailing_bit(uint2 v) { } void firstTrailingBit_45eb10() { - uint2 res = tint_first_trailing_bit((0u).xx); + uint2 res = tint_first_trailing_bit((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl index 20ecb35441..93af66bfe2 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_trailing_bit(uint2 v) { } void firstTrailingBit_45eb10() { - uint2 res = tint_first_trailing_bit((0u).xx); + uint2 res = tint_first_trailing_bit((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.glsl index b8d2cb84fe..d9b84b2bc8 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_first_trailing_bit(uvec2 v) { } void firstTrailingBit_45eb10() { - uvec2 res = tint_first_trailing_bit(uvec2(0u)); + uvec2 res = tint_first_trailing_bit(uvec2(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec2 tint_first_trailing_bit(uvec2 v) { } void firstTrailingBit_45eb10() { - uvec2 res = tint_first_trailing_bit(uvec2(0u)); + uvec2 res = tint_first_trailing_bit(uvec2(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec2 tint_first_trailing_bit(uvec2 v) { } void firstTrailingBit_45eb10() { - uvec2 res = tint_first_trailing_bit(uvec2(0u)); + uvec2 res = tint_first_trailing_bit(uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.msl index eae55ff004..744afadfa6 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.msl @@ -17,7 +17,7 @@ uint2 tint_first_trailing_bit(uint2 v) { } void firstTrailingBit_45eb10() { - uint2 res = tint_first_trailing_bit(uint2(0u)); + uint2 res = tint_first_trailing_bit(uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.spvasm index 7bb312a61c..5aac2e5421 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %firstTrailingBit_45eb10 = OpFunction %void None %78 %81 = OpLabel %res = OpVariable %_ptr_Function_v2uint Function %18 - %82 = OpFunctionCall %v2uint %tint_first_trailing_bit %18 + %82 = OpFunctionCall %v2uint %tint_first_trailing_bit %65 OpStore %res %82 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.wgsl index cbe3457835..0db7af4fbc 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/45eb10.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_45eb10() { - var res : vec2 = firstTrailingBit(vec2()); + var res : vec2 = firstTrailingBit(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl index 6004640798..aabc4fb02c 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<2, i32>) -> vec<2, i32> fn firstTrailingBit_50c072() { - var res: vec2 = firstTrailingBit(vec2()); + var res: vec2 = firstTrailingBit(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl index a430becb23..6831c5b781 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_trailing_bit(int2 v) { } void firstTrailingBit_50c072() { - int2 res = tint_first_trailing_bit((0).xx); + int2 res = tint_first_trailing_bit((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl index a430becb23..6831c5b781 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_trailing_bit(int2 v) { } void firstTrailingBit_50c072() { - int2 res = tint_first_trailing_bit((0).xx); + int2 res = tint_first_trailing_bit((1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.glsl index bfe3eed990..f59914622d 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_first_trailing_bit(ivec2 v) { } void firstTrailingBit_50c072() { - ivec2 res = tint_first_trailing_bit(ivec2(0)); + ivec2 res = tint_first_trailing_bit(ivec2(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec2 tint_first_trailing_bit(ivec2 v) { } void firstTrailingBit_50c072() { - ivec2 res = tint_first_trailing_bit(ivec2(0)); + ivec2 res = tint_first_trailing_bit(ivec2(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec2 tint_first_trailing_bit(ivec2 v) { } void firstTrailingBit_50c072() { - ivec2 res = tint_first_trailing_bit(ivec2(0)); + ivec2 res = tint_first_trailing_bit(ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.msl index 2f96b72c45..77d08a2f77 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.msl @@ -17,7 +17,7 @@ int2 tint_first_trailing_bit(int2 v) { } void firstTrailingBit_50c072() { - int2 res = tint_first_trailing_bit(int2(0)); + int2 res = tint_first_trailing_bit(int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.spvasm index d2ea1952b8..3b8a036a99 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 102 +; Bound: 104 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -62,9 +62,11 @@ %73 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %80 = OpTypeFunction %void - %85 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %86 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %88 = OpTypeFunction %v4float + %89 = OpConstantNull %v2int + %90 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_trailing_bit = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -117,30 +119,30 @@ OpFunctionEnd %firstTrailingBit_50c072 = OpFunction %void None %80 %83 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %85 - %84 = OpFunctionCall %v2int %tint_first_trailing_bit %85 + %res = OpVariable %_ptr_Function_v2int Function %89 + %84 = OpFunctionCall %v2int %tint_first_trailing_bit %86 OpStore %res %84 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %88 - %90 = OpLabel - %91 = OpFunctionCall %void %firstTrailingBit_50c072 +%vertex_main_inner = OpFunction %v4float None %90 + %92 = OpLabel + %93 = OpFunctionCall %void %firstTrailingBit_50c072 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %80 - %93 = OpLabel - %94 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %94 + %95 = OpLabel + %96 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %96 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %80 - %97 = OpLabel - %98 = OpFunctionCall %void %firstTrailingBit_50c072 + %99 = OpLabel + %100 = OpFunctionCall %void %firstTrailingBit_50c072 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %80 - %100 = OpLabel - %101 = OpFunctionCall %void %firstTrailingBit_50c072 + %102 = OpLabel + %103 = OpFunctionCall %void %firstTrailingBit_50c072 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.wgsl index 747c95c4c4..3f1b31245e 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/50c072.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_50c072() { - var res : vec2 = firstTrailingBit(vec2()); + var res : vec2 = firstTrailingBit(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl index 9d41559d03..2b4d081c0e 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<3, i32>) -> vec<3, i32> fn firstTrailingBit_7496d6() { - var res: vec3 = firstTrailingBit(vec3()); + var res: vec3 = firstTrailingBit(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl index 426c09d08a..b6a770e919 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_trailing_bit(int3 v) { } void firstTrailingBit_7496d6() { - int3 res = tint_first_trailing_bit((0).xxx); + int3 res = tint_first_trailing_bit((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl index 426c09d08a..b6a770e919 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_trailing_bit(int3 v) { } void firstTrailingBit_7496d6() { - int3 res = tint_first_trailing_bit((0).xxx); + int3 res = tint_first_trailing_bit((1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.glsl index b7eae3b2d8..f32c11889d 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_first_trailing_bit(ivec3 v) { } void firstTrailingBit_7496d6() { - ivec3 res = tint_first_trailing_bit(ivec3(0)); + ivec3 res = tint_first_trailing_bit(ivec3(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec3 tint_first_trailing_bit(ivec3 v) { } void firstTrailingBit_7496d6() { - ivec3 res = tint_first_trailing_bit(ivec3(0)); + ivec3 res = tint_first_trailing_bit(ivec3(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec3 tint_first_trailing_bit(ivec3 v) { } void firstTrailingBit_7496d6() { - ivec3 res = tint_first_trailing_bit(ivec3(0)); + ivec3 res = tint_first_trailing_bit(ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.msl index b03047a190..ebbd9e5d47 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.msl @@ -17,7 +17,7 @@ int3 tint_first_trailing_bit(int3 v) { } void firstTrailingBit_7496d6() { - int3 res = tint_first_trailing_bit(int3(0)); + int3 res = tint_first_trailing_bit(int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.spvasm index a0178624c7..19085fc050 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 102 +; Bound: 104 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -62,9 +62,11 @@ %73 = OpConstantComposite %v3uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %80 = OpTypeFunction %void - %85 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %86 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %88 = OpTypeFunction %v4float + %89 = OpConstantNull %v3int + %90 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_trailing_bit = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -117,30 +119,30 @@ OpFunctionEnd %firstTrailingBit_7496d6 = OpFunction %void None %80 %83 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %85 - %84 = OpFunctionCall %v3int %tint_first_trailing_bit %85 + %res = OpVariable %_ptr_Function_v3int Function %89 + %84 = OpFunctionCall %v3int %tint_first_trailing_bit %86 OpStore %res %84 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %88 - %90 = OpLabel - %91 = OpFunctionCall %void %firstTrailingBit_7496d6 +%vertex_main_inner = OpFunction %v4float None %90 + %92 = OpLabel + %93 = OpFunctionCall %void %firstTrailingBit_7496d6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %80 - %93 = OpLabel - %94 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %94 + %95 = OpLabel + %96 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %96 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %80 - %97 = OpLabel - %98 = OpFunctionCall %void %firstTrailingBit_7496d6 + %99 = OpLabel + %100 = OpFunctionCall %void %firstTrailingBit_7496d6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %80 - %100 = OpLabel - %101 = OpFunctionCall %void %firstTrailingBit_7496d6 + %102 = OpLabel + %103 = OpFunctionCall %void %firstTrailingBit_7496d6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.wgsl index 6bd04ddcae..0786fc72a7 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/7496d6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_7496d6() { - var res : vec3 = firstTrailingBit(vec3()); + var res : vec3 = firstTrailingBit(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl index ddbbf70382..47b496804d 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<4, i32>) -> vec<4, i32> fn firstTrailingBit_86551b() { - var res: vec4 = firstTrailingBit(vec4()); + var res: vec4 = firstTrailingBit(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl index 67fdee4d23..83b0e6c5c8 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_trailing_bit(int4 v) { } void firstTrailingBit_86551b() { - int4 res = tint_first_trailing_bit((0).xxxx); + int4 res = tint_first_trailing_bit((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl index 67fdee4d23..83b0e6c5c8 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_trailing_bit(int4 v) { } void firstTrailingBit_86551b() { - int4 res = tint_first_trailing_bit((0).xxxx); + int4 res = tint_first_trailing_bit((1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.glsl index 61ca80d588..5965aea01d 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_first_trailing_bit(ivec4 v) { } void firstTrailingBit_86551b() { - ivec4 res = tint_first_trailing_bit(ivec4(0)); + ivec4 res = tint_first_trailing_bit(ivec4(1)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ ivec4 tint_first_trailing_bit(ivec4 v) { } void firstTrailingBit_86551b() { - ivec4 res = tint_first_trailing_bit(ivec4(0)); + ivec4 res = tint_first_trailing_bit(ivec4(1)); } void fragment_main() { @@ -80,7 +80,7 @@ ivec4 tint_first_trailing_bit(ivec4 v) { } void firstTrailingBit_86551b() { - ivec4 res = tint_first_trailing_bit(ivec4(0)); + ivec4 res = tint_first_trailing_bit(ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.msl index d3c9254280..1f2e6b2eb5 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.msl @@ -17,7 +17,7 @@ int4 tint_first_trailing_bit(int4 v) { } void firstTrailingBit_86551b() { - int4 res = tint_first_trailing_bit(int4(0)); + int4 res = tint_first_trailing_bit(int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.spvasm index 1e44e0a0d3..fb88fcd4ab 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 102 +; Bound: 104 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -62,9 +62,11 @@ %73 = OpConstantComposite %v4uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %80 = OpTypeFunction %void - %85 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %86 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %88 = OpTypeFunction %v4float + %89 = OpConstantNull %v4int + %90 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_trailing_bit = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -117,30 +119,30 @@ OpFunctionEnd %firstTrailingBit_86551b = OpFunction %void None %80 %83 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %85 - %84 = OpFunctionCall %v4int %tint_first_trailing_bit %85 + %res = OpVariable %_ptr_Function_v4int Function %89 + %84 = OpFunctionCall %v4int %tint_first_trailing_bit %86 OpStore %res %84 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %88 - %90 = OpLabel - %91 = OpFunctionCall %void %firstTrailingBit_86551b +%vertex_main_inner = OpFunction %v4float None %90 + %92 = OpLabel + %93 = OpFunctionCall %void %firstTrailingBit_86551b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %80 - %93 = OpLabel - %94 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %94 + %95 = OpLabel + %96 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %96 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %80 - %97 = OpLabel - %98 = OpFunctionCall %void %firstTrailingBit_86551b + %99 = OpLabel + %100 = OpFunctionCall %void %firstTrailingBit_86551b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %80 - %100 = OpLabel - %101 = OpFunctionCall %void %firstTrailingBit_86551b + %102 = OpLabel + %103 = OpFunctionCall %void %firstTrailingBit_86551b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.wgsl index 273c4cdc7d..9bfaaf71f2 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/86551b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_86551b() { - var res : vec4 = firstTrailingBit(vec4()); + var res : vec4 = firstTrailingBit(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl index a476078479..01a8adf16d 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<3, u32>) -> vec<3, u32> fn firstTrailingBit_cb51ce() { - var res: vec3 = firstTrailingBit(vec3()); + var res: vec3 = firstTrailingBit(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl index 4828bc8d04..18d192c25b 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_trailing_bit(uint3 v) { } void firstTrailingBit_cb51ce() { - uint3 res = tint_first_trailing_bit((0u).xxx); + uint3 res = tint_first_trailing_bit((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl index 4828bc8d04..18d192c25b 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_trailing_bit(uint3 v) { } void firstTrailingBit_cb51ce() { - uint3 res = tint_first_trailing_bit((0u).xxx); + uint3 res = tint_first_trailing_bit((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.glsl index 579c13b643..c7568164df 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_first_trailing_bit(uvec3 v) { } void firstTrailingBit_cb51ce() { - uvec3 res = tint_first_trailing_bit(uvec3(0u)); + uvec3 res = tint_first_trailing_bit(uvec3(1u)); } vec4 vertex_main() { @@ -51,7 +51,7 @@ uvec3 tint_first_trailing_bit(uvec3 v) { } void firstTrailingBit_cb51ce() { - uvec3 res = tint_first_trailing_bit(uvec3(0u)); + uvec3 res = tint_first_trailing_bit(uvec3(1u)); } void fragment_main() { @@ -80,7 +80,7 @@ uvec3 tint_first_trailing_bit(uvec3 v) { } void firstTrailingBit_cb51ce() { - uvec3 res = tint_first_trailing_bit(uvec3(0u)); + uvec3 res = tint_first_trailing_bit(uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.msl index 0b4fc3e15e..9acc871fce 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.msl @@ -17,7 +17,7 @@ uint3 tint_first_trailing_bit(uint3 v) { } void firstTrailingBit_cb51ce() { - uint3 res = tint_first_trailing_bit(uint3(0u)); + uint3 res = tint_first_trailing_bit(uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.spvasm index b89d2f59ba..06c2e92d04 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %firstTrailingBit_cb51ce = OpFunction %void None %78 %81 = OpLabel %res = OpVariable %_ptr_Function_v3uint Function %18 - %82 = OpFunctionCall %v3uint %tint_first_trailing_bit %18 + %82 = OpFunctionCall %v3uint %tint_first_trailing_bit %65 OpStore %res %82 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.wgsl index e8f2f99b4c..e18b54e3c5 100644 --- a/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/firstTrailingBit/cb51ce.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_cb51ce() { - var res : vec3 = firstTrailingBit(vec3()); + var res : vec3 = firstTrailingBit(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl index fee3492d2c..5ab3b5244a 100644 --- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl +++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl @@ -25,7 +25,7 @@ // fn floor(vec<4, f32>) -> vec<4, f32> fn floor_3bccc4() { - var res: vec4 = floor(vec4()); + var res: vec4 = floor(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.dxc.hlsl index 5306bad2f8..4f77c085bf 100644 --- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_3bccc4() { - float4 res = floor((0.0f).xxxx); + float4 res = floor((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.fxc.hlsl index 5306bad2f8..4f77c085bf 100644 --- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void floor_3bccc4() { - float4 res = floor((0.0f).xxxx); + float4 res = floor((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.glsl index 6932c86c7b..a37a4dc5c1 100644 --- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void floor_3bccc4() { - vec4 res = floor(vec4(0.0f)); + vec4 res = floor(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void floor_3bccc4() { - vec4 res = floor(vec4(0.0f)); + vec4 res = floor(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void floor_3bccc4() { - vec4 res = floor(vec4(0.0f)); + vec4 res = floor(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.msl index 17290a10db..a5d5b84763 100644 --- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_3bccc4() { - float4 res = floor(float4(0.0f)); + float4 res = floor(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.spvasm index acc6532a71..d9dd56bd14 100644 --- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %floor_3bccc4 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Floor %5 + %13 = OpExtInst %v4float %14 Floor %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %floor_3bccc4 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %floor_3bccc4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %floor_3bccc4 + %27 = OpLabel + %28 = OpFunctionCall %void %floor_3bccc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %floor_3bccc4 + %30 = OpLabel + %31 = OpFunctionCall %void %floor_3bccc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.wgsl index 9e31c12b29..1ad4e281ac 100644 --- a/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/3bccc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_3bccc4() { - var res : vec4 = floor(vec4()); + var res : vec4 = floor(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl index 5e2fa755f0..23df1edcc9 100644 --- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl +++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl @@ -25,7 +25,7 @@ // fn floor(vec<2, f32>) -> vec<2, f32> fn floor_5fc9ac() { - var res: vec2 = floor(vec2()); + var res: vec2 = floor(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.dxc.hlsl index 4233cd41e9..80235f73c4 100644 --- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_5fc9ac() { - float2 res = floor((0.0f).xx); + float2 res = floor((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.fxc.hlsl index 4233cd41e9..80235f73c4 100644 --- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void floor_5fc9ac() { - float2 res = floor((0.0f).xx); + float2 res = floor((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.glsl index 580cb90d66..61482410a7 100644 --- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void floor_5fc9ac() { - vec2 res = floor(vec2(0.0f)); + vec2 res = floor(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void floor_5fc9ac() { - vec2 res = floor(vec2(0.0f)); + vec2 res = floor(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void floor_5fc9ac() { - vec2 res = floor(vec2(0.0f)); + vec2 res = floor(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.msl index 572c9f6efd..ccc2e384ff 100644 --- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_5fc9ac() { - float2 res = floor(float2(0.0f)); + float2 res = floor(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.spvasm index 49b872cfef..6396eb712f 100644 --- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %floor_5fc9ac = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Floor %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Floor %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %floor_5fc9ac +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %floor_5fc9ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %floor_5fc9ac + %29 = OpLabel + %30 = OpFunctionCall %void %floor_5fc9ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %floor_5fc9ac + %32 = OpLabel + %33 = OpFunctionCall %void %floor_5fc9ac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.wgsl index 7ddc9238c2..caa758186b 100644 --- a/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/5fc9ac.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_5fc9ac() { - var res : vec2 = floor(vec2()); + var res : vec2 = floor(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl index e44e9467c3..ed3fe20af3 100644 --- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl +++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl @@ -25,7 +25,7 @@ // fn floor(vec<3, f32>) -> vec<3, f32> fn floor_60d7ea() { - var res: vec3 = floor(vec3()); + var res: vec3 = floor(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.dxc.hlsl index 6f46d2e386..726fd06288 100644 --- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_60d7ea() { - float3 res = floor((0.0f).xxx); + float3 res = floor((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.fxc.hlsl index 6f46d2e386..726fd06288 100644 --- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void floor_60d7ea() { - float3 res = floor((0.0f).xxx); + float3 res = floor((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.glsl index df0b2841d1..38ae3c168c 100644 --- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void floor_60d7ea() { - vec3 res = floor(vec3(0.0f)); + vec3 res = floor(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void floor_60d7ea() { - vec3 res = floor(vec3(0.0f)); + vec3 res = floor(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void floor_60d7ea() { - vec3 res = floor(vec3(0.0f)); + vec3 res = floor(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.msl index 963c9a6fd8..cc96d6f915 100644 --- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_60d7ea() { - float3 res = floor(float3(0.0f)); + float3 res = floor(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.spvasm index c0fa003a5f..77f35170ee 100644 --- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %floor_60d7ea = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Floor %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Floor %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %floor_60d7ea +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %floor_60d7ea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %floor_60d7ea + %29 = OpLabel + %30 = OpFunctionCall %void %floor_60d7ea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %floor_60d7ea + %32 = OpLabel + %33 = OpFunctionCall %void %floor_60d7ea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.wgsl index 8b6be7c755..1403c179e3 100644 --- a/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/60d7ea.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_60d7ea() { - var res : vec3 = floor(vec3()); + var res : vec3 = floor(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/66f154.wgsl b/test/tint/builtins/gen/literal/floor/66f154.wgsl index 44ed3c6293..aa710a5268 100644 --- a/test/tint/builtins/gen/literal/floor/66f154.wgsl +++ b/test/tint/builtins/gen/literal/floor/66f154.wgsl @@ -25,7 +25,7 @@ // fn floor(f32) -> f32 fn floor_66f154() { - var res: f32 = floor(1.0); + var res: f32 = floor(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.wgsl index 50c9513c2a..2451e66b9a 100644 --- a/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/floor/66f154.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_66f154() { - var res : f32 = floor(1.0); + var res : f32 = floor(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl index 371cf352b3..9e436dfd93 100644 --- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl +++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl @@ -25,7 +25,7 @@ // fn fma(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn fma_26a7a9() { - var res: vec2 = fma(vec2(), vec2(), vec2()); + var res: vec2 = fma(vec2(1.f), vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.dxc.hlsl index f1c9865a3f..d58d1dbb11 100644 --- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fma_26a7a9() { - float2 res = mad((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = mad((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.fxc.hlsl index f1c9865a3f..d58d1dbb11 100644 --- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fma_26a7a9() { - float2 res = mad((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = mad((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.glsl index 4d2f38f6fb..1905d1615b 100644 --- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fma_26a7a9() { - vec2 res = ((vec2(0.0f)) * (vec2(0.0f)) + (vec2(0.0f))); + vec2 res = ((vec2(1.0f)) * (vec2(1.0f)) + (vec2(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void fma_26a7a9() { - vec2 res = ((vec2(0.0f)) * (vec2(0.0f)) + (vec2(0.0f))); + vec2 res = ((vec2(1.0f)) * (vec2(1.0f)) + (vec2(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void fma_26a7a9() { - vec2 res = ((vec2(0.0f)) * (vec2(0.0f)) + (vec2(0.0f))); + vec2 res = ((vec2(1.0f)) * (vec2(1.0f)) + (vec2(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.msl index 568d3026d3..98fe6440fe 100644 --- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fma_26a7a9() { - float2 res = fma(float2(0.0f), float2(0.0f), float2(0.0f)); + float2 res = fma(float2(1.0f), float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.spvasm index 5df98bd256..2e2385e2b2 100644 --- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %fma_26a7a9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Fma %16 %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Fma %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %fma_26a7a9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %fma_26a7a9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %fma_26a7a9 + %29 = OpLabel + %30 = OpFunctionCall %void %fma_26a7a9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fma_26a7a9 + %32 = OpLabel + %33 = OpFunctionCall %void %fma_26a7a9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.wgsl index 86ac098ab9..b58dda7480 100644 --- a/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/26a7a9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fma_26a7a9() { - var res : vec2 = fma(vec2(), vec2(), vec2()); + var res : vec2 = fma(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl b/test/tint/builtins/gen/literal/fma/6a3283.wgsl index 7e9d4713f1..51b413c06b 100644 --- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl +++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl @@ -25,7 +25,7 @@ // fn fma(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn fma_6a3283() { - var res: vec4 = fma(vec4(), vec4(), vec4()); + var res: vec4 = fma(vec4(1.f), vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.dxc.hlsl index b6d436f361..8959dfa17a 100644 --- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fma_6a3283() { - float4 res = mad((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = mad((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.fxc.hlsl index b6d436f361..8959dfa17a 100644 --- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fma_6a3283() { - float4 res = mad((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = mad((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.glsl index 16116fbb1b..96bc9f232b 100644 --- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fma_6a3283() { - vec4 res = ((vec4(0.0f)) * (vec4(0.0f)) + (vec4(0.0f))); + vec4 res = ((vec4(1.0f)) * (vec4(1.0f)) + (vec4(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void fma_6a3283() { - vec4 res = ((vec4(0.0f)) * (vec4(0.0f)) + (vec4(0.0f))); + vec4 res = ((vec4(1.0f)) * (vec4(1.0f)) + (vec4(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void fma_6a3283() { - vec4 res = ((vec4(0.0f)) * (vec4(0.0f)) + (vec4(0.0f))); + vec4 res = ((vec4(1.0f)) * (vec4(1.0f)) + (vec4(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.msl index 370d6f8799..6c675c1166 100644 --- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fma_6a3283() { - float4 res = fma(float4(0.0f), float4(0.0f), float4(0.0f)); + float4 res = fma(float4(1.0f), float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.spvasm index cf266852c7..197b06b98a 100644 --- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %fma_6a3283 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Fma %5 %5 %5 + %13 = OpExtInst %v4float %14 Fma %16 %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %fma_6a3283 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %fma_6a3283 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %fma_6a3283 + %27 = OpLabel + %28 = OpFunctionCall %void %fma_6a3283 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fma_6a3283 + %30 = OpLabel + %31 = OpFunctionCall %void %fma_6a3283 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.wgsl index 97053b7c8e..4a60892f3d 100644 --- a/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/6a3283.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fma_6a3283() { - var res : vec4 = fma(vec4(), vec4(), vec4()); + var res : vec4 = fma(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/c10ba3.wgsl b/test/tint/builtins/gen/literal/fma/c10ba3.wgsl index fa1eb72399..1d9dfb0655 100644 --- a/test/tint/builtins/gen/literal/fma/c10ba3.wgsl +++ b/test/tint/builtins/gen/literal/fma/c10ba3.wgsl @@ -25,7 +25,7 @@ // fn fma(f32, f32, f32) -> f32 fn fma_c10ba3() { - var res: f32 = fma(1.0, 1.0, 1.0); + var res: f32 = fma(1.f, 1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.wgsl index 47d583d45e..178dcd2dc6 100644 --- a/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/c10ba3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fma_c10ba3() { - var res : f32 = fma(1.0, 1.0, 1.0); + var res : f32 = fma(1.0f, 1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl index efd17154da..fa50d39051 100644 --- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl +++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl @@ -25,7 +25,7 @@ // fn fma(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn fma_e17c5c() { - var res: vec3 = fma(vec3(), vec3(), vec3()); + var res: vec3 = fma(vec3(1.f), vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.dxc.hlsl index ca6355783f..89cd7e83db 100644 --- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fma_e17c5c() { - float3 res = mad((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = mad((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.fxc.hlsl index ca6355783f..89cd7e83db 100644 --- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fma_e17c5c() { - float3 res = mad((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = mad((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.glsl index 1083afa922..d1b1d2ee1f 100644 --- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fma_e17c5c() { - vec3 res = ((vec3(0.0f)) * (vec3(0.0f)) + (vec3(0.0f))); + vec3 res = ((vec3(1.0f)) * (vec3(1.0f)) + (vec3(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void fma_e17c5c() { - vec3 res = ((vec3(0.0f)) * (vec3(0.0f)) + (vec3(0.0f))); + vec3 res = ((vec3(1.0f)) * (vec3(1.0f)) + (vec3(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void fma_e17c5c() { - vec3 res = ((vec3(0.0f)) * (vec3(0.0f)) + (vec3(0.0f))); + vec3 res = ((vec3(1.0f)) * (vec3(1.0f)) + (vec3(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.msl index 5598d6f9db..469605fc25 100644 --- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fma_e17c5c() { - float3 res = fma(float3(0.0f), float3(0.0f), float3(0.0f)); + float3 res = fma(float3(1.0f), float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.spvasm index de2025e442..f1d385b819 100644 --- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %fma_e17c5c = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Fma %16 %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Fma %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %fma_e17c5c +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %fma_e17c5c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %fma_e17c5c + %29 = OpLabel + %30 = OpFunctionCall %void %fma_e17c5c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fma_e17c5c + %32 = OpLabel + %33 = OpFunctionCall %void %fma_e17c5c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.wgsl index 7fcedaaee0..8ddabbe7a0 100644 --- a/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fma/e17c5c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fma_e17c5c() { - var res : vec3 = fma(vec3(), vec3(), vec3()); + var res : vec3 = fma(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl index d68b871d67..0f1389c4cc 100644 --- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl +++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl @@ -25,7 +25,7 @@ // fn fract(vec<4, f32>) -> vec<4, f32> fn fract_8bc1e9() { - var res: vec4 = fract(vec4()); + var res: vec4 = fract(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.dxc.hlsl index ec690bca9d..f6a454cc2a 100644 --- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_8bc1e9() { - float4 res = frac((0.0f).xxxx); + float4 res = frac((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.fxc.hlsl index ec690bca9d..f6a454cc2a 100644 --- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fract_8bc1e9() { - float4 res = frac((0.0f).xxxx); + float4 res = frac((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.glsl index ee3f7d50ad..e89b9d8eb7 100644 --- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fract_8bc1e9() { - vec4 res = fract(vec4(0.0f)); + vec4 res = fract(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void fract_8bc1e9() { - vec4 res = fract(vec4(0.0f)); + vec4 res = fract(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void fract_8bc1e9() { - vec4 res = fract(vec4(0.0f)); + vec4 res = fract(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.msl index 1e1b110ed8..97bbceff93 100644 --- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_8bc1e9() { - float4 res = fract(float4(0.0f)); + float4 res = fract(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.spvasm index e6d041881d..0f9bdc348c 100644 --- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %fract_8bc1e9 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Fract %5 + %13 = OpExtInst %v4float %14 Fract %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %fract_8bc1e9 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %fract_8bc1e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %fract_8bc1e9 + %27 = OpLabel + %28 = OpFunctionCall %void %fract_8bc1e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %fract_8bc1e9 + %30 = OpLabel + %31 = OpFunctionCall %void %fract_8bc1e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.wgsl index 627af4a8dc..7c9911588a 100644 --- a/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/8bc1e9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_8bc1e9() { - var res : vec4 = fract(vec4()); + var res : vec4 = fract(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl b/test/tint/builtins/gen/literal/fract/943cb1.wgsl index 1efe2a0684..4c43cfd6eb 100644 --- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl +++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl @@ -25,7 +25,7 @@ // fn fract(vec<2, f32>) -> vec<2, f32> fn fract_943cb1() { - var res: vec2 = fract(vec2()); + var res: vec2 = fract(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.dxc.hlsl index 625a0ec215..60f7ce1dd2 100644 --- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_943cb1() { - float2 res = frac((0.0f).xx); + float2 res = frac((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.fxc.hlsl index 625a0ec215..60f7ce1dd2 100644 --- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fract_943cb1() { - float2 res = frac((0.0f).xx); + float2 res = frac((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.glsl index 628bdef0ef..c463977b85 100644 --- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fract_943cb1() { - vec2 res = fract(vec2(0.0f)); + vec2 res = fract(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void fract_943cb1() { - vec2 res = fract(vec2(0.0f)); + vec2 res = fract(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void fract_943cb1() { - vec2 res = fract(vec2(0.0f)); + vec2 res = fract(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.msl index 6830fdfd1c..ea16cd92b3 100644 --- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_943cb1() { - float2 res = fract(float2(0.0f)); + float2 res = fract(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.spvasm index afe8e9841f..debfe32032 100644 --- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %fract_943cb1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Fract %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Fract %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %fract_943cb1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %fract_943cb1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %fract_943cb1 + %29 = OpLabel + %30 = OpFunctionCall %void %fract_943cb1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fract_943cb1 + %32 = OpLabel + %33 = OpFunctionCall %void %fract_943cb1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.wgsl index 457b9cb503..21a6738bf6 100644 --- a/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/943cb1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_943cb1() { - var res : vec2 = fract(vec2()); + var res : vec2 = fract(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl b/test/tint/builtins/gen/literal/fract/a49758.wgsl index 5d67222b0a..1889c0f77b 100644 --- a/test/tint/builtins/gen/literal/fract/a49758.wgsl +++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl @@ -25,7 +25,7 @@ // fn fract(vec<3, f32>) -> vec<3, f32> fn fract_a49758() { - var res: vec3 = fract(vec3()); + var res: vec3 = fract(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.dxc.hlsl index 9a2ae28273..ad679713ef 100644 --- a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_a49758() { - float3 res = frac((0.0f).xxx); + float3 res = frac((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.fxc.hlsl index 9a2ae28273..ad679713ef 100644 --- a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fract_a49758() { - float3 res = frac((0.0f).xxx); + float3 res = frac((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.glsl index 9a81b933c5..d6c541506b 100644 --- a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fract_a49758() { - vec3 res = fract(vec3(0.0f)); + vec3 res = fract(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void fract_a49758() { - vec3 res = fract(vec3(0.0f)); + vec3 res = fract(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void fract_a49758() { - vec3 res = fract(vec3(0.0f)); + vec3 res = fract(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.msl index c3631f2453..c59b0defe6 100644 --- a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_a49758() { - float3 res = fract(float3(0.0f)); + float3 res = fract(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.spvasm index 284b664512..e132589760 100644 --- a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %fract_a49758 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Fract %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Fract %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %fract_a49758 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %fract_a49758 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %fract_a49758 + %29 = OpLabel + %30 = OpFunctionCall %void %fract_a49758 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fract_a49758 + %32 = OpLabel + %33 = OpFunctionCall %void %fract_a49758 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.wgsl index b973bddcba..70c82507aa 100644 --- a/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/a49758.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_a49758() { - var res : vec3 = fract(vec3()); + var res : vec3 = fract(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/fa5c71.wgsl b/test/tint/builtins/gen/literal/fract/fa5c71.wgsl index 352b67d4bf..395311b1ed 100644 --- a/test/tint/builtins/gen/literal/fract/fa5c71.wgsl +++ b/test/tint/builtins/gen/literal/fract/fa5c71.wgsl @@ -25,7 +25,7 @@ // fn fract(f32) -> f32 fn fract_fa5c71() { - var res: f32 = fract(1.0); + var res: f32 = fract(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.wgsl index eedc8aee92..431666aec2 100644 --- a/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fract/fa5c71.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_fa5c71() { - var res : f32 = fract(1.0); + var res : f32 = fract(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/368997.wgsl b/test/tint/builtins/gen/literal/frexp/368997.wgsl index 8db1238c70..4cfa8e499d 100644 --- a/test/tint/builtins/gen/literal/frexp/368997.wgsl +++ b/test/tint/builtins/gen/literal/frexp/368997.wgsl @@ -25,7 +25,7 @@ // fn frexp(vec<3, f32>) -> __frexp_result_vec<3> fn frexp_368997() { - var res = frexp(vec3()); + var res = frexp(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.dxc.hlsl index 154eb56491..d546bd6ce6 100644 --- a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec3 tint_frexp(float3 param_0) { } void frexp_368997() { - frexp_result_vec3 res = tint_frexp((0.0f).xxx); + frexp_result_vec3 res = tint_frexp((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.fxc.hlsl index 154eb56491..d546bd6ce6 100644 --- a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec3 tint_frexp(float3 param_0) { } void frexp_368997() { - frexp_result_vec3 res = tint_frexp((0.0f).xxx); + frexp_result_vec3 res = tint_frexp((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.glsl index b95a82aa49..0ebe90fca6 100644 --- a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.glsl @@ -13,7 +13,7 @@ frexp_result_vec3 tint_frexp(vec3 param_0) { void frexp_368997() { - frexp_result_vec3 res = tint_frexp(vec3(0.0f)); + frexp_result_vec3 res = tint_frexp(vec3(1.0f)); } vec4 vertex_main() { @@ -45,7 +45,7 @@ frexp_result_vec3 tint_frexp(vec3 param_0) { void frexp_368997() { - frexp_result_vec3 res = tint_frexp(vec3(0.0f)); + frexp_result_vec3 res = tint_frexp(vec3(1.0f)); } void fragment_main() { @@ -71,7 +71,7 @@ frexp_result_vec3 tint_frexp(vec3 param_0) { void frexp_368997() { - frexp_result_vec3 res = tint_frexp(vec3(0.0f)); + frexp_result_vec3 res = tint_frexp(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.msl index a50831a87b..d00280f92c 100644 --- a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec3 tint_frexp(float3 param_0) { } void frexp_368997() { - frexp_result_vec3 res = tint_frexp(float3(0.0f)); + frexp_result_vec3 res = tint_frexp(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.spvasm index 1aba2f8fde..df6c282447 100644 --- a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.spvasm @@ -40,27 +40,27 @@ %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %__frexp_result_vec3 = OpTypeStruct %v3float %v3int - %19 = OpConstantNull %v3float -%_ptr_Function___frexp_result_vec3 = OpTypePointer Function %__frexp_result_vec3 - %22 = OpConstantNull %__frexp_result_vec3 - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function___frexp_result_vec3 = OpTypePointer Function %__frexp_result_vec3 + %23 = OpConstantNull %__frexp_result_vec3 + %24 = OpTypeFunction %v4float %frexp_368997 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___frexp_result_vec3 Function %22 - %13 = OpExtInst %__frexp_result_vec3 %18 FrexpStruct %19 + %res = OpVariable %_ptr_Function___frexp_result_vec3 Function %23 + %13 = OpExtInst %__frexp_result_vec3 %18 FrexpStruct %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %frexp_368997 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %frexp_368997 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.wgsl index 19b9f7d3c9..2f9ec781f0 100644 --- a/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/368997.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_368997() { - var res = frexp(vec3()); + var res = frexp(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl index 38375e3465..aa5be44d9d 100644 --- a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl +++ b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl @@ -25,7 +25,7 @@ // fn frexp(vec<4, f32>) -> __frexp_result_vec<4> fn frexp_3c4f48() { - var res = frexp(vec4()); + var res = frexp(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.dxc.hlsl index 09e278a5e0..5fc892b4a2 100644 --- a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec4 tint_frexp(float4 param_0) { } void frexp_3c4f48() { - frexp_result_vec4 res = tint_frexp((0.0f).xxxx); + frexp_result_vec4 res = tint_frexp((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.fxc.hlsl index 09e278a5e0..5fc892b4a2 100644 --- a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec4 tint_frexp(float4 param_0) { } void frexp_3c4f48() { - frexp_result_vec4 res = tint_frexp((0.0f).xxxx); + frexp_result_vec4 res = tint_frexp((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.glsl index 94d803f3da..83e64f2eb5 100644 --- a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.glsl @@ -13,7 +13,7 @@ frexp_result_vec4 tint_frexp(vec4 param_0) { void frexp_3c4f48() { - frexp_result_vec4 res = tint_frexp(vec4(0.0f)); + frexp_result_vec4 res = tint_frexp(vec4(1.0f)); } vec4 vertex_main() { @@ -45,7 +45,7 @@ frexp_result_vec4 tint_frexp(vec4 param_0) { void frexp_3c4f48() { - frexp_result_vec4 res = tint_frexp(vec4(0.0f)); + frexp_result_vec4 res = tint_frexp(vec4(1.0f)); } void fragment_main() { @@ -71,7 +71,7 @@ frexp_result_vec4 tint_frexp(vec4 param_0) { void frexp_3c4f48() { - frexp_result_vec4 res = tint_frexp(vec4(0.0f)); + frexp_result_vec4 res = tint_frexp(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.msl index 9f471b6bc9..c150a8c264 100644 --- a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec4 tint_frexp(float4 param_0) { } void frexp_3c4f48() { - frexp_result_vec4 res = tint_frexp(float4(0.0f)); + frexp_result_vec4 res = tint_frexp(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.spvasm index 82a388ccec..953f054dfb 100644 --- a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader %17 = OpExtInstImport "GLSL.std.450" @@ -39,36 +39,37 @@ %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %__frexp_result_vec4 = OpTypeStruct %v4float %v4int -%_ptr_Function___frexp_result_vec4 = OpTypePointer Function %__frexp_result_vec4 - %20 = OpConstantNull %__frexp_result_vec4 - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function___frexp_result_vec4 = OpTypePointer Function %__frexp_result_vec4 + %22 = OpConstantNull %__frexp_result_vec4 + %23 = OpTypeFunction %v4float %frexp_3c4f48 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___frexp_result_vec4 Function %20 - %13 = OpExtInst %__frexp_result_vec4 %17 FrexpStruct %5 + %res = OpVariable %_ptr_Function___frexp_result_vec4 Function %22 + %13 = OpExtInst %__frexp_result_vec4 %17 FrexpStruct %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %frexp_3c4f48 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %frexp_3c4f48 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %frexp_3c4f48 + %31 = OpLabel + %32 = OpFunctionCall %void %frexp_3c4f48 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %frexp_3c4f48 + %34 = OpLabel + %35 = OpFunctionCall %void %frexp_3c4f48 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.wgsl index 2876d96692..cb1d316639 100644 --- a/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/3c4f48.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_3c4f48() { - var res = frexp(vec4()); + var res = frexp(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl index fa8647a5d4..bb2aa69f99 100644 --- a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl +++ b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl @@ -25,7 +25,7 @@ // fn frexp(vec<2, f32>) -> __frexp_result_vec<2> fn frexp_4bdfc7() { - var res = frexp(vec2()); + var res = frexp(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.dxc.hlsl index 9fec4761b4..310178b70f 100644 --- a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec2 tint_frexp(float2 param_0) { } void frexp_4bdfc7() { - frexp_result_vec2 res = tint_frexp((0.0f).xx); + frexp_result_vec2 res = tint_frexp((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.fxc.hlsl index 9fec4761b4..310178b70f 100644 --- a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec2 tint_frexp(float2 param_0) { } void frexp_4bdfc7() { - frexp_result_vec2 res = tint_frexp((0.0f).xx); + frexp_result_vec2 res = tint_frexp((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.glsl index 2af8af81ac..b6b21f4834 100644 --- a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.glsl @@ -13,7 +13,7 @@ frexp_result_vec2 tint_frexp(vec2 param_0) { void frexp_4bdfc7() { - frexp_result_vec2 res = tint_frexp(vec2(0.0f)); + frexp_result_vec2 res = tint_frexp(vec2(1.0f)); } vec4 vertex_main() { @@ -45,7 +45,7 @@ frexp_result_vec2 tint_frexp(vec2 param_0) { void frexp_4bdfc7() { - frexp_result_vec2 res = tint_frexp(vec2(0.0f)); + frexp_result_vec2 res = tint_frexp(vec2(1.0f)); } void fragment_main() { @@ -71,7 +71,7 @@ frexp_result_vec2 tint_frexp(vec2 param_0) { void frexp_4bdfc7() { - frexp_result_vec2 res = tint_frexp(vec2(0.0f)); + frexp_result_vec2 res = tint_frexp(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.msl index a4048c07c1..dc8fd476a9 100644 --- a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec2 tint_frexp(float2 param_0) { } void frexp_4bdfc7() { - frexp_result_vec2 res = tint_frexp(float2(0.0f)); + frexp_result_vec2 res = tint_frexp(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.spvasm index 3a47390c0a..5c21dff1aa 100644 --- a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.spvasm @@ -40,27 +40,27 @@ %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %__frexp_result_vec2 = OpTypeStruct %v2float %v2int - %19 = OpConstantNull %v2float -%_ptr_Function___frexp_result_vec2 = OpTypePointer Function %__frexp_result_vec2 - %22 = OpConstantNull %__frexp_result_vec2 - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function___frexp_result_vec2 = OpTypePointer Function %__frexp_result_vec2 + %23 = OpConstantNull %__frexp_result_vec2 + %24 = OpTypeFunction %v4float %frexp_4bdfc7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___frexp_result_vec2 Function %22 - %13 = OpExtInst %__frexp_result_vec2 %18 FrexpStruct %19 + %res = OpVariable %_ptr_Function___frexp_result_vec2 Function %23 + %13 = OpExtInst %__frexp_result_vec2 %18 FrexpStruct %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %frexp_4bdfc7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %frexp_4bdfc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.wgsl index b4933f853b..23a0e009f0 100644 --- a/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/4bdfc7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_4bdfc7() { - var res = frexp(vec2()); + var res = frexp(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/eabd40.wgsl b/test/tint/builtins/gen/literal/frexp/eabd40.wgsl index 12bb0c31c4..fb2f1f2c28 100644 --- a/test/tint/builtins/gen/literal/frexp/eabd40.wgsl +++ b/test/tint/builtins/gen/literal/frexp/eabd40.wgsl @@ -25,7 +25,7 @@ // fn frexp(f32) -> __frexp_result fn frexp_eabd40() { - var res = frexp(1.0); + var res = frexp(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/frexp/eabd40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/eabd40.wgsl.expected.wgsl index a6793c5e0f..4bd91b68f3 100644 --- a/test/tint/builtins/gen/literal/frexp/eabd40.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/frexp/eabd40.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_eabd40() { - var res = frexp(1.0); + var res = frexp(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl index fae0efbfd4..edab52a4a4 100644 --- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl @@ -25,7 +25,7 @@ // fn fwidth(vec<3, f32>) -> vec<3, f32> fn fwidth_5d1b39() { - var res: vec3 = fwidth(vec3()); + var res: vec3 = fwidth(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.dxc.hlsl index d3ed334834..f93dd5c2d9 100644 --- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidth_5d1b39() { - float3 res = fwidth((0.0f).xxx); + float3 res = fwidth((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.fxc.hlsl index d3ed334834..f93dd5c2d9 100644 --- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidth_5d1b39() { - float3 res = fwidth((0.0f).xxx); + float3 res = fwidth((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.glsl index fd55d4cee5..197e3fe2bf 100644 --- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidth_5d1b39() { - vec3 res = fwidth(vec3(0.0f)); + vec3 res = fwidth(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.msl index 76ca23d020..94e9749021 100644 --- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidth_5d1b39() { - float3 res = fwidth(float3(0.0f)); + float3 res = fwidth(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.spvasm index 5dc5ef3250..65a1aacec1 100644 --- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %fwidth_5d1b39 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpFwidth %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpFwidth %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidth_5d1b39 + %14 = OpLabel + %15 = OpFunctionCall %void %fwidth_5d1b39 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.wgsl index 2ccfef31c0..d85e56e5e1 100644 --- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_5d1b39() { - var res : vec3 = fwidth(vec3()); + var res : vec3 = fwidth(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl index 541367b612..10d338eacd 100644 --- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl @@ -25,7 +25,7 @@ // fn fwidth(vec<2, f32>) -> vec<2, f32> fn fwidth_b83ebb() { - var res: vec2 = fwidth(vec2()); + var res: vec2 = fwidth(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.dxc.hlsl index 54027bb580..498cad2e32 100644 --- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidth_b83ebb() { - float2 res = fwidth((0.0f).xx); + float2 res = fwidth((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.fxc.hlsl index 54027bb580..498cad2e32 100644 --- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidth_b83ebb() { - float2 res = fwidth((0.0f).xx); + float2 res = fwidth((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.glsl index ede2c03af3..b6d81ce010 100644 --- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidth_b83ebb() { - vec2 res = fwidth(vec2(0.0f)); + vec2 res = fwidth(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.msl index e598cf8f5d..ee894ebbdd 100644 --- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidth_b83ebb() { - float2 res = fwidth(float2(0.0f)); + float2 res = fwidth(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.spvasm index 033004d9ce..929683f3e4 100644 --- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %fwidth_b83ebb = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpFwidth %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpFwidth %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidth_b83ebb + %14 = OpLabel + %15 = OpFunctionCall %void %fwidth_b83ebb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.wgsl index 19e433057c..8e23172513 100644 --- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_b83ebb() { - var res : vec2 = fwidth(vec2()); + var res : vec2 = fwidth(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl index cb0806b6dc..1978c60c8f 100644 --- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl @@ -25,7 +25,7 @@ // fn fwidth(vec<4, f32>) -> vec<4, f32> fn fwidth_d2ab9a() { - var res: vec4 = fwidth(vec4()); + var res: vec4 = fwidth(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.dxc.hlsl index 5afde3de40..0da023754a 100644 --- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidth_d2ab9a() { - float4 res = fwidth((0.0f).xxxx); + float4 res = fwidth((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.fxc.hlsl index 5afde3de40..0da023754a 100644 --- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidth_d2ab9a() { - float4 res = fwidth((0.0f).xxxx); + float4 res = fwidth((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.glsl index 82273aee0b..b4f2144d03 100644 --- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidth_d2ab9a() { - vec4 res = fwidth(vec4(0.0f)); + vec4 res = fwidth(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.msl index a27c2e3407..d2969e15ad 100644 --- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidth_d2ab9a() { - float4 res = fwidth(float4(0.0f)); + float4 res = fwidth(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.spvasm index 779ba1f84b..1f46a285f9 100644 --- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,17 +14,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %fwidth_d2ab9a = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpFwidth %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpFwidth %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidth_d2ab9a + %14 = OpLabel + %15 = OpFunctionCall %void %fwidth_d2ab9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.wgsl index c3c4ff45a5..50d3dd7444 100644 --- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_d2ab9a() { - var res : vec4 = fwidth(vec4()); + var res : vec4 = fwidth(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl index ae108cc7d9..5fc888fbbc 100644 --- a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl @@ -25,7 +25,7 @@ // fn fwidth(f32) -> f32 fn fwidth_df38ef() { - var res: f32 = fwidth(1.0); + var res: f32 = fwidth(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.wgsl index cf508ec975..7d20601112 100644 --- a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_df38ef() { - var res : f32 = fwidth(1.0); + var res : f32 = fwidth(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl index 496a405abf..0a4c4eef77 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(f32) -> f32 fn fwidthCoarse_159c8a() { - var res: f32 = fwidthCoarse(1.0); + var res: f32 = fwidthCoarse(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.wgsl index dda103bec2..37c5011b73 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_159c8a() { - var res : f32 = fwidthCoarse(1.0); + var res : f32 = fwidthCoarse(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl index 432dcadb6f..9d751b6d35 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(vec<3, f32>) -> vec<3, f32> fn fwidthCoarse_1e59d9() { - var res: vec3 = fwidthCoarse(vec3()); + var res: vec3 = fwidthCoarse(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl index 25fa857db0..4b73859ce7 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_1e59d9() { - float3 res = fwidth((0.0f).xxx); + float3 res = fwidth((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl index 25fa857db0..4b73859ce7 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_1e59d9() { - float3 res = fwidth((0.0f).xxx); + float3 res = fwidth((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.glsl index efce1a50b6..a614e22b93 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthCoarse_1e59d9() { - vec3 res = fwidth(vec3(0.0f)); + vec3 res = fwidth(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.msl index 5ea337182d..15a129d387 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthCoarse_1e59d9() { - float3 res = fwidth(float3(0.0f)); + float3 res = fwidth(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.spvasm index c0f4e31149..5e0ce8f0cd 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %fwidthCoarse_1e59d9 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpFwidthCoarse %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpFwidthCoarse %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidthCoarse_1e59d9 + %14 = OpLabel + %15 = OpFunctionCall %void %fwidthCoarse_1e59d9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.wgsl index 8a1e6b0eaa..f6c705364d 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_1e59d9() { - var res : vec3 = fwidthCoarse(vec3()); + var res : vec3 = fwidthCoarse(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl index a64acf793c..6f1e52110f 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(vec<4, f32>) -> vec<4, f32> fn fwidthCoarse_4e4fc4() { - var res: vec4 = fwidthCoarse(vec4()); + var res: vec4 = fwidthCoarse(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl index 947d5cc14d..7a1a11cc8a 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_4e4fc4() { - float4 res = fwidth((0.0f).xxxx); + float4 res = fwidth((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl index 947d5cc14d..7a1a11cc8a 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_4e4fc4() { - float4 res = fwidth((0.0f).xxxx); + float4 res = fwidth((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.glsl index 6d355fd396..12433786f8 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthCoarse_4e4fc4() { - vec4 res = fwidth(vec4(0.0f)); + vec4 res = fwidth(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.msl index 106eea64e7..259259df3e 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthCoarse_4e4fc4() { - float4 res = fwidth(float4(0.0f)); + float4 res = fwidth(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.spvasm index 36c64b516e..36cdd1962f 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %fwidthCoarse_4e4fc4 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpFwidthCoarse %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpFwidthCoarse %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidthCoarse_4e4fc4 + %14 = OpLabel + %15 = OpFunctionCall %void %fwidthCoarse_4e4fc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.wgsl index 06b78e85fd..e401616453 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_4e4fc4() { - var res : vec4 = fwidthCoarse(vec4()); + var res : vec4 = fwidthCoarse(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl index dc216bf8c8..f678013bc9 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(vec<2, f32>) -> vec<2, f32> fn fwidthCoarse_e653f7() { - var res: vec2 = fwidthCoarse(vec2()); + var res: vec2 = fwidthCoarse(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl index 5d0cc28a87..934ddfa261 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_e653f7() { - float2 res = fwidth((0.0f).xx); + float2 res = fwidth((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl index 5d0cc28a87..934ddfa261 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_e653f7() { - float2 res = fwidth((0.0f).xx); + float2 res = fwidth((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.glsl index 5073cfeed8..8c4eecbd5c 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthCoarse_e653f7() { - vec2 res = fwidth(vec2(0.0f)); + vec2 res = fwidth(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.msl index 0bb41831a5..64fcbfd756 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthCoarse_e653f7() { - float2 res = fwidth(float2(0.0f)); + float2 res = fwidth(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.spvasm index 8aa64246b4..dda4c3c063 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %fwidthCoarse_e653f7 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpFwidthCoarse %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpFwidthCoarse %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidthCoarse_e653f7 + %14 = OpLabel + %15 = OpFunctionCall %void %fwidthCoarse_e653f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.wgsl index 5ed3f4b361..31805c94e8 100644 --- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_e653f7() { - var res : vec2 = fwidthCoarse(vec2()); + var res : vec2 = fwidthCoarse(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl index a445464a20..d70d227135 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(vec<3, f32>) -> vec<3, f32> fn fwidthFine_523fdc() { - var res: vec3 = fwidthFine(vec3()); + var res: vec3 = fwidthFine(vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.dxc.hlsl index 43222afece..88b4f91eef 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_523fdc() { - float3 res = fwidth((0.0f).xxx); + float3 res = fwidth((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.fxc.hlsl index 43222afece..88b4f91eef 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_523fdc() { - float3 res = fwidth((0.0f).xxx); + float3 res = fwidth((1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.glsl index f0b9ba0778..b0341a54ba 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthFine_523fdc() { - vec3 res = fwidth(vec3(0.0f)); + vec3 res = fwidth(vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.msl index 4f36972070..578816b63e 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthFine_523fdc() { - float3 res = fwidth(float3(0.0f)); + float3 res = fwidth(float3(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.spvasm index 70148cca17..7bc84fc559 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %8 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %12 = OpConstantNull %v3float %fwidthFine_523fdc = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %8 - %5 = OpFwidthFine %v3float %8 + %res = OpVariable %_ptr_Function_v3float Function %12 + %5 = OpFwidthFine %v3float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidthFine_523fdc + %14 = OpLabel + %15 = OpFunctionCall %void %fwidthFine_523fdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.wgsl index b3eb93b077..ccccfeba15 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_523fdc() { - var res : vec3 = fwidthFine(vec3()); + var res : vec3 = fwidthFine(vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl index 55e8dbd385..af8de9a65b 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(vec<4, f32>) -> vec<4, f32> fn fwidthFine_68f4ef() { - var res: vec4 = fwidthFine(vec4()); + var res: vec4 = fwidthFine(vec4(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl index 7440cb0280..a6ba6fa950 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_68f4ef() { - float4 res = fwidth((0.0f).xxxx); + float4 res = fwidth((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl index 7440cb0280..a6ba6fa950 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_68f4ef() { - float4 res = fwidth((0.0f).xxxx); + float4 res = fwidth((1.0f).xxxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.glsl index f75e43b858..bb48166c36 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthFine_68f4ef() { - vec4 res = fwidth(vec4(0.0f)); + vec4 res = fwidth(vec4(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.msl index 3c4768e233..9a32402e6a 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthFine_68f4ef() { - float4 res = fwidth(float4(0.0f)); + float4 res = fwidth(float4(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.spvasm index 7258785d76..2e87a7cdbc 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %8 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %12 = OpConstantNull %v4float %fwidthFine_68f4ef = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %8 - %5 = OpFwidthFine %v4float %8 + %res = OpVariable %_ptr_Function_v4float Function %12 + %5 = OpFwidthFine %v4float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidthFine_68f4ef + %14 = OpLabel + %15 = OpFunctionCall %void %fwidthFine_68f4ef OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.wgsl index 01d3ea89a3..4914826ec7 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_68f4ef() { - var res : vec4 = fwidthFine(vec4()); + var res : vec4 = fwidthFine(vec4(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl index fca4bd14a6..ef0309ba13 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(f32) -> f32 fn fwidthFine_f1742d() { - var res: f32 = fwidthFine(1.0); + var res: f32 = fwidthFine(1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.wgsl index 13437b4ec6..0f0f6ebbff 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_f1742d() { - var res : f32 = fwidthFine(1.0); + var res : f32 = fwidthFine(1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl index fe1fbb55d6..742f8f0754 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(vec<2, f32>) -> vec<2, f32> fn fwidthFine_ff6aa0() { - var res: vec2 = fwidthFine(vec2()); + var res: vec2 = fwidthFine(vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl index 28ff46d7e9..ec674cc458 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_ff6aa0() { - float2 res = fwidth((0.0f).xx); + float2 res = fwidth((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl index 28ff46d7e9..ec674cc458 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_ff6aa0() { - float2 res = fwidth((0.0f).xx); + float2 res = fwidth((1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.glsl index b44025c6c7..95868ae7ed 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthFine_ff6aa0() { - vec2 res = fwidth(vec2(0.0f)); + vec2 res = fwidth(vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.msl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.msl index b121c887a3..ea88962bcc 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthFine_ff6aa0() { - float2 res = fwidth(float2(0.0f)); + float2 res = fwidth(float2(1.0f)); } fragment void fragment_main() { diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.spvasm index 591d6e083a..7e793258a9 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 14 +; Bound: 16 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -15,17 +15,19 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %8 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %9 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %12 = OpConstantNull %v2float %fwidthFine_ff6aa0 = OpFunction %void None %1 %4 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %8 - %5 = OpFwidthFine %v2float %8 + %res = OpVariable %_ptr_Function_v2float Function %12 + %5 = OpFwidthFine %v2float %9 OpStore %res %5 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %12 = OpLabel - %13 = OpFunctionCall %void %fwidthFine_ff6aa0 + %14 = OpLabel + %15 = OpFunctionCall %void %fwidthFine_ff6aa0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.wgsl index ad816e4921..69a64643fd 100644 --- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_ff6aa0() { - var res : vec2 = fwidthFine(vec2()); + var res : vec2 = fwidthFine(vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl index cdf4c75879..bb361d1fe2 100644 --- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl @@ -25,7 +25,7 @@ // fn insertBits(vec<2, u32>, vec<2, u32>, u32, u32) -> vec<2, u32> fn insertBits_3c7ba5() { - var res: vec2 = insertBits(vec2(), vec2(), 1u, 1u); + var res: vec2 = insertBits(vec2(1u), vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.dxc.hlsl index 78507ca88c..01e391d28a 100644 --- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.dxc.hlsl @@ -6,7 +6,7 @@ uint2 tint_insert_bits(uint2 v, uint2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uint2 res = tint_insert_bits((0u).xx, (0u).xx, 1u, 1u); + uint2 res = tint_insert_bits((1u).xx, (1u).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.fxc.hlsl index 78507ca88c..01e391d28a 100644 --- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.fxc.hlsl @@ -6,7 +6,7 @@ uint2 tint_insert_bits(uint2 v, uint2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uint2 res = tint_insert_bits((0u).xx, (0u).xx, 1u, 1u); + uint2 res = tint_insert_bits((1u).xx, (1u).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.glsl index 4f41583416..3cbe76e707 100644 --- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec2 tint_insert_bits(uvec2 v, uvec2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uvec2 res = tint_insert_bits(uvec2(0u), uvec2(0u), 1u, 1u); + uvec2 res = tint_insert_bits(uvec2(1u), uvec2(1u), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ uvec2 tint_insert_bits(uvec2 v, uvec2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uvec2 res = tint_insert_bits(uvec2(0u), uvec2(0u), 1u, 1u); + uvec2 res = tint_insert_bits(uvec2(1u), uvec2(1u), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ uvec2 tint_insert_bits(uvec2 v, uvec2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uvec2 res = tint_insert_bits(uvec2(0u), uvec2(0u), 1u, 1u); + uvec2 res = tint_insert_bits(uvec2(1u), uvec2(1u), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.msl b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.msl index e79a66fa9b..eea8550311 100644 --- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.msl @@ -8,7 +8,7 @@ uint2 tint_insert_bits(uint2 v, uint2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uint2 res = tint_insert_bits(uint2(0u), uint2(0u), 1u, 1u); + uint2 res = tint_insert_bits(uint2(1u), uint2(1u), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.spvasm index bd5c7b97dc..96b9209461 100644 --- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -40,10 +40,11 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %30 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %31 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v2uint + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v2uint None %9 %v = OpFunctionParameter %v2uint @@ -60,30 +61,30 @@ OpFunctionEnd %insertBits_3c7ba5 = OpFunction %void None %25 %28 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %30 - %29 = OpFunctionCall %v2uint %tint_insert_bits %30 %30 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v2uint Function %34 + %29 = OpFunctionCall %v2uint %tint_insert_bits %31 %31 %uint_1 %uint_1 OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %insertBits_3c7ba5 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %insertBits_3c7ba5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %43 = OpLabel - %44 = OpFunctionCall %void %insertBits_3c7ba5 + %44 = OpLabel + %45 = OpFunctionCall %void %insertBits_3c7ba5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %46 = OpLabel - %47 = OpFunctionCall %void %insertBits_3c7ba5 + %47 = OpLabel + %48 = OpFunctionCall %void %insertBits_3c7ba5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.wgsl index 37e6e6750a..0d296c61fb 100644 --- a/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/3c7ba5.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn insertBits_3c7ba5() { - var res : vec2 = insertBits(vec2(), vec2(), 1u, 1u); + var res : vec2 = insertBits(vec2(1u), vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl index 04e4af4a0a..c999e92aac 100644 --- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl @@ -25,7 +25,7 @@ // fn insertBits(vec<3, i32>, vec<3, i32>, u32, u32) -> vec<3, i32> fn insertBits_428b0b() { - var res: vec3 = insertBits(vec3(), vec3(), 1u, 1u); + var res: vec3 = insertBits(vec3(1), vec3(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.dxc.hlsl index 1d8acd2b04..fcc8e1274e 100644 --- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.dxc.hlsl @@ -6,7 +6,7 @@ int3 tint_insert_bits(int3 v, int3 n, uint offset, uint count) { } void insertBits_428b0b() { - int3 res = tint_insert_bits((0).xxx, (0).xxx, 1u, 1u); + int3 res = tint_insert_bits((1).xxx, (1).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.fxc.hlsl index 1d8acd2b04..fcc8e1274e 100644 --- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.fxc.hlsl @@ -6,7 +6,7 @@ int3 tint_insert_bits(int3 v, int3 n, uint offset, uint count) { } void insertBits_428b0b() { - int3 res = tint_insert_bits((0).xxx, (0).xxx, 1u, 1u); + int3 res = tint_insert_bits((1).xxx, (1).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.glsl index 07da791dc1..38eb5cba8c 100644 --- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec3 tint_insert_bits(ivec3 v, ivec3 n, uint offset, uint count) { } void insertBits_428b0b() { - ivec3 res = tint_insert_bits(ivec3(0), ivec3(0), 1u, 1u); + ivec3 res = tint_insert_bits(ivec3(1), ivec3(1), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ ivec3 tint_insert_bits(ivec3 v, ivec3 n, uint offset, uint count) { } void insertBits_428b0b() { - ivec3 res = tint_insert_bits(ivec3(0), ivec3(0), 1u, 1u); + ivec3 res = tint_insert_bits(ivec3(1), ivec3(1), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ ivec3 tint_insert_bits(ivec3 v, ivec3 n, uint offset, uint count) { } void insertBits_428b0b() { - ivec3 res = tint_insert_bits(ivec3(0), ivec3(0), 1u, 1u); + ivec3 res = tint_insert_bits(ivec3(1), ivec3(1), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.msl index 1af1c07651..026c7a4b0d 100644 --- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.msl @@ -8,7 +8,7 @@ int3 tint_insert_bits(int3 v, int3 n, uint offset, uint count) { } void insertBits_428b0b() { - int3 res = tint_insert_bits(int3(0), int3(0), 1u, 1u); + int3 res = tint_insert_bits(int3(1), int3(1), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.spvasm index 14ffcb4373..923dcfd94d 100644 --- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 51 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -41,10 +41,12 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %26 = OpTypeFunction %void - %31 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %35 = OpTypeFunction %v4float + %36 = OpConstantNull %v3int + %37 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -61,30 +63,30 @@ OpFunctionEnd %insertBits_428b0b = OpFunction %void None %26 %29 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %31 - %30 = OpFunctionCall %v3int %tint_insert_bits %31 %31 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v3int Function %36 + %30 = OpFunctionCall %v3int %tint_insert_bits %32 %32 %uint_1 %uint_1 OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %insertBits_428b0b +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %insertBits_428b0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %26 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %26 - %44 = OpLabel - %45 = OpFunctionCall %void %insertBits_428b0b + %46 = OpLabel + %47 = OpFunctionCall %void %insertBits_428b0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %26 - %47 = OpLabel - %48 = OpFunctionCall %void %insertBits_428b0b + %49 = OpLabel + %50 = OpFunctionCall %void %insertBits_428b0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.wgsl index a91e908506..56e7e062cb 100644 --- a/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/428b0b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn insertBits_428b0b() { - var res : vec3 = insertBits(vec3(), vec3(), 1u, 1u); + var res : vec3 = insertBits(vec3(1), vec3(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl index 23bdfa01d7..e2db168bdb 100644 --- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl @@ -25,7 +25,7 @@ // fn insertBits(vec<4, u32>, vec<4, u32>, u32, u32) -> vec<4, u32> fn insertBits_51ede1() { - var res: vec4 = insertBits(vec4(), vec4(), 1u, 1u); + var res: vec4 = insertBits(vec4(1u), vec4(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.dxc.hlsl index c0b0f503d2..25671aa9c9 100644 --- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.dxc.hlsl @@ -6,7 +6,7 @@ uint4 tint_insert_bits(uint4 v, uint4 n, uint offset, uint count) { } void insertBits_51ede1() { - uint4 res = tint_insert_bits((0u).xxxx, (0u).xxxx, 1u, 1u); + uint4 res = tint_insert_bits((1u).xxxx, (1u).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.fxc.hlsl index c0b0f503d2..25671aa9c9 100644 --- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.fxc.hlsl @@ -6,7 +6,7 @@ uint4 tint_insert_bits(uint4 v, uint4 n, uint offset, uint count) { } void insertBits_51ede1() { - uint4 res = tint_insert_bits((0u).xxxx, (0u).xxxx, 1u, 1u); + uint4 res = tint_insert_bits((1u).xxxx, (1u).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.glsl index e8e4c3a637..4996ffbb6c 100644 --- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec4 tint_insert_bits(uvec4 v, uvec4 n, uint offset, uint count) { } void insertBits_51ede1() { - uvec4 res = tint_insert_bits(uvec4(0u), uvec4(0u), 1u, 1u); + uvec4 res = tint_insert_bits(uvec4(1u), uvec4(1u), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ uvec4 tint_insert_bits(uvec4 v, uvec4 n, uint offset, uint count) { } void insertBits_51ede1() { - uvec4 res = tint_insert_bits(uvec4(0u), uvec4(0u), 1u, 1u); + uvec4 res = tint_insert_bits(uvec4(1u), uvec4(1u), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ uvec4 tint_insert_bits(uvec4 v, uvec4 n, uint offset, uint count) { } void insertBits_51ede1() { - uvec4 res = tint_insert_bits(uvec4(0u), uvec4(0u), 1u, 1u); + uvec4 res = tint_insert_bits(uvec4(1u), uvec4(1u), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.msl b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.msl index df82bfd39f..bd1ebb39c3 100644 --- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.msl @@ -8,7 +8,7 @@ uint4 tint_insert_bits(uint4 v, uint4 n, uint offset, uint count) { } void insertBits_51ede1() { - uint4 res = tint_insert_bits(uint4(0u), uint4(0u), 1u, 1u); + uint4 res = tint_insert_bits(uint4(1u), uint4(1u), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.spvasm index b5e9f62afa..0aa617842d 100644 --- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -40,10 +40,11 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %30 = OpConstantNull %v4uint %uint_1 = OpConstant %uint 1 + %31 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v4uint + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v4uint None %9 %v = OpFunctionParameter %v4uint @@ -60,30 +61,30 @@ OpFunctionEnd %insertBits_51ede1 = OpFunction %void None %25 %28 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %30 - %29 = OpFunctionCall %v4uint %tint_insert_bits %30 %30 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v4uint Function %34 + %29 = OpFunctionCall %v4uint %tint_insert_bits %31 %31 %uint_1 %uint_1 OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %insertBits_51ede1 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %insertBits_51ede1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %43 = OpLabel - %44 = OpFunctionCall %void %insertBits_51ede1 + %44 = OpLabel + %45 = OpFunctionCall %void %insertBits_51ede1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %46 = OpLabel - %47 = OpFunctionCall %void %insertBits_51ede1 + %47 = OpLabel + %48 = OpFunctionCall %void %insertBits_51ede1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.wgsl index 678c6b25a2..facb770f6c 100644 --- a/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/51ede1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn insertBits_51ede1() { - var res : vec4 = insertBits(vec4(), vec4(), 1u, 1u); + var res : vec4 = insertBits(vec4(1u), vec4(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl index d9fba647af..672e8808a2 100644 --- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl @@ -25,7 +25,7 @@ // fn insertBits(vec<3, u32>, vec<3, u32>, u32, u32) -> vec<3, u32> fn insertBits_87826b() { - var res: vec3 = insertBits(vec3(), vec3(), 1u, 1u); + var res: vec3 = insertBits(vec3(1u), vec3(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.dxc.hlsl index 76154887b3..e0c514762b 100644 --- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.dxc.hlsl @@ -6,7 +6,7 @@ uint3 tint_insert_bits(uint3 v, uint3 n, uint offset, uint count) { } void insertBits_87826b() { - uint3 res = tint_insert_bits((0u).xxx, (0u).xxx, 1u, 1u); + uint3 res = tint_insert_bits((1u).xxx, (1u).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.fxc.hlsl index 76154887b3..e0c514762b 100644 --- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.fxc.hlsl @@ -6,7 +6,7 @@ uint3 tint_insert_bits(uint3 v, uint3 n, uint offset, uint count) { } void insertBits_87826b() { - uint3 res = tint_insert_bits((0u).xxx, (0u).xxx, 1u, 1u); + uint3 res = tint_insert_bits((1u).xxx, (1u).xxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.glsl index cf6a0c7548..e0e8d8e520 100644 --- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec3 tint_insert_bits(uvec3 v, uvec3 n, uint offset, uint count) { } void insertBits_87826b() { - uvec3 res = tint_insert_bits(uvec3(0u), uvec3(0u), 1u, 1u); + uvec3 res = tint_insert_bits(uvec3(1u), uvec3(1u), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ uvec3 tint_insert_bits(uvec3 v, uvec3 n, uint offset, uint count) { } void insertBits_87826b() { - uvec3 res = tint_insert_bits(uvec3(0u), uvec3(0u), 1u, 1u); + uvec3 res = tint_insert_bits(uvec3(1u), uvec3(1u), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ uvec3 tint_insert_bits(uvec3 v, uvec3 n, uint offset, uint count) { } void insertBits_87826b() { - uvec3 res = tint_insert_bits(uvec3(0u), uvec3(0u), 1u, 1u); + uvec3 res = tint_insert_bits(uvec3(1u), uvec3(1u), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.msl b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.msl index fd6a145e78..c8ea86520e 100644 --- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.msl @@ -8,7 +8,7 @@ uint3 tint_insert_bits(uint3 v, uint3 n, uint offset, uint count) { } void insertBits_87826b() { - uint3 res = tint_insert_bits(uint3(0u), uint3(0u), 1u, 1u); + uint3 res = tint_insert_bits(uint3(1u), uint3(1u), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.spvasm index cf3a5cb9fd..e36125032b 100644 --- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -40,10 +40,11 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %30 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %31 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v3uint + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v3uint None %9 %v = OpFunctionParameter %v3uint @@ -60,30 +61,30 @@ OpFunctionEnd %insertBits_87826b = OpFunction %void None %25 %28 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %30 - %29 = OpFunctionCall %v3uint %tint_insert_bits %30 %30 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v3uint Function %34 + %29 = OpFunctionCall %v3uint %tint_insert_bits %31 %31 %uint_1 %uint_1 OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %insertBits_87826b +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %insertBits_87826b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %43 = OpLabel - %44 = OpFunctionCall %void %insertBits_87826b + %44 = OpLabel + %45 = OpFunctionCall %void %insertBits_87826b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %46 = OpLabel - %47 = OpFunctionCall %void %insertBits_87826b + %47 = OpLabel + %48 = OpFunctionCall %void %insertBits_87826b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.wgsl index 242fe60695..2c88061e9e 100644 --- a/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/87826b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn insertBits_87826b() { - var res : vec3 = insertBits(vec3(), vec3(), 1u, 1u); + var res : vec3 = insertBits(vec3(1u), vec3(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl index 11dd5181ef..cdb9157ba3 100644 --- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl @@ -25,7 +25,7 @@ // fn insertBits(vec<4, i32>, vec<4, i32>, u32, u32) -> vec<4, i32> fn insertBits_d86978() { - var res: vec4 = insertBits(vec4(), vec4(), 1u, 1u); + var res: vec4 = insertBits(vec4(1), vec4(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.dxc.hlsl index 914e700f4d..11333bab22 100644 --- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.dxc.hlsl @@ -6,7 +6,7 @@ int4 tint_insert_bits(int4 v, int4 n, uint offset, uint count) { } void insertBits_d86978() { - int4 res = tint_insert_bits((0).xxxx, (0).xxxx, 1u, 1u); + int4 res = tint_insert_bits((1).xxxx, (1).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.fxc.hlsl index 914e700f4d..11333bab22 100644 --- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.fxc.hlsl @@ -6,7 +6,7 @@ int4 tint_insert_bits(int4 v, int4 n, uint offset, uint count) { } void insertBits_d86978() { - int4 res = tint_insert_bits((0).xxxx, (0).xxxx, 1u, 1u); + int4 res = tint_insert_bits((1).xxxx, (1).xxxx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.glsl b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.glsl index 369d296e72..fc0aa6f0bd 100644 --- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec4 tint_insert_bits(ivec4 v, ivec4 n, uint offset, uint count) { } void insertBits_d86978() { - ivec4 res = tint_insert_bits(ivec4(0), ivec4(0), 1u, 1u); + ivec4 res = tint_insert_bits(ivec4(1), ivec4(1), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ ivec4 tint_insert_bits(ivec4 v, ivec4 n, uint offset, uint count) { } void insertBits_d86978() { - ivec4 res = tint_insert_bits(ivec4(0), ivec4(0), 1u, 1u); + ivec4 res = tint_insert_bits(ivec4(1), ivec4(1), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ ivec4 tint_insert_bits(ivec4 v, ivec4 n, uint offset, uint count) { } void insertBits_d86978() { - ivec4 res = tint_insert_bits(ivec4(0), ivec4(0), 1u, 1u); + ivec4 res = tint_insert_bits(ivec4(1), ivec4(1), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.msl b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.msl index 8457cb684b..b7929fe151 100644 --- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.msl @@ -8,7 +8,7 @@ int4 tint_insert_bits(int4 v, int4 n, uint offset, uint count) { } void insertBits_d86978() { - int4 res = tint_insert_bits(int4(0), int4(0), 1u, 1u); + int4 res = tint_insert_bits(int4(1), int4(1), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.spvasm index e7cf5074d1..639baf30a3 100644 --- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 51 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -41,10 +41,12 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %26 = OpTypeFunction %void - %31 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpTypeFunction %v4float + %36 = OpConstantNull %v4int + %37 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -61,30 +63,30 @@ OpFunctionEnd %insertBits_d86978 = OpFunction %void None %26 %29 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %31 - %30 = OpFunctionCall %v4int %tint_insert_bits %31 %31 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v4int Function %36 + %30 = OpFunctionCall %v4int %tint_insert_bits %32 %32 %uint_1 %uint_1 OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %insertBits_d86978 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %insertBits_d86978 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %26 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %26 - %44 = OpLabel - %45 = OpFunctionCall %void %insertBits_d86978 + %46 = OpLabel + %47 = OpFunctionCall %void %insertBits_d86978 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %26 - %47 = OpLabel - %48 = OpFunctionCall %void %insertBits_d86978 + %49 = OpLabel + %50 = OpFunctionCall %void %insertBits_d86978 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.wgsl index 77bbeecea1..92b7cfec48 100644 --- a/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/d86978.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn insertBits_d86978() { - var res : vec4 = insertBits(vec4(), vec4(), 1u, 1u); + var res : vec4 = insertBits(vec4(1), vec4(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl index 23866aaa1f..c7bb37b0e9 100644 --- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl @@ -25,7 +25,7 @@ // fn insertBits(vec<2, i32>, vec<2, i32>, u32, u32) -> vec<2, i32> fn insertBits_fe6ba6() { - var res: vec2 = insertBits(vec2(), vec2(), 1u, 1u); + var res: vec2 = insertBits(vec2(1), vec2(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.dxc.hlsl index 1122690934..6861d6e581 100644 --- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.dxc.hlsl @@ -6,7 +6,7 @@ int2 tint_insert_bits(int2 v, int2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - int2 res = tint_insert_bits((0).xx, (0).xx, 1u, 1u); + int2 res = tint_insert_bits((1).xx, (1).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.fxc.hlsl index 1122690934..6861d6e581 100644 --- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.fxc.hlsl @@ -6,7 +6,7 @@ int2 tint_insert_bits(int2 v, int2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - int2 res = tint_insert_bits((0).xx, (0).xx, 1u, 1u); + int2 res = tint_insert_bits((1).xx, (1).xx, 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.glsl index e6eca92fa1..3a65590f1a 100644 --- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec2 tint_insert_bits(ivec2 v, ivec2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - ivec2 res = tint_insert_bits(ivec2(0), ivec2(0), 1u, 1u); + ivec2 res = tint_insert_bits(ivec2(1), ivec2(1), 1u, 1u); } vec4 vertex_main() { @@ -33,7 +33,7 @@ ivec2 tint_insert_bits(ivec2 v, ivec2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - ivec2 res = tint_insert_bits(ivec2(0), ivec2(0), 1u, 1u); + ivec2 res = tint_insert_bits(ivec2(1), ivec2(1), 1u, 1u); } void fragment_main() { @@ -53,7 +53,7 @@ ivec2 tint_insert_bits(ivec2 v, ivec2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - ivec2 res = tint_insert_bits(ivec2(0), ivec2(0), 1u, 1u); + ivec2 res = tint_insert_bits(ivec2(1), ivec2(1), 1u, 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.msl b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.msl index e39abe9b63..8b053adb61 100644 --- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.msl @@ -8,7 +8,7 @@ int2 tint_insert_bits(int2 v, int2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - int2 res = tint_insert_bits(int2(0), int2(0), 1u, 1u); + int2 res = tint_insert_bits(int2(1), int2(1), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.spvasm index b5e72718b3..18cbaafb62 100644 --- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 51 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -41,10 +41,12 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %26 = OpTypeFunction %void - %31 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %35 = OpTypeFunction %v4float + %36 = OpConstantNull %v2int + %37 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -61,30 +63,30 @@ OpFunctionEnd %insertBits_fe6ba6 = OpFunction %void None %26 %29 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %31 - %30 = OpFunctionCall %v2int %tint_insert_bits %31 %31 %uint_1 %uint_1 + %res = OpVariable %_ptr_Function_v2int Function %36 + %30 = OpFunctionCall %v2int %tint_insert_bits %32 %32 %uint_1 %uint_1 OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %insertBits_fe6ba6 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %insertBits_fe6ba6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %26 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %26 - %44 = OpLabel - %45 = OpFunctionCall %void %insertBits_fe6ba6 + %46 = OpLabel + %47 = OpFunctionCall %void %insertBits_fe6ba6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %26 - %47 = OpLabel - %48 = OpFunctionCall %void %insertBits_fe6ba6 + %49 = OpLabel + %50 = OpFunctionCall %void %insertBits_fe6ba6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.wgsl index aabea77955..04bee6f7e0 100644 --- a/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/insertBits/fe6ba6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn insertBits_fe6ba6() { - var res : vec2 = insertBits(vec2(), vec2(), 1u, 1u); + var res : vec2 = insertBits(vec2(1), vec2(1), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl index 8dd98cc65f..07146c2ba9 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(f32) -> f32 fn inverseSqrt_84407e() { - var res: f32 = inverseSqrt(1.0); + var res: f32 = inverseSqrt(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.wgsl index 9c74b78834..1afdfc4c7a 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/84407e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_84407e() { - var res : f32 = inverseSqrt(1.0); + var res : f32 = inverseSqrt(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl index b1774a9661..bef836b429 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(vec<2, f32>) -> vec<2, f32> fn inverseSqrt_8f2bd2() { - var res: vec2 = inverseSqrt(vec2()); + var res: vec2 = inverseSqrt(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl index 0b1c795562..c0487c4cc5 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_8f2bd2() { - float2 res = rsqrt((0.0f).xx); + float2 res = rsqrt((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl index 0b1c795562..c0487c4cc5 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_8f2bd2() { - float2 res = rsqrt((0.0f).xx); + float2 res = rsqrt((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.glsl index bb040dbbb6..7a9a429777 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void inverseSqrt_8f2bd2() { - vec2 res = inversesqrt(vec2(0.0f)); + vec2 res = inversesqrt(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void inverseSqrt_8f2bd2() { - vec2 res = inversesqrt(vec2(0.0f)); + vec2 res = inversesqrt(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void inverseSqrt_8f2bd2() { - vec2 res = inversesqrt(vec2(0.0f)); + vec2 res = inversesqrt(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.msl index 1076102b13..c4436e3ecd 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_8f2bd2() { - float2 res = rsqrt(float2(0.0f)); + float2 res = rsqrt(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.spvasm index d8b74167f5..5e60aeafd1 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %inverseSqrt_8f2bd2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 InverseSqrt %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 InverseSqrt %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %inverseSqrt_8f2bd2 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %inverseSqrt_8f2bd2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %inverseSqrt_8f2bd2 + %29 = OpLabel + %30 = OpFunctionCall %void %inverseSqrt_8f2bd2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %inverseSqrt_8f2bd2 + %32 = OpLabel + %33 = OpFunctionCall %void %inverseSqrt_8f2bd2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.wgsl index 05e3d1cd8e..1fe7a7ca52 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/8f2bd2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_8f2bd2() { - var res : vec2 = inverseSqrt(vec2()); + var res : vec2 = inverseSqrt(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl index d4bbc281b0..0bf5ae3fae 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(vec<3, f32>) -> vec<3, f32> fn inverseSqrt_b197b1() { - var res: vec3 = inverseSqrt(vec3()); + var res: vec3 = inverseSqrt(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl index 710a458ba7..e9b409019f 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_b197b1() { - float3 res = rsqrt((0.0f).xxx); + float3 res = rsqrt((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl index 710a458ba7..e9b409019f 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_b197b1() { - float3 res = rsqrt((0.0f).xxx); + float3 res = rsqrt((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.glsl index a588d10d51..266b109a44 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void inverseSqrt_b197b1() { - vec3 res = inversesqrt(vec3(0.0f)); + vec3 res = inversesqrt(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void inverseSqrt_b197b1() { - vec3 res = inversesqrt(vec3(0.0f)); + vec3 res = inversesqrt(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void inverseSqrt_b197b1() { - vec3 res = inversesqrt(vec3(0.0f)); + vec3 res = inversesqrt(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.msl index eececb7c6e..e8f6fa126d 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_b197b1() { - float3 res = rsqrt(float3(0.0f)); + float3 res = rsqrt(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.spvasm index c70dc36a70..88ee7d3072 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %inverseSqrt_b197b1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 InverseSqrt %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 InverseSqrt %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %inverseSqrt_b197b1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %inverseSqrt_b197b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %inverseSqrt_b197b1 + %29 = OpLabel + %30 = OpFunctionCall %void %inverseSqrt_b197b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %inverseSqrt_b197b1 + %32 = OpLabel + %33 = OpFunctionCall %void %inverseSqrt_b197b1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.wgsl index 11777c2ecd..f8920cdcdf 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/b197b1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_b197b1() { - var res : vec3 = inverseSqrt(vec3()); + var res : vec3 = inverseSqrt(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl index 7b5baf6b66..c48125ee5d 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(vec<4, f32>) -> vec<4, f32> fn inverseSqrt_c22347() { - var res: vec4 = inverseSqrt(vec4()); + var res: vec4 = inverseSqrt(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.dxc.hlsl index c2693bf506..3cddf65cc0 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_c22347() { - float4 res = rsqrt((0.0f).xxxx); + float4 res = rsqrt((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.fxc.hlsl index c2693bf506..3cddf65cc0 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_c22347() { - float4 res = rsqrt((0.0f).xxxx); + float4 res = rsqrt((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.glsl index f999e26246..a788f74f9e 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void inverseSqrt_c22347() { - vec4 res = inversesqrt(vec4(0.0f)); + vec4 res = inversesqrt(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void inverseSqrt_c22347() { - vec4 res = inversesqrt(vec4(0.0f)); + vec4 res = inversesqrt(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void inverseSqrt_c22347() { - vec4 res = inversesqrt(vec4(0.0f)); + vec4 res = inversesqrt(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.msl index eb5f34e1f2..afad412c00 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_c22347() { - float4 res = rsqrt(float4(0.0f)); + float4 res = rsqrt(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.spvasm index 9dcf62392a..f487a3be6d 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %inverseSqrt_c22347 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 InverseSqrt %5 + %13 = OpExtInst %v4float %14 InverseSqrt %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %inverseSqrt_c22347 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %inverseSqrt_c22347 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %inverseSqrt_c22347 + %27 = OpLabel + %28 = OpFunctionCall %void %inverseSqrt_c22347 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %inverseSqrt_c22347 + %30 = OpLabel + %31 = OpFunctionCall %void %inverseSqrt_c22347 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.wgsl index 7d5465dd76..cbcfd78ac9 100644 --- a/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/inverseSqrt/c22347.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_c22347() { - var res : vec4 = inverseSqrt(vec4()); + var res : vec4 = inverseSqrt(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl index 1cdaca3be6..7eb54885f0 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl @@ -25,7 +25,7 @@ // fn ldexp(vec<3, f32>, vec<3, i32>) -> vec<3, f32> fn ldexp_a31cdc() { - var res: vec3 = ldexp(vec3(), vec3()); + var res: vec3 = ldexp(vec3(1.f), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl index 5e192f5eaf..b2ec51db34 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_a31cdc() { - float3 res = ldexp((0.0f).xxx, (0).xxx); + float3 res = ldexp((1.0f).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl index 5e192f5eaf..b2ec51db34 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ldexp_a31cdc() { - float3 res = ldexp((0.0f).xxx, (0).xxx); + float3 res = ldexp((1.0f).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl index 97c7619e42..6183994b60 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ldexp_a31cdc() { - vec3 res = ldexp(vec3(0.0f), ivec3(0)); + vec3 res = ldexp(vec3(1.0f), ivec3(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ldexp_a31cdc() { - vec3 res = ldexp(vec3(0.0f), ivec3(0)); + vec3 res = ldexp(vec3(1.0f), ivec3(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ldexp_a31cdc() { - vec3 res = ldexp(vec3(0.0f), ivec3(0)); + vec3 res = ldexp(vec3(1.0f), ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl index 7530329e41..14c9d99921 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_a31cdc() { - float3 res = ldexp(float3(0.0f), int3(0)); + float3 res = ldexp(float3(1.0f), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm index 8c131c60d4..ea305234c6 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,39 +32,41 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %22 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %24 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %ldexp_a31cdc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Ldexp %16 %19 + %res = OpVariable %_ptr_Function_v3float Function %24 + %13 = OpExtInst %v3float %15 Ldexp %17 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %ldexp_a31cdc +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %ldexp_a31cdc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ldexp_a31cdc + %33 = OpLabel + %34 = OpFunctionCall %void %ldexp_a31cdc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ldexp_a31cdc + %36 = OpLabel + %37 = OpFunctionCall %void %ldexp_a31cdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.wgsl index 232e2a9fae..920f1c584d 100644 --- a/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/a31cdc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ldexp_a31cdc() { - var res : vec3 = ldexp(vec3(), vec3()); + var res : vec3 = ldexp(vec3(1.0f), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl index 8e41255b7f..7922ca91ed 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl @@ -25,7 +25,7 @@ // fn ldexp(vec<2, f32>, vec<2, i32>) -> vec<2, f32> fn ldexp_abd718() { - var res: vec2 = ldexp(vec2(), vec2()); + var res: vec2 = ldexp(vec2(1.f), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl index 52232d7b66..e630230fe4 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_abd718() { - float2 res = ldexp((0.0f).xx, (0).xx); + float2 res = ldexp((1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl index 52232d7b66..e630230fe4 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ldexp_abd718() { - float2 res = ldexp((0.0f).xx, (0).xx); + float2 res = ldexp((1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl index 9b3ab87668..c529027948 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ldexp_abd718() { - vec2 res = ldexp(vec2(0.0f), ivec2(0)); + vec2 res = ldexp(vec2(1.0f), ivec2(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ldexp_abd718() { - vec2 res = ldexp(vec2(0.0f), ivec2(0)); + vec2 res = ldexp(vec2(1.0f), ivec2(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ldexp_abd718() { - vec2 res = ldexp(vec2(0.0f), ivec2(0)); + vec2 res = ldexp(vec2(1.0f), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl index cdd6395c82..2e6ab5c61d 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_abd718() { - float2 res = ldexp(float2(0.0f), int2(0)); + float2 res = ldexp(float2(1.0f), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm index 7da0d18d45..c00bbce1e5 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,39 +32,41 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %22 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %24 = OpConstantNull %v2float + %25 = OpTypeFunction %v4float %ldexp_abd718 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Ldexp %16 %19 + %res = OpVariable %_ptr_Function_v2float Function %24 + %13 = OpExtInst %v2float %15 Ldexp %17 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %ldexp_abd718 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %ldexp_abd718 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ldexp_abd718 + %33 = OpLabel + %34 = OpFunctionCall %void %ldexp_abd718 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ldexp_abd718 + %36 = OpLabel + %37 = OpFunctionCall %void %ldexp_abd718 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.wgsl index 8c33747f8f..884585bb7b 100644 --- a/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/abd718.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ldexp_abd718() { - var res : vec2 = ldexp(vec2(), vec2()); + var res : vec2 = ldexp(vec2(1.0f), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl index 622c5b4a2a..3ce83a113a 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl @@ -25,7 +25,7 @@ // fn ldexp(vec<4, f32>, vec<4, i32>) -> vec<4, f32> fn ldexp_cc9cde() { - var res: vec4 = ldexp(vec4(), vec4()); + var res: vec4 = ldexp(vec4(1.f), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl index 280dc6ddee..9769500139 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ldexp_cc9cde() { - float4 res = ldexp((0.0f).xxxx, (0).xxxx); + float4 res = ldexp((1.0f).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl index 280dc6ddee..9769500139 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ldexp_cc9cde() { - float4 res = ldexp((0.0f).xxxx, (0).xxxx); + float4 res = ldexp((1.0f).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl index 391928c864..99f1ba3866 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ldexp_cc9cde() { - vec4 res = ldexp(vec4(0.0f), ivec4(0)); + vec4 res = ldexp(vec4(1.0f), ivec4(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void ldexp_cc9cde() { - vec4 res = ldexp(vec4(0.0f), ivec4(0)); + vec4 res = ldexp(vec4(1.0f), ivec4(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void ldexp_cc9cde() { - vec4 res = ldexp(vec4(0.0f), ivec4(0)); + vec4 res = ldexp(vec4(1.0f), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl index 7b62158bb7..cdaeabfb28 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ldexp_cc9cde() { - float4 res = ldexp(float4(0.0f), int4(0)); + float4 res = ldexp(float4(1.0f), int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm index 4f75b897ae..da8bfed14d 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,38 +31,40 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %17 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %20 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %23 = OpTypeFunction %v4float %ldexp_cc9cde = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Ldexp %5 %17 + %13 = OpExtInst %v4float %14 Ldexp %16 %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %ldexp_cc9cde +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %ldexp_cc9cde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %ldexp_cc9cde + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_cc9cde OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %ldexp_cc9cde + %34 = OpLabel + %35 = OpFunctionCall %void %ldexp_cc9cde OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.wgsl index 913094d025..0d104b6a31 100644 --- a/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/cc9cde.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ldexp_cc9cde() { - var res : vec4 = ldexp(vec4(), vec4()); + var res : vec4 = ldexp(vec4(1.0f), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl index beb3c1dc90..6b7decc603 100644 --- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl @@ -25,7 +25,7 @@ // fn ldexp(f32, i32) -> f32 fn ldexp_db8b49() { - var res: f32 = ldexp(1.0, 1); + var res: f32 = ldexp(1.f, 1); } @vertex diff --git a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.wgsl index d7c840fc8f..374a55f47a 100644 --- a/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/ldexp/db8b49.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ldexp_db8b49() { - var res : f32 = ldexp(1.0, 1); + var res : f32 = ldexp(1.0f, 1); } @vertex diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl b/test/tint/builtins/gen/literal/length/056071.wgsl index 25f90cea50..5ebb4d8e97 100644 --- a/test/tint/builtins/gen/literal/length/056071.wgsl +++ b/test/tint/builtins/gen/literal/length/056071.wgsl @@ -25,7 +25,7 @@ // fn length(vec<3, f32>) -> f32 fn length_056071() { - var res: f32 = length(vec3()); + var res: f32 = length(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.dxc.hlsl index e3fbb4c6fb..059bd52fb0 100644 --- a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_056071() { - float res = length((0.0f).xxx); + float res = length((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.fxc.hlsl index e3fbb4c6fb..059bd52fb0 100644 --- a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void length_056071() { - float res = length((0.0f).xxx); + float res = length((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.glsl index bcec21b2f7..13c4890b46 100644 --- a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void length_056071() { - float res = length(vec3(0.0f)); + float res = length(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void length_056071() { - float res = length(vec3(0.0f)); + float res = length(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void length_056071() { - float res = length(vec3(0.0f)); + float res = length(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.msl index fe155d7135..387e06d238 100644 --- a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_056071() { - float res = length(float3(0.0f)); + float res = length(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.spvasm index 47e4a5d741..9f13f37e35 100644 --- a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.spvasm @@ -32,26 +32,26 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_float = OpTypePointer Function %float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %20 = OpTypeFunction %v4float %length_056071 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Length %16 + %13 = OpExtInst %float %14 Length %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %length_056071 +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %length_056071 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.wgsl index 4060039bc5..d83825d83f 100644 --- a/test/tint/builtins/gen/literal/length/056071.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/056071.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_056071() { - var res : f32 = length(vec3()); + var res : f32 = length(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/602a17.wgsl b/test/tint/builtins/gen/literal/length/602a17.wgsl index 50a668a218..00f99de0fc 100644 --- a/test/tint/builtins/gen/literal/length/602a17.wgsl +++ b/test/tint/builtins/gen/literal/length/602a17.wgsl @@ -25,7 +25,7 @@ // fn length(f32) -> f32 fn length_602a17() { - var res: f32 = length(1.0); + var res: f32 = length(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.wgsl index accc2eaf47..9209e3fc2f 100644 --- a/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/602a17.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_602a17() { - var res : f32 = length(1.0); + var res : f32 = length(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl b/test/tint/builtins/gen/literal/length/afde8b.wgsl index a5cbe4f333..4cce90da66 100644 --- a/test/tint/builtins/gen/literal/length/afde8b.wgsl +++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl @@ -25,7 +25,7 @@ // fn length(vec<2, f32>) -> f32 fn length_afde8b() { - var res: f32 = length(vec2()); + var res: f32 = length(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.dxc.hlsl index 136df03991..fedf5b1a0f 100644 --- a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_afde8b() { - float res = length((0.0f).xx); + float res = length((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.fxc.hlsl index 136df03991..fedf5b1a0f 100644 --- a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void length_afde8b() { - float res = length((0.0f).xx); + float res = length((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.glsl index b8c13f061d..c81bf7b56e 100644 --- a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void length_afde8b() { - float res = length(vec2(0.0f)); + float res = length(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void length_afde8b() { - float res = length(vec2(0.0f)); + float res = length(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void length_afde8b() { - float res = length(vec2(0.0f)); + float res = length(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.msl index 1f44a890ca..74668c52da 100644 --- a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_afde8b() { - float res = length(float2(0.0f)); + float res = length(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.spvasm index 9dc866555c..d82d662150 100644 --- a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.spvasm @@ -32,26 +32,26 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_float = OpTypePointer Function %float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %20 = OpTypeFunction %v4float %length_afde8b = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Length %16 + %13 = OpExtInst %float %14 Length %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %length_afde8b +%vertex_main_inner = OpFunction %v4float None %20 + %22 = OpLabel + %23 = OpFunctionCall %void %length_afde8b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %25 = OpLabel + %26 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %26 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.wgsl index 4c02a779eb..77a600c723 100644 --- a/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/afde8b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_afde8b() { - var res : f32 = length(vec2()); + var res : f32 = length(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl b/test/tint/builtins/gen/literal/length/becebf.wgsl index 6e117471ab..323ce5af73 100644 --- a/test/tint/builtins/gen/literal/length/becebf.wgsl +++ b/test/tint/builtins/gen/literal/length/becebf.wgsl @@ -25,7 +25,7 @@ // fn length(vec<4, f32>) -> f32 fn length_becebf() { - var res: f32 = length(vec4()); + var res: f32 = length(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.dxc.hlsl index dd68660b2d..2d55ef8491 100644 --- a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_becebf() { - float res = length((0.0f).xxxx); + float res = length((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.fxc.hlsl index dd68660b2d..2d55ef8491 100644 --- a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void length_becebf() { - float res = length((0.0f).xxxx); + float res = length((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.glsl index 91e0308ce1..b83674639d 100644 --- a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void length_becebf() { - float res = length(vec4(0.0f)); + float res = length(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void length_becebf() { - float res = length(vec4(0.0f)); + float res = length(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void length_becebf() { - float res = length(vec4(0.0f)); + float res = length(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.msl index 921935f416..fdc96aa434 100644 --- a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_becebf() { - float res = length(float4(0.0f)); + float res = length(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.spvasm index aebf0ae632..5ca602ff81 100644 --- a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_float = OpTypePointer Function %float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %19 = OpTypeFunction %v4float %length_becebf = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpExtInst %float %14 Length %5 + %13 = OpExtInst %float %14 Length %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %length_becebf +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %length_becebf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %length_becebf + %27 = OpLabel + %28 = OpFunctionCall %void %length_becebf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %length_becebf + %30 = OpLabel + %31 = OpFunctionCall %void %length_becebf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.wgsl index 77f0909a0f..e6e3b713b9 100644 --- a/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/length/becebf.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_becebf() { - var res : f32 = length(vec4()); + var res : f32 = length(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl b/test/tint/builtins/gen/literal/log/3da25a.wgsl index 593535c4e9..b0fa8012e2 100644 --- a/test/tint/builtins/gen/literal/log/3da25a.wgsl +++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl @@ -25,7 +25,7 @@ // fn log(vec<4, f32>) -> vec<4, f32> fn log_3da25a() { - var res: vec4 = log(vec4()); + var res: vec4 = log(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.dxc.hlsl index 1f575bcaf9..c0c3c6d1a3 100644 --- a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_3da25a() { - float4 res = log((0.0f).xxxx); + float4 res = log((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.fxc.hlsl index 1f575bcaf9..c0c3c6d1a3 100644 --- a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log_3da25a() { - float4 res = log((0.0f).xxxx); + float4 res = log((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.glsl index ca52b64d63..df5ca13d23 100644 --- a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log_3da25a() { - vec4 res = log(vec4(0.0f)); + vec4 res = log(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void log_3da25a() { - vec4 res = log(vec4(0.0f)); + vec4 res = log(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void log_3da25a() { - vec4 res = log(vec4(0.0f)); + vec4 res = log(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.msl index d74a929cf3..dc18bb99d5 100644 --- a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_3da25a() { - float4 res = log(float4(0.0f)); + float4 res = log(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.spvasm index 2546b7f529..65cc0302d1 100644 --- a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %log_3da25a = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Log %5 + %13 = OpExtInst %v4float %14 Log %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %log_3da25a +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %log_3da25a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %log_3da25a + %27 = OpLabel + %28 = OpFunctionCall %void %log_3da25a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log_3da25a + %30 = OpLabel + %31 = OpFunctionCall %void %log_3da25a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.wgsl index a772327763..1b52a980e5 100644 --- a/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/3da25a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_3da25a() { - var res : vec4 = log(vec4()); + var res : vec4 = log(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/7114a6.wgsl b/test/tint/builtins/gen/literal/log/7114a6.wgsl index 9267ece291..855f749646 100644 --- a/test/tint/builtins/gen/literal/log/7114a6.wgsl +++ b/test/tint/builtins/gen/literal/log/7114a6.wgsl @@ -25,7 +25,7 @@ // fn log(f32) -> f32 fn log_7114a6() { - var res: f32 = log(1.0); + var res: f32 = log(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.wgsl index 040bf35206..176e330c61 100644 --- a/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/7114a6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_7114a6() { - var res : f32 = log(1.0); + var res : f32 = log(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl b/test/tint/builtins/gen/literal/log/b2ce28.wgsl index 1854ce540e..8a2f010179 100644 --- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl +++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl @@ -25,7 +25,7 @@ // fn log(vec<2, f32>) -> vec<2, f32> fn log_b2ce28() { - var res: vec2 = log(vec2()); + var res: vec2 = log(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.dxc.hlsl index a68ac88d5e..3eff95a367 100644 --- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_b2ce28() { - float2 res = log((0.0f).xx); + float2 res = log((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.fxc.hlsl index a68ac88d5e..3eff95a367 100644 --- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log_b2ce28() { - float2 res = log((0.0f).xx); + float2 res = log((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.glsl index dfe94a9d30..cc98643daa 100644 --- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log_b2ce28() { - vec2 res = log(vec2(0.0f)); + vec2 res = log(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void log_b2ce28() { - vec2 res = log(vec2(0.0f)); + vec2 res = log(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void log_b2ce28() { - vec2 res = log(vec2(0.0f)); + vec2 res = log(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.msl index 7081fdc2e7..f9c13bd73f 100644 --- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_b2ce28() { - float2 res = log(float2(0.0f)); + float2 res = log(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.spvasm index d64f498cef..5ea25fd7c2 100644 --- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %log_b2ce28 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Log %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Log %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log_b2ce28 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %log_b2ce28 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log_b2ce28 + %29 = OpLabel + %30 = OpFunctionCall %void %log_b2ce28 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log_b2ce28 + %32 = OpLabel + %33 = OpFunctionCall %void %log_b2ce28 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.wgsl index b504d96228..3fafdad3c8 100644 --- a/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/b2ce28.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_b2ce28() { - var res : vec2 = log(vec2()); + var res : vec2 = log(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl b/test/tint/builtins/gen/literal/log/f4c570.wgsl index 93ae9237f2..465e2dabc2 100644 --- a/test/tint/builtins/gen/literal/log/f4c570.wgsl +++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl @@ -25,7 +25,7 @@ // fn log(vec<3, f32>) -> vec<3, f32> fn log_f4c570() { - var res: vec3 = log(vec3()); + var res: vec3 = log(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.dxc.hlsl index fa99614b90..28d545b076 100644 --- a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_f4c570() { - float3 res = log((0.0f).xxx); + float3 res = log((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.fxc.hlsl index fa99614b90..28d545b076 100644 --- a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log_f4c570() { - float3 res = log((0.0f).xxx); + float3 res = log((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.glsl index 91a2314cfd..6a8af4433b 100644 --- a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log_f4c570() { - vec3 res = log(vec3(0.0f)); + vec3 res = log(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void log_f4c570() { - vec3 res = log(vec3(0.0f)); + vec3 res = log(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void log_f4c570() { - vec3 res = log(vec3(0.0f)); + vec3 res = log(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.msl index aa3c95f271..7f61e97137 100644 --- a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_f4c570() { - float3 res = log(float3(0.0f)); + float3 res = log(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.spvasm index 32ce39c22d..c0d6533d6a 100644 --- a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %log_f4c570 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Log %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Log %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log_f4c570 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %log_f4c570 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log_f4c570 + %29 = OpLabel + %30 = OpFunctionCall %void %log_f4c570 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log_f4c570 + %32 = OpLabel + %33 = OpFunctionCall %void %log_f4c570 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.wgsl index 6bb8358e47..6e7dd27bc4 100644 --- a/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log/f4c570.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_f4c570() { - var res : vec3 = log(vec3()); + var res : vec3 = log(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/4036ed.wgsl b/test/tint/builtins/gen/literal/log2/4036ed.wgsl index d7604ea601..19925c881b 100644 --- a/test/tint/builtins/gen/literal/log2/4036ed.wgsl +++ b/test/tint/builtins/gen/literal/log2/4036ed.wgsl @@ -25,7 +25,7 @@ // fn log2(f32) -> f32 fn log2_4036ed() { - var res: f32 = log2(1.0); + var res: f32 = log2(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.wgsl index afaf861537..316b9cd1d8 100644 --- a/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/4036ed.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_4036ed() { - var res : f32 = log2(1.0); + var res : f32 = log2(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl b/test/tint/builtins/gen/literal/log2/902988.wgsl index e8f4b077c6..390f678a7c 100644 --- a/test/tint/builtins/gen/literal/log2/902988.wgsl +++ b/test/tint/builtins/gen/literal/log2/902988.wgsl @@ -25,7 +25,7 @@ // fn log2(vec<4, f32>) -> vec<4, f32> fn log2_902988() { - var res: vec4 = log2(vec4()); + var res: vec4 = log2(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.dxc.hlsl index 9305d245a0..500098ebb5 100644 --- a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_902988() { - float4 res = log2((0.0f).xxxx); + float4 res = log2((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.fxc.hlsl index 9305d245a0..500098ebb5 100644 --- a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log2_902988() { - float4 res = log2((0.0f).xxxx); + float4 res = log2((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.glsl index 5ae645bb11..117b10c28d 100644 --- a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log2_902988() { - vec4 res = log2(vec4(0.0f)); + vec4 res = log2(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void log2_902988() { - vec4 res = log2(vec4(0.0f)); + vec4 res = log2(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void log2_902988() { - vec4 res = log2(vec4(0.0f)); + vec4 res = log2(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.msl index 59f605ba69..354f7615a7 100644 --- a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_902988() { - float4 res = log2(float4(0.0f)); + float4 res = log2(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.spvasm index 81e911869e..6a493b9d81 100644 --- a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %log2_902988 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Log2 %5 + %13 = OpExtInst %v4float %14 Log2 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %log2_902988 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %log2_902988 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %log2_902988 + %27 = OpLabel + %28 = OpFunctionCall %void %log2_902988 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %log2_902988 + %30 = OpLabel + %31 = OpFunctionCall %void %log2_902988 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.wgsl index f493458730..a0a76d1aff 100644 --- a/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/902988.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_902988() { - var res : vec4 = log2(vec4()); + var res : vec4 = log2(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl b/test/tint/builtins/gen/literal/log2/adb233.wgsl index 17cbe44ed5..04af859225 100644 --- a/test/tint/builtins/gen/literal/log2/adb233.wgsl +++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl @@ -25,7 +25,7 @@ // fn log2(vec<3, f32>) -> vec<3, f32> fn log2_adb233() { - var res: vec3 = log2(vec3()); + var res: vec3 = log2(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.dxc.hlsl index c4114cfa90..73bd8d58a4 100644 --- a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_adb233() { - float3 res = log2((0.0f).xxx); + float3 res = log2((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.fxc.hlsl index c4114cfa90..73bd8d58a4 100644 --- a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log2_adb233() { - float3 res = log2((0.0f).xxx); + float3 res = log2((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.glsl index 51fd0cbfd8..82d0d605de 100644 --- a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log2_adb233() { - vec3 res = log2(vec3(0.0f)); + vec3 res = log2(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void log2_adb233() { - vec3 res = log2(vec3(0.0f)); + vec3 res = log2(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void log2_adb233() { - vec3 res = log2(vec3(0.0f)); + vec3 res = log2(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.msl index 5914d8a171..6d394dce9d 100644 --- a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_adb233() { - float3 res = log2(float3(0.0f)); + float3 res = log2(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.spvasm index 5218f913ba..ac19e978e8 100644 --- a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %log2_adb233 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Log2 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Log2 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log2_adb233 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %log2_adb233 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log2_adb233 + %29 = OpLabel + %30 = OpFunctionCall %void %log2_adb233 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log2_adb233 + %32 = OpLabel + %33 = OpFunctionCall %void %log2_adb233 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.wgsl index 9a00f7fbec..326a8e1932 100644 --- a/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/adb233.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_adb233() { - var res : vec3 = log2(vec3()); + var res : vec3 = log2(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl b/test/tint/builtins/gen/literal/log2/aea659.wgsl index 281ef83875..756ebb7a87 100644 --- a/test/tint/builtins/gen/literal/log2/aea659.wgsl +++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl @@ -25,7 +25,7 @@ // fn log2(vec<2, f32>) -> vec<2, f32> fn log2_aea659() { - var res: vec2 = log2(vec2()); + var res: vec2 = log2(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.dxc.hlsl index 8a49c684ce..8c58800014 100644 --- a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_aea659() { - float2 res = log2((0.0f).xx); + float2 res = log2((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.fxc.hlsl index 8a49c684ce..8c58800014 100644 --- a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log2_aea659() { - float2 res = log2((0.0f).xx); + float2 res = log2((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.glsl index fcbf2a6ec6..6b1412f393 100644 --- a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log2_aea659() { - vec2 res = log2(vec2(0.0f)); + vec2 res = log2(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void log2_aea659() { - vec2 res = log2(vec2(0.0f)); + vec2 res = log2(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void log2_aea659() { - vec2 res = log2(vec2(0.0f)); + vec2 res = log2(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.msl index aad7c2ad49..83e3e7d1d7 100644 --- a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_aea659() { - float2 res = log2(float2(0.0f)); + float2 res = log2(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.spvasm index 708bf37692..9f381bc419 100644 --- a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %log2_aea659 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Log2 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Log2 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log2_aea659 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %log2_aea659 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log2_aea659 + %29 = OpLabel + %30 = OpFunctionCall %void %log2_aea659 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log2_aea659 + %32 = OpLabel + %33 = OpFunctionCall %void %log2_aea659 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.wgsl index 562880d55e..039526e2b7 100644 --- a/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/log2/aea659.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_aea659() { - var res : vec2 = log2(vec2()); + var res : vec2 = log2(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl b/test/tint/builtins/gen/literal/max/25eafe.wgsl index 38b4c97818..d1c89ce465 100644 --- a/test/tint/builtins/gen/literal/max/25eafe.wgsl +++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl @@ -25,7 +25,7 @@ // fn max(vec<3, i32>, vec<3, i32>) -> vec<3, i32> fn max_25eafe() { - var res: vec3 = max(vec3(), vec3()); + var res: vec3 = max(vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.dxc.hlsl index 38813ca38b..5909d39be1 100644 --- a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_25eafe() { - int3 res = max((0).xxx, (0).xxx); + int3 res = max((1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.fxc.hlsl index 38813ca38b..5909d39be1 100644 --- a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_25eafe() { - int3 res = max((0).xxx, (0).xxx); + int3 res = max((1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.glsl index 00e2cfebb7..a002bc2e3c 100644 --- a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_25eafe() { - ivec3 res = max(ivec3(0), ivec3(0)); + ivec3 res = max(ivec3(1), ivec3(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_25eafe() { - ivec3 res = max(ivec3(0), ivec3(0)); + ivec3 res = max(ivec3(1), ivec3(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_25eafe() { - ivec3 res = max(ivec3(0), ivec3(0)); + ivec3 res = max(ivec3(1), ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.msl index a05f1f6be2..25f0106007 100644 --- a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_25eafe() { - int3 res = max(int3(0), int3(0)); + int3 res = max(int3(1), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.spvasm index ee1697461e..cb413c8e52 100644 --- a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %17 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_25eafe = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %17 - %13 = OpExtInst %v3int %16 SMax %17 %17 + %res = OpVariable %_ptr_Function_v3int Function %21 + %13 = OpExtInst %v3int %16 SMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_25eafe +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_25eafe OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_25eafe + %31 = OpLabel + %32 = OpFunctionCall %void %max_25eafe OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_25eafe + %34 = OpLabel + %35 = OpFunctionCall %void %max_25eafe OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.wgsl index 0c64e2473e..37dfc6438c 100644 --- a/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/25eafe.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_25eafe() { - var res : vec3 = max(vec3(), vec3()); + var res : vec3 = max(vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl b/test/tint/builtins/gen/literal/max/320815.wgsl index ef566a680a..a1242565e8 100644 --- a/test/tint/builtins/gen/literal/max/320815.wgsl +++ b/test/tint/builtins/gen/literal/max/320815.wgsl @@ -25,7 +25,7 @@ // fn max(vec<2, u32>, vec<2, u32>) -> vec<2, u32> fn max_320815() { - var res: vec2 = max(vec2(), vec2()); + var res: vec2 = max(vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.dxc.hlsl index 2ba1102fb2..d0c591e528 100644 --- a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_320815() { - uint2 res = max((0u).xx, (0u).xx); + uint2 res = max((1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.fxc.hlsl index 2ba1102fb2..d0c591e528 100644 --- a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_320815() { - uint2 res = max((0u).xx, (0u).xx); + uint2 res = max((1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.glsl index 03f3598cff..571c2490f9 100644 --- a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_320815() { - uvec2 res = max(uvec2(0u), uvec2(0u)); + uvec2 res = max(uvec2(1u), uvec2(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_320815() { - uvec2 res = max(uvec2(0u), uvec2(0u)); + uvec2 res = max(uvec2(1u), uvec2(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_320815() { - uvec2 res = max(uvec2(0u), uvec2(0u)); + uvec2 res = max(uvec2(1u), uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.msl index 8c62cf0e77..1cae0b39c2 100644 --- a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_320815() { - uint2 res = max(uint2(0u), uint2(0u)); + uint2 res = max(uint2(1u), uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.spvasm index 649e397439..0be807e205 100644 --- a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %17 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_320815 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %17 - %13 = OpExtInst %v2uint %16 UMax %17 %17 + %res = OpVariable %_ptr_Function_v2uint Function %21 + %13 = OpExtInst %v2uint %16 UMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_320815 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_320815 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_320815 + %31 = OpLabel + %32 = OpFunctionCall %void %max_320815 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_320815 + %34 = OpLabel + %35 = OpFunctionCall %void %max_320815 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.wgsl index d3ac55294f..d47c2e14f3 100644 --- a/test/tint/builtins/gen/literal/max/320815.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/320815.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_320815() { - var res : vec2 = max(vec2(), vec2()); + var res : vec2 = max(vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/44a39d.wgsl b/test/tint/builtins/gen/literal/max/44a39d.wgsl index 037045f22b..d36befbfa0 100644 --- a/test/tint/builtins/gen/literal/max/44a39d.wgsl +++ b/test/tint/builtins/gen/literal/max/44a39d.wgsl @@ -25,7 +25,7 @@ // fn max(f32, f32) -> f32 fn max_44a39d() { - var res: f32 = max(1.0, 1.0); + var res: f32 = max(1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.wgsl index 44ddd84f24..e485a0478a 100644 --- a/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/44a39d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_44a39d() { - var res : f32 = max(1.0, 1.0); + var res : f32 = max(1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl b/test/tint/builtins/gen/literal/max/453e04.wgsl index f1fc2d0638..91b8c9003f 100644 --- a/test/tint/builtins/gen/literal/max/453e04.wgsl +++ b/test/tint/builtins/gen/literal/max/453e04.wgsl @@ -25,7 +25,7 @@ // fn max(vec<4, u32>, vec<4, u32>) -> vec<4, u32> fn max_453e04() { - var res: vec4 = max(vec4(), vec4()); + var res: vec4 = max(vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.dxc.hlsl index f85440056c..52efcc4952 100644 --- a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_453e04() { - uint4 res = max((0u).xxxx, (0u).xxxx); + uint4 res = max((1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.fxc.hlsl index f85440056c..52efcc4952 100644 --- a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_453e04() { - uint4 res = max((0u).xxxx, (0u).xxxx); + uint4 res = max((1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.glsl index 0fd7c6f97b..d2e1aff2ac 100644 --- a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_453e04() { - uvec4 res = max(uvec4(0u), uvec4(0u)); + uvec4 res = max(uvec4(1u), uvec4(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_453e04() { - uvec4 res = max(uvec4(0u), uvec4(0u)); + uvec4 res = max(uvec4(1u), uvec4(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_453e04() { - uvec4 res = max(uvec4(0u), uvec4(0u)); + uvec4 res = max(uvec4(1u), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.msl index d81a71c0c6..ea82e5cb07 100644 --- a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_453e04() { - uint4 res = max(uint4(0u), uint4(0u)); + uint4 res = max(uint4(1u), uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.spvasm index 25e7047bb0..5f0ed0a5d3 100644 --- a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %17 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_453e04 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %17 - %13 = OpExtInst %v4uint %16 UMax %17 %17 + %res = OpVariable %_ptr_Function_v4uint Function %21 + %13 = OpExtInst %v4uint %16 UMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_453e04 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_453e04 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_453e04 + %31 = OpLabel + %32 = OpFunctionCall %void %max_453e04 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_453e04 + %34 = OpLabel + %35 = OpFunctionCall %void %max_453e04 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.wgsl index a5426dda86..49573f56e1 100644 --- a/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/453e04.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_453e04() { - var res : vec4 = max(vec4(), vec4()); + var res : vec4 = max(vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl b/test/tint/builtins/gen/literal/max/462050.wgsl index 01afaf5ace..1c11b14ce5 100644 --- a/test/tint/builtins/gen/literal/max/462050.wgsl +++ b/test/tint/builtins/gen/literal/max/462050.wgsl @@ -25,7 +25,7 @@ // fn max(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn max_462050() { - var res: vec2 = max(vec2(), vec2()); + var res: vec2 = max(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.dxc.hlsl index a2e1d751fa..e6ce078134 100644 --- a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_462050() { - float2 res = max((0.0f).xx, (0.0f).xx); + float2 res = max((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.fxc.hlsl index a2e1d751fa..e6ce078134 100644 --- a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_462050() { - float2 res = max((0.0f).xx, (0.0f).xx); + float2 res = max((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.glsl index 5a809e4480..1bdbe243f2 100644 --- a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_462050() { - vec2 res = max(vec2(0.0f), vec2(0.0f)); + vec2 res = max(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_462050() { - vec2 res = max(vec2(0.0f), vec2(0.0f)); + vec2 res = max(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_462050() { - vec2 res = max(vec2(0.0f), vec2(0.0f)); + vec2 res = max(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.msl index 638c8b3cfa..7689ad5b1d 100644 --- a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_462050() { - float2 res = fmax(float2(0.0f), float2(0.0f)); + float2 res = fmax(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.spvasm index f513309c8e..e0de9d85f5 100644 --- a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %max_462050 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 NMax %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 NMax %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %max_462050 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %max_462050 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %max_462050 + %29 = OpLabel + %30 = OpFunctionCall %void %max_462050 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %max_462050 + %32 = OpLabel + %33 = OpFunctionCall %void %max_462050 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.wgsl index 608a2518da..f28ca59c8d 100644 --- a/test/tint/builtins/gen/literal/max/462050.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/462050.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_462050() { - var res : vec2 = max(vec2(), vec2()); + var res : vec2 = max(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl b/test/tint/builtins/gen/literal/max/4883ac.wgsl index db981e2cd5..3051ef0297 100644 --- a/test/tint/builtins/gen/literal/max/4883ac.wgsl +++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl @@ -25,7 +25,7 @@ // fn max(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn max_4883ac() { - var res: vec3 = max(vec3(), vec3()); + var res: vec3 = max(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.dxc.hlsl index b58a744b97..a4a8b129ff 100644 --- a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_4883ac() { - float3 res = max((0.0f).xxx, (0.0f).xxx); + float3 res = max((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.fxc.hlsl index b58a744b97..a4a8b129ff 100644 --- a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_4883ac() { - float3 res = max((0.0f).xxx, (0.0f).xxx); + float3 res = max((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.glsl index 964a17e6d6..1a0e25ee57 100644 --- a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_4883ac() { - vec3 res = max(vec3(0.0f), vec3(0.0f)); + vec3 res = max(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_4883ac() { - vec3 res = max(vec3(0.0f), vec3(0.0f)); + vec3 res = max(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_4883ac() { - vec3 res = max(vec3(0.0f), vec3(0.0f)); + vec3 res = max(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.msl index 1bcdcddfa7..740e3cd645 100644 --- a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_4883ac() { - float3 res = fmax(float3(0.0f), float3(0.0f)); + float3 res = fmax(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.spvasm index f3a038b1db..3d847003f3 100644 --- a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %max_4883ac = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 NMax %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 NMax %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %max_4883ac +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %max_4883ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %max_4883ac + %29 = OpLabel + %30 = OpFunctionCall %void %max_4883ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %max_4883ac + %32 = OpLabel + %33 = OpFunctionCall %void %max_4883ac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.wgsl index c546b80a13..2178c7604b 100644 --- a/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/4883ac.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_4883ac() { - var res : vec3 = max(vec3(), vec3()); + var res : vec3 = max(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl b/test/tint/builtins/gen/literal/max/85e6bc.wgsl index 2c83e893d7..516a5c5409 100644 --- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl +++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl @@ -25,7 +25,7 @@ // fn max(vec<4, i32>, vec<4, i32>) -> vec<4, i32> fn max_85e6bc() { - var res: vec4 = max(vec4(), vec4()); + var res: vec4 = max(vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.dxc.hlsl index d9f4ff7554..4bcdaeea78 100644 --- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_85e6bc() { - int4 res = max((0).xxxx, (0).xxxx); + int4 res = max((1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.fxc.hlsl index d9f4ff7554..4bcdaeea78 100644 --- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_85e6bc() { - int4 res = max((0).xxxx, (0).xxxx); + int4 res = max((1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.glsl index 9a822277da..60ae5923a8 100644 --- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_85e6bc() { - ivec4 res = max(ivec4(0), ivec4(0)); + ivec4 res = max(ivec4(1), ivec4(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_85e6bc() { - ivec4 res = max(ivec4(0), ivec4(0)); + ivec4 res = max(ivec4(1), ivec4(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_85e6bc() { - ivec4 res = max(ivec4(0), ivec4(0)); + ivec4 res = max(ivec4(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.msl index b48e0db295..4195ba58ef 100644 --- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_85e6bc() { - int4 res = max(int4(0), int4(0)); + int4 res = max(int4(1), int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.spvasm index 4274291dce..457ec87064 100644 --- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %17 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_85e6bc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %17 - %13 = OpExtInst %v4int %16 SMax %17 %17 + %res = OpVariable %_ptr_Function_v4int Function %21 + %13 = OpExtInst %v4int %16 SMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_85e6bc +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_85e6bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_85e6bc + %31 = OpLabel + %32 = OpFunctionCall %void %max_85e6bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_85e6bc + %34 = OpLabel + %35 = OpFunctionCall %void %max_85e6bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.wgsl index 4f221661a4..4043b8c612 100644 --- a/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/85e6bc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_85e6bc() { - var res : vec4 = max(vec4(), vec4()); + var res : vec4 = max(vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl b/test/tint/builtins/gen/literal/max/a93419.wgsl index 6d51baa41b..079f4198e9 100644 --- a/test/tint/builtins/gen/literal/max/a93419.wgsl +++ b/test/tint/builtins/gen/literal/max/a93419.wgsl @@ -25,7 +25,7 @@ // fn max(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn max_a93419() { - var res: vec4 = max(vec4(), vec4()); + var res: vec4 = max(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.dxc.hlsl index 9422412238..0e5c51a32b 100644 --- a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_a93419() { - float4 res = max((0.0f).xxxx, (0.0f).xxxx); + float4 res = max((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.fxc.hlsl index 9422412238..0e5c51a32b 100644 --- a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_a93419() { - float4 res = max((0.0f).xxxx, (0.0f).xxxx); + float4 res = max((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.glsl index ea9cc2b22c..d14adc1d5b 100644 --- a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_a93419() { - vec4 res = max(vec4(0.0f), vec4(0.0f)); + vec4 res = max(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_a93419() { - vec4 res = max(vec4(0.0f), vec4(0.0f)); + vec4 res = max(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_a93419() { - vec4 res = max(vec4(0.0f), vec4(0.0f)); + vec4 res = max(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.msl index 06ecc31cee..2aceaf5f04 100644 --- a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_a93419() { - float4 res = fmax(float4(0.0f), float4(0.0f)); + float4 res = fmax(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.spvasm index 7a4efd7aa9..d99b4183dc 100644 --- a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %max_a93419 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 NMax %5 %5 + %13 = OpExtInst %v4float %14 NMax %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %max_a93419 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %max_a93419 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %max_a93419 + %27 = OpLabel + %28 = OpFunctionCall %void %max_a93419 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_a93419 + %30 = OpLabel + %31 = OpFunctionCall %void %max_a93419 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.wgsl index 8058515758..3bf5ae72fb 100644 --- a/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/a93419.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_a93419() { - var res : vec4 = max(vec4(), vec4()); + var res : vec4 = max(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl b/test/tint/builtins/gen/literal/max/b1b73a.wgsl index 4903288b85..2a460fcdde 100644 --- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl +++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl @@ -25,7 +25,7 @@ // fn max(vec<3, u32>, vec<3, u32>) -> vec<3, u32> fn max_b1b73a() { - var res: vec3 = max(vec3(), vec3()); + var res: vec3 = max(vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.dxc.hlsl index 078debdc5e..c7981d5022 100644 --- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_b1b73a() { - uint3 res = max((0u).xxx, (0u).xxx); + uint3 res = max((1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.fxc.hlsl index 078debdc5e..c7981d5022 100644 --- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_b1b73a() { - uint3 res = max((0u).xxx, (0u).xxx); + uint3 res = max((1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.glsl index bfd415bef6..73f1f880b9 100644 --- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_b1b73a() { - uvec3 res = max(uvec3(0u), uvec3(0u)); + uvec3 res = max(uvec3(1u), uvec3(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_b1b73a() { - uvec3 res = max(uvec3(0u), uvec3(0u)); + uvec3 res = max(uvec3(1u), uvec3(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_b1b73a() { - uvec3 res = max(uvec3(0u), uvec3(0u)); + uvec3 res = max(uvec3(1u), uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.msl index b2635e75e8..c87f2b2049 100644 --- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_b1b73a() { - uint3 res = max(uint3(0u), uint3(0u)); + uint3 res = max(uint3(1u), uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.spvasm index 1daf5703a9..c85b90037a 100644 --- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %17 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_b1b73a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %17 - %13 = OpExtInst %v3uint %16 UMax %17 %17 + %res = OpVariable %_ptr_Function_v3uint Function %21 + %13 = OpExtInst %v3uint %16 UMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_b1b73a +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_b1b73a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_b1b73a + %31 = OpLabel + %32 = OpFunctionCall %void %max_b1b73a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_b1b73a + %34 = OpLabel + %35 = OpFunctionCall %void %max_b1b73a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.wgsl index 6a206ee7f0..545f4ef0c1 100644 --- a/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/b1b73a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_b1b73a() { - var res : vec3 = max(vec3(), vec3()); + var res : vec3 = max(vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl b/test/tint/builtins/gen/literal/max/e8192f.wgsl index a48d7041d8..7d39e24a0a 100644 --- a/test/tint/builtins/gen/literal/max/e8192f.wgsl +++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl @@ -25,7 +25,7 @@ // fn max(vec<2, i32>, vec<2, i32>) -> vec<2, i32> fn max_e8192f() { - var res: vec2 = max(vec2(), vec2()); + var res: vec2 = max(vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.dxc.hlsl index 5a10dbe701..31d3fe3d4e 100644 --- a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void max_e8192f() { - int2 res = max((0).xx, (0).xx); + int2 res = max((1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.fxc.hlsl index 5a10dbe701..31d3fe3d4e 100644 --- a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void max_e8192f() { - int2 res = max((0).xx, (0).xx); + int2 res = max((1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.glsl index 5be4ffb46b..5ae6d7d4b0 100644 --- a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void max_e8192f() { - ivec2 res = max(ivec2(0), ivec2(0)); + ivec2 res = max(ivec2(1), ivec2(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void max_e8192f() { - ivec2 res = max(ivec2(0), ivec2(0)); + ivec2 res = max(ivec2(1), ivec2(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void max_e8192f() { - ivec2 res = max(ivec2(0), ivec2(0)); + ivec2 res = max(ivec2(1), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.msl index 528a782145..71b545b95e 100644 --- a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void max_e8192f() { - int2 res = max(int2(0), int2(0)); + int2 res = max(int2(1), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.spvasm index 1c310adeb1..9dae5f47c4 100644 --- a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %17 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_e8192f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %17 - %13 = OpExtInst %v2int %16 SMax %17 %17 + %res = OpVariable %_ptr_Function_v2int Function %21 + %13 = OpExtInst %v2int %16 SMax %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %max_e8192f +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %max_e8192f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %max_e8192f + %31 = OpLabel + %32 = OpFunctionCall %void %max_e8192f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_e8192f + %34 = OpLabel + %35 = OpFunctionCall %void %max_e8192f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.wgsl index cd7cae14d8..5a9dcfecd9 100644 --- a/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/max/e8192f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn max_e8192f() { - var res : vec2 = max(vec2(), vec2()); + var res : vec2 = max(vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl b/test/tint/builtins/gen/literal/min/03c7e3.wgsl index e07f5b1620..e38dd49d1d 100644 --- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl +++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl @@ -25,7 +25,7 @@ // fn min(vec<2, i32>, vec<2, i32>) -> vec<2, i32> fn min_03c7e3() { - var res: vec2 = min(vec2(), vec2()); + var res: vec2 = min(vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.dxc.hlsl index f24639879e..a1f6b1dcbf 100644 --- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_03c7e3() { - int2 res = min((0).xx, (0).xx); + int2 res = min((1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.fxc.hlsl index f24639879e..a1f6b1dcbf 100644 --- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_03c7e3() { - int2 res = min((0).xx, (0).xx); + int2 res = min((1).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.glsl index 9dfe748d49..b321320ff5 100644 --- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_03c7e3() { - ivec2 res = min(ivec2(0), ivec2(0)); + ivec2 res = min(ivec2(1), ivec2(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_03c7e3() { - ivec2 res = min(ivec2(0), ivec2(0)); + ivec2 res = min(ivec2(1), ivec2(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_03c7e3() { - ivec2 res = min(ivec2(0), ivec2(0)); + ivec2 res = min(ivec2(1), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.msl index 246cc613eb..7460946135 100644 --- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_03c7e3() { - int2 res = min(int2(0), int2(0)); + int2 res = min(int2(1), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.spvasm index 8aad2ecc47..cc5420a58f 100644 --- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %17 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_03c7e3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %17 - %13 = OpExtInst %v2int %16 SMin %17 %17 + %res = OpVariable %_ptr_Function_v2int Function %21 + %13 = OpExtInst %v2int %16 SMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_03c7e3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_03c7e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_03c7e3 + %31 = OpLabel + %32 = OpFunctionCall %void %min_03c7e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_03c7e3 + %34 = OpLabel + %35 = OpFunctionCall %void %min_03c7e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.wgsl index 9814eb9b94..a6dc684075 100644 --- a/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/03c7e3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_03c7e3() { - var res : vec2 = min(vec2(), vec2()); + var res : vec2 = min(vec2(1), vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl b/test/tint/builtins/gen/literal/min/0dc614.wgsl index c803614abc..e4cf5fd985 100644 --- a/test/tint/builtins/gen/literal/min/0dc614.wgsl +++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl @@ -25,7 +25,7 @@ // fn min(vec<4, u32>, vec<4, u32>) -> vec<4, u32> fn min_0dc614() { - var res: vec4 = min(vec4(), vec4()); + var res: vec4 = min(vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.dxc.hlsl index 00a483b8c0..426d3980e0 100644 --- a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_0dc614() { - uint4 res = min((0u).xxxx, (0u).xxxx); + uint4 res = min((1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.fxc.hlsl index 00a483b8c0..426d3980e0 100644 --- a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_0dc614() { - uint4 res = min((0u).xxxx, (0u).xxxx); + uint4 res = min((1u).xxxx, (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.glsl index 72f9e0c3ac..3d60c02dbd 100644 --- a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_0dc614() { - uvec4 res = min(uvec4(0u), uvec4(0u)); + uvec4 res = min(uvec4(1u), uvec4(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_0dc614() { - uvec4 res = min(uvec4(0u), uvec4(0u)); + uvec4 res = min(uvec4(1u), uvec4(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_0dc614() { - uvec4 res = min(uvec4(0u), uvec4(0u)); + uvec4 res = min(uvec4(1u), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.msl index 8064a9ebaf..7b898b5277 100644 --- a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_0dc614() { - uint4 res = min(uint4(0u), uint4(0u)); + uint4 res = min(uint4(1u), uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.spvasm index 772b7d0857..53a931e5d2 100644 --- a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %17 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_0dc614 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %17 - %13 = OpExtInst %v4uint %16 UMin %17 %17 + %res = OpVariable %_ptr_Function_v4uint Function %21 + %13 = OpExtInst %v4uint %16 UMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_0dc614 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_0dc614 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_0dc614 + %31 = OpLabel + %32 = OpFunctionCall %void %min_0dc614 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_0dc614 + %34 = OpLabel + %35 = OpFunctionCall %void %min_0dc614 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.wgsl index aef6335045..a9491e2921 100644 --- a/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/0dc614.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_0dc614() { - var res : vec4 = min(vec4(), vec4()); + var res : vec4 = min(vec4(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl b/test/tint/builtins/gen/literal/min/3941e1.wgsl index 4af9b45cd2..ed98683c0f 100644 --- a/test/tint/builtins/gen/literal/min/3941e1.wgsl +++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl @@ -25,7 +25,7 @@ // fn min(vec<4, i32>, vec<4, i32>) -> vec<4, i32> fn min_3941e1() { - var res: vec4 = min(vec4(), vec4()); + var res: vec4 = min(vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.dxc.hlsl index f20c063b1c..bffbd4a789 100644 --- a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_3941e1() { - int4 res = min((0).xxxx, (0).xxxx); + int4 res = min((1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.fxc.hlsl index f20c063b1c..bffbd4a789 100644 --- a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_3941e1() { - int4 res = min((0).xxxx, (0).xxxx); + int4 res = min((1).xxxx, (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.glsl index 2ed7c6c78c..5ed44c0b68 100644 --- a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_3941e1() { - ivec4 res = min(ivec4(0), ivec4(0)); + ivec4 res = min(ivec4(1), ivec4(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_3941e1() { - ivec4 res = min(ivec4(0), ivec4(0)); + ivec4 res = min(ivec4(1), ivec4(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_3941e1() { - ivec4 res = min(ivec4(0), ivec4(0)); + ivec4 res = min(ivec4(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.msl index bdb1516d71..fe3409cf8e 100644 --- a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_3941e1() { - int4 res = min(int4(0), int4(0)); + int4 res = min(int4(1), int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.spvasm index 03e4ed8df6..7d3fc67683 100644 --- a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %17 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v4int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_3941e1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %17 - %13 = OpExtInst %v4int %16 SMin %17 %17 + %res = OpVariable %_ptr_Function_v4int Function %21 + %13 = OpExtInst %v4int %16 SMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_3941e1 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_3941e1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_3941e1 + %31 = OpLabel + %32 = OpFunctionCall %void %min_3941e1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_3941e1 + %34 = OpLabel + %35 = OpFunctionCall %void %min_3941e1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.wgsl index f64d01b027..cf74c05e5e 100644 --- a/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/3941e1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_3941e1() { - var res : vec4 = min(vec4(), vec4()); + var res : vec4 = min(vec4(1), vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl b/test/tint/builtins/gen/literal/min/82b28f.wgsl index 3e152dcd0c..c46672fcf6 100644 --- a/test/tint/builtins/gen/literal/min/82b28f.wgsl +++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl @@ -25,7 +25,7 @@ // fn min(vec<2, u32>, vec<2, u32>) -> vec<2, u32> fn min_82b28f() { - var res: vec2 = min(vec2(), vec2()); + var res: vec2 = min(vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.dxc.hlsl index c9d2b0ea2d..09b33835ca 100644 --- a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_82b28f() { - uint2 res = min((0u).xx, (0u).xx); + uint2 res = min((1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.fxc.hlsl index c9d2b0ea2d..09b33835ca 100644 --- a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_82b28f() { - uint2 res = min((0u).xx, (0u).xx); + uint2 res = min((1u).xx, (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.glsl index 747faad7f1..74d6493279 100644 --- a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_82b28f() { - uvec2 res = min(uvec2(0u), uvec2(0u)); + uvec2 res = min(uvec2(1u), uvec2(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_82b28f() { - uvec2 res = min(uvec2(0u), uvec2(0u)); + uvec2 res = min(uvec2(1u), uvec2(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_82b28f() { - uvec2 res = min(uvec2(0u), uvec2(0u)); + uvec2 res = min(uvec2(1u), uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.msl index 4c9e53d1f9..6fb614d8c0 100644 --- a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_82b28f() { - uint2 res = min(uint2(0u), uint2(0u)); + uint2 res = min(uint2(1u), uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.spvasm index dfee21a1c7..1b2e64a802 100644 --- a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %17 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v2uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_82b28f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %17 - %13 = OpExtInst %v2uint %16 UMin %17 %17 + %res = OpVariable %_ptr_Function_v2uint Function %21 + %13 = OpExtInst %v2uint %16 UMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_82b28f +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_82b28f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_82b28f + %31 = OpLabel + %32 = OpFunctionCall %void %min_82b28f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_82b28f + %34 = OpLabel + %35 = OpFunctionCall %void %min_82b28f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.wgsl index 13f7dde566..cfd2297283 100644 --- a/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/82b28f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_82b28f() { - var res : vec2 = min(vec2(), vec2()); + var res : vec2 = min(vec2(1u), vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl b/test/tint/builtins/gen/literal/min/93cfc4.wgsl index 84e45b5b0d..d6bd6ab080 100644 --- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl +++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl @@ -25,7 +25,7 @@ // fn min(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn min_93cfc4() { - var res: vec3 = min(vec3(), vec3()); + var res: vec3 = min(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.dxc.hlsl index 4506d8a1f8..e026a3823b 100644 --- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_93cfc4() { - float3 res = min((0.0f).xxx, (0.0f).xxx); + float3 res = min((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.fxc.hlsl index 4506d8a1f8..e026a3823b 100644 --- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_93cfc4() { - float3 res = min((0.0f).xxx, (0.0f).xxx); + float3 res = min((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.glsl index 815875d6d0..4803ddb4be 100644 --- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_93cfc4() { - vec3 res = min(vec3(0.0f), vec3(0.0f)); + vec3 res = min(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_93cfc4() { - vec3 res = min(vec3(0.0f), vec3(0.0f)); + vec3 res = min(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_93cfc4() { - vec3 res = min(vec3(0.0f), vec3(0.0f)); + vec3 res = min(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.msl index 80b5e7c842..93dcaf5d64 100644 --- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_93cfc4() { - float3 res = fmin(float3(0.0f), float3(0.0f)); + float3 res = fmin(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.spvasm index 4ec86a3742..0ee1982822 100644 --- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %min_93cfc4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 NMin %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 NMin %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %min_93cfc4 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %min_93cfc4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %min_93cfc4 + %29 = OpLabel + %30 = OpFunctionCall %void %min_93cfc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %min_93cfc4 + %32 = OpLabel + %33 = OpFunctionCall %void %min_93cfc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.wgsl index bc1ce596e1..a9b796d7c1 100644 --- a/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/93cfc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_93cfc4() { - var res : vec3 = min(vec3(), vec3()); + var res : vec3 = min(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl b/test/tint/builtins/gen/literal/min/a45171.wgsl index ff064e6a16..64bdee6de1 100644 --- a/test/tint/builtins/gen/literal/min/a45171.wgsl +++ b/test/tint/builtins/gen/literal/min/a45171.wgsl @@ -25,7 +25,7 @@ // fn min(vec<3, i32>, vec<3, i32>) -> vec<3, i32> fn min_a45171() { - var res: vec3 = min(vec3(), vec3()); + var res: vec3 = min(vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.dxc.hlsl index 43e5449d4b..6f727fee6b 100644 --- a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_a45171() { - int3 res = min((0).xxx, (0).xxx); + int3 res = min((1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.fxc.hlsl index 43e5449d4b..6f727fee6b 100644 --- a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_a45171() { - int3 res = min((0).xxx, (0).xxx); + int3 res = min((1).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.glsl index bdd786affc..b80a9d4a40 100644 --- a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_a45171() { - ivec3 res = min(ivec3(0), ivec3(0)); + ivec3 res = min(ivec3(1), ivec3(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_a45171() { - ivec3 res = min(ivec3(0), ivec3(0)); + ivec3 res = min(ivec3(1), ivec3(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_a45171() { - ivec3 res = min(ivec3(0), ivec3(0)); + ivec3 res = min(ivec3(1), ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.msl index 4faba50487..58e69d5034 100644 --- a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_a45171() { - int3 res = min(int3(0), int3(0)); + int3 res = min(int3(1), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.spvasm index 267b83e50c..8ecf53481a 100644 --- a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %17 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %18 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3int + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_a45171 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %17 - %13 = OpExtInst %v3int %16 SMin %17 %17 + %res = OpVariable %_ptr_Function_v3int Function %21 + %13 = OpExtInst %v3int %16 SMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_a45171 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_a45171 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_a45171 + %31 = OpLabel + %32 = OpFunctionCall %void %min_a45171 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_a45171 + %34 = OpLabel + %35 = OpFunctionCall %void %min_a45171 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.wgsl index 21846d808d..7f1ce9421d 100644 --- a/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/a45171.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_a45171() { - var res : vec3 = min(vec3(), vec3()); + var res : vec3 = min(vec3(1), vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl b/test/tint/builtins/gen/literal/min/aa28ad.wgsl index 06a34382ba..36f5922eb6 100644 --- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl +++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl @@ -25,7 +25,7 @@ // fn min(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn min_aa28ad() { - var res: vec2 = min(vec2(), vec2()); + var res: vec2 = min(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.dxc.hlsl index a177f79c02..cd3621d775 100644 --- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_aa28ad() { - float2 res = min((0.0f).xx, (0.0f).xx); + float2 res = min((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.fxc.hlsl index a177f79c02..cd3621d775 100644 --- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_aa28ad() { - float2 res = min((0.0f).xx, (0.0f).xx); + float2 res = min((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.glsl index 9151c2e42e..5adc832265 100644 --- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_aa28ad() { - vec2 res = min(vec2(0.0f), vec2(0.0f)); + vec2 res = min(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_aa28ad() { - vec2 res = min(vec2(0.0f), vec2(0.0f)); + vec2 res = min(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_aa28ad() { - vec2 res = min(vec2(0.0f), vec2(0.0f)); + vec2 res = min(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.msl index 4a07ff33be..2b8e88470d 100644 --- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_aa28ad() { - float2 res = fmin(float2(0.0f), float2(0.0f)); + float2 res = fmin(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.spvasm index 7c1cb4d679..b48e17801d 100644 --- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %min_aa28ad = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 NMin %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 NMin %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %min_aa28ad +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %min_aa28ad OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %min_aa28ad + %29 = OpLabel + %30 = OpFunctionCall %void %min_aa28ad OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %min_aa28ad + %32 = OpLabel + %33 = OpFunctionCall %void %min_aa28ad OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.wgsl index d7d651971c..7be6f81f1e 100644 --- a/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/aa28ad.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_aa28ad() { - var res : vec2 = min(vec2(), vec2()); + var res : vec2 = min(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/af326d.wgsl b/test/tint/builtins/gen/literal/min/af326d.wgsl index fe607d5f2c..4c9998a402 100644 --- a/test/tint/builtins/gen/literal/min/af326d.wgsl +++ b/test/tint/builtins/gen/literal/min/af326d.wgsl @@ -25,7 +25,7 @@ // fn min(f32, f32) -> f32 fn min_af326d() { - var res: f32 = min(1.0, 1.0); + var res: f32 = min(1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.wgsl index 3cf8c8baf1..237752f8ff 100644 --- a/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/af326d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_af326d() { - var res : f32 = min(1.0, 1.0); + var res : f32 = min(1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl b/test/tint/builtins/gen/literal/min/c70bb7.wgsl index bb2c99fa13..39555399d9 100644 --- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl +++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl @@ -25,7 +25,7 @@ // fn min(vec<3, u32>, vec<3, u32>) -> vec<3, u32> fn min_c70bb7() { - var res: vec3 = min(vec3(), vec3()); + var res: vec3 = min(vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.dxc.hlsl index 774e77b411..d260b4c443 100644 --- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_c70bb7() { - uint3 res = min((0u).xxx, (0u).xxx); + uint3 res = min((1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.fxc.hlsl index 774e77b411..d260b4c443 100644 --- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_c70bb7() { - uint3 res = min((0u).xxx, (0u).xxx); + uint3 res = min((1u).xxx, (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.glsl index 8e9531f4c2..672a3e4e7d 100644 --- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_c70bb7() { - uvec3 res = min(uvec3(0u), uvec3(0u)); + uvec3 res = min(uvec3(1u), uvec3(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_c70bb7() { - uvec3 res = min(uvec3(0u), uvec3(0u)); + uvec3 res = min(uvec3(1u), uvec3(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_c70bb7() { - uvec3 res = min(uvec3(0u), uvec3(0u)); + uvec3 res = min(uvec3(1u), uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.msl index 74513122ac..3b0730470e 100644 --- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_c70bb7() { - uint3 res = min(uint3(0u), uint3(0u)); + uint3 res = min(uint3(1u), uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.spvasm index ed15a516fe..c40895cb31 100644 --- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader %16 = OpExtInstImport "GLSL.std.450" @@ -33,36 +33,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %17 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %18 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %20 = OpTypeFunction %v4float + %21 = OpConstantNull %v3uint + %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_c70bb7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %17 - %13 = OpExtInst %v3uint %16 UMin %17 %17 + %res = OpVariable %_ptr_Function_v3uint Function %21 + %13 = OpExtInst %v3uint %16 UMin %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %min_c70bb7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %min_c70bb7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_c70bb7 + %31 = OpLabel + %32 = OpFunctionCall %void %min_c70bb7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_c70bb7 + %34 = OpLabel + %35 = OpFunctionCall %void %min_c70bb7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.wgsl index f08a503200..827caf5891 100644 --- a/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/c70bb7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_c70bb7() { - var res : vec3 = min(vec3(), vec3()); + var res : vec3 = min(vec3(1u), vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl b/test/tint/builtins/gen/literal/min/c76fa6.wgsl index 6c5794bc76..aca9e74552 100644 --- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl +++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl @@ -25,7 +25,7 @@ // fn min(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn min_c76fa6() { - var res: vec4 = min(vec4(), vec4()); + var res: vec4 = min(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.dxc.hlsl index 10bb3f2e66..ee24fbbd0f 100644 --- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void min_c76fa6() { - float4 res = min((0.0f).xxxx, (0.0f).xxxx); + float4 res = min((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.fxc.hlsl index 10bb3f2e66..ee24fbbd0f 100644 --- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void min_c76fa6() { - float4 res = min((0.0f).xxxx, (0.0f).xxxx); + float4 res = min((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.glsl index b560e6cadf..be35c1d8fd 100644 --- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void min_c76fa6() { - vec4 res = min(vec4(0.0f), vec4(0.0f)); + vec4 res = min(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void min_c76fa6() { - vec4 res = min(vec4(0.0f), vec4(0.0f)); + vec4 res = min(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void min_c76fa6() { - vec4 res = min(vec4(0.0f), vec4(0.0f)); + vec4 res = min(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.msl index b8e3b36422..2ae53d189b 100644 --- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void min_c76fa6() { - float4 res = fmin(float4(0.0f), float4(0.0f)); + float4 res = fmin(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.spvasm index 6d8fad9f65..1a3b883ae7 100644 --- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %min_c76fa6 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 NMin %5 %5 + %13 = OpExtInst %v4float %14 NMin %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %min_c76fa6 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %min_c76fa6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %min_c76fa6 + %27 = OpLabel + %28 = OpFunctionCall %void %min_c76fa6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %min_c76fa6 + %30 = OpLabel + %31 = OpFunctionCall %void %min_c76fa6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.wgsl index 6b486e3d25..9c3f82edf3 100644 --- a/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/min/c76fa6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn min_c76fa6() { - var res : vec4 = min(vec4(), vec4()); + var res : vec4 = min(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl index 7d1a06f4e2..e174e7b541 100644 --- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl +++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl @@ -25,7 +25,7 @@ // fn mix(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn mix_0c8c33() { - var res: vec3 = mix(vec3(), vec3(), vec3()); + var res: vec3 = mix(vec3(1.f), vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.dxc.hlsl index f81885125f..e29efdd252 100644 --- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_0c8c33() { - float3 res = lerp((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = lerp((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.fxc.hlsl index f81885125f..e29efdd252 100644 --- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void mix_0c8c33() { - float3 res = lerp((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = lerp((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.glsl index fc5c2c026e..801fcbe747 100644 --- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void mix_0c8c33() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = mix(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void mix_0c8c33() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = mix(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void mix_0c8c33() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = mix(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.msl index 74bb3170ee..70041812d8 100644 --- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_0c8c33() { - float3 res = mix(float3(0.0f), float3(0.0f), float3(0.0f)); + float3 res = mix(float3(1.0f), float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.spvasm index ec2334d165..aa1735d9f5 100644 --- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %mix_0c8c33 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 FMix %16 %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 FMix %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %mix_0c8c33 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %mix_0c8c33 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %mix_0c8c33 + %29 = OpLabel + %30 = OpFunctionCall %void %mix_0c8c33 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %mix_0c8c33 + %32 = OpLabel + %33 = OpFunctionCall %void %mix_0c8c33 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.wgsl index 4c2b6d111f..ad663457a6 100644 --- a/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/0c8c33.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn mix_0c8c33() { - var res : vec3 = mix(vec3(), vec3(), vec3()); + var res : vec3 = mix(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl index a5354fcc7c..603d1cd3d8 100644 --- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl +++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl @@ -25,7 +25,7 @@ // fn mix(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32> fn mix_1faeb1() { - var res: vec4 = mix(vec4(), vec4(), 1.0); + var res: vec4 = mix(vec4(1.f), vec4(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.dxc.hlsl index 87255a299b..86f86ad130 100644 --- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_1faeb1() { - float4 res = lerp((0.0f).xxxx, (0.0f).xxxx, 1.0f); + float4 res = lerp((1.0f).xxxx, (1.0f).xxxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.fxc.hlsl index 87255a299b..86f86ad130 100644 --- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void mix_1faeb1() { - float4 res = lerp((0.0f).xxxx, (0.0f).xxxx, 1.0f); + float4 res = lerp((1.0f).xxxx, (1.0f).xxxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.glsl index 46c3bdbe41..365e81e799 100644 --- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void mix_1faeb1() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), 1.0f); + vec4 res = mix(vec4(1.0f), vec4(1.0f), 1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void mix_1faeb1() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), 1.0f); + vec4 res = mix(vec4(1.0f), vec4(1.0f), 1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void mix_1faeb1() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), 1.0f); + vec4 res = mix(vec4(1.0f), vec4(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.msl index 4588bf2b38..404c7cd31f 100644 --- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_1faeb1() { - float4 res = mix(float4(0.0f), float4(0.0f), 1.0f); + float4 res = mix(float4(1.0f), float4(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.spvasm index 57731fbab3..c252ef7bca 100644 --- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %20 = OpTypeFunction %v4float + %21 = OpTypeFunction %v4float %mix_1faeb1 = OpFunction %void None %9 %12 = OpLabel - %16 = OpVariable %_ptr_Function_v4float Function %5 + %17 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - %18 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1 - %13 = OpExtInst %v4float %14 FMix %5 %5 %18 + %19 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1 + %13 = OpExtInst %v4float %14 FMix %16 %16 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %mix_1faeb1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %mix_1faeb1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %mix_1faeb1 + %29 = OpLabel + %30 = OpFunctionCall %void %mix_1faeb1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %mix_1faeb1 + %32 = OpLabel + %33 = OpFunctionCall %void %mix_1faeb1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.wgsl index 355a438e87..6743370969 100644 --- a/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/1faeb1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn mix_1faeb1() { - var res : vec4 = mix(vec4(), vec4(), 1.0); + var res : vec4 = mix(vec4(1.0f), vec4(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl b/test/tint/builtins/gen/literal/mix/2fadab.wgsl index ccfeb73ba8..1f45a3e21f 100644 --- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl +++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl @@ -25,7 +25,7 @@ // fn mix(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32> fn mix_2fadab() { - var res: vec2 = mix(vec2(), vec2(), 1.0); + var res: vec2 = mix(vec2(1.f), vec2(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.dxc.hlsl index 8e703e36d7..8e87ed26df 100644 --- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_2fadab() { - float2 res = lerp((0.0f).xx, (0.0f).xx, 1.0f); + float2 res = lerp((1.0f).xx, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.fxc.hlsl index 8e703e36d7..8e87ed26df 100644 --- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void mix_2fadab() { - float2 res = lerp((0.0f).xx, (0.0f).xx, 1.0f); + float2 res = lerp((1.0f).xx, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.glsl index 10678be56b..adcb16b93c 100644 --- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void mix_2fadab() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), 1.0f); + vec2 res = mix(vec2(1.0f), vec2(1.0f), 1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void mix_2fadab() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), 1.0f); + vec2 res = mix(vec2(1.0f), vec2(1.0f), 1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void mix_2fadab() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), 1.0f); + vec2 res = mix(vec2(1.0f), vec2(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.msl index 027e303850..b40e2661bd 100644 --- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_2fadab() { - float2 res = mix(float2(0.0f), float2(0.0f), 1.0f); + float2 res = mix(float2(1.0f), float2(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.spvasm index 3eb2f5d72c..201dff7d27 100644 --- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,38 +32,39 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %22 = OpTypeFunction %v4float + %20 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %mix_2fadab = OpFunction %void None %9 %12 = OpLabel - %18 = OpVariable %_ptr_Function_v2float Function %16 - %res = OpVariable %_ptr_Function_v2float Function %16 - %20 = OpCompositeConstruct %v2float %float_1 %float_1 - %13 = OpExtInst %v2float %15 FMix %16 %16 %20 + %18 = OpVariable %_ptr_Function_v2float Function %20 + %res = OpVariable %_ptr_Function_v2float Function %20 + %21 = OpCompositeConstruct %v2float %float_1 %float_1 + %13 = OpExtInst %v2float %15 FMix %17 %17 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %mix_2fadab +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %mix_2fadab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %mix_2fadab + %31 = OpLabel + %32 = OpFunctionCall %void %mix_2fadab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %mix_2fadab + %34 = OpLabel + %35 = OpFunctionCall %void %mix_2fadab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.wgsl index 43188af882..15843688f6 100644 --- a/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/2fadab.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn mix_2fadab() { - var res : vec2 = mix(vec2(), vec2(), 1.0); + var res : vec2 = mix(vec2(1.0f), vec2(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl b/test/tint/builtins/gen/literal/mix/315264.wgsl index f7c7d0caf5..7637d3b76e 100644 --- a/test/tint/builtins/gen/literal/mix/315264.wgsl +++ b/test/tint/builtins/gen/literal/mix/315264.wgsl @@ -25,7 +25,7 @@ // fn mix(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32> fn mix_315264() { - var res: vec3 = mix(vec3(), vec3(), 1.0); + var res: vec3 = mix(vec3(1.f), vec3(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.dxc.hlsl index 2c9e4c5895..d2180b769e 100644 --- a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_315264() { - float3 res = lerp((0.0f).xxx, (0.0f).xxx, 1.0f); + float3 res = lerp((1.0f).xxx, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.fxc.hlsl index 2c9e4c5895..d2180b769e 100644 --- a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void mix_315264() { - float3 res = lerp((0.0f).xxx, (0.0f).xxx, 1.0f); + float3 res = lerp((1.0f).xxx, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.glsl index f8a10ec505..e746050d5e 100644 --- a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void mix_315264() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), 1.0f); + vec3 res = mix(vec3(1.0f), vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void mix_315264() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), 1.0f); + vec3 res = mix(vec3(1.0f), vec3(1.0f), 1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void mix_315264() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), 1.0f); + vec3 res = mix(vec3(1.0f), vec3(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.msl index 877991d603..f3b9575688 100644 --- a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_315264() { - float3 res = mix(float3(0.0f), float3(0.0f), 1.0f); + float3 res = mix(float3(1.0f), float3(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.spvasm index edd5730b98..f6b4234ea0 100644 --- a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,38 +32,39 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %22 = OpTypeFunction %v4float + %20 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %mix_315264 = OpFunction %void None %9 %12 = OpLabel - %18 = OpVariable %_ptr_Function_v3float Function %16 - %res = OpVariable %_ptr_Function_v3float Function %16 - %20 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1 - %13 = OpExtInst %v3float %15 FMix %16 %16 %20 + %18 = OpVariable %_ptr_Function_v3float Function %20 + %res = OpVariable %_ptr_Function_v3float Function %20 + %21 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1 + %13 = OpExtInst %v3float %15 FMix %17 %17 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %mix_315264 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %mix_315264 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %mix_315264 + %31 = OpLabel + %32 = OpFunctionCall %void %mix_315264 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %mix_315264 + %34 = OpLabel + %35 = OpFunctionCall %void %mix_315264 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.wgsl index 2bed41c2f8..4596da5e8b 100644 --- a/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/315264.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn mix_315264() { - var res : vec3 = mix(vec3(), vec3(), 1.0); + var res : vec3 = mix(vec3(1.0f), vec3(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl b/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl index faf842b936..5f1c056931 100644 --- a/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl +++ b/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl @@ -25,7 +25,7 @@ // fn mix(f32, f32, f32) -> f32 fn mix_4f0b5e() { - var res: f32 = mix(1.0, 1.0, 1.0); + var res: f32 = mix(1.f, 1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.wgsl index 81859ea362..a8a790a9b6 100644 --- a/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/4f0b5e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn mix_4f0b5e() { - var res : f32 = mix(1.0, 1.0, 1.0); + var res : f32 = mix(1.0f, 1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl index 1dfe2016f2..893390e837 100644 --- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl +++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl @@ -25,7 +25,7 @@ // fn mix(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn mix_6f8adc() { - var res: vec2 = mix(vec2(), vec2(), vec2()); + var res: vec2 = mix(vec2(1.f), vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.dxc.hlsl index 748ee91ea8..4c18f49bd9 100644 --- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_6f8adc() { - float2 res = lerp((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = lerp((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.fxc.hlsl index 748ee91ea8..4c18f49bd9 100644 --- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void mix_6f8adc() { - float2 res = lerp((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = lerp((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.glsl index 1d7bfac38b..8742f945ca 100644 --- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void mix_6f8adc() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = mix(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void mix_6f8adc() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = mix(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void mix_6f8adc() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = mix(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.msl index 8792e186a3..fe9ab8846e 100644 --- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_6f8adc() { - float2 res = mix(float2(0.0f), float2(0.0f), float2(0.0f)); + float2 res = mix(float2(1.0f), float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.spvasm index 86fda1765a..e97dfb3e07 100644 --- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %mix_6f8adc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 FMix %16 %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 FMix %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %mix_6f8adc +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %mix_6f8adc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %mix_6f8adc + %29 = OpLabel + %30 = OpFunctionCall %void %mix_6f8adc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %mix_6f8adc + %32 = OpLabel + %33 = OpFunctionCall %void %mix_6f8adc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.wgsl index 05aa3a2387..1fbda72cef 100644 --- a/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/6f8adc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn mix_6f8adc() { - var res : vec2 = mix(vec2(), vec2(), vec2()); + var res : vec2 = mix(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl b/test/tint/builtins/gen/literal/mix/c37ede.wgsl index 95fd2b10ca..59f343f2e4 100644 --- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl +++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl @@ -25,7 +25,7 @@ // fn mix(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn mix_c37ede() { - var res: vec4 = mix(vec4(), vec4(), vec4()); + var res: vec4 = mix(vec4(1.f), vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.dxc.hlsl index 64cc5d3d8b..04a92f0e29 100644 --- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void mix_c37ede() { - float4 res = lerp((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = lerp((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.fxc.hlsl index 64cc5d3d8b..04a92f0e29 100644 --- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void mix_c37ede() { - float4 res = lerp((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = lerp((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.glsl index 6ec06e2bf7..aafa134f22 100644 --- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void mix_c37ede() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = mix(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void mix_c37ede() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = mix(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void mix_c37ede() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = mix(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.msl index 1100892681..3c839264dc 100644 --- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void mix_c37ede() { - float4 res = mix(float4(0.0f), float4(0.0f), float4(0.0f)); + float4 res = mix(float4(1.0f), float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.spvasm index dfac6facb6..95427bd2a6 100644 --- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %mix_c37ede = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 FMix %5 %5 %5 + %13 = OpExtInst %v4float %14 FMix %16 %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %mix_c37ede +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %mix_c37ede OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %mix_c37ede + %27 = OpLabel + %28 = OpFunctionCall %void %mix_c37ede OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %mix_c37ede + %30 = OpLabel + %31 = OpFunctionCall %void %mix_c37ede OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.wgsl index f0a5da8892..71abfdf1f9 100644 --- a/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/mix/c37ede.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn mix_c37ede() { - var res : vec4 = mix(vec4(), vec4(), vec4()); + var res : vec4 = mix(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/180fed.wgsl b/test/tint/builtins/gen/literal/modf/180fed.wgsl index 1084647499..6284b4e934 100644 --- a/test/tint/builtins/gen/literal/modf/180fed.wgsl +++ b/test/tint/builtins/gen/literal/modf/180fed.wgsl @@ -25,7 +25,7 @@ // fn modf(f32) -> __modf_result fn modf_180fed() { - var res = modf(1.0); + var res = modf(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/180fed.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/180fed.wgsl.expected.wgsl index 16690e4b9e..c1fb535ffe 100644 --- a/test/tint/builtins/gen/literal/modf/180fed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/180fed.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_180fed() { - var res = modf(1.0); + var res = modf(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl index 2821fb2d3f..30c2c1b115 100644 --- a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl +++ b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl @@ -25,7 +25,7 @@ // fn modf(vec<3, f32>) -> __modf_result_vec<3> fn modf_9b75f7() { - var res = modf(vec3()); + var res = modf(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.dxc.hlsl index 1628d04131..b2fabab03a 100644 --- a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec3 tint_modf(float3 param_0) { } void modf_9b75f7() { - modf_result_vec3 res = tint_modf((0.0f).xxx); + modf_result_vec3 res = tint_modf((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.fxc.hlsl index 1628d04131..b2fabab03a 100644 --- a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec3 tint_modf(float3 param_0) { } void modf_9b75f7() { - modf_result_vec3 res = tint_modf((0.0f).xxx); + modf_result_vec3 res = tint_modf((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.glsl index 1e8e59c89b..96710379a6 100644 --- a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.glsl @@ -13,7 +13,7 @@ modf_result_vec3 tint_modf(vec3 param_0) { void modf_9b75f7() { - modf_result_vec3 res = tint_modf(vec3(0.0f)); + modf_result_vec3 res = tint_modf(vec3(1.0f)); } vec4 vertex_main() { @@ -45,7 +45,7 @@ modf_result_vec3 tint_modf(vec3 param_0) { void modf_9b75f7() { - modf_result_vec3 res = tint_modf(vec3(0.0f)); + modf_result_vec3 res = tint_modf(vec3(1.0f)); } void fragment_main() { @@ -71,7 +71,7 @@ modf_result_vec3 tint_modf(vec3 param_0) { void modf_9b75f7() { - modf_result_vec3 res = tint_modf(vec3(0.0f)); + modf_result_vec3 res = tint_modf(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.msl index 7fca0841c3..652a8b6fde 100644 --- a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec3 tint_modf(float3 param_0) { } void modf_9b75f7() { - modf_result_vec3 res = tint_modf(float3(0.0f)); + modf_result_vec3 res = tint_modf(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.spvasm index 358ed18223..bac50d9d76 100644 --- a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.spvasm @@ -38,27 +38,27 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %__modf_result_vec3 = OpTypeStruct %v3float %v3float - %17 = OpConstantNull %v3float -%_ptr_Function___modf_result_vec3 = OpTypePointer Function %__modf_result_vec3 - %20 = OpConstantNull %__modf_result_vec3 - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function___modf_result_vec3 = OpTypePointer Function %__modf_result_vec3 + %21 = OpConstantNull %__modf_result_vec3 + %22 = OpTypeFunction %v4float %modf_9b75f7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___modf_result_vec3 Function %20 - %13 = OpExtInst %__modf_result_vec3 %16 ModfStruct %17 + %res = OpVariable %_ptr_Function___modf_result_vec3 Function %21 + %13 = OpExtInst %__modf_result_vec3 %16 ModfStruct %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %modf_9b75f7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %modf_9b75f7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.wgsl index 24727c69de..6fc1a82caf 100644 --- a/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/9b75f7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_9b75f7() { - var res = modf(vec3()); + var res = modf(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl index 705bf574e1..fc5d28bdf7 100644 --- a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl +++ b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl @@ -25,7 +25,7 @@ // fn modf(vec<4, f32>) -> __modf_result_vec<4> fn modf_ec2dbc() { - var res = modf(vec4()); + var res = modf(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.dxc.hlsl index 26dcc4f37d..1610de1c1d 100644 --- a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec4 tint_modf(float4 param_0) { } void modf_ec2dbc() { - modf_result_vec4 res = tint_modf((0.0f).xxxx); + modf_result_vec4 res = tint_modf((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.fxc.hlsl index 26dcc4f37d..1610de1c1d 100644 --- a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec4 tint_modf(float4 param_0) { } void modf_ec2dbc() { - modf_result_vec4 res = tint_modf((0.0f).xxxx); + modf_result_vec4 res = tint_modf((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.glsl index 46fc278cae..7792ce9a80 100644 --- a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.glsl @@ -13,7 +13,7 @@ modf_result_vec4 tint_modf(vec4 param_0) { void modf_ec2dbc() { - modf_result_vec4 res = tint_modf(vec4(0.0f)); + modf_result_vec4 res = tint_modf(vec4(1.0f)); } vec4 vertex_main() { @@ -45,7 +45,7 @@ modf_result_vec4 tint_modf(vec4 param_0) { void modf_ec2dbc() { - modf_result_vec4 res = tint_modf(vec4(0.0f)); + modf_result_vec4 res = tint_modf(vec4(1.0f)); } void fragment_main() { @@ -71,7 +71,7 @@ modf_result_vec4 tint_modf(vec4 param_0) { void modf_ec2dbc() { - modf_result_vec4 res = tint_modf(vec4(0.0f)); + modf_result_vec4 res = tint_modf(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.msl index 7fb92c2e65..ea4b8568c6 100644 --- a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec4 tint_modf(float4 param_0) { } void modf_ec2dbc() { - modf_result_vec4 res = tint_modf(float4(0.0f)); + modf_result_vec4 res = tint_modf(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.spvasm index 3b63387564..61b2faa1db 100644 --- a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -37,36 +37,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %__modf_result_vec4 = OpTypeStruct %v4float %v4float -%_ptr_Function___modf_result_vec4 = OpTypePointer Function %__modf_result_vec4 - %18 = OpConstantNull %__modf_result_vec4 - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function___modf_result_vec4 = OpTypePointer Function %__modf_result_vec4 + %20 = OpConstantNull %__modf_result_vec4 + %21 = OpTypeFunction %v4float %modf_ec2dbc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___modf_result_vec4 Function %18 - %13 = OpExtInst %__modf_result_vec4 %15 ModfStruct %5 + %res = OpVariable %_ptr_Function___modf_result_vec4 Function %20 + %13 = OpExtInst %__modf_result_vec4 %15 ModfStruct %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %modf_ec2dbc +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %modf_ec2dbc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %modf_ec2dbc + %29 = OpLabel + %30 = OpFunctionCall %void %modf_ec2dbc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %modf_ec2dbc + %32 = OpLabel + %33 = OpFunctionCall %void %modf_ec2dbc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.wgsl index 29b1da6235..b06d9d7deb 100644 --- a/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/ec2dbc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_ec2dbc() { - var res = modf(vec4()); + var res = modf(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl index b59ff813d8..6c7b51e184 100644 --- a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl +++ b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl @@ -25,7 +25,7 @@ // fn modf(vec<2, f32>) -> __modf_result_vec<2> fn modf_f5f20d() { - var res = modf(vec2()); + var res = modf(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.dxc.hlsl index 1dbfa472d6..6b7bdea96d 100644 --- a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec2 tint_modf(float2 param_0) { } void modf_f5f20d() { - modf_result_vec2 res = tint_modf((0.0f).xx); + modf_result_vec2 res = tint_modf((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.fxc.hlsl index 1dbfa472d6..6b7bdea96d 100644 --- a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec2 tint_modf(float2 param_0) { } void modf_f5f20d() { - modf_result_vec2 res = tint_modf((0.0f).xx); + modf_result_vec2 res = tint_modf((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.glsl index 59388058d2..aa9477cd09 100644 --- a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.glsl @@ -13,7 +13,7 @@ modf_result_vec2 tint_modf(vec2 param_0) { void modf_f5f20d() { - modf_result_vec2 res = tint_modf(vec2(0.0f)); + modf_result_vec2 res = tint_modf(vec2(1.0f)); } vec4 vertex_main() { @@ -45,7 +45,7 @@ modf_result_vec2 tint_modf(vec2 param_0) { void modf_f5f20d() { - modf_result_vec2 res = tint_modf(vec2(0.0f)); + modf_result_vec2 res = tint_modf(vec2(1.0f)); } void fragment_main() { @@ -71,7 +71,7 @@ modf_result_vec2 tint_modf(vec2 param_0) { void modf_f5f20d() { - modf_result_vec2 res = tint_modf(vec2(0.0f)); + modf_result_vec2 res = tint_modf(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.msl index a537f67ec0..e2b7204395 100644 --- a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec2 tint_modf(float2 param_0) { } void modf_f5f20d() { - modf_result_vec2 res = tint_modf(float2(0.0f)); + modf_result_vec2 res = tint_modf(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.spvasm index fce65bf884..dd059cb98e 100644 --- a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.spvasm @@ -38,27 +38,27 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %__modf_result_vec2 = OpTypeStruct %v2float %v2float - %17 = OpConstantNull %v2float -%_ptr_Function___modf_result_vec2 = OpTypePointer Function %__modf_result_vec2 - %20 = OpConstantNull %__modf_result_vec2 - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function___modf_result_vec2 = OpTypePointer Function %__modf_result_vec2 + %21 = OpConstantNull %__modf_result_vec2 + %22 = OpTypeFunction %v4float %modf_f5f20d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function___modf_result_vec2 Function %20 - %13 = OpExtInst %__modf_result_vec2 %16 ModfStruct %17 + %res = OpVariable %_ptr_Function___modf_result_vec2 Function %21 + %13 = OpExtInst %__modf_result_vec2 %16 ModfStruct %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %modf_f5f20d +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %modf_f5f20d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.wgsl index 8e78a457c2..c34c0df5b6 100644 --- a/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/modf/f5f20d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_f5f20d() { - var res = modf(vec2()); + var res = modf(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl index e640191c78..2268c2acc1 100644 --- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl +++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl @@ -25,7 +25,7 @@ // fn normalize(vec<3, f32>) -> vec<3, f32> fn normalize_64d8c0() { - var res: vec3 = normalize(vec3()); + var res: vec3 = normalize(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.dxc.hlsl index 44f37d27f9..435c77f3bd 100644 --- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_64d8c0() { - float3 res = normalize((0.0f).xxx); + float3 res = normalize((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.fxc.hlsl index 44f37d27f9..435c77f3bd 100644 --- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void normalize_64d8c0() { - float3 res = normalize((0.0f).xxx); + float3 res = normalize((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.glsl index 6080da92b4..ee47fc768b 100644 --- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void normalize_64d8c0() { - vec3 res = normalize(vec3(0.0f)); + vec3 res = normalize(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void normalize_64d8c0() { - vec3 res = normalize(vec3(0.0f)); + vec3 res = normalize(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void normalize_64d8c0() { - vec3 res = normalize(vec3(0.0f)); + vec3 res = normalize(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.msl index e65cbfa18b..a821d6ddf2 100644 --- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_64d8c0() { - float3 res = normalize(float3(0.0f)); + float3 res = normalize(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.spvasm index 914973a33a..e8caa640f2 100644 --- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %normalize_64d8c0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Normalize %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Normalize %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %normalize_64d8c0 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %normalize_64d8c0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %normalize_64d8c0 + %29 = OpLabel + %30 = OpFunctionCall %void %normalize_64d8c0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %normalize_64d8c0 + %32 = OpLabel + %33 = OpFunctionCall %void %normalize_64d8c0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.wgsl index ac57ff174a..4e73ed0275 100644 --- a/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/normalize/64d8c0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn normalize_64d8c0() { - var res : vec3 = normalize(vec3()); + var res : vec3 = normalize(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl index 0f92a9699c..03a68580b3 100644 --- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl +++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl @@ -25,7 +25,7 @@ // fn normalize(vec<4, f32>) -> vec<4, f32> fn normalize_9a0aab() { - var res: vec4 = normalize(vec4()); + var res: vec4 = normalize(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.dxc.hlsl index 7b03b075fb..c50afa0bc6 100644 --- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_9a0aab() { - float4 res = normalize((0.0f).xxxx); + float4 res = normalize((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.fxc.hlsl index 7b03b075fb..c50afa0bc6 100644 --- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void normalize_9a0aab() { - float4 res = normalize((0.0f).xxxx); + float4 res = normalize((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.glsl index 079a0068dc..2e9a75d3eb 100644 --- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void normalize_9a0aab() { - vec4 res = normalize(vec4(0.0f)); + vec4 res = normalize(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void normalize_9a0aab() { - vec4 res = normalize(vec4(0.0f)); + vec4 res = normalize(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void normalize_9a0aab() { - vec4 res = normalize(vec4(0.0f)); + vec4 res = normalize(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.msl index 7883710f2f..c30ba2846f 100644 --- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_9a0aab() { - float4 res = normalize(float4(0.0f)); + float4 res = normalize(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.spvasm index 7b18b6f7d5..65d4b55273 100644 --- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %normalize_9a0aab = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Normalize %5 + %13 = OpExtInst %v4float %14 Normalize %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %normalize_9a0aab +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %normalize_9a0aab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %normalize_9a0aab + %27 = OpLabel + %28 = OpFunctionCall %void %normalize_9a0aab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %normalize_9a0aab + %30 = OpLabel + %31 = OpFunctionCall %void %normalize_9a0aab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.wgsl index 44226a52f3..336e47dd51 100644 --- a/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/normalize/9a0aab.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn normalize_9a0aab() { - var res : vec4 = normalize(vec4()); + var res : vec4 = normalize(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl index e1b02752ac..dc60770649 100644 --- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl +++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl @@ -25,7 +25,7 @@ // fn normalize(vec<2, f32>) -> vec<2, f32> fn normalize_fc2ef1() { - var res: vec2 = normalize(vec2()); + var res: vec2 = normalize(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.dxc.hlsl index ae32c22d23..5eadc79796 100644 --- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_fc2ef1() { - float2 res = normalize((0.0f).xx); + float2 res = normalize((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.fxc.hlsl index ae32c22d23..5eadc79796 100644 --- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void normalize_fc2ef1() { - float2 res = normalize((0.0f).xx); + float2 res = normalize((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.glsl index a723fd65c3..a3ae11e9a4 100644 --- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void normalize_fc2ef1() { - vec2 res = normalize(vec2(0.0f)); + vec2 res = normalize(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void normalize_fc2ef1() { - vec2 res = normalize(vec2(0.0f)); + vec2 res = normalize(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void normalize_fc2ef1() { - vec2 res = normalize(vec2(0.0f)); + vec2 res = normalize(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.msl index 18c8099526..1c9820ba69 100644 --- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_fc2ef1() { - float2 res = normalize(float2(0.0f)); + float2 res = normalize(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.spvasm index ed6aec3a0e..1eb6f881f3 100644 --- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %normalize_fc2ef1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Normalize %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Normalize %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %normalize_fc2ef1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %normalize_fc2ef1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %normalize_fc2ef1 + %29 = OpLabel + %30 = OpFunctionCall %void %normalize_fc2ef1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %normalize_fc2ef1 + %32 = OpLabel + %33 = OpFunctionCall %void %normalize_fc2ef1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.wgsl index e434b5847a..ef05b2590c 100644 --- a/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/normalize/fc2ef1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn normalize_fc2ef1() { - var res : vec2 = normalize(vec2()); + var res : vec2 = normalize(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl b/test/tint/builtins/gen/literal/pow/04a908.wgsl index 52effd61a9..c12aab0409 100644 --- a/test/tint/builtins/gen/literal/pow/04a908.wgsl +++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl @@ -25,7 +25,7 @@ // fn pow(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn pow_04a908() { - var res: vec4 = pow(vec4(), vec4()); + var res: vec4 = pow(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.dxc.hlsl index 49e81d6728..7006eef600 100644 --- a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void pow_04a908() { - float4 res = pow((0.0f).xxxx, (0.0f).xxxx); + float4 res = pow((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.fxc.hlsl index 49e81d6728..7006eef600 100644 --- a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void pow_04a908() { - float4 res = pow((0.0f).xxxx, (0.0f).xxxx); + float4 res = pow((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.glsl index 6dde9867be..dc7e2f6e84 100644 --- a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pow_04a908() { - vec4 res = pow(vec4(0.0f), vec4(0.0f)); + vec4 res = pow(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pow_04a908() { - vec4 res = pow(vec4(0.0f), vec4(0.0f)); + vec4 res = pow(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pow_04a908() { - vec4 res = pow(vec4(0.0f), vec4(0.0f)); + vec4 res = pow(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.msl index 3e8d0c4944..647e665fca 100644 --- a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pow_04a908() { - float4 res = pow(float4(0.0f), float4(0.0f)); + float4 res = pow(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.spvasm index 200e5e4b2d..614ed9b1c8 100644 --- a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %pow_04a908 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Pow %5 %5 + %13 = OpExtInst %v4float %14 Pow %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %pow_04a908 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %pow_04a908 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %pow_04a908 + %27 = OpLabel + %28 = OpFunctionCall %void %pow_04a908 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %pow_04a908 + %30 = OpLabel + %31 = OpFunctionCall %void %pow_04a908 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.wgsl index 315a4bc4c4..a89bbf4cb7 100644 --- a/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/04a908.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pow_04a908() { - var res : vec4 = pow(vec4(), vec4()); + var res : vec4 = pow(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/46e029.wgsl b/test/tint/builtins/gen/literal/pow/46e029.wgsl index 533afb8c47..c8fed78bc3 100644 --- a/test/tint/builtins/gen/literal/pow/46e029.wgsl +++ b/test/tint/builtins/gen/literal/pow/46e029.wgsl @@ -25,7 +25,7 @@ // fn pow(f32, f32) -> f32 fn pow_46e029() { - var res: f32 = pow(1.0, 1.0); + var res: f32 = pow(1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.wgsl index 646aec39a1..892a9aedce 100644 --- a/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/46e029.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pow_46e029() { - var res : f32 = pow(1.0, 1.0); + var res : f32 = pow(1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl index 6c8cccfe33..0d3a04416b 100644 --- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl +++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl @@ -25,7 +25,7 @@ // fn pow(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn pow_4a46c9() { - var res: vec3 = pow(vec3(), vec3()); + var res: vec3 = pow(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.dxc.hlsl index c08dee8c3b..282199079e 100644 --- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void pow_4a46c9() { - float3 res = pow((0.0f).xxx, (0.0f).xxx); + float3 res = pow((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.fxc.hlsl index c08dee8c3b..282199079e 100644 --- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void pow_4a46c9() { - float3 res = pow((0.0f).xxx, (0.0f).xxx); + float3 res = pow((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.glsl index 921ace0291..36ad96855b 100644 --- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pow_4a46c9() { - vec3 res = pow(vec3(0.0f), vec3(0.0f)); + vec3 res = pow(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pow_4a46c9() { - vec3 res = pow(vec3(0.0f), vec3(0.0f)); + vec3 res = pow(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pow_4a46c9() { - vec3 res = pow(vec3(0.0f), vec3(0.0f)); + vec3 res = pow(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.msl index b7eabb8677..e0fa00c674 100644 --- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pow_4a46c9() { - float3 res = pow(float3(0.0f), float3(0.0f)); + float3 res = pow(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.spvasm index e6adbfe194..01a3076e98 100644 --- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %pow_4a46c9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Pow %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Pow %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %pow_4a46c9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %pow_4a46c9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %pow_4a46c9 + %29 = OpLabel + %30 = OpFunctionCall %void %pow_4a46c9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pow_4a46c9 + %32 = OpLabel + %33 = OpFunctionCall %void %pow_4a46c9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.wgsl index 1b7cf2d986..c28a6115b0 100644 --- a/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/4a46c9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pow_4a46c9() { - var res : vec3 = pow(vec3(), vec3()); + var res : vec3 = pow(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl index eea84ff930..e75fb8a20d 100644 --- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl +++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl @@ -25,7 +25,7 @@ // fn pow(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn pow_e60ea5() { - var res: vec2 = pow(vec2(), vec2()); + var res: vec2 = pow(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.dxc.hlsl index a5e598545c..1a7b88c2cd 100644 --- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void pow_e60ea5() { - float2 res = pow((0.0f).xx, (0.0f).xx); + float2 res = pow((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.fxc.hlsl index a5e598545c..1a7b88c2cd 100644 --- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void pow_e60ea5() { - float2 res = pow((0.0f).xx, (0.0f).xx); + float2 res = pow((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.glsl index 1d1dfc9371..ede9a15093 100644 --- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pow_e60ea5() { - vec2 res = pow(vec2(0.0f), vec2(0.0f)); + vec2 res = pow(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pow_e60ea5() { - vec2 res = pow(vec2(0.0f), vec2(0.0f)); + vec2 res = pow(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pow_e60ea5() { - vec2 res = pow(vec2(0.0f), vec2(0.0f)); + vec2 res = pow(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.msl index c24658d49d..5a964bad28 100644 --- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pow_e60ea5() { - float2 res = pow(float2(0.0f), float2(0.0f)); + float2 res = pow(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.spvasm index 52c3db126b..17d1989a1e 100644 --- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %pow_e60ea5 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Pow %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Pow %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %pow_e60ea5 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %pow_e60ea5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %pow_e60ea5 + %29 = OpLabel + %30 = OpFunctionCall %void %pow_e60ea5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pow_e60ea5 + %32 = OpLabel + %33 = OpFunctionCall %void %pow_e60ea5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.wgsl index a7d9fcb058..f1d54b0356 100644 --- a/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pow/e60ea5.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pow_e60ea5() { - var res : vec2 = pow(vec2(), vec2()); + var res : vec2 = pow(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl index ef30a5274f..52b33ef260 100644 --- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl +++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl @@ -25,7 +25,7 @@ // fn radians(vec<4, f32>) -> vec<4, f32> fn radians_09b7fc() { - var res: vec4 = radians(vec4()); + var res: vec4 = radians(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.dxc.hlsl index c4b4e7118b..d1adfed065 100644 --- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_radians(float4 param_0) { } void radians_09b7fc() { - float4 res = tint_radians((0.0f).xxxx); + float4 res = tint_radians((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.fxc.hlsl index c4b4e7118b..d1adfed065 100644 --- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_radians(float4 param_0) { } void radians_09b7fc() { - float4 res = tint_radians((0.0f).xxxx); + float4 res = tint_radians((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.glsl index 6d3a58e820..06b664a0e5 100644 --- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec4 tint_radians(vec4 param_0) { void radians_09b7fc() { - vec4 res = tint_radians(vec4(0.0f)); + vec4 res = tint_radians(vec4(1.0f)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ vec4 tint_radians(vec4 param_0) { void radians_09b7fc() { - vec4 res = tint_radians(vec4(0.0f)); + vec4 res = tint_radians(vec4(1.0f)); } void fragment_main() { @@ -50,7 +50,7 @@ vec4 tint_radians(vec4 param_0) { void radians_09b7fc() { - vec4 res = tint_radians(vec4(0.0f)); + vec4 res = tint_radians(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.msl index 895e01bba4..59ac3a3080 100644 --- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.msl @@ -7,7 +7,7 @@ float4 tint_radians(float4 param_0) { } void radians_09b7fc() { - float4 res = tint_radians(float4(0.0f)); + float4 res = tint_radians(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.spvasm index e2f2f99fc9..ddeea5d5e0 100644 --- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %radians_09b7fc = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Radians %5 + %13 = OpExtInst %v4float %14 Radians %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %radians_09b7fc +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %radians_09b7fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %radians_09b7fc + %27 = OpLabel + %28 = OpFunctionCall %void %radians_09b7fc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %radians_09b7fc + %30 = OpLabel + %31 = OpFunctionCall %void %radians_09b7fc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.wgsl index 6300fd694c..76a6cc838e 100644 --- a/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/09b7fc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_09b7fc() { - var res : vec4 = radians(vec4()); + var res : vec4 = radians(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl b/test/tint/builtins/gen/literal/radians/61687a.wgsl index bd44d9428e..462b3b3c41 100644 --- a/test/tint/builtins/gen/literal/radians/61687a.wgsl +++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl @@ -25,7 +25,7 @@ // fn radians(vec<2, f32>) -> vec<2, f32> fn radians_61687a() { - var res: vec2 = radians(vec2()); + var res: vec2 = radians(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.dxc.hlsl index 9256119568..66fd0bb9c8 100644 --- a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_radians(float2 param_0) { } void radians_61687a() { - float2 res = tint_radians((0.0f).xx); + float2 res = tint_radians((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.fxc.hlsl index 9256119568..66fd0bb9c8 100644 --- a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_radians(float2 param_0) { } void radians_61687a() { - float2 res = tint_radians((0.0f).xx); + float2 res = tint_radians((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.glsl index bfc6c1e8f2..074d2cd533 100644 --- a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec2 tint_radians(vec2 param_0) { void radians_61687a() { - vec2 res = tint_radians(vec2(0.0f)); + vec2 res = tint_radians(vec2(1.0f)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ vec2 tint_radians(vec2 param_0) { void radians_61687a() { - vec2 res = tint_radians(vec2(0.0f)); + vec2 res = tint_radians(vec2(1.0f)); } void fragment_main() { @@ -50,7 +50,7 @@ vec2 tint_radians(vec2 param_0) { void radians_61687a() { - vec2 res = tint_radians(vec2(0.0f)); + vec2 res = tint_radians(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.msl index 00c5efa334..2ce18610d0 100644 --- a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.msl @@ -7,7 +7,7 @@ float2 tint_radians(float2 param_0) { } void radians_61687a() { - float2 res = tint_radians(float2(0.0f)); + float2 res = tint_radians(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.spvasm index b5dc84d32a..b9e7307a66 100644 --- a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %radians_61687a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Radians %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Radians %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %radians_61687a +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %radians_61687a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %radians_61687a + %29 = OpLabel + %30 = OpFunctionCall %void %radians_61687a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %radians_61687a + %32 = OpLabel + %33 = OpFunctionCall %void %radians_61687a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.wgsl index 5cef876cca..c5fe5018f2 100644 --- a/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/61687a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_61687a() { - var res : vec2 = radians(vec2()); + var res : vec2 = radians(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl b/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl index aa64cc9632..fd00ce2ad4 100644 --- a/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl +++ b/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl @@ -25,7 +25,7 @@ // fn radians(f32) -> f32 fn radians_6b0ff2() { - var res: f32 = radians(1.0); + var res: f32 = radians(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.wgsl index de4a51a547..8e5f986a25 100644 --- a/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/6b0ff2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_6b0ff2() { - var res : f32 = radians(1.0); + var res : f32 = radians(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl b/test/tint/builtins/gen/literal/radians/f96258.wgsl index 05785b0e72..10e683569a 100644 --- a/test/tint/builtins/gen/literal/radians/f96258.wgsl +++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl @@ -25,7 +25,7 @@ // fn radians(vec<3, f32>) -> vec<3, f32> fn radians_f96258() { - var res: vec3 = radians(vec3()); + var res: vec3 = radians(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.dxc.hlsl index 809549a797..3ca2a8046e 100644 --- a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_radians(float3 param_0) { } void radians_f96258() { - float3 res = tint_radians((0.0f).xxx); + float3 res = tint_radians((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.fxc.hlsl index 809549a797..3ca2a8046e 100644 --- a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_radians(float3 param_0) { } void radians_f96258() { - float3 res = tint_radians((0.0f).xxx); + float3 res = tint_radians((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.glsl index f1c319bbc0..f4a72345dd 100644 --- a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec3 tint_radians(vec3 param_0) { void radians_f96258() { - vec3 res = tint_radians(vec3(0.0f)); + vec3 res = tint_radians(vec3(1.0f)); } vec4 vertex_main() { @@ -31,7 +31,7 @@ vec3 tint_radians(vec3 param_0) { void radians_f96258() { - vec3 res = tint_radians(vec3(0.0f)); + vec3 res = tint_radians(vec3(1.0f)); } void fragment_main() { @@ -50,7 +50,7 @@ vec3 tint_radians(vec3 param_0) { void radians_f96258() { - vec3 res = tint_radians(vec3(0.0f)); + vec3 res = tint_radians(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.msl index 2864b49ca0..cae23f490b 100644 --- a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.msl @@ -7,7 +7,7 @@ float3 tint_radians(float3 param_0) { } void radians_f96258() { - float3 res = tint_radians(float3(0.0f)); + float3 res = tint_radians(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.spvasm index 277f09e387..ef337f4f81 100644 --- a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %radians_f96258 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Radians %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Radians %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %radians_f96258 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %radians_f96258 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %radians_f96258 + %29 = OpLabel + %30 = OpFunctionCall %void %radians_f96258 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %radians_f96258 + %32 = OpLabel + %33 = OpFunctionCall %void %radians_f96258 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.wgsl index 5e43bb863c..d0ea14efb9 100644 --- a/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/radians/f96258.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_f96258() { - var res : vec3 = radians(vec3()); + var res : vec3 = radians(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl b/test/tint/builtins/gen/literal/reflect/05357e.wgsl index 0fe5cba2a0..ee9300be4e 100644 --- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl +++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl @@ -25,7 +25,7 @@ // fn reflect(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn reflect_05357e() { - var res: vec4 = reflect(vec4(), vec4()); + var res: vec4 = reflect(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.dxc.hlsl index f692e16863..fd73a286ea 100644 --- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reflect_05357e() { - float4 res = reflect((0.0f).xxxx, (0.0f).xxxx); + float4 res = reflect((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.fxc.hlsl index f692e16863..fd73a286ea 100644 --- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reflect_05357e() { - float4 res = reflect((0.0f).xxxx, (0.0f).xxxx); + float4 res = reflect((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.glsl index 203992573b..3921ef5650 100644 --- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reflect_05357e() { - vec4 res = reflect(vec4(0.0f), vec4(0.0f)); + vec4 res = reflect(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reflect_05357e() { - vec4 res = reflect(vec4(0.0f), vec4(0.0f)); + vec4 res = reflect(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reflect_05357e() { - vec4 res = reflect(vec4(0.0f), vec4(0.0f)); + vec4 res = reflect(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.msl index 2ba2389e5e..6a895d1b03 100644 --- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reflect_05357e() { - float4 res = reflect(float4(0.0f), float4(0.0f)); + float4 res = reflect(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.spvasm index e3fc18da98..2e975508d7 100644 --- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %reflect_05357e = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Reflect %5 %5 + %13 = OpExtInst %v4float %14 Reflect %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %reflect_05357e +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %reflect_05357e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %reflect_05357e + %27 = OpLabel + %28 = OpFunctionCall %void %reflect_05357e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %reflect_05357e + %30 = OpLabel + %31 = OpFunctionCall %void %reflect_05357e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.wgsl index 23966df211..d9da648e22 100644 --- a/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reflect/05357e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reflect_05357e() { - var res : vec4 = reflect(vec4(), vec4()); + var res : vec4 = reflect(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl index aeeaed7028..b154dc9809 100644 --- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl +++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl @@ -25,7 +25,7 @@ // fn reflect(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn reflect_b61e10() { - var res: vec2 = reflect(vec2(), vec2()); + var res: vec2 = reflect(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.dxc.hlsl index 7fb47a07e1..5762d11c15 100644 --- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reflect_b61e10() { - float2 res = reflect((0.0f).xx, (0.0f).xx); + float2 res = reflect((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.fxc.hlsl index 7fb47a07e1..5762d11c15 100644 --- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reflect_b61e10() { - float2 res = reflect((0.0f).xx, (0.0f).xx); + float2 res = reflect((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.glsl index 889faca044..83fb3a6988 100644 --- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reflect_b61e10() { - vec2 res = reflect(vec2(0.0f), vec2(0.0f)); + vec2 res = reflect(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reflect_b61e10() { - vec2 res = reflect(vec2(0.0f), vec2(0.0f)); + vec2 res = reflect(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reflect_b61e10() { - vec2 res = reflect(vec2(0.0f), vec2(0.0f)); + vec2 res = reflect(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.msl index 8e773b6294..2df9be572f 100644 --- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reflect_b61e10() { - float2 res = reflect(float2(0.0f), float2(0.0f)); + float2 res = reflect(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.spvasm index 24a2c10fb5..6155906487 100644 --- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %reflect_b61e10 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Reflect %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Reflect %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reflect_b61e10 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reflect_b61e10 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reflect_b61e10 + %29 = OpLabel + %30 = OpFunctionCall %void %reflect_b61e10 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reflect_b61e10 + %32 = OpLabel + %33 = OpFunctionCall %void %reflect_b61e10 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.wgsl index 2ef48b1c39..c717a382d6 100644 --- a/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reflect/b61e10.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reflect_b61e10() { - var res : vec2 = reflect(vec2(), vec2()); + var res : vec2 = reflect(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl index 3abf913fd2..f634442e3a 100644 --- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl +++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl @@ -25,7 +25,7 @@ // fn reflect(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn reflect_f47fdb() { - var res: vec3 = reflect(vec3(), vec3()); + var res: vec3 = reflect(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.dxc.hlsl index af76751b78..a98a1fef23 100644 --- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reflect_f47fdb() { - float3 res = reflect((0.0f).xxx, (0.0f).xxx); + float3 res = reflect((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.fxc.hlsl index af76751b78..a98a1fef23 100644 --- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reflect_f47fdb() { - float3 res = reflect((0.0f).xxx, (0.0f).xxx); + float3 res = reflect((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.glsl index da62aa4dde..cdddcc02dc 100644 --- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reflect_f47fdb() { - vec3 res = reflect(vec3(0.0f), vec3(0.0f)); + vec3 res = reflect(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reflect_f47fdb() { - vec3 res = reflect(vec3(0.0f), vec3(0.0f)); + vec3 res = reflect(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reflect_f47fdb() { - vec3 res = reflect(vec3(0.0f), vec3(0.0f)); + vec3 res = reflect(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.msl index 74e2a3a722..36e3c60dde 100644 --- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reflect_f47fdb() { - float3 res = reflect(float3(0.0f), float3(0.0f)); + float3 res = reflect(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.spvasm index b8ce4f78ec..69731e22a1 100644 --- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %reflect_f47fdb = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Reflect %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Reflect %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reflect_f47fdb +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reflect_f47fdb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reflect_f47fdb + %29 = OpLabel + %30 = OpFunctionCall %void %reflect_f47fdb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reflect_f47fdb + %32 = OpLabel + %33 = OpFunctionCall %void %reflect_f47fdb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.wgsl index 7e386779fa..c9a13ea1a2 100644 --- a/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reflect/f47fdb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reflect_f47fdb() { - var res : vec3 = reflect(vec3(), vec3()); + var res : vec3 = reflect(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl index 34bd4ee535..e4bef32ccf 100644 --- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl +++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl @@ -25,7 +25,7 @@ // fn refract(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32> fn refract_7e02e6() { - var res: vec4 = refract(vec4(), vec4(), 1.0); + var res: vec4 = refract(vec4(1.f), vec4(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.dxc.hlsl index 80fac1d6f4..d8c3de86a4 100644 --- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void refract_7e02e6() { - float4 res = refract((0.0f).xxxx, (0.0f).xxxx, 1.0f); + float4 res = refract((1.0f).xxxx, (1.0f).xxxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.fxc.hlsl index 80fac1d6f4..d8c3de86a4 100644 --- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void refract_7e02e6() { - float4 res = refract((0.0f).xxxx, (0.0f).xxxx, 1.0f); + float4 res = refract((1.0f).xxxx, (1.0f).xxxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.glsl index fda808865f..5c8bd1e747 100644 --- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void refract_7e02e6() { - vec4 res = refract(vec4(0.0f), vec4(0.0f), 1.0f); + vec4 res = refract(vec4(1.0f), vec4(1.0f), 1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void refract_7e02e6() { - vec4 res = refract(vec4(0.0f), vec4(0.0f), 1.0f); + vec4 res = refract(vec4(1.0f), vec4(1.0f), 1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void refract_7e02e6() { - vec4 res = refract(vec4(0.0f), vec4(0.0f), 1.0f); + vec4 res = refract(vec4(1.0f), vec4(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.msl index d7bf57c7d3..a44d158caa 100644 --- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void refract_7e02e6() { - float4 res = refract(float4(0.0f), float4(0.0f), 1.0f); + float4 res = refract(float4(1.0f), float4(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.spvasm index d3a15d72c4..6cfa75a5d9 100644 --- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -32,34 +32,35 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %18 = OpTypeFunction %v4float + %19 = OpTypeFunction %v4float %refract_7e02e6 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Refract %5 %5 %float_1 + %13 = OpExtInst %v4float %14 Refract %16 %16 %float_1 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %refract_7e02e6 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %refract_7e02e6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %refract_7e02e6 + %27 = OpLabel + %28 = OpFunctionCall %void %refract_7e02e6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %refract_7e02e6 + %30 = OpLabel + %31 = OpFunctionCall %void %refract_7e02e6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.wgsl index e1fb4d2a1e..75f3851951 100644 --- a/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/refract/7e02e6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn refract_7e02e6() { - var res : vec4 = refract(vec4(), vec4(), 1.0); + var res : vec4 = refract(vec4(1.0f), vec4(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl index dec991f37d..b3dc8692b1 100644 --- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl +++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl @@ -25,7 +25,7 @@ // fn refract(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32> fn refract_cbc1d2() { - var res: vec3 = refract(vec3(), vec3(), 1.0); + var res: vec3 = refract(vec3(1.f), vec3(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.dxc.hlsl index 4af833e9e0..0fa2f162aa 100644 --- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void refract_cbc1d2() { - float3 res = refract((0.0f).xxx, (0.0f).xxx, 1.0f); + float3 res = refract((1.0f).xxx, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.fxc.hlsl index 4af833e9e0..0fa2f162aa 100644 --- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void refract_cbc1d2() { - float3 res = refract((0.0f).xxx, (0.0f).xxx, 1.0f); + float3 res = refract((1.0f).xxx, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.glsl index 00f6a4ae47..45dc14b8f2 100644 --- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void refract_cbc1d2() { - vec3 res = refract(vec3(0.0f), vec3(0.0f), 1.0f); + vec3 res = refract(vec3(1.0f), vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void refract_cbc1d2() { - vec3 res = refract(vec3(0.0f), vec3(0.0f), 1.0f); + vec3 res = refract(vec3(1.0f), vec3(1.0f), 1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void refract_cbc1d2() { - vec3 res = refract(vec3(0.0f), vec3(0.0f), 1.0f); + vec3 res = refract(vec3(1.0f), vec3(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.msl index 410a9a6b60..dbec949089 100644 --- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void refract_cbc1d2() { - float3 res = refract(float3(0.0f), float3(0.0f), 1.0f); + float3 res = refract(float3(1.0f), float3(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.spvasm index de16a55649..5591003742 100644 --- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %refract_cbc1d2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Refract %16 %16 %float_1 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Refract %17 %17 %float_1 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %refract_cbc1d2 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %refract_cbc1d2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %refract_cbc1d2 + %29 = OpLabel + %30 = OpFunctionCall %void %refract_cbc1d2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %refract_cbc1d2 + %32 = OpLabel + %33 = OpFunctionCall %void %refract_cbc1d2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.wgsl index 900bf9825c..7c031e8921 100644 --- a/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/refract/cbc1d2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn refract_cbc1d2() { - var res : vec3 = refract(vec3(), vec3(), 1.0); + var res : vec3 = refract(vec3(1.0f), vec3(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl b/test/tint/builtins/gen/literal/refract/cd905f.wgsl index 4e96eefb05..d6de6a6fef 100644 --- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl +++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl @@ -25,7 +25,7 @@ // fn refract(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32> fn refract_cd905f() { - var res: vec2 = refract(vec2(), vec2(), 1.0); + var res: vec2 = refract(vec2(1.f), vec2(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.dxc.hlsl index c328a3c1a4..ef5d9451dc 100644 --- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void refract_cd905f() { - float2 res = refract((0.0f).xx, (0.0f).xx, 1.0f); + float2 res = refract((1.0f).xx, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.fxc.hlsl index c328a3c1a4..ef5d9451dc 100644 --- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void refract_cd905f() { - float2 res = refract((0.0f).xx, (0.0f).xx, 1.0f); + float2 res = refract((1.0f).xx, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.glsl index 71df03bbf5..d0928e7590 100644 --- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void refract_cd905f() { - vec2 res = refract(vec2(0.0f), vec2(0.0f), 1.0f); + vec2 res = refract(vec2(1.0f), vec2(1.0f), 1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void refract_cd905f() { - vec2 res = refract(vec2(0.0f), vec2(0.0f), 1.0f); + vec2 res = refract(vec2(1.0f), vec2(1.0f), 1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void refract_cd905f() { - vec2 res = refract(vec2(0.0f), vec2(0.0f), 1.0f); + vec2 res = refract(vec2(1.0f), vec2(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.msl index e0fee6d018..1ba00a8ddb 100644 --- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void refract_cd905f() { - float2 res = refract(float2(0.0f), float2(0.0f), 1.0f); + float2 res = refract(float2(1.0f), float2(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.spvasm index 76d7a59fd8..9a6516e697 100644 --- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %20 = OpTypeFunction %v4float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %refract_cd905f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Refract %16 %16 %float_1 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Refract %17 %17 %float_1 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %refract_cd905f +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %refract_cd905f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %refract_cd905f + %29 = OpLabel + %30 = OpFunctionCall %void %refract_cd905f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %refract_cd905f + %32 = OpLabel + %33 = OpFunctionCall %void %refract_cd905f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.wgsl index e91bff9f52..0c7532befb 100644 --- a/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/refract/cd905f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn refract_cd905f() { - var res : vec2 = refract(vec2(), vec2(), 1.0); + var res : vec2 = refract(vec2(1.0f), vec2(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl index f44b0a4629..da7c40551e 100644 --- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<2, i32>) -> vec<2, i32> fn reverseBits_222177() { - var res: vec2 = reverseBits(vec2()); + var res: vec2 = reverseBits(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.dxc.hlsl index 94dc2e7ad8..2ea66b6d08 100644 --- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_222177() { - int2 res = asint(reversebits(asuint((0).xx))); + int2 res = asint(reversebits(asuint((1).xx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.fxc.hlsl index 94dc2e7ad8..2ea66b6d08 100644 --- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_222177() { - int2 res = asint(reversebits(asuint((0).xx))); + int2 res = asint(reversebits(asuint((1).xx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.glsl index 9532d7f20d..599d35ac8e 100644 --- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_222177() { - ivec2 res = bitfieldReverse(ivec2(0)); + ivec2 res = bitfieldReverse(ivec2(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reverseBits_222177() { - ivec2 res = bitfieldReverse(ivec2(0)); + ivec2 res = bitfieldReverse(ivec2(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reverseBits_222177() { - ivec2 res = bitfieldReverse(ivec2(0)); + ivec2 res = bitfieldReverse(ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.msl b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.msl index f3b8e8a87e..a9283f6c7b 100644 --- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_222177() { - int2 res = reverse_bits(int2(0)); + int2 res = reverse_bits(int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.spvasm index 5f046b0a3b..7fe7741e33 100644 --- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %16 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v2int + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_222177 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %16 - %13 = OpBitReverse %v2int %16 + %res = OpVariable %_ptr_Function_v2int Function %20 + %13 = OpBitReverse %v2int %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reverseBits_222177 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reverseBits_222177 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reverseBits_222177 + %30 = OpLabel + %31 = OpFunctionCall %void %reverseBits_222177 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reverseBits_222177 + %33 = OpLabel + %34 = OpFunctionCall %void %reverseBits_222177 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.wgsl index 13c75dd17e..a42f490e04 100644 --- a/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/222177.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_222177() { - var res : vec2 = reverseBits(vec2()); + var res : vec2 = reverseBits(vec2(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl index 4249225d23..6a247b9648 100644 --- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<4, u32>) -> vec<4, u32> fn reverseBits_35fea9() { - var res: vec4 = reverseBits(vec4()); + var res: vec4 = reverseBits(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.dxc.hlsl index d6f1ffc0d7..dab85fe998 100644 --- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_35fea9() { - uint4 res = reversebits((0u).xxxx); + uint4 res = reversebits((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.fxc.hlsl index d6f1ffc0d7..dab85fe998 100644 --- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_35fea9() { - uint4 res = reversebits((0u).xxxx); + uint4 res = reversebits((1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.glsl index 68e4ef43cf..cf80319482 100644 --- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_35fea9() { - uvec4 res = bitfieldReverse(uvec4(0u)); + uvec4 res = bitfieldReverse(uvec4(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reverseBits_35fea9() { - uvec4 res = bitfieldReverse(uvec4(0u)); + uvec4 res = bitfieldReverse(uvec4(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reverseBits_35fea9() { - uvec4 res = bitfieldReverse(uvec4(0u)); + uvec4 res = bitfieldReverse(uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.msl b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.msl index 9efd87c725..af6ec6cef2 100644 --- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_35fea9() { - uint4 res = reverse_bits(uint4(0u)); + uint4 res = reverse_bits(uint4(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.spvasm index 4db3d73fda..64647f436b 100644 --- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %16 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v4uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_35fea9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %16 - %13 = OpBitReverse %v4uint %16 + %res = OpVariable %_ptr_Function_v4uint Function %20 + %13 = OpBitReverse %v4uint %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reverseBits_35fea9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reverseBits_35fea9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reverseBits_35fea9 + %30 = OpLabel + %31 = OpFunctionCall %void %reverseBits_35fea9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reverseBits_35fea9 + %33 = OpLabel + %34 = OpFunctionCall %void %reverseBits_35fea9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.wgsl index 8244ce3508..8b094470ba 100644 --- a/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/35fea9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_35fea9() { - var res : vec4 = reverseBits(vec4()); + var res : vec4 = reverseBits(vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl index f04f8d9669..30a3a6f238 100644 --- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<4, i32>) -> vec<4, i32> fn reverseBits_4dbd6f() { - var res: vec4 = reverseBits(vec4()); + var res: vec4 = reverseBits(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl index 428a58b656..73a433ba7a 100644 --- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_4dbd6f() { - int4 res = asint(reversebits(asuint((0).xxxx))); + int4 res = asint(reversebits(asuint((1).xxxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl index 428a58b656..73a433ba7a 100644 --- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_4dbd6f() { - int4 res = asint(reversebits(asuint((0).xxxx))); + int4 res = asint(reversebits(asuint((1).xxxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.glsl index e26d63680d..0d096c5138 100644 --- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_4dbd6f() { - ivec4 res = bitfieldReverse(ivec4(0)); + ivec4 res = bitfieldReverse(ivec4(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reverseBits_4dbd6f() { - ivec4 res = bitfieldReverse(ivec4(0)); + ivec4 res = bitfieldReverse(ivec4(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reverseBits_4dbd6f() { - ivec4 res = bitfieldReverse(ivec4(0)); + ivec4 res = bitfieldReverse(ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.msl b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.msl index 97741fbf8e..f148edcccf 100644 --- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_4dbd6f() { - int4 res = reverse_bits(int4(0)); + int4 res = reverse_bits(int4(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.spvasm index 316876d3bb..f8dfbb65ef 100644 --- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %16 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v4int + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_4dbd6f = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %16 - %13 = OpBitReverse %v4int %16 + %res = OpVariable %_ptr_Function_v4int Function %20 + %13 = OpBitReverse %v4int %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reverseBits_4dbd6f +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reverseBits_4dbd6f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reverseBits_4dbd6f + %30 = OpLabel + %31 = OpFunctionCall %void %reverseBits_4dbd6f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reverseBits_4dbd6f + %33 = OpLabel + %34 = OpFunctionCall %void %reverseBits_4dbd6f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.wgsl index fee38298f7..c9b184068f 100644 --- a/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/4dbd6f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_4dbd6f() { - var res : vec4 = reverseBits(vec4()); + var res : vec4 = reverseBits(vec4(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl index 61a0605017..9dc556830c 100644 --- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<3, u32>) -> vec<3, u32> fn reverseBits_a6ccd4() { - var res: vec3 = reverseBits(vec3()); + var res: vec3 = reverseBits(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl index 88102ab27c..99e125afff 100644 --- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_a6ccd4() { - uint3 res = reversebits((0u).xxx); + uint3 res = reversebits((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl index 88102ab27c..99e125afff 100644 --- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_a6ccd4() { - uint3 res = reversebits((0u).xxx); + uint3 res = reversebits((1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.glsl index 4b4be8add5..ae14fb671d 100644 --- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_a6ccd4() { - uvec3 res = bitfieldReverse(uvec3(0u)); + uvec3 res = bitfieldReverse(uvec3(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reverseBits_a6ccd4() { - uvec3 res = bitfieldReverse(uvec3(0u)); + uvec3 res = bitfieldReverse(uvec3(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reverseBits_a6ccd4() { - uvec3 res = bitfieldReverse(uvec3(0u)); + uvec3 res = bitfieldReverse(uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.msl index 772087ded7..1c8cfe712e 100644 --- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_a6ccd4() { - uint3 res = reverse_bits(uint3(0u)); + uint3 res = reverse_bits(uint3(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.spvasm index 6b44df5e9f..cb42d67869 100644 --- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %16 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v3uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_a6ccd4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %16 - %13 = OpBitReverse %v3uint %16 + %res = OpVariable %_ptr_Function_v3uint Function %20 + %13 = OpBitReverse %v3uint %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reverseBits_a6ccd4 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reverseBits_a6ccd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reverseBits_a6ccd4 + %30 = OpLabel + %31 = OpFunctionCall %void %reverseBits_a6ccd4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reverseBits_a6ccd4 + %33 = OpLabel + %34 = OpFunctionCall %void %reverseBits_a6ccd4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.wgsl index 8ac960aa93..c5425dedb7 100644 --- a/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/a6ccd4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_a6ccd4() { - var res : vec3 = reverseBits(vec3()); + var res : vec3 = reverseBits(vec3(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl index 79a1015478..fae3c76254 100644 --- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<3, i32>) -> vec<3, i32> fn reverseBits_c21bc1() { - var res: vec3 = reverseBits(vec3()); + var res: vec3 = reverseBits(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.dxc.hlsl index 1726c59bce..5c31987567 100644 --- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_c21bc1() { - int3 res = asint(reversebits(asuint((0).xxx))); + int3 res = asint(reversebits(asuint((1).xxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.fxc.hlsl index 1726c59bce..5c31987567 100644 --- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_c21bc1() { - int3 res = asint(reversebits(asuint((0).xxx))); + int3 res = asint(reversebits(asuint((1).xxx))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.glsl index 149bbe11bb..f71833dd88 100644 --- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_c21bc1() { - ivec3 res = bitfieldReverse(ivec3(0)); + ivec3 res = bitfieldReverse(ivec3(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reverseBits_c21bc1() { - ivec3 res = bitfieldReverse(ivec3(0)); + ivec3 res = bitfieldReverse(ivec3(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reverseBits_c21bc1() { - ivec3 res = bitfieldReverse(ivec3(0)); + ivec3 res = bitfieldReverse(ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.msl b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.msl index 783f8e25ca..fb2b4aacc7 100644 --- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_c21bc1() { - int3 res = reverse_bits(int3(0)); + int3 res = reverse_bits(int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.spvasm index 9fcc4deeba..74cbb29bb7 100644 --- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %16 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %17 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v3int + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_c21bc1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %16 - %13 = OpBitReverse %v3int %16 + %res = OpVariable %_ptr_Function_v3int Function %20 + %13 = OpBitReverse %v3int %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reverseBits_c21bc1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reverseBits_c21bc1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reverseBits_c21bc1 + %30 = OpLabel + %31 = OpFunctionCall %void %reverseBits_c21bc1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reverseBits_c21bc1 + %33 = OpLabel + %34 = OpFunctionCall %void %reverseBits_c21bc1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.wgsl index 6c20e727c8..1446d033dc 100644 --- a/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/c21bc1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_c21bc1() { - var res : vec3 = reverseBits(vec3()); + var res : vec3 = reverseBits(vec3(1)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl index c51a94e98f..300324ade2 100644 --- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<2, u32>) -> vec<2, u32> fn reverseBits_e1f4c1() { - var res: vec2 = reverseBits(vec2()); + var res: vec2 = reverseBits(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl index 935837ec57..d159b1dc84 100644 --- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_e1f4c1() { - uint2 res = reversebits((0u).xx); + uint2 res = reversebits((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl index 935837ec57..d159b1dc84 100644 --- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_e1f4c1() { - uint2 res = reversebits((0u).xx); + uint2 res = reversebits((1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.glsl index 3889e10842..123f32c429 100644 --- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_e1f4c1() { - uvec2 res = bitfieldReverse(uvec2(0u)); + uvec2 res = bitfieldReverse(uvec2(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void reverseBits_e1f4c1() { - uvec2 res = bitfieldReverse(uvec2(0u)); + uvec2 res = bitfieldReverse(uvec2(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void reverseBits_e1f4c1() { - uvec2 res = bitfieldReverse(uvec2(0u)); + uvec2 res = bitfieldReverse(uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.msl b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.msl index b4f660bd7a..0394724b98 100644 --- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_e1f4c1() { - uint2 res = reverse_bits(uint2(0u)); + uint2 res = reverse_bits(uint2(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.spvasm index 261fa99b81..9643cf026a 100644 --- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %16 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %17 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v2uint + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_e1f4c1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %16 - %13 = OpBitReverse %v2uint %16 + %res = OpVariable %_ptr_Function_v2uint Function %20 + %13 = OpBitReverse %v2uint %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %reverseBits_e1f4c1 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %reverseBits_e1f4c1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %reverseBits_e1f4c1 + %30 = OpLabel + %31 = OpFunctionCall %void %reverseBits_e1f4c1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %reverseBits_e1f4c1 + %33 = OpLabel + %34 = OpFunctionCall %void %reverseBits_e1f4c1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.wgsl index d7ffaa9d41..d932106103 100644 --- a/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/reverseBits/e1f4c1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_e1f4c1() { - var res : vec2 = reverseBits(vec2()); + var res : vec2 = reverseBits(vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl b/test/tint/builtins/gen/literal/round/106c0b.wgsl index 8523bd10fb..12796707d3 100644 --- a/test/tint/builtins/gen/literal/round/106c0b.wgsl +++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl @@ -25,7 +25,7 @@ // fn round(vec<4, f32>) -> vec<4, f32> fn round_106c0b() { - var res: vec4 = round(vec4()); + var res: vec4 = round(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.dxc.hlsl index 68bf13e9e1..cbcc5cfb3b 100644 --- a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_106c0b() { - float4 res = round((0.0f).xxxx); + float4 res = round((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.fxc.hlsl index 68bf13e9e1..cbcc5cfb3b 100644 --- a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void round_106c0b() { - float4 res = round((0.0f).xxxx); + float4 res = round((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.glsl index 0698c3e80d..476bb4ca3f 100644 --- a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void round_106c0b() { - vec4 res = round(vec4(0.0f)); + vec4 res = round(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void round_106c0b() { - vec4 res = round(vec4(0.0f)); + vec4 res = round(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void round_106c0b() { - vec4 res = round(vec4(0.0f)); + vec4 res = round(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.msl index def3309518..89a1522d5b 100644 --- a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_106c0b() { - float4 res = rint(float4(0.0f)); + float4 res = rint(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.spvasm index b0204e70c5..8c44d7c21c 100644 --- a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %round_106c0b = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 RoundEven %5 + %13 = OpExtInst %v4float %14 RoundEven %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %round_106c0b +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %round_106c0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %round_106c0b + %27 = OpLabel + %28 = OpFunctionCall %void %round_106c0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %round_106c0b + %30 = OpLabel + %31 = OpFunctionCall %void %round_106c0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.wgsl index c846a03b75..4bf6403d00 100644 --- a/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/106c0b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_106c0b() { - var res : vec4 = round(vec4()); + var res : vec4 = round(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl b/test/tint/builtins/gen/literal/round/1c7897.wgsl index 4403ce74ff..034e6b0232 100644 --- a/test/tint/builtins/gen/literal/round/1c7897.wgsl +++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl @@ -25,7 +25,7 @@ // fn round(vec<3, f32>) -> vec<3, f32> fn round_1c7897() { - var res: vec3 = round(vec3()); + var res: vec3 = round(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.dxc.hlsl index b6e0e6b693..654f791410 100644 --- a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_1c7897() { - float3 res = round((0.0f).xxx); + float3 res = round((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.fxc.hlsl index b6e0e6b693..654f791410 100644 --- a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void round_1c7897() { - float3 res = round((0.0f).xxx); + float3 res = round((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.glsl index 24140c5a3b..4ab3d34706 100644 --- a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void round_1c7897() { - vec3 res = round(vec3(0.0f)); + vec3 res = round(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void round_1c7897() { - vec3 res = round(vec3(0.0f)); + vec3 res = round(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void round_1c7897() { - vec3 res = round(vec3(0.0f)); + vec3 res = round(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.msl index c808255268..af57b2fc52 100644 --- a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_1c7897() { - float3 res = rint(float3(0.0f)); + float3 res = rint(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.spvasm index 925cea42e2..b9cd1e0f7c 100644 --- a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %round_1c7897 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 RoundEven %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 RoundEven %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %round_1c7897 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %round_1c7897 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %round_1c7897 + %29 = OpLabel + %30 = OpFunctionCall %void %round_1c7897 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %round_1c7897 + %32 = OpLabel + %33 = OpFunctionCall %void %round_1c7897 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.wgsl index e55a2eec36..4767a89182 100644 --- a/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/1c7897.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_1c7897() { - var res : vec3 = round(vec3()); + var res : vec3 = round(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl b/test/tint/builtins/gen/literal/round/52c84d.wgsl index 9a454ad39a..580d9bde05 100644 --- a/test/tint/builtins/gen/literal/round/52c84d.wgsl +++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl @@ -25,7 +25,7 @@ // fn round(vec<2, f32>) -> vec<2, f32> fn round_52c84d() { - var res: vec2 = round(vec2()); + var res: vec2 = round(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.dxc.hlsl index fc298d4511..f8c0830232 100644 --- a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_52c84d() { - float2 res = round((0.0f).xx); + float2 res = round((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.fxc.hlsl index fc298d4511..f8c0830232 100644 --- a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void round_52c84d() { - float2 res = round((0.0f).xx); + float2 res = round((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.glsl index aff8f6f8aa..494a03b93e 100644 --- a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void round_52c84d() { - vec2 res = round(vec2(0.0f)); + vec2 res = round(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void round_52c84d() { - vec2 res = round(vec2(0.0f)); + vec2 res = round(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void round_52c84d() { - vec2 res = round(vec2(0.0f)); + vec2 res = round(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.msl index c1145e2498..803ee34063 100644 --- a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_52c84d() { - float2 res = rint(float2(0.0f)); + float2 res = rint(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.spvasm index 78f53964f1..861f456910 100644 --- a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %round_52c84d = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 RoundEven %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 RoundEven %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %round_52c84d +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %round_52c84d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %round_52c84d + %29 = OpLabel + %30 = OpFunctionCall %void %round_52c84d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %round_52c84d + %32 = OpLabel + %33 = OpFunctionCall %void %round_52c84d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.wgsl index 040946b5a7..ce712819d8 100644 --- a/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/52c84d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_52c84d() { - var res : vec2 = round(vec2()); + var res : vec2 = round(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/round/9edc38.wgsl b/test/tint/builtins/gen/literal/round/9edc38.wgsl index b4f482ad79..df0b80a192 100644 --- a/test/tint/builtins/gen/literal/round/9edc38.wgsl +++ b/test/tint/builtins/gen/literal/round/9edc38.wgsl @@ -25,7 +25,7 @@ // fn round(f32) -> f32 fn round_9edc38() { - var res: f32 = round(1.0); + var res: f32 = round(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.wgsl index dbe7d730a7..a4672411da 100644 --- a/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/round/9edc38.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_9edc38() { - var res : f32 = round(1.0); + var res : f32 = round(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl b/test/tint/builtins/gen/literal/select/00b848.wgsl index 7808557e1b..de87bc5ff0 100644 --- a/test/tint/builtins/gen/literal/select/00b848.wgsl +++ b/test/tint/builtins/gen/literal/select/00b848.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, i32>, vec<2, i32>, vec<2, bool>) -> vec<2, i32> fn select_00b848() { - var res: vec2 = select(vec2(), vec2(), vec2()); + var res: vec2 = select(vec2(1), vec2(1), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.dxc.hlsl index 5be17c52ec..85382631a0 100644 --- a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_00b848() { - int2 res = ((false).xx ? (0).xx : (0).xx); + int2 res = ((true).xx ? (1).xx : (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.fxc.hlsl index 5be17c52ec..85382631a0 100644 --- a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_00b848() { - int2 res = ((false).xx ? (0).xx : (0).xx); + int2 res = ((true).xx ? (1).xx : (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.glsl index 2e46647c24..3e03e16745 100644 --- a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_00b848() { - ivec2 res = mix(ivec2(0), ivec2(0), bvec2(false)); + ivec2 res = mix(ivec2(1), ivec2(1), bvec2(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_00b848() { - ivec2 res = mix(ivec2(0), ivec2(0), bvec2(false)); + ivec2 res = mix(ivec2(1), ivec2(1), bvec2(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_00b848() { - ivec2 res = mix(ivec2(0), ivec2(0), bvec2(false)); + ivec2 res = mix(ivec2(1), ivec2(1), bvec2(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.msl index 3391fae0e2..a3915c9a08 100644 --- a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_00b848() { - int2 res = select(int2(0), int2(0), bool2(false)); + int2 res = select(int2(1), int2(1), bool2(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.spvasm index b4ab55c534..b2604cc4fa 100644 --- a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,40 @@ %v2int = OpTypeVector %int 2 %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %18 = OpConstantNull %v2bool - %19 = OpConstantNull %v2int + %true = OpConstantTrue %bool + %19 = OpConstantComposite %v2bool %true %true + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %22 = OpTypeFunction %v4float + %24 = OpConstantNull %v2int + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_00b848 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2int Function %19 - %13 = OpSelect %v2int %18 %19 %19 + %res = OpVariable %_ptr_Function_v2int Function %24 + %13 = OpSelect %v2int %19 %21 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_00b848 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_00b848 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_00b848 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %select_00b848 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %select_00b848 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.wgsl index 91bc2abeb2..4dc5e7f86c 100644 --- a/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/00b848.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_00b848() { - var res : vec2 = select(vec2(), vec2(), vec2()); + var res : vec2 = select(vec2(1), vec2(1), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl b/test/tint/builtins/gen/literal/select/01e2cd.wgsl index dca4e962f8..ba6c65f19a 100644 --- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl +++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, i32>, vec<3, i32>, vec<3, bool>) -> vec<3, i32> fn select_01e2cd() { - var res: vec3 = select(vec3(), vec3(), vec3()); + var res: vec3 = select(vec3(1), vec3(1), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.dxc.hlsl index dcc2733ec0..274eac64c9 100644 --- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_01e2cd() { - int3 res = ((false).xxx ? (0).xxx : (0).xxx); + int3 res = ((true).xxx ? (1).xxx : (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.fxc.hlsl index dcc2733ec0..274eac64c9 100644 --- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_01e2cd() { - int3 res = ((false).xxx ? (0).xxx : (0).xxx); + int3 res = ((true).xxx ? (1).xxx : (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.glsl index 7e3c6537e0..71c57911b8 100644 --- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_01e2cd() { - ivec3 res = mix(ivec3(0), ivec3(0), bvec3(false)); + ivec3 res = mix(ivec3(1), ivec3(1), bvec3(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_01e2cd() { - ivec3 res = mix(ivec3(0), ivec3(0), bvec3(false)); + ivec3 res = mix(ivec3(1), ivec3(1), bvec3(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_01e2cd() { - ivec3 res = mix(ivec3(0), ivec3(0), bvec3(false)); + ivec3 res = mix(ivec3(1), ivec3(1), bvec3(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.msl index 49db474258..7ad0b714a2 100644 --- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_01e2cd() { - int3 res = select(int3(0), int3(0), bool3(false)); + int3 res = select(int3(1), int3(1), bool3(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.spvasm index f2bc1f9efc..465b4c837d 100644 --- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,40 @@ %v3int = OpTypeVector %int 3 %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %18 = OpConstantNull %v3bool - %19 = OpConstantNull %v3int + %true = OpConstantTrue %bool + %19 = OpConstantComposite %v3bool %true %true %true + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %22 = OpTypeFunction %v4float + %24 = OpConstantNull %v3int + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_01e2cd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3int Function %19 - %13 = OpSelect %v3int %18 %19 %19 + %res = OpVariable %_ptr_Function_v3int Function %24 + %13 = OpSelect %v3int %19 %21 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_01e2cd +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_01e2cd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_01e2cd - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %select_01e2cd OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %select_01e2cd + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.wgsl index 0abdc607ca..07187575d3 100644 --- a/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/01e2cd.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_01e2cd() { - var res : vec3 = select(vec3(), vec3(), vec3()); + var res : vec3 = select(vec3(1), vec3(1), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl b/test/tint/builtins/gen/literal/select/087ea4.wgsl index 74ea93dd5f..43c20f9ddc 100644 --- a/test/tint/builtins/gen/literal/select/087ea4.wgsl +++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, u32>, vec<4, u32>, bool) -> vec<4, u32> fn select_087ea4() { - var res: vec4 = select(vec4(), vec4(), bool()); + var res: vec4 = select(vec4(1u), vec4(1u), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.dxc.hlsl index cb71b76a35..4d82275174 100644 --- a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_087ea4() { - uint4 res = (false ? (0u).xxxx : (0u).xxxx); + uint4 res = (true ? (1u).xxxx : (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.fxc.hlsl index cb71b76a35..4d82275174 100644 --- a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_087ea4() { - uint4 res = (false ? (0u).xxxx : (0u).xxxx); + uint4 res = (true ? (1u).xxxx : (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.glsl index 231e3c2f5b..ef874e6525 100644 --- a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_087ea4() { - uvec4 res = (false ? uvec4(0u) : uvec4(0u)); + uvec4 res = (true ? uvec4(1u) : uvec4(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_087ea4() { - uvec4 res = (false ? uvec4(0u) : uvec4(0u)); + uvec4 res = (true ? uvec4(1u) : uvec4(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_087ea4() { - uvec4 res = (false ? uvec4(0u) : uvec4(0u)); + uvec4 res = (true ? uvec4(1u) : uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.msl index 49588896d0..4b90e29b47 100644 --- a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_087ea4() { - uint4 res = select(uint4(0u), uint4(0u), false); + uint4 res = select(uint4(1u), uint4(1u), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.spvasm index c1ea2cd51d..4494fd2ac5 100644 --- a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 %bool = OpTypeBool - %17 = OpConstantNull %bool - %18 = OpConstantNull %v4uint + %true = OpConstantTrue %bool + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %22 = OpConstantNull %v4bool + %23 = OpConstantNull %v4bool %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_087ea4 = OpFunction %void None %9 %12 = OpLabel - %20 = OpVariable %_ptr_Function_v4bool Function %22 - %res = OpVariable %_ptr_Function_v4uint Function %18 - %23 = OpCompositeConstruct %v4bool %17 %17 %17 %17 - %13 = OpSelect %v4uint %23 %18 %18 + %21 = OpVariable %_ptr_Function_v4bool Function %23 + %res = OpVariable %_ptr_Function_v4uint Function %27 + %24 = OpCompositeConstruct %v4bool %true %true %true %true + %13 = OpSelect %v4uint %24 %19 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_087ea4 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %select_087ea4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_087ea4 + %37 = OpLabel + %38 = OpFunctionCall %void %select_087ea4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_087ea4 + %40 = OpLabel + %41 = OpFunctionCall %void %select_087ea4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.wgsl index 2d02c09b76..2c28feb2de 100644 --- a/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/087ea4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_087ea4() { - var res : vec4 = select(vec4(), vec4(), bool()); + var res : vec4 = select(vec4(1u), vec4(1u), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl b/test/tint/builtins/gen/literal/select/1e960b.wgsl index d98f9b73a7..eb0cc136f1 100644 --- a/test/tint/builtins/gen/literal/select/1e960b.wgsl +++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, u32>, vec<2, u32>, vec<2, bool>) -> vec<2, u32> fn select_1e960b() { - var res: vec2 = select(vec2(), vec2(), vec2()); + var res: vec2 = select(vec2(1u), vec2(1u), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.dxc.hlsl index c2664b50f4..19b70cc884 100644 --- a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_1e960b() { - uint2 res = ((false).xx ? (0u).xx : (0u).xx); + uint2 res = ((true).xx ? (1u).xx : (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.fxc.hlsl index c2664b50f4..19b70cc884 100644 --- a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_1e960b() { - uint2 res = ((false).xx ? (0u).xx : (0u).xx); + uint2 res = ((true).xx ? (1u).xx : (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.glsl index 417ae053fc..54ed91da7a 100644 --- a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_1e960b() { - uvec2 res = mix(uvec2(0u), uvec2(0u), bvec2(false)); + uvec2 res = mix(uvec2(1u), uvec2(1u), bvec2(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_1e960b() { - uvec2 res = mix(uvec2(0u), uvec2(0u), bvec2(false)); + uvec2 res = mix(uvec2(1u), uvec2(1u), bvec2(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_1e960b() { - uvec2 res = mix(uvec2(0u), uvec2(0u), bvec2(false)); + uvec2 res = mix(uvec2(1u), uvec2(1u), bvec2(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.msl index b59ac22331..b540a011aa 100644 --- a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_1e960b() { - uint2 res = select(uint2(0u), uint2(0u), bool2(false)); + uint2 res = select(uint2(1u), uint2(1u), bool2(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.spvasm index 62b963c28f..a564f3192e 100644 --- a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,40 @@ %v2uint = OpTypeVector %uint 2 %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %18 = OpConstantNull %v2bool - %19 = OpConstantNull %v2uint + %true = OpConstantTrue %bool + %19 = OpConstantComposite %v2bool %true %true + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %22 = OpTypeFunction %v4float + %24 = OpConstantNull %v2uint + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_1e960b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2uint Function %19 - %13 = OpSelect %v2uint %18 %19 %19 + %res = OpVariable %_ptr_Function_v2uint Function %24 + %13 = OpSelect %v2uint %19 %21 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_1e960b +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_1e960b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_1e960b - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %select_1e960b OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %select_1e960b + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.wgsl index fbc5ff3d86..c978f2d57a 100644 --- a/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/1e960b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_1e960b() { - var res : vec2 = select(vec2(), vec2(), vec2()); + var res : vec2 = select(vec2(1u), vec2(1u), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl b/test/tint/builtins/gen/literal/select/266aff.wgsl index 1c4c258264..aa00059290 100644 --- a/test/tint/builtins/gen/literal/select/266aff.wgsl +++ b/test/tint/builtins/gen/literal/select/266aff.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, f32>, vec<2, f32>, vec<2, bool>) -> vec<2, f32> fn select_266aff() { - var res: vec2 = select(vec2(), vec2(), vec2()); + var res: vec2 = select(vec2(1.f), vec2(1.f), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.dxc.hlsl index 80d1742090..2dc967e483 100644 --- a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_266aff() { - float2 res = ((false).xx ? (0.0f).xx : (0.0f).xx); + float2 res = ((true).xx ? (1.0f).xx : (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.fxc.hlsl index 80d1742090..2dc967e483 100644 --- a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_266aff() { - float2 res = ((false).xx ? (0.0f).xx : (0.0f).xx); + float2 res = ((true).xx ? (1.0f).xx : (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.glsl index 6cfbb750ea..8eb8ecfb4c 100644 --- a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_266aff() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), bvec2(false)); + vec2 res = mix(vec2(1.0f), vec2(1.0f), bvec2(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_266aff() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), bvec2(false)); + vec2 res = mix(vec2(1.0f), vec2(1.0f), bvec2(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_266aff() { - vec2 res = mix(vec2(0.0f), vec2(0.0f), bvec2(false)); + vec2 res = mix(vec2(1.0f), vec2(1.0f), bvec2(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.msl index 138dfe6ef4..fb2037e2d2 100644 --- a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_266aff() { - float2 res = select(float2(0.0f), float2(0.0f), bool2(false)); + float2 res = select(float2(1.0f), float2(1.0f), bool2(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.spvasm index 4dad59d2a5..131a743713 100644 --- a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,37 +33,39 @@ %v2float = OpTypeVector %float 2 %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %17 = OpConstantNull %v2bool - %18 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float + %true = OpConstantTrue %bool + %18 = OpConstantComposite %v2bool %true %true %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %23 = OpConstantNull %v2float + %24 = OpTypeFunction %v4float %select_266aff = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %18 - %13 = OpSelect %v2float %17 %18 %18 + %res = OpVariable %_ptr_Function_v2float Function %23 + %13 = OpSelect %v2float %18 %20 %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %select_266aff +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %select_266aff OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_266aff + %32 = OpLabel + %33 = OpFunctionCall %void %select_266aff OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %select_266aff + %35 = OpLabel + %36 = OpFunctionCall %void %select_266aff OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.wgsl index 1390d5dd51..5633491763 100644 --- a/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/266aff.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_266aff() { - var res : vec2 = select(vec2(), vec2(), vec2()); + var res : vec2 = select(vec2(1.0f), vec2(1.0f), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl b/test/tint/builtins/gen/literal/select/28a27e.wgsl index 611a0b2867..2fcc6b43db 100644 --- a/test/tint/builtins/gen/literal/select/28a27e.wgsl +++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, u32>, vec<3, u32>, vec<3, bool>) -> vec<3, u32> fn select_28a27e() { - var res: vec3 = select(vec3(), vec3(), vec3()); + var res: vec3 = select(vec3(1u), vec3(1u), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.dxc.hlsl index b4e741cce3..839a95c951 100644 --- a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_28a27e() { - uint3 res = ((false).xxx ? (0u).xxx : (0u).xxx); + uint3 res = ((true).xxx ? (1u).xxx : (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.fxc.hlsl index b4e741cce3..839a95c951 100644 --- a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_28a27e() { - uint3 res = ((false).xxx ? (0u).xxx : (0u).xxx); + uint3 res = ((true).xxx ? (1u).xxx : (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.glsl index 7cffa7e150..6085586885 100644 --- a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_28a27e() { - uvec3 res = mix(uvec3(0u), uvec3(0u), bvec3(false)); + uvec3 res = mix(uvec3(1u), uvec3(1u), bvec3(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_28a27e() { - uvec3 res = mix(uvec3(0u), uvec3(0u), bvec3(false)); + uvec3 res = mix(uvec3(1u), uvec3(1u), bvec3(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_28a27e() { - uvec3 res = mix(uvec3(0u), uvec3(0u), bvec3(false)); + uvec3 res = mix(uvec3(1u), uvec3(1u), bvec3(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.msl index ce36281ad4..af33466ffd 100644 --- a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_28a27e() { - uint3 res = select(uint3(0u), uint3(0u), bool3(false)); + uint3 res = select(uint3(1u), uint3(1u), bool3(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.spvasm index 31dbbacbf4..33269e9871 100644 --- a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,40 @@ %v3uint = OpTypeVector %uint 3 %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %18 = OpConstantNull %v3bool - %19 = OpConstantNull %v3uint + %true = OpConstantTrue %bool + %19 = OpConstantComposite %v3bool %true %true %true + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %22 = OpTypeFunction %v4float + %24 = OpConstantNull %v3uint + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_28a27e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3uint Function %19 - %13 = OpSelect %v3uint %18 %19 %19 + %res = OpVariable %_ptr_Function_v3uint Function %24 + %13 = OpSelect %v3uint %19 %21 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_28a27e +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_28a27e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_28a27e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %select_28a27e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %select_28a27e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.wgsl index 47aa39f92f..1d859241cc 100644 --- a/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/28a27e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_28a27e() { - var res : vec3 = select(vec3(), vec3(), vec3()); + var res : vec3 = select(vec3(1u), vec3(1u), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl b/test/tint/builtins/gen/literal/select/3c25ce.wgsl index 12a37437ef..5def10032c 100644 --- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl +++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, bool>, vec<3, bool>, bool) -> vec<3, bool> fn select_3c25ce() { - var res: vec3 = select(vec3(), vec3(), bool()); + var res: vec3 = select(vec3(true), vec3(true), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.dxc.hlsl index e705f9a240..fdfa6e6df9 100644 --- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_3c25ce() { - bool3 res = (false ? (false).xxx : (false).xxx); + bool3 res = (true ? (true).xxx : (true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.fxc.hlsl index e705f9a240..fdfa6e6df9 100644 --- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_3c25ce() { - bool3 res = (false ? (false).xxx : (false).xxx); + bool3 res = (true ? (true).xxx : (true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.glsl index 45766d7379..bac0f4e03e 100644 --- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_3c25ce() { - bvec3 res = (false ? bvec3(false) : bvec3(false)); + bvec3 res = (true ? bvec3(true) : bvec3(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_3c25ce() { - bvec3 res = (false ? bvec3(false) : bvec3(false)); + bvec3 res = (true ? bvec3(true) : bvec3(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_3c25ce() { - bvec3 res = (false ? bvec3(false) : bvec3(false)); + bvec3 res = (true ? bvec3(true) : bvec3(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.msl index c5ce477b26..2db2e7d2ba 100644 --- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_3c25ce() { - bool3 res = select(bool3(false), bool3(false), false); + bool3 res = select(bool3(true), bool3(true), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.spvasm index f4b03d4ddd..ad81aedeb1 100644 --- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,39 +32,40 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %16 = OpConstantNull %bool - %17 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %22 = OpTypeFunction %v4float + %20 = OpConstantNull %v3bool + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_3c25ce = OpFunction %void None %9 %12 = OpLabel - %18 = OpVariable %_ptr_Function_v3bool Function %17 - %res = OpVariable %_ptr_Function_v3bool Function %17 - %20 = OpCompositeConstruct %v3bool %16 %16 %16 - %13 = OpSelect %v3bool %20 %17 %17 + %18 = OpVariable %_ptr_Function_v3bool Function %20 + %res = OpVariable %_ptr_Function_v3bool Function %20 + %21 = OpCompositeConstruct %v3bool %true %true %true + %13 = OpSelect %v3bool %21 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_3c25ce +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %select_3c25ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_3c25ce + %32 = OpLabel + %33 = OpFunctionCall %void %select_3c25ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_3c25ce + %35 = OpLabel + %36 = OpFunctionCall %void %select_3c25ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.wgsl index c73fe5558f..7363bb617d 100644 --- a/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/3c25ce.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_3c25ce() { - var res : vec3 = select(vec3(), vec3(), bool()); + var res : vec3 = select(vec3(true), vec3(true), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl b/test/tint/builtins/gen/literal/select/416e14.wgsl index d98f5044fa..40a74d8952 100644 --- a/test/tint/builtins/gen/literal/select/416e14.wgsl +++ b/test/tint/builtins/gen/literal/select/416e14.wgsl @@ -25,7 +25,7 @@ // fn select(f32, f32, bool) -> f32 fn select_416e14() { - var res: f32 = select(1.0, 1.0, bool()); + var res: f32 = select(1.f, 1.f, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.dxc.hlsl index 5fcd4de0c0..3ed856de2c 100644 --- a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_416e14() { - float res = (false ? 1.0f : 1.0f); + float res = (true ? 1.0f : 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.fxc.hlsl index 5fcd4de0c0..3ed856de2c 100644 --- a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_416e14() { - float res = (false ? 1.0f : 1.0f); + float res = (true ? 1.0f : 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.glsl index 91841844b6..fd8341b0a3 100644 --- a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_416e14() { - float res = (false ? 1.0f : 1.0f); + float res = (true ? 1.0f : 1.0f); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_416e14() { - float res = (false ? 1.0f : 1.0f); + float res = (true ? 1.0f : 1.0f); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_416e14() { - float res = (false ? 1.0f : 1.0f); + float res = (true ? 1.0f : 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.msl index 57f9b67bda..78cbe35012 100644 --- a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_416e14() { - float res = select(1.0f, 1.0f, false); + float res = select(1.0f, 1.0f, true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.spvasm index 0ab293153d..1a8250f095 100644 --- a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.spvasm @@ -31,14 +31,14 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %15 = OpConstantNull %bool + %true = OpConstantTrue %bool %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float %19 = OpTypeFunction %v4float %select_416e14 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 - %13 = OpSelect %float %15 %float_1 %float_1 + %13 = OpSelect %float %true %float_1 %float_1 OpStore %res %13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.wgsl index 06fe6cfc64..ad0a0917a7 100644 --- a/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/416e14.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_416e14() { - var res : f32 = select(1.0, 1.0, bool()); + var res : f32 = select(1.0f, 1.0f, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl b/test/tint/builtins/gen/literal/select/51b047.wgsl index eddc40e154..e7bb1a1d08 100644 --- a/test/tint/builtins/gen/literal/select/51b047.wgsl +++ b/test/tint/builtins/gen/literal/select/51b047.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, u32>, vec<2, u32>, bool) -> vec<2, u32> fn select_51b047() { - var res: vec2 = select(vec2(), vec2(), bool()); + var res: vec2 = select(vec2(1u), vec2(1u), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.dxc.hlsl index 33bd9426be..04067a8a6f 100644 --- a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_51b047() { - uint2 res = (false ? (0u).xx : (0u).xx); + uint2 res = (true ? (1u).xx : (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.fxc.hlsl index 33bd9426be..04067a8a6f 100644 --- a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_51b047() { - uint2 res = (false ? (0u).xx : (0u).xx); + uint2 res = (true ? (1u).xx : (1u).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.glsl index 5f317a9dd1..cc8df231c9 100644 --- a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_51b047() { - uvec2 res = (false ? uvec2(0u) : uvec2(0u)); + uvec2 res = (true ? uvec2(1u) : uvec2(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_51b047() { - uvec2 res = (false ? uvec2(0u) : uvec2(0u)); + uvec2 res = (true ? uvec2(1u) : uvec2(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_51b047() { - uvec2 res = (false ? uvec2(0u) : uvec2(0u)); + uvec2 res = (true ? uvec2(1u) : uvec2(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.msl index bcfb862895..ecc3ac7d3a 100644 --- a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_51b047() { - uint2 res = select(uint2(0u), uint2(0u), false); + uint2 res = select(uint2(1u), uint2(1u), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.spvasm index 617dea6b53..8ee6bdc6aa 100644 --- a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 %bool = OpTypeBool - %17 = OpConstantNull %bool - %18 = OpConstantNull %v2uint + %true = OpConstantTrue %bool + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %22 = OpConstantNull %v2bool + %23 = OpConstantNull %v2bool %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %v2uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_51b047 = OpFunction %void None %9 %12 = OpLabel - %20 = OpVariable %_ptr_Function_v2bool Function %22 - %res = OpVariable %_ptr_Function_v2uint Function %18 - %23 = OpCompositeConstruct %v2bool %17 %17 - %13 = OpSelect %v2uint %23 %18 %18 + %21 = OpVariable %_ptr_Function_v2bool Function %23 + %res = OpVariable %_ptr_Function_v2uint Function %27 + %24 = OpCompositeConstruct %v2bool %true %true + %13 = OpSelect %v2uint %24 %19 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_51b047 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %select_51b047 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_51b047 + %37 = OpLabel + %38 = OpFunctionCall %void %select_51b047 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_51b047 + %40 = OpLabel + %41 = OpFunctionCall %void %select_51b047 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.wgsl index aa9e7d2a64..03cd3886c3 100644 --- a/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/51b047.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_51b047() { - var res : vec2 = select(vec2(), vec2(), bool()); + var res : vec2 = select(vec2(1u), vec2(1u), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl b/test/tint/builtins/gen/literal/select/713567.wgsl index 1915518d1e..9f054a377e 100644 --- a/test/tint/builtins/gen/literal/select/713567.wgsl +++ b/test/tint/builtins/gen/literal/select/713567.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, f32>, vec<4, f32>, bool) -> vec<4, f32> fn select_713567() { - var res: vec4 = select(vec4(), vec4(), bool()); + var res: vec4 = select(vec4(1.f), vec4(1.f), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.dxc.hlsl index aba8dfd993..c2c69a8563 100644 --- a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_713567() { - float4 res = (false ? (0.0f).xxxx : (0.0f).xxxx); + float4 res = (true ? (1.0f).xxxx : (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.fxc.hlsl index aba8dfd993..c2c69a8563 100644 --- a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_713567() { - float4 res = (false ? (0.0f).xxxx : (0.0f).xxxx); + float4 res = (true ? (1.0f).xxxx : (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.glsl index 0142ca5bd3..9246c39463 100644 --- a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_713567() { - vec4 res = (false ? vec4(0.0f) : vec4(0.0f)); + vec4 res = (true ? vec4(1.0f) : vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_713567() { - vec4 res = (false ? vec4(0.0f) : vec4(0.0f)); + vec4 res = (true ? vec4(1.0f) : vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_713567() { - vec4 res = (false ? vec4(0.0f) : vec4(0.0f)); + vec4 res = (true ? vec4(1.0f) : vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.msl index 38edfd08ac..ea28af2c24 100644 --- a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_713567() { - float4 res = select(float4(0.0f), float4(0.0f), false); + float4 res = select(float4(1.0f), float4(1.0f), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.spvasm index e4c5aca3c0..6c41ce14ef 100644 --- a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,41 +31,42 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %15 = OpConstantNull %bool + %true = OpConstantTrue %bool + %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %19 = OpConstantNull %v4bool + %21 = OpConstantNull %v4bool %_ptr_Function_v4float = OpTypePointer Function %v4float - %23 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpTypeFunction %v4float %select_713567 = OpFunction %void None %9 %12 = OpLabel - %17 = OpVariable %_ptr_Function_v4bool Function %19 + %19 = OpVariable %_ptr_Function_v4bool Function %21 %res = OpVariable %_ptr_Function_v4float Function %5 - %20 = OpCompositeConstruct %v4bool %15 %15 %15 %15 - %13 = OpSelect %v4float %20 %5 %5 + %22 = OpCompositeConstruct %v4bool %true %true %true %true + %13 = OpSelect %v4float %22 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %select_713567 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_713567 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %select_713567 + %33 = OpLabel + %34 = OpFunctionCall %void %select_713567 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_713567 + %36 = OpLabel + %37 = OpFunctionCall %void %select_713567 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.wgsl index 74ce8af537..d5f975b41c 100644 --- a/test/tint/builtins/gen/literal/select/713567.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/713567.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_713567() { - var res : vec4 = select(vec4(), vec4(), bool()); + var res : vec4 = select(vec4(1.0f), vec4(1.0f), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl b/test/tint/builtins/gen/literal/select/78be5f.wgsl index 3385a460c2..3452847255 100644 --- a/test/tint/builtins/gen/literal/select/78be5f.wgsl +++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, f32>, vec<3, f32>, bool) -> vec<3, f32> fn select_78be5f() { - var res: vec3 = select(vec3(), vec3(), bool()); + var res: vec3 = select(vec3(1.f), vec3(1.f), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.dxc.hlsl index 91d17bd613..a49ff2fb42 100644 --- a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_78be5f() { - float3 res = (false ? (0.0f).xxx : (0.0f).xxx); + float3 res = (true ? (1.0f).xxx : (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.fxc.hlsl index 91d17bd613..a49ff2fb42 100644 --- a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_78be5f() { - float3 res = (false ? (0.0f).xxx : (0.0f).xxx); + float3 res = (true ? (1.0f).xxx : (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.glsl index bc290e2370..139ca165c2 100644 --- a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_78be5f() { - vec3 res = (false ? vec3(0.0f) : vec3(0.0f)); + vec3 res = (true ? vec3(1.0f) : vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_78be5f() { - vec3 res = (false ? vec3(0.0f) : vec3(0.0f)); + vec3 res = (true ? vec3(1.0f) : vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_78be5f() { - vec3 res = (false ? vec3(0.0f) : vec3(0.0f)); + vec3 res = (true ? vec3(1.0f) : vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.msl index 8338204784..e01f02712b 100644 --- a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_78be5f() { - float3 res = select(float3(0.0f), float3(0.0f), false); + float3 res = select(float3(1.0f), float3(1.0f), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.spvasm index 71a76039c5..ce23c7b024 100644 --- a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,42 +32,43 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %bool = OpTypeBool - %16 = OpConstantNull %bool - %17 = OpConstantNull %v3float + %true = OpConstantTrue %bool + %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %21 = OpConstantNull %v3bool + %22 = OpConstantNull %v3bool %_ptr_Function_v3float = OpTypePointer Function %v3float - %25 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %v3float + %27 = OpTypeFunction %v4float %select_78be5f = OpFunction %void None %9 %12 = OpLabel - %19 = OpVariable %_ptr_Function_v3bool Function %21 - %res = OpVariable %_ptr_Function_v3float Function %17 - %22 = OpCompositeConstruct %v3bool %16 %16 %16 - %13 = OpSelect %v3float %22 %17 %17 + %20 = OpVariable %_ptr_Function_v3bool Function %22 + %res = OpVariable %_ptr_Function_v3float Function %26 + %23 = OpCompositeConstruct %v3bool %true %true %true + %13 = OpSelect %v3float %23 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %select_78be5f +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %select_78be5f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_78be5f + %35 = OpLabel + %36 = OpFunctionCall %void %select_78be5f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_78be5f + %38 = OpLabel + %39 = OpFunctionCall %void %select_78be5f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.wgsl index 8a6dd23ad9..958852770e 100644 --- a/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/78be5f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_78be5f() { - var res : vec3 = select(vec3(), vec3(), bool()); + var res : vec3 = select(vec3(1.0f), vec3(1.0f), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl b/test/tint/builtins/gen/literal/select/80a9a9.wgsl index d29e19f808..6bb2dae76a 100644 --- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl +++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, bool>, vec<3, bool>, vec<3, bool>) -> vec<3, bool> fn select_80a9a9() { - var res: vec3 = select(vec3(), vec3(), vec3()); + var res: vec3 = select(vec3(true), vec3(true), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.dxc.hlsl index e23d12b4e7..b319508739 100644 --- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_80a9a9() { - bool3 res = ((false).xxx ? (false).xxx : (false).xxx); + bool3 res = ((true).xxx ? (true).xxx : (true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.fxc.hlsl index e23d12b4e7..b319508739 100644 --- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_80a9a9() { - bool3 res = ((false).xxx ? (false).xxx : (false).xxx); + bool3 res = ((true).xxx ? (true).xxx : (true).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.glsl index 397e9f7a94..e2195563cd 100644 --- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_80a9a9() { - bvec3 res = mix(bvec3(false), bvec3(false), bvec3(false)); + bvec3 res = mix(bvec3(true), bvec3(true), bvec3(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_80a9a9() { - bvec3 res = mix(bvec3(false), bvec3(false), bvec3(false)); + bvec3 res = mix(bvec3(true), bvec3(true), bvec3(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_80a9a9() { - bvec3 res = mix(bvec3(false), bvec3(false), bvec3(false)); + bvec3 res = mix(bvec3(true), bvec3(true), bvec3(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.msl index 21229b0652..f6cc3e5649 100644 --- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_80a9a9() { - bool3 res = select(bool3(false), bool3(false), bool3(false)); + bool3 res = select(bool3(true), bool3(true), bool3(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.spvasm index bf4c72e7b2..0fbf2a154f 100644 --- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %16 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v3bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_80a9a9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3bool Function %16 - %13 = OpSelect %v3bool %16 %16 %16 + %res = OpVariable %_ptr_Function_v3bool Function %20 + %13 = OpSelect %v3bool %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %select_80a9a9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %select_80a9a9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %select_80a9a9 + %30 = OpLabel + %31 = OpFunctionCall %void %select_80a9a9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_80a9a9 + %33 = OpLabel + %34 = OpFunctionCall %void %select_80a9a9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.wgsl index 57b9aa88c9..465edf2fcd 100644 --- a/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/80a9a9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_80a9a9() { - var res : vec3 = select(vec3(), vec3(), vec3()); + var res : vec3 = select(vec3(true), vec3(true), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl b/test/tint/builtins/gen/literal/select/8fa62c.wgsl index 7d16232f59..98d2458bd1 100644 --- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl +++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, i32>, vec<3, i32>, bool) -> vec<3, i32> fn select_8fa62c() { - var res: vec3 = select(vec3(), vec3(), bool()); + var res: vec3 = select(vec3(1), vec3(1), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.dxc.hlsl index f6fb23bb27..57f210d3bd 100644 --- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_8fa62c() { - int3 res = (false ? (0).xxx : (0).xxx); + int3 res = (true ? (1).xxx : (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.fxc.hlsl index f6fb23bb27..57f210d3bd 100644 --- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_8fa62c() { - int3 res = (false ? (0).xxx : (0).xxx); + int3 res = (true ? (1).xxx : (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.glsl index 4cd7593347..4b70835140 100644 --- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_8fa62c() { - ivec3 res = (false ? ivec3(0) : ivec3(0)); + ivec3 res = (true ? ivec3(1) : ivec3(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_8fa62c() { - ivec3 res = (false ? ivec3(0) : ivec3(0)); + ivec3 res = (true ? ivec3(1) : ivec3(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_8fa62c() { - ivec3 res = (false ? ivec3(0) : ivec3(0)); + ivec3 res = (true ? ivec3(1) : ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.msl index be4667a15e..7e4ed08e8c 100644 --- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_8fa62c() { - int3 res = select(int3(0), int3(0), false); + int3 res = select(int3(1), int3(1), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.spvasm index a2ada450ed..16dfeac426 100644 --- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %bool = OpTypeBool - %17 = OpConstantNull %bool - %18 = OpConstantNull %v3int + %true = OpConstantTrue %bool + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %22 = OpConstantNull %v3bool + %23 = OpConstantNull %v3bool %_ptr_Function_v3int = OpTypePointer Function %v3int - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %v3int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_8fa62c = OpFunction %void None %9 %12 = OpLabel - %20 = OpVariable %_ptr_Function_v3bool Function %22 - %res = OpVariable %_ptr_Function_v3int Function %18 - %23 = OpCompositeConstruct %v3bool %17 %17 %17 - %13 = OpSelect %v3int %23 %18 %18 + %21 = OpVariable %_ptr_Function_v3bool Function %23 + %res = OpVariable %_ptr_Function_v3int Function %27 + %24 = OpCompositeConstruct %v3bool %true %true %true + %13 = OpSelect %v3int %24 %19 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_8fa62c +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %select_8fa62c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_8fa62c + %37 = OpLabel + %38 = OpFunctionCall %void %select_8fa62c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_8fa62c + %40 = OpLabel + %41 = OpFunctionCall %void %select_8fa62c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.wgsl index b369a29bec..eac241852b 100644 --- a/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/8fa62c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_8fa62c() { - var res : vec3 = select(vec3(), vec3(), bool()); + var res : vec3 = select(vec3(1), vec3(1), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl b/test/tint/builtins/gen/literal/select/99f883.wgsl index 4cb49acdeb..9d0f086e24 100644 --- a/test/tint/builtins/gen/literal/select/99f883.wgsl +++ b/test/tint/builtins/gen/literal/select/99f883.wgsl @@ -25,7 +25,7 @@ // fn select(u32, u32, bool) -> u32 fn select_99f883() { - var res: u32 = select(1u, 1u, bool()); + var res: u32 = select(1u, 1u, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.dxc.hlsl index 53c70022b1..75093f5bd0 100644 --- a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_99f883() { - uint res = (false ? 1u : 1u); + uint res = (true ? 1u : 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.fxc.hlsl index 53c70022b1..75093f5bd0 100644 --- a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_99f883() { - uint res = (false ? 1u : 1u); + uint res = (true ? 1u : 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.glsl index 50eff8fc5a..868fe4dbdd 100644 --- a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_99f883() { - uint res = (false ? 1u : 1u); + uint res = (true ? 1u : 1u); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_99f883() { - uint res = (false ? 1u : 1u); + uint res = (true ? 1u : 1u); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_99f883() { - uint res = (false ? 1u : 1u); + uint res = (true ? 1u : 1u); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.msl index a7efb93075..2d5afcb05c 100644 --- a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_99f883() { - uint res = select(1u, 1u, false); + uint res = select(1u, 1u, true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.spvasm index 9ef43b9bde..f05c98730b 100644 --- a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.spvasm @@ -32,7 +32,7 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %bool = OpTypeBool - %16 = OpConstantNull %bool + %true = OpConstantTrue %bool %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint @@ -41,7 +41,7 @@ %select_99f883 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_uint Function %20 - %13 = OpSelect %uint %16 %uint_1 %uint_1 + %13 = OpSelect %uint %true %uint_1 %uint_1 OpStore %res %13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.wgsl index 391c89b080..03d93941d6 100644 --- a/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/99f883.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_99f883() { - var res : u32 = select(1u, 1u, bool()); + var res : u32 = select(1u, 1u, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl b/test/tint/builtins/gen/literal/select/a2860e.wgsl index 8dd8c6e5c8..13082af61d 100644 --- a/test/tint/builtins/gen/literal/select/a2860e.wgsl +++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, i32>, vec<4, i32>, vec<4, bool>) -> vec<4, i32> fn select_a2860e() { - var res: vec4 = select(vec4(), vec4(), vec4()); + var res: vec4 = select(vec4(1), vec4(1), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.dxc.hlsl index edeff35015..e87fb0a1a9 100644 --- a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_a2860e() { - int4 res = ((false).xxxx ? (0).xxxx : (0).xxxx); + int4 res = ((true).xxxx ? (1).xxxx : (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.fxc.hlsl index edeff35015..e87fb0a1a9 100644 --- a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_a2860e() { - int4 res = ((false).xxxx ? (0).xxxx : (0).xxxx); + int4 res = ((true).xxxx ? (1).xxxx : (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.glsl index 249dc8392d..c323c86db8 100644 --- a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_a2860e() { - ivec4 res = mix(ivec4(0), ivec4(0), bvec4(false)); + ivec4 res = mix(ivec4(1), ivec4(1), bvec4(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_a2860e() { - ivec4 res = mix(ivec4(0), ivec4(0), bvec4(false)); + ivec4 res = mix(ivec4(1), ivec4(1), bvec4(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_a2860e() { - ivec4 res = mix(ivec4(0), ivec4(0), bvec4(false)); + ivec4 res = mix(ivec4(1), ivec4(1), bvec4(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.msl index c0de41ced8..b81f26a13c 100644 --- a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_a2860e() { - int4 res = select(int4(0), int4(0), bool4(false)); + int4 res = select(int4(1), int4(1), bool4(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.spvasm index 9dd2601bfd..be8a0ca84a 100644 --- a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,40 @@ %v4int = OpTypeVector %int 4 %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %18 = OpConstantNull %v4bool - %19 = OpConstantNull %v4int + %true = OpConstantTrue %bool + %19 = OpConstantComposite %v4bool %true %true %true %true + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %22 = OpTypeFunction %v4float + %24 = OpConstantNull %v4int + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_a2860e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %19 - %13 = OpSelect %v4int %18 %19 %19 + %res = OpVariable %_ptr_Function_v4int Function %24 + %13 = OpSelect %v4int %19 %21 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_a2860e +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_a2860e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_a2860e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %select_a2860e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %select_a2860e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.wgsl index bb3a6b3ea4..b489567c13 100644 --- a/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/a2860e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_a2860e() { - var res : vec4 = select(vec4(), vec4(), vec4()); + var res : vec4 = select(vec4(1), vec4(1), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl b/test/tint/builtins/gen/literal/select/ab069f.wgsl index 014c1b89f7..74a605ed8a 100644 --- a/test/tint/builtins/gen/literal/select/ab069f.wgsl +++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, i32>, vec<4, i32>, bool) -> vec<4, i32> fn select_ab069f() { - var res: vec4 = select(vec4(), vec4(), bool()); + var res: vec4 = select(vec4(1), vec4(1), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.dxc.hlsl index bd1106d69b..7436b53f24 100644 --- a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_ab069f() { - int4 res = (false ? (0).xxxx : (0).xxxx); + int4 res = (true ? (1).xxxx : (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.fxc.hlsl index bd1106d69b..7436b53f24 100644 --- a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_ab069f() { - int4 res = (false ? (0).xxxx : (0).xxxx); + int4 res = (true ? (1).xxxx : (1).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.glsl index 81f83c031c..5de0446c6c 100644 --- a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_ab069f() { - ivec4 res = (false ? ivec4(0) : ivec4(0)); + ivec4 res = (true ? ivec4(1) : ivec4(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_ab069f() { - ivec4 res = (false ? ivec4(0) : ivec4(0)); + ivec4 res = (true ? ivec4(1) : ivec4(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_ab069f() { - ivec4 res = (false ? ivec4(0) : ivec4(0)); + ivec4 res = (true ? ivec4(1) : ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.msl index 602f22f7b0..fe40e00cd9 100644 --- a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_ab069f() { - int4 res = select(int4(0), int4(0), false); + int4 res = select(int4(1), int4(1), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.spvasm index 76d001f2cb..5714961423 100644 --- a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %bool = OpTypeBool - %17 = OpConstantNull %bool - %18 = OpConstantNull %v4int + %true = OpConstantTrue %bool + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %22 = OpConstantNull %v4bool + %23 = OpConstantNull %v4bool %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_ab069f = OpFunction %void None %9 %12 = OpLabel - %20 = OpVariable %_ptr_Function_v4bool Function %22 - %res = OpVariable %_ptr_Function_v4int Function %18 - %23 = OpCompositeConstruct %v4bool %17 %17 %17 %17 - %13 = OpSelect %v4int %23 %18 %18 + %21 = OpVariable %_ptr_Function_v4bool Function %23 + %res = OpVariable %_ptr_Function_v4int Function %27 + %24 = OpCompositeConstruct %v4bool %true %true %true %true + %13 = OpSelect %v4int %24 %19 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_ab069f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %select_ab069f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_ab069f + %37 = OpLabel + %38 = OpFunctionCall %void %select_ab069f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_ab069f + %40 = OpLabel + %41 = OpFunctionCall %void %select_ab069f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.wgsl index 0749b91d7c..a07860c1fe 100644 --- a/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/ab069f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_ab069f() { - var res : vec4 = select(vec4(), vec4(), bool()); + var res : vec4 = select(vec4(1), vec4(1), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl b/test/tint/builtins/gen/literal/select/b04721.wgsl index 78da8d12e4..9626bfe6d2 100644 --- a/test/tint/builtins/gen/literal/select/b04721.wgsl +++ b/test/tint/builtins/gen/literal/select/b04721.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, u32>, vec<3, u32>, bool) -> vec<3, u32> fn select_b04721() { - var res: vec3 = select(vec3(), vec3(), bool()); + var res: vec3 = select(vec3(1u), vec3(1u), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.dxc.hlsl index c94d537dee..d48819734b 100644 --- a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_b04721() { - uint3 res = (false ? (0u).xxx : (0u).xxx); + uint3 res = (true ? (1u).xxx : (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.fxc.hlsl index c94d537dee..d48819734b 100644 --- a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_b04721() { - uint3 res = (false ? (0u).xxx : (0u).xxx); + uint3 res = (true ? (1u).xxx : (1u).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.glsl index a3f20cf0b5..bfc7dcf0d8 100644 --- a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_b04721() { - uvec3 res = (false ? uvec3(0u) : uvec3(0u)); + uvec3 res = (true ? uvec3(1u) : uvec3(1u)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_b04721() { - uvec3 res = (false ? uvec3(0u) : uvec3(0u)); + uvec3 res = (true ? uvec3(1u) : uvec3(1u)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_b04721() { - uvec3 res = (false ? uvec3(0u) : uvec3(0u)); + uvec3 res = (true ? uvec3(1u) : uvec3(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.msl index be23b83a90..03c0349c5a 100644 --- a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_b04721() { - uint3 res = select(uint3(0u), uint3(0u), false); + uint3 res = select(uint3(1u), uint3(1u), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.spvasm index 7324fa3943..5508f4d8ee 100644 --- a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 %bool = OpTypeBool - %17 = OpConstantNull %bool - %18 = OpConstantNull %v3uint + %true = OpConstantTrue %bool + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %22 = OpConstantNull %v3bool + %23 = OpConstantNull %v3bool %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %v3uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_b04721 = OpFunction %void None %9 %12 = OpLabel - %20 = OpVariable %_ptr_Function_v3bool Function %22 - %res = OpVariable %_ptr_Function_v3uint Function %18 - %23 = OpCompositeConstruct %v3bool %17 %17 %17 - %13 = OpSelect %v3uint %23 %18 %18 + %21 = OpVariable %_ptr_Function_v3bool Function %23 + %res = OpVariable %_ptr_Function_v3uint Function %27 + %24 = OpCompositeConstruct %v3bool %true %true %true + %13 = OpSelect %v3uint %24 %19 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_b04721 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %select_b04721 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_b04721 + %37 = OpLabel + %38 = OpFunctionCall %void %select_b04721 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_b04721 + %40 = OpLabel + %41 = OpFunctionCall %void %select_b04721 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.wgsl index 6dcdc87684..f44d059c2c 100644 --- a/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/b04721.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_b04721() { - var res : vec3 = select(vec3(), vec3(), bool()); + var res : vec3 = select(vec3(1u), vec3(1u), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl b/test/tint/builtins/gen/literal/select/bb447f.wgsl index 1a98f64c0a..eee737651b 100644 --- a/test/tint/builtins/gen/literal/select/bb447f.wgsl +++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, i32>, vec<2, i32>, bool) -> vec<2, i32> fn select_bb447f() { - var res: vec2 = select(vec2(), vec2(), bool()); + var res: vec2 = select(vec2(1), vec2(1), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.dxc.hlsl index 9831d7801b..0b807d377b 100644 --- a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_bb447f() { - int2 res = (false ? (0).xx : (0).xx); + int2 res = (true ? (1).xx : (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.fxc.hlsl index 9831d7801b..0b807d377b 100644 --- a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_bb447f() { - int2 res = (false ? (0).xx : (0).xx); + int2 res = (true ? (1).xx : (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.glsl index 73fd93d0a4..e0e4446deb 100644 --- a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_bb447f() { - ivec2 res = (false ? ivec2(0) : ivec2(0)); + ivec2 res = (true ? ivec2(1) : ivec2(1)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_bb447f() { - ivec2 res = (false ? ivec2(0) : ivec2(0)); + ivec2 res = (true ? ivec2(1) : ivec2(1)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_bb447f() { - ivec2 res = (false ? ivec2(0) : ivec2(0)); + ivec2 res = (true ? ivec2(1) : ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.msl index bfbe2ed13c..a1349a485b 100644 --- a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_bb447f() { - int2 res = select(int2(0), int2(0), false); + int2 res = select(int2(1), int2(1), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.spvasm index 95805066ea..a45e966c98 100644 --- a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %bool = OpTypeBool - %17 = OpConstantNull %bool - %18 = OpConstantNull %v2int + %true = OpConstantTrue %bool + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %22 = OpConstantNull %v2bool + %23 = OpConstantNull %v2bool %_ptr_Function_v2int = OpTypePointer Function %v2int - %26 = OpTypeFunction %v4float + %27 = OpConstantNull %v2int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_bb447f = OpFunction %void None %9 %12 = OpLabel - %20 = OpVariable %_ptr_Function_v2bool Function %22 - %res = OpVariable %_ptr_Function_v2int Function %18 - %23 = OpCompositeConstruct %v2bool %17 %17 - %13 = OpSelect %v2int %23 %18 %18 + %21 = OpVariable %_ptr_Function_v2bool Function %23 + %res = OpVariable %_ptr_Function_v2int Function %27 + %24 = OpCompositeConstruct %v2bool %true %true + %13 = OpSelect %v2int %24 %19 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_bb447f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %select_bb447f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_bb447f + %37 = OpLabel + %38 = OpFunctionCall %void %select_bb447f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_bb447f + %40 = OpLabel + %41 = OpFunctionCall %void %select_bb447f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.wgsl index ad447ce260..7bbbcf6dba 100644 --- a/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/bb447f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_bb447f() { - var res : vec2 = select(vec2(), vec2(), bool()); + var res : vec2 = select(vec2(1), vec2(1), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl b/test/tint/builtins/gen/literal/select/bb8aae.wgsl index 412ee947e6..44faa7767f 100644 --- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl +++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, f32>, vec<4, f32>, vec<4, bool>) -> vec<4, f32> fn select_bb8aae() { - var res: vec4 = select(vec4(), vec4(), vec4()); + var res: vec4 = select(vec4(1.f), vec4(1.f), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.dxc.hlsl index 2247492ad6..9d696b5e13 100644 --- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_bb8aae() { - float4 res = ((false).xxxx ? (0.0f).xxxx : (0.0f).xxxx); + float4 res = ((true).xxxx ? (1.0f).xxxx : (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.fxc.hlsl index 2247492ad6..9d696b5e13 100644 --- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_bb8aae() { - float4 res = ((false).xxxx ? (0.0f).xxxx : (0.0f).xxxx); + float4 res = ((true).xxxx ? (1.0f).xxxx : (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.glsl index ab211b1fad..5509024aa3 100644 --- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_bb8aae() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), bvec4(false)); + vec4 res = mix(vec4(1.0f), vec4(1.0f), bvec4(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_bb8aae() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), bvec4(false)); + vec4 res = mix(vec4(1.0f), vec4(1.0f), bvec4(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_bb8aae() { - vec4 res = mix(vec4(0.0f), vec4(0.0f), bvec4(false)); + vec4 res = mix(vec4(1.0f), vec4(1.0f), bvec4(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.msl index bd80ddf95c..b165f0ca81 100644 --- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_bb8aae() { - float4 res = select(float4(0.0f), float4(0.0f), bool4(false)); + float4 res = select(float4(1.0f), float4(1.0f), bool4(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.spvasm index 29dc265f8c..32b22cd8e0 100644 --- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %16 = OpConstantNull %v4bool -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v4bool %true %true %true %true %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %22 = OpTypeFunction %v4float %select_bb8aae = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpSelect %v4float %16 %5 %5 + %13 = OpSelect %v4float %17 %19 %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %select_bb8aae +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %select_bb8aae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %select_bb8aae + %30 = OpLabel + %31 = OpFunctionCall %void %select_bb8aae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_bb8aae + %33 = OpLabel + %34 = OpFunctionCall %void %select_bb8aae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.wgsl index 862c7699c0..b2f2620748 100644 --- a/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/bb8aae.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_bb8aae() { - var res : vec4 = select(vec4(), vec4(), vec4()); + var res : vec4 = select(vec4(1.0f), vec4(1.0f), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl b/test/tint/builtins/gen/literal/select/bf3d29.wgsl index a1b233f778..afe9ac932f 100644 --- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl +++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, f32>, vec<2, f32>, bool) -> vec<2, f32> fn select_bf3d29() { - var res: vec2 = select(vec2(), vec2(), bool()); + var res: vec2 = select(vec2(1.f), vec2(1.f), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.dxc.hlsl index 033f3e7337..ee028a12bd 100644 --- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_bf3d29() { - float2 res = (false ? (0.0f).xx : (0.0f).xx); + float2 res = (true ? (1.0f).xx : (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.fxc.hlsl index 033f3e7337..ee028a12bd 100644 --- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_bf3d29() { - float2 res = (false ? (0.0f).xx : (0.0f).xx); + float2 res = (true ? (1.0f).xx : (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.glsl index 6a71346d6c..a51f6f3e46 100644 --- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_bf3d29() { - vec2 res = (false ? vec2(0.0f) : vec2(0.0f)); + vec2 res = (true ? vec2(1.0f) : vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_bf3d29() { - vec2 res = (false ? vec2(0.0f) : vec2(0.0f)); + vec2 res = (true ? vec2(1.0f) : vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_bf3d29() { - vec2 res = (false ? vec2(0.0f) : vec2(0.0f)); + vec2 res = (true ? vec2(1.0f) : vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.msl index ba3d3553f4..6989bc14fe 100644 --- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_bf3d29() { - float2 res = select(float2(0.0f), float2(0.0f), false); + float2 res = select(float2(1.0f), float2(1.0f), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.spvasm index accad0cf26..6c9333f5d8 100644 --- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,42 +32,43 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %bool = OpTypeBool - %16 = OpConstantNull %bool - %17 = OpConstantNull %v2float + %true = OpConstantTrue %bool + %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %21 = OpConstantNull %v2bool + %22 = OpConstantNull %v2bool %_ptr_Function_v2float = OpTypePointer Function %v2float - %25 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %v2float + %27 = OpTypeFunction %v4float %select_bf3d29 = OpFunction %void None %9 %12 = OpLabel - %19 = OpVariable %_ptr_Function_v2bool Function %21 - %res = OpVariable %_ptr_Function_v2float Function %17 - %22 = OpCompositeConstruct %v2bool %16 %16 - %13 = OpSelect %v2float %22 %17 %17 + %20 = OpVariable %_ptr_Function_v2bool Function %22 + %res = OpVariable %_ptr_Function_v2float Function %26 + %23 = OpCompositeConstruct %v2bool %true %true + %13 = OpSelect %v2float %23 %18 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %select_bf3d29 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %select_bf3d29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_bf3d29 + %35 = OpLabel + %36 = OpFunctionCall %void %select_bf3d29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_bf3d29 + %38 = OpLabel + %39 = OpFunctionCall %void %select_bf3d29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.wgsl index 7210a86465..d6877c8650 100644 --- a/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/bf3d29.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_bf3d29() { - var res : vec2 = select(vec2(), vec2(), bool()); + var res : vec2 = select(vec2(1.0f), vec2(1.0f), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl b/test/tint/builtins/gen/literal/select/c31f9e.wgsl index 6d2ece4538..7c02d3b3ba 100644 --- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl +++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl @@ -25,7 +25,7 @@ // fn select(bool, bool, bool) -> bool fn select_c31f9e() { - var res: bool = select(bool(), bool(), bool()); + var res: bool = select(true, true, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.dxc.hlsl index 2e968f3b57..69c808e426 100644 --- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_c31f9e() { - bool res = (false ? false : false); + bool res = (true ? true : true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.fxc.hlsl index 2e968f3b57..69c808e426 100644 --- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_c31f9e() { - bool res = (false ? false : false); + bool res = (true ? true : true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.glsl index 07f1f9e0c1..0ef947ba23 100644 --- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_c31f9e() { - bool res = (false ? false : false); + bool res = (true ? true : true); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_c31f9e() { - bool res = (false ? false : false); + bool res = (true ? true : true); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_c31f9e() { - bool res = (false ? false : false); + bool res = (true ? true : true); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.msl index de68201e51..bb2e033e6a 100644 --- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_c31f9e() { - bool res = select(false, false, false); + bool res = select(true, true, true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.spvasm index 5091beb663..fb10e96c32 100644 --- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 33 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,36 +31,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %15 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %18 = OpTypeFunction %v4float + %18 = OpConstantNull %bool + %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_c31f9e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_bool Function %15 - %13 = OpSelect %bool %15 %15 %15 + %res = OpVariable %_ptr_Function_bool Function %18 + %13 = OpSelect %bool %true %true %true OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %select_c31f9e +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %select_c31f9e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %select_c31f9e + %28 = OpLabel + %29 = OpFunctionCall %void %select_c31f9e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_c31f9e + %31 = OpLabel + %32 = OpFunctionCall %void %select_c31f9e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.wgsl index c2f9e89260..2632b11712 100644 --- a/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/c31f9e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_c31f9e() { - var res : bool = select(bool(), bool(), bool()); + var res : bool = select(true, true, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl b/test/tint/builtins/gen/literal/select/c41bd1.wgsl index 484aecd609..e9f0c814a5 100644 --- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl +++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, bool>, vec<4, bool>, bool) -> vec<4, bool> fn select_c41bd1() { - var res: vec4 = select(vec4(), vec4(), bool()); + var res: vec4 = select(vec4(true), vec4(true), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.dxc.hlsl index 9d8b4caa11..ccdd95864a 100644 --- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_c41bd1() { - bool4 res = (false ? (false).xxxx : (false).xxxx); + bool4 res = (true ? (true).xxxx : (true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.fxc.hlsl index 9d8b4caa11..ccdd95864a 100644 --- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_c41bd1() { - bool4 res = (false ? (false).xxxx : (false).xxxx); + bool4 res = (true ? (true).xxxx : (true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.glsl index 45ff884785..c31ed7a184 100644 --- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_c41bd1() { - bvec4 res = (false ? bvec4(false) : bvec4(false)); + bvec4 res = (true ? bvec4(true) : bvec4(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_c41bd1() { - bvec4 res = (false ? bvec4(false) : bvec4(false)); + bvec4 res = (true ? bvec4(true) : bvec4(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_c41bd1() { - bvec4 res = (false ? bvec4(false) : bvec4(false)); + bvec4 res = (true ? bvec4(true) : bvec4(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.msl index fa1cf9a96e..dc9b3b9d77 100644 --- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_c41bd1() { - bool4 res = select(bool4(false), bool4(false), false); + bool4 res = select(bool4(true), bool4(true), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.spvasm index 8c3b9ef3b3..b81194c8d4 100644 --- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,39 +32,40 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %16 = OpConstantNull %bool - %17 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %22 = OpTypeFunction %v4float + %20 = OpConstantNull %v4bool + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_c41bd1 = OpFunction %void None %9 %12 = OpLabel - %18 = OpVariable %_ptr_Function_v4bool Function %17 - %res = OpVariable %_ptr_Function_v4bool Function %17 - %20 = OpCompositeConstruct %v4bool %16 %16 %16 %16 - %13 = OpSelect %v4bool %20 %17 %17 + %18 = OpVariable %_ptr_Function_v4bool Function %20 + %res = OpVariable %_ptr_Function_v4bool Function %20 + %21 = OpCompositeConstruct %v4bool %true %true %true %true + %13 = OpSelect %v4bool %21 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_c41bd1 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %select_c41bd1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_c41bd1 + %32 = OpLabel + %33 = OpFunctionCall %void %select_c41bd1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_c41bd1 + %35 = OpLabel + %36 = OpFunctionCall %void %select_c41bd1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.wgsl index 0527d9f311..48cb1c9244 100644 --- a/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/c41bd1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_c41bd1() { - var res : vec4 = select(vec4(), vec4(), bool()); + var res : vec4 = select(vec4(true), vec4(true), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl index 8592125100..01688033a6 100644 --- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl +++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, u32>, vec<4, u32>, vec<4, bool>) -> vec<4, u32> fn select_c4a4ef() { - var res: vec4 = select(vec4(), vec4(), vec4()); + var res: vec4 = select(vec4(1u), vec4(1u), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.dxc.hlsl index d6a8a58615..c309f05b9a 100644 --- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_c4a4ef() { - uint4 res = ((false).xxxx ? (0u).xxxx : (0u).xxxx); + uint4 res = ((true).xxxx ? (1u).xxxx : (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.fxc.hlsl index d6a8a58615..c309f05b9a 100644 --- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_c4a4ef() { - uint4 res = ((false).xxxx ? (0u).xxxx : (0u).xxxx); + uint4 res = ((true).xxxx ? (1u).xxxx : (1u).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.glsl index 6f6f07cf60..bb831d6141 100644 --- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_c4a4ef() { - uvec4 res = mix(uvec4(0u), uvec4(0u), bvec4(false)); + uvec4 res = mix(uvec4(1u), uvec4(1u), bvec4(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_c4a4ef() { - uvec4 res = mix(uvec4(0u), uvec4(0u), bvec4(false)); + uvec4 res = mix(uvec4(1u), uvec4(1u), bvec4(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_c4a4ef() { - uvec4 res = mix(uvec4(0u), uvec4(0u), bvec4(false)); + uvec4 res = mix(uvec4(1u), uvec4(1u), bvec4(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.msl index ca4f7ce7e9..0a7ea61a66 100644 --- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_c4a4ef() { - uint4 res = select(uint4(0u), uint4(0u), bool4(false)); + uint4 res = select(uint4(1u), uint4(1u), bool4(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.spvasm index c4eff67b69..83779278aa 100644 --- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,40 @@ %v4uint = OpTypeVector %uint 4 %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %18 = OpConstantNull %v4bool - %19 = OpConstantNull %v4uint + %true = OpConstantTrue %bool + %19 = OpConstantComposite %v4bool %true %true %true %true + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %22 = OpTypeFunction %v4float + %24 = OpConstantNull %v4uint + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_c4a4ef = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %19 - %13 = OpSelect %v4uint %18 %19 %19 + %res = OpVariable %_ptr_Function_v4uint Function %24 + %13 = OpSelect %v4uint %19 %21 %21 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_c4a4ef +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_c4a4ef OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_c4a4ef - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %34 = OpLabel %35 = OpFunctionCall %void %select_c4a4ef OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %37 = OpLabel + %38 = OpFunctionCall %void %select_c4a4ef + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.wgsl index d02111fed7..6ffda61721 100644 --- a/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/c4a4ef.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_c4a4ef() { - var res : vec4 = select(vec4(), vec4(), vec4()); + var res : vec4 = select(vec4(1u), vec4(1u), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl b/test/tint/builtins/gen/literal/select/cb9301.wgsl index 0c26752bd6..3e6e58cb1a 100644 --- a/test/tint/builtins/gen/literal/select/cb9301.wgsl +++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, bool>, vec<2, bool>, vec<2, bool>) -> vec<2, bool> fn select_cb9301() { - var res: vec2 = select(vec2(), vec2(), vec2()); + var res: vec2 = select(vec2(true), vec2(true), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.dxc.hlsl index 44cf52b3ce..93fbebcd58 100644 --- a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_cb9301() { - bool2 res = ((false).xx ? (false).xx : (false).xx); + bool2 res = ((true).xx ? (true).xx : (true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.fxc.hlsl index 44cf52b3ce..93fbebcd58 100644 --- a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_cb9301() { - bool2 res = ((false).xx ? (false).xx : (false).xx); + bool2 res = ((true).xx ? (true).xx : (true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.glsl index 661c17efee..5737cf4959 100644 --- a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_cb9301() { - bvec2 res = mix(bvec2(false), bvec2(false), bvec2(false)); + bvec2 res = mix(bvec2(true), bvec2(true), bvec2(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_cb9301() { - bvec2 res = mix(bvec2(false), bvec2(false), bvec2(false)); + bvec2 res = mix(bvec2(true), bvec2(true), bvec2(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_cb9301() { - bvec2 res = mix(bvec2(false), bvec2(false), bvec2(false)); + bvec2 res = mix(bvec2(true), bvec2(true), bvec2(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.msl index f075cbdc50..b3a7fb1a3e 100644 --- a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_cb9301() { - bool2 res = select(bool2(false), bool2(false), bool2(false)); + bool2 res = select(bool2(true), bool2(true), bool2(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.spvasm index 8a86fc95ff..7e893d3669 100644 --- a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %16 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v2bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_cb9301 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2bool Function %16 - %13 = OpSelect %v2bool %16 %16 %16 + %res = OpVariable %_ptr_Function_v2bool Function %20 + %13 = OpSelect %v2bool %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %select_cb9301 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %select_cb9301 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %select_cb9301 + %30 = OpLabel + %31 = OpFunctionCall %void %select_cb9301 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_cb9301 + %33 = OpLabel + %34 = OpFunctionCall %void %select_cb9301 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.wgsl index b925f9c52b..57a01d2e0c 100644 --- a/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/cb9301.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_cb9301() { - var res : vec2 = select(vec2(), vec2(), vec2()); + var res : vec2 = select(vec2(true), vec2(true), vec2(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl b/test/tint/builtins/gen/literal/select/e3e028.wgsl index 7051ad5698..ee82ad9f8e 100644 --- a/test/tint/builtins/gen/literal/select/e3e028.wgsl +++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl @@ -25,7 +25,7 @@ // fn select(vec<4, bool>, vec<4, bool>, vec<4, bool>) -> vec<4, bool> fn select_e3e028() { - var res: vec4 = select(vec4(), vec4(), vec4()); + var res: vec4 = select(vec4(true), vec4(true), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.dxc.hlsl index fa1a031a34..0876d282d7 100644 --- a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_e3e028() { - bool4 res = ((false).xxxx ? (false).xxxx : (false).xxxx); + bool4 res = ((true).xxxx ? (true).xxxx : (true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.fxc.hlsl index fa1a031a34..0876d282d7 100644 --- a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_e3e028() { - bool4 res = ((false).xxxx ? (false).xxxx : (false).xxxx); + bool4 res = ((true).xxxx ? (true).xxxx : (true).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.glsl index f3f48bfd0f..a28a0395e4 100644 --- a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_e3e028() { - bvec4 res = mix(bvec4(false), bvec4(false), bvec4(false)); + bvec4 res = mix(bvec4(true), bvec4(true), bvec4(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_e3e028() { - bvec4 res = mix(bvec4(false), bvec4(false), bvec4(false)); + bvec4 res = mix(bvec4(true), bvec4(true), bvec4(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_e3e028() { - bvec4 res = mix(bvec4(false), bvec4(false), bvec4(false)); + bvec4 res = mix(bvec4(true), bvec4(true), bvec4(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.msl index 49bdf1d767..d25a5ae2d5 100644 --- a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_e3e028() { - bool4 res = select(bool4(false), bool4(false), bool4(false)); + bool4 res = select(bool4(true), bool4(true), bool4(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.spvasm index 259f9c0cec..bbfa5e16a9 100644 --- a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %16 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %19 = OpTypeFunction %v4float + %20 = OpConstantNull %v4bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_e3e028 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v4bool Function %16 - %13 = OpSelect %v4bool %16 %16 %16 + %res = OpVariable %_ptr_Function_v4bool Function %20 + %13 = OpSelect %v4bool %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %select_e3e028 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %select_e3e028 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %select_e3e028 + %30 = OpLabel + %31 = OpFunctionCall %void %select_e3e028 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_e3e028 + %33 = OpLabel + %34 = OpFunctionCall %void %select_e3e028 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.wgsl index 60bb7ed4f7..1794fd6117 100644 --- a/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/e3e028.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_e3e028() { - var res : vec4 = select(vec4(), vec4(), vec4()); + var res : vec4 = select(vec4(true), vec4(true), vec4(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl b/test/tint/builtins/gen/literal/select/ebfea2.wgsl index 804af398a5..ddc3341fe6 100644 --- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl +++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl @@ -25,7 +25,7 @@ // fn select(vec<3, f32>, vec<3, f32>, vec<3, bool>) -> vec<3, f32> fn select_ebfea2() { - var res: vec3 = select(vec3(), vec3(), vec3()); + var res: vec3 = select(vec3(1.f), vec3(1.f), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.dxc.hlsl index bd3fc8e059..2bb8831ed0 100644 --- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_ebfea2() { - float3 res = ((false).xxx ? (0.0f).xxx : (0.0f).xxx); + float3 res = ((true).xxx ? (1.0f).xxx : (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.fxc.hlsl index bd3fc8e059..2bb8831ed0 100644 --- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_ebfea2() { - float3 res = ((false).xxx ? (0.0f).xxx : (0.0f).xxx); + float3 res = ((true).xxx ? (1.0f).xxx : (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.glsl index a1caf6f3bf..1fa1c53faa 100644 --- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_ebfea2() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), bvec3(false)); + vec3 res = mix(vec3(1.0f), vec3(1.0f), bvec3(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_ebfea2() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), bvec3(false)); + vec3 res = mix(vec3(1.0f), vec3(1.0f), bvec3(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_ebfea2() { - vec3 res = mix(vec3(0.0f), vec3(0.0f), bvec3(false)); + vec3 res = mix(vec3(1.0f), vec3(1.0f), bvec3(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.msl index f1adced65e..5d62fd1734 100644 --- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_ebfea2() { - float3 res = select(float3(0.0f), float3(0.0f), bool3(false)); + float3 res = select(float3(1.0f), float3(1.0f), bool3(true)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.spvasm index 60a799fd61..b6e0c0316b 100644 --- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,37 +33,39 @@ %v3float = OpTypeVector %float 3 %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %17 = OpConstantNull %v3bool - %18 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float + %true = OpConstantTrue %bool + %18 = OpConstantComposite %v3bool %true %true %true %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %23 = OpConstantNull %v3float + %24 = OpTypeFunction %v4float %select_ebfea2 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %18 - %13 = OpSelect %v3float %17 %18 %18 + %res = OpVariable %_ptr_Function_v3float Function %23 + %13 = OpSelect %v3float %18 %20 %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %select_ebfea2 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %select_ebfea2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %select_ebfea2 + %32 = OpLabel + %33 = OpFunctionCall %void %select_ebfea2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %select_ebfea2 + %35 = OpLabel + %36 = OpFunctionCall %void %select_ebfea2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.wgsl index fd0315ce87..7586aab56e 100644 --- a/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/ebfea2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_ebfea2() { - var res : vec3 = select(vec3(), vec3(), vec3()); + var res : vec3 = select(vec3(1.0f), vec3(1.0f), vec3(true)); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl b/test/tint/builtins/gen/literal/select/ed8a15.wgsl index 6a33b8a3d4..244338132b 100644 --- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl +++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl @@ -25,7 +25,7 @@ // fn select(i32, i32, bool) -> i32 fn select_ed8a15() { - var res: i32 = select(1, 1, bool()); + var res: i32 = select(1, 1, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.dxc.hlsl index 70a240fe3d..204bba2277 100644 --- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_ed8a15() { - int res = (false ? 1 : 1); + int res = (true ? 1 : 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.fxc.hlsl index 70a240fe3d..204bba2277 100644 --- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_ed8a15() { - int res = (false ? 1 : 1); + int res = (true ? 1 : 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.glsl index 44771e54fb..b89c5848c9 100644 --- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_ed8a15() { - int res = (false ? 1 : 1); + int res = (true ? 1 : 1); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_ed8a15() { - int res = (false ? 1 : 1); + int res = (true ? 1 : 1); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_ed8a15() { - int res = (false ? 1 : 1); + int res = (true ? 1 : 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.msl index a584fb047f..159410ebc1 100644 --- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_ed8a15() { - int res = select(1, 1, false); + int res = select(1, 1, true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.spvasm index 259b51d11d..5dc45bf82d 100644 --- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.spvasm @@ -32,7 +32,7 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %bool = OpTypeBool - %16 = OpConstantNull %bool + %true = OpConstantTrue %bool %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int @@ -41,7 +41,7 @@ %select_ed8a15 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_int Function %20 - %13 = OpSelect %int %16 %int_1 %int_1 + %13 = OpSelect %int %true %int_1 %int_1 OpStore %res %13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.wgsl index a097c1fd11..2db78b319d 100644 --- a/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/ed8a15.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_ed8a15() { - var res : i32 = select(1, 1, bool()); + var res : i32 = select(1, 1, true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl b/test/tint/builtins/gen/literal/select/fb7e53.wgsl index 18fcedcadf..5fde2a4291 100644 --- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl +++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl @@ -25,7 +25,7 @@ // fn select(vec<2, bool>, vec<2, bool>, bool) -> vec<2, bool> fn select_fb7e53() { - var res: vec2 = select(vec2(), vec2(), bool()); + var res: vec2 = select(vec2(true), vec2(true), true); } @vertex diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.dxc.hlsl index dcbf816dce..09a9f42430 100644 --- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void select_fb7e53() { - bool2 res = (false ? (false).xx : (false).xx); + bool2 res = (true ? (true).xx : (true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.fxc.hlsl index dcbf816dce..09a9f42430 100644 --- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void select_fb7e53() { - bool2 res = (false ? (false).xx : (false).xx); + bool2 res = (true ? (true).xx : (true).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.glsl index 6926829fc2..4f655b8916 100644 --- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void select_fb7e53() { - bvec2 res = (false ? bvec2(false) : bvec2(false)); + bvec2 res = (true ? bvec2(true) : bvec2(true)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void select_fb7e53() { - bvec2 res = (false ? bvec2(false) : bvec2(false)); + bvec2 res = (true ? bvec2(true) : bvec2(true)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void select_fb7e53() { - bvec2 res = (false ? bvec2(false) : bvec2(false)); + bvec2 res = (true ? bvec2(true) : bvec2(true)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.msl index 7dc1f08c99..f1ba6f0fda 100644 --- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void select_fb7e53() { - bool2 res = select(bool2(false), bool2(false), false); + bool2 res = select(bool2(true), bool2(true), true); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.spvasm index 2465e39fa4..7b6deab35f 100644 --- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,39 +32,40 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %16 = OpConstantNull %bool - %17 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %17 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %22 = OpTypeFunction %v4float + %20 = OpConstantNull %v2bool + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_fb7e53 = OpFunction %void None %9 %12 = OpLabel - %18 = OpVariable %_ptr_Function_v2bool Function %17 - %res = OpVariable %_ptr_Function_v2bool Function %17 - %20 = OpCompositeConstruct %v2bool %16 %16 - %13 = OpSelect %v2bool %20 %17 %17 + %18 = OpVariable %_ptr_Function_v2bool Function %20 + %res = OpVariable %_ptr_Function_v2bool Function %20 + %21 = OpCompositeConstruct %v2bool %true %true + %13 = OpSelect %v2bool %21 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %select_fb7e53 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %select_fb7e53 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %select_fb7e53 + %32 = OpLabel + %33 = OpFunctionCall %void %select_fb7e53 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_fb7e53 + %35 = OpLabel + %36 = OpFunctionCall %void %select_fb7e53 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.wgsl index f39bf368d6..d5061488bb 100644 --- a/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/select/fb7e53.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn select_fb7e53() { - var res : vec2 = select(vec2(), vec2(), bool()); + var res : vec2 = select(vec2(true), vec2(true), true); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl b/test/tint/builtins/gen/literal/sign/159665.wgsl index 4fb808ae1d..6547cfb3f3 100644 --- a/test/tint/builtins/gen/literal/sign/159665.wgsl +++ b/test/tint/builtins/gen/literal/sign/159665.wgsl @@ -25,7 +25,7 @@ // fn sign(vec<3, f32>) -> vec<3, f32> fn sign_159665() { - var res: vec3 = sign(vec3()); + var res: vec3 = sign(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.dxc.hlsl index f2bd209a52..0ab4fc738b 100644 --- a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_159665() { - float3 res = sign((0.0f).xxx); + float3 res = sign((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.fxc.hlsl index f2bd209a52..0ab4fc738b 100644 --- a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sign_159665() { - float3 res = sign((0.0f).xxx); + float3 res = sign((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.glsl index 5fa1f598d8..821e964379 100644 --- a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sign_159665() { - vec3 res = sign(vec3(0.0f)); + vec3 res = sign(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sign_159665() { - vec3 res = sign(vec3(0.0f)); + vec3 res = sign(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sign_159665() { - vec3 res = sign(vec3(0.0f)); + vec3 res = sign(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.msl index bab4bf4c5c..d8f87fe5e2 100644 --- a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_159665() { - float3 res = sign(float3(0.0f)); + float3 res = sign(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.spvasm index 5e734b0b4c..360dc6f7a6 100644 --- a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %sign_159665 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 FSign %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 FSign %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sign_159665 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sign_159665 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sign_159665 + %29 = OpLabel + %30 = OpFunctionCall %void %sign_159665 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sign_159665 + %32 = OpLabel + %33 = OpFunctionCall %void %sign_159665 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.wgsl index 4f99fa9e97..d11f696558 100644 --- a/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/159665.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_159665() { - var res : vec3 = sign(vec3()); + var res : vec3 = sign(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl b/test/tint/builtins/gen/literal/sign/b8f634.wgsl index 7a75abc701..d04538395c 100644 --- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl +++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl @@ -25,7 +25,7 @@ // fn sign(vec<4, f32>) -> vec<4, f32> fn sign_b8f634() { - var res: vec4 = sign(vec4()); + var res: vec4 = sign(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.dxc.hlsl index 390e7bb03f..dfad227d6a 100644 --- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_b8f634() { - float4 res = sign((0.0f).xxxx); + float4 res = sign((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.fxc.hlsl index 390e7bb03f..dfad227d6a 100644 --- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sign_b8f634() { - float4 res = sign((0.0f).xxxx); + float4 res = sign((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.glsl index 9f217953c6..85db73f324 100644 --- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sign_b8f634() { - vec4 res = sign(vec4(0.0f)); + vec4 res = sign(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sign_b8f634() { - vec4 res = sign(vec4(0.0f)); + vec4 res = sign(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sign_b8f634() { - vec4 res = sign(vec4(0.0f)); + vec4 res = sign(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.msl index c911824eba..44f67fba46 100644 --- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_b8f634() { - float4 res = sign(float4(0.0f)); + float4 res = sign(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.spvasm index 88d6d0fbf9..3f785b5ecf 100644 --- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %sign_b8f634 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 FSign %5 + %13 = OpExtInst %v4float %14 FSign %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %sign_b8f634 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %sign_b8f634 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sign_b8f634 + %27 = OpLabel + %28 = OpFunctionCall %void %sign_b8f634 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sign_b8f634 + %30 = OpLabel + %31 = OpFunctionCall %void %sign_b8f634 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.wgsl index 690f072c46..99450856b5 100644 --- a/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/b8f634.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_b8f634() { - var res : vec4 = sign(vec4()); + var res : vec4 = sign(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl b/test/tint/builtins/gen/literal/sign/d065d8.wgsl index ed052e5fae..ca366ac30d 100644 --- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl +++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl @@ -25,7 +25,7 @@ // fn sign(vec<2, f32>) -> vec<2, f32> fn sign_d065d8() { - var res: vec2 = sign(vec2()); + var res: vec2 = sign(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.dxc.hlsl index 1774c0f298..b7571a84e8 100644 --- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_d065d8() { - float2 res = sign((0.0f).xx); + float2 res = sign((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.fxc.hlsl index 1774c0f298..b7571a84e8 100644 --- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sign_d065d8() { - float2 res = sign((0.0f).xx); + float2 res = sign((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.glsl index 60de59176f..80e261f924 100644 --- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sign_d065d8() { - vec2 res = sign(vec2(0.0f)); + vec2 res = sign(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sign_d065d8() { - vec2 res = sign(vec2(0.0f)); + vec2 res = sign(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sign_d065d8() { - vec2 res = sign(vec2(0.0f)); + vec2 res = sign(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.msl index 4255b7017b..b810a3d023 100644 --- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_d065d8() { - float2 res = sign(float2(0.0f)); + float2 res = sign(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.spvasm index 585a70e25c..ff49cd3013 100644 --- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %sign_d065d8 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 FSign %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 FSign %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sign_d065d8 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sign_d065d8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sign_d065d8 + %29 = OpLabel + %30 = OpFunctionCall %void %sign_d065d8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sign_d065d8 + %32 = OpLabel + %33 = OpFunctionCall %void %sign_d065d8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.wgsl index a7d4c6d370..bd5bb83a70 100644 --- a/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/d065d8.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_d065d8() { - var res : vec2 = sign(vec2()); + var res : vec2 = sign(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/dd790e.wgsl b/test/tint/builtins/gen/literal/sign/dd790e.wgsl index 4b967a95d2..9d921c5221 100644 --- a/test/tint/builtins/gen/literal/sign/dd790e.wgsl +++ b/test/tint/builtins/gen/literal/sign/dd790e.wgsl @@ -25,7 +25,7 @@ // fn sign(f32) -> f32 fn sign_dd790e() { - var res: f32 = sign(1.0); + var res: f32 = sign(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.wgsl index 8733a598c3..8a2bc6b52c 100644 --- a/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sign/dd790e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_dd790e() { - var res : f32 = sign(1.0); + var res : f32 = sign(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl index 17b5798c13..6fa6c0a640 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl @@ -25,7 +25,7 @@ // fn sin(vec<3, f32>) -> vec<3, f32> fn sin_01f241() { - var res: vec3 = sin(vec3()); + var res: vec3 = sin(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl index 75b33089ef..7593cd8998 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 res = sin((0.0f).xxx); + float3 res = sin((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl index 75b33089ef..7593cd8998 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 res = sin((0.0f).xxx); + float3 res = sin((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl index 49e9ab5612..5fe78bf6f8 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_01f241() { - vec3 res = sin(vec3(0.0f)); + vec3 res = sin(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_01f241() { - vec3 res = sin(vec3(0.0f)); + vec3 res = sin(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_01f241() { - vec3 res = sin(vec3(0.0f)); + vec3 res = sin(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl index 8b3c830882..197815bf8f 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_01f241() { - float3 res = sin(float3(0.0f)); + float3 res = sin(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm index 6a709ff96e..284f417718 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %sin_01f241 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Sin %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Sin %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sin_01f241 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sin_01f241 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_01f241 + %29 = OpLabel + %30 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_01f241 + %32 = OpLabel + %33 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl index 4acc145926..cbbca228ac 100644 --- a/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/01f241.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_01f241() { - var res : vec3 = sin(vec3()); + var res : vec3 = sin(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl index 25ad471302..f135f9652b 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl @@ -25,7 +25,7 @@ // fn sin(vec<4, f32>) -> vec<4, f32> fn sin_4e3979() { - var res: vec4 = sin(vec4()); + var res: vec4 = sin(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl index 2cc14515e3..016064bed6 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 res = sin((0.0f).xxxx); + float4 res = sin((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl index 2cc14515e3..016064bed6 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 res = sin((0.0f).xxxx); + float4 res = sin((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl index 20afb5d822..f5f794651f 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_4e3979() { - vec4 res = sin(vec4(0.0f)); + vec4 res = sin(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_4e3979() { - vec4 res = sin(vec4(0.0f)); + vec4 res = sin(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_4e3979() { - vec4 res = sin(vec4(0.0f)); + vec4 res = sin(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl index 84dc10b888..08239ea918 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_4e3979() { - float4 res = sin(float4(0.0f)); + float4 res = sin(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm index c83fd92de3..a6eb84eb0e 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %sin_4e3979 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Sin %5 + %13 = OpExtInst %v4float %14 Sin %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %sin_4e3979 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %sin_4e3979 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sin_4e3979 + %27 = OpLabel + %28 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sin_4e3979 + %30 = OpLabel + %31 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl index a576da3197..de883118e1 100644 --- a/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/4e3979.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_4e3979() { - var res : vec4 = sin(vec4()); + var res : vec4 = sin(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl index 50406eadef..f740859c41 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl @@ -25,7 +25,7 @@ // fn sin(f32) -> f32 fn sin_b78c91() { - var res: f32 = sin(1.0); + var res: f32 = sin(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl index da7ee81947..ed5914c907 100644 --- a/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/b78c91.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_b78c91() { - var res : f32 = sin(1.0); + var res : f32 = sin(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl index 1793e70582..713d559d57 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl @@ -25,7 +25,7 @@ // fn sin(vec<2, f32>) -> vec<2, f32> fn sin_fc8bc4() { - var res: vec2 = sin(vec2()); + var res: vec2 = sin(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl index 2183670819..6334dafc19 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 res = sin((0.0f).xx); + float2 res = sin((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl index 2183670819..6334dafc19 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 res = sin((0.0f).xx); + float2 res = sin((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl index 385618266c..58c95b8287 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_fc8bc4() { - vec2 res = sin(vec2(0.0f)); + vec2 res = sin(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sin_fc8bc4() { - vec2 res = sin(vec2(0.0f)); + vec2 res = sin(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sin_fc8bc4() { - vec2 res = sin(vec2(0.0f)); + vec2 res = sin(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl index e0525998d0..82021b4de6 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_fc8bc4() { - float2 res = sin(float2(0.0f)); + float2 res = sin(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm index ff7c146ff9..fbed393fc4 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %sin_fc8bc4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Sin %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Sin %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sin_fc8bc4 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sin_fc8bc4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_fc8bc4 + %29 = OpLabel + %30 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_fc8bc4 + %32 = OpLabel + %33 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl index fb6ec7205d..62f5f13f3a 100644 --- a/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sin/fc8bc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_fc8bc4() { - var res : vec2 = sin(vec2()); + var res : vec2 = sin(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl b/test/tint/builtins/gen/literal/sinh/445e33.wgsl index 43e57dee6b..a52b551fa6 100644 --- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl +++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl @@ -25,7 +25,7 @@ // fn sinh(vec<4, f32>) -> vec<4, f32> fn sinh_445e33() { - var res: vec4 = sinh(vec4()); + var res: vec4 = sinh(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.dxc.hlsl index 65f3d01a7f..678cef4da9 100644 --- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_445e33() { - float4 res = sinh((0.0f).xxxx); + float4 res = sinh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.fxc.hlsl index 65f3d01a7f..678cef4da9 100644 --- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sinh_445e33() { - float4 res = sinh((0.0f).xxxx); + float4 res = sinh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.glsl index eb2df9e785..2d90f5019f 100644 --- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sinh_445e33() { - vec4 res = sinh(vec4(0.0f)); + vec4 res = sinh(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sinh_445e33() { - vec4 res = sinh(vec4(0.0f)); + vec4 res = sinh(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sinh_445e33() { - vec4 res = sinh(vec4(0.0f)); + vec4 res = sinh(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.msl index 1cd540921d..4f0fdbce53 100644 --- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_445e33() { - float4 res = sinh(float4(0.0f)); + float4 res = sinh(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.spvasm index a3e2fb6871..1d1c9f6aa3 100644 --- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %sinh_445e33 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Sinh %5 + %13 = OpExtInst %v4float %14 Sinh %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %sinh_445e33 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %sinh_445e33 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sinh_445e33 + %27 = OpLabel + %28 = OpFunctionCall %void %sinh_445e33 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sinh_445e33 + %30 = OpLabel + %31 = OpFunctionCall %void %sinh_445e33 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.wgsl index f5ef008bf9..4cc352736a 100644 --- a/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/445e33.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_445e33() { - var res : vec4 = sinh(vec4()); + var res : vec4 = sinh(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/7bb598.wgsl b/test/tint/builtins/gen/literal/sinh/7bb598.wgsl index 05c502ddc3..e6c9756ebc 100644 --- a/test/tint/builtins/gen/literal/sinh/7bb598.wgsl +++ b/test/tint/builtins/gen/literal/sinh/7bb598.wgsl @@ -25,7 +25,7 @@ // fn sinh(f32) -> f32 fn sinh_7bb598() { - var res: f32 = sinh(1.0); + var res: f32 = sinh(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.wgsl index 67cc8fd2cc..8b00cfb727 100644 --- a/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/7bb598.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_7bb598() { - var res : f32 = sinh(1.0); + var res : f32 = sinh(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl index 21026cd0df..172201abde 100644 --- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl +++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl @@ -25,7 +25,7 @@ // fn sinh(vec<2, f32>) -> vec<2, f32> fn sinh_b9860e() { - var res: vec2 = sinh(vec2()); + var res: vec2 = sinh(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.dxc.hlsl index a7cb7f9f10..9961a6af41 100644 --- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_b9860e() { - float2 res = sinh((0.0f).xx); + float2 res = sinh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.fxc.hlsl index a7cb7f9f10..9961a6af41 100644 --- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sinh_b9860e() { - float2 res = sinh((0.0f).xx); + float2 res = sinh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.glsl index db61df2c91..83d01b7f6f 100644 --- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sinh_b9860e() { - vec2 res = sinh(vec2(0.0f)); + vec2 res = sinh(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sinh_b9860e() { - vec2 res = sinh(vec2(0.0f)); + vec2 res = sinh(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sinh_b9860e() { - vec2 res = sinh(vec2(0.0f)); + vec2 res = sinh(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.msl index f1e812ccf2..0b99457355 100644 --- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_b9860e() { - float2 res = sinh(float2(0.0f)); + float2 res = sinh(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.spvasm index 8225ffdf26..f09ce359eb 100644 --- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %sinh_b9860e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Sinh %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Sinh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sinh_b9860e +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sinh_b9860e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sinh_b9860e + %29 = OpLabel + %30 = OpFunctionCall %void %sinh_b9860e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sinh_b9860e + %32 = OpLabel + %33 = OpFunctionCall %void %sinh_b9860e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.wgsl index 014cca3274..6a6454f505 100644 --- a/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/b9860e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_b9860e() { - var res : vec2 = sinh(vec2()); + var res : vec2 = sinh(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl index 8935110b4e..c6e6b64462 100644 --- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl +++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl @@ -25,7 +25,7 @@ // fn sinh(vec<3, f32>) -> vec<3, f32> fn sinh_c9a5eb() { - var res: vec3 = sinh(vec3()); + var res: vec3 = sinh(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.dxc.hlsl index cb0d9dc08a..201111f25a 100644 --- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_c9a5eb() { - float3 res = sinh((0.0f).xxx); + float3 res = sinh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.fxc.hlsl index cb0d9dc08a..201111f25a 100644 --- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sinh_c9a5eb() { - float3 res = sinh((0.0f).xxx); + float3 res = sinh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.glsl index 6aa5169dc9..36f42dcfdd 100644 --- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sinh_c9a5eb() { - vec3 res = sinh(vec3(0.0f)); + vec3 res = sinh(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sinh_c9a5eb() { - vec3 res = sinh(vec3(0.0f)); + vec3 res = sinh(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sinh_c9a5eb() { - vec3 res = sinh(vec3(0.0f)); + vec3 res = sinh(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.msl index 6af7a0d7de..de40db2062 100644 --- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_c9a5eb() { - float3 res = sinh(float3(0.0f)); + float3 res = sinh(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.spvasm index a84374631a..3e1041a975 100644 --- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %sinh_c9a5eb = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Sinh %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Sinh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sinh_c9a5eb +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sinh_c9a5eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sinh_c9a5eb + %29 = OpLabel + %30 = OpFunctionCall %void %sinh_c9a5eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sinh_c9a5eb + %32 = OpLabel + %33 = OpFunctionCall %void %sinh_c9a5eb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.wgsl index c3e1955e90..67df10e22e 100644 --- a/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sinh/c9a5eb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_c9a5eb() { - var res : vec3 = sinh(vec3()); + var res : vec3 = sinh(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl index e06dff7922..0ee3f8a15d 100644 --- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl @@ -25,7 +25,7 @@ // fn smoothstep(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn smoothstep_392c19() { - var res: vec2 = smoothstep(vec2(), vec2(), vec2()); + var res: vec2 = smoothstep(vec2(1.f), vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.dxc.hlsl index 9a156f7558..e1a3d850ab 100644 --- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_392c19() { - float2 res = smoothstep((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = smoothstep((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.fxc.hlsl index 9a156f7558..e1a3d850ab 100644 --- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_392c19() { - float2 res = smoothstep((0.0f).xx, (0.0f).xx, (0.0f).xx); + float2 res = smoothstep((1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.glsl index a677eeae5c..4b897f4a17 100644 --- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void smoothstep_392c19() { - vec2 res = smoothstep(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = smoothstep(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void smoothstep_392c19() { - vec2 res = smoothstep(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = smoothstep(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void smoothstep_392c19() { - vec2 res = smoothstep(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec2 res = smoothstep(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.msl index 1b534a6f59..6a6423153f 100644 --- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void smoothstep_392c19() { - float2 res = smoothstep(float2(0.0f), float2(0.0f), float2(0.0f)); + float2 res = smoothstep(float2(1.0f), float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.spvasm index 14299d9e95..cce9e9a6af 100644 --- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %smoothstep_392c19 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 SmoothStep %16 %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 SmoothStep %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %smoothstep_392c19 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %smoothstep_392c19 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %smoothstep_392c19 + %29 = OpLabel + %30 = OpFunctionCall %void %smoothstep_392c19 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %smoothstep_392c19 + %32 = OpLabel + %33 = OpFunctionCall %void %smoothstep_392c19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.wgsl index f941e24442..a645970fe4 100644 --- a/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/392c19.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn smoothstep_392c19() { - var res : vec2 = smoothstep(vec2(), vec2(), vec2()); + var res : vec2 = smoothstep(vec2(1.0f), vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl index b080c200f1..64be9ef87c 100644 --- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl @@ -25,7 +25,7 @@ // fn smoothstep(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn smoothstep_40864c() { - var res: vec4 = smoothstep(vec4(), vec4(), vec4()); + var res: vec4 = smoothstep(vec4(1.f), vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.dxc.hlsl index 919e5e1e2a..a19b74d03d 100644 --- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_40864c() { - float4 res = smoothstep((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = smoothstep((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.fxc.hlsl index 919e5e1e2a..a19b74d03d 100644 --- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_40864c() { - float4 res = smoothstep((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4 res = smoothstep((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.glsl index 9bb5dbcbbd..47e97b6e74 100644 --- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void smoothstep_40864c() { - vec4 res = smoothstep(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = smoothstep(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void smoothstep_40864c() { - vec4 res = smoothstep(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = smoothstep(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void smoothstep_40864c() { - vec4 res = smoothstep(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + vec4 res = smoothstep(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.msl index efadf29097..9e47f9386b 100644 --- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void smoothstep_40864c() { - float4 res = smoothstep(float4(0.0f), float4(0.0f), float4(0.0f)); + float4 res = smoothstep(float4(1.0f), float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.spvasm index 8a1dda2c3d..ce5479e1ae 100644 --- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %smoothstep_40864c = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 SmoothStep %5 %5 %5 + %13 = OpExtInst %v4float %14 SmoothStep %16 %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %smoothstep_40864c +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %smoothstep_40864c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %smoothstep_40864c + %27 = OpLabel + %28 = OpFunctionCall %void %smoothstep_40864c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %smoothstep_40864c + %30 = OpLabel + %31 = OpFunctionCall %void %smoothstep_40864c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.wgsl index ddfe5c9d81..d53f10c2ff 100644 --- a/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/40864c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn smoothstep_40864c() { - var res : vec4 = smoothstep(vec4(), vec4(), vec4()); + var res : vec4 = smoothstep(vec4(1.0f), vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl b/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl index d1743e0d76..c2e4a3770c 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl @@ -25,7 +25,7 @@ // fn smoothstep(f32, f32, f32) -> f32 fn smoothstep_6c4975() { - var res: f32 = smoothstep(1.0, 1.0, 1.0); + var res: f32 = smoothstep(1.f, 1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.wgsl index dc4c629ffa..596b0a098b 100644 --- a/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/6c4975.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn smoothstep_6c4975() { - var res : f32 = smoothstep(1.0, 1.0, 1.0); + var res : f32 = smoothstep(1.0f, 1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl index 379eb1471e..8d526fde98 100644 --- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl @@ -25,7 +25,7 @@ // fn smoothstep(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn smoothstep_aad1db() { - var res: vec3 = smoothstep(vec3(), vec3(), vec3()); + var res: vec3 = smoothstep(vec3(1.f), vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.dxc.hlsl index 1b6358f3a5..cb88afb86c 100644 --- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_aad1db() { - float3 res = smoothstep((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = smoothstep((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.fxc.hlsl index 1b6358f3a5..cb88afb86c 100644 --- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void smoothstep_aad1db() { - float3 res = smoothstep((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3 res = smoothstep((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.glsl index 5ec2073881..3f8d9b2da8 100644 --- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void smoothstep_aad1db() { - vec3 res = smoothstep(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = smoothstep(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void smoothstep_aad1db() { - vec3 res = smoothstep(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = smoothstep(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void smoothstep_aad1db() { - vec3 res = smoothstep(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec3 res = smoothstep(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.msl index 0f364ab4a2..48037d1bf0 100644 --- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void smoothstep_aad1db() { - float3 res = smoothstep(float3(0.0f), float3(0.0f), float3(0.0f)); + float3 res = smoothstep(float3(1.0f), float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.spvasm index c5b2f08a06..845c531f86 100644 --- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %smoothstep_aad1db = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 SmoothStep %16 %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 SmoothStep %17 %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %smoothstep_aad1db +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %smoothstep_aad1db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %smoothstep_aad1db + %29 = OpLabel + %30 = OpFunctionCall %void %smoothstep_aad1db OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %smoothstep_aad1db + %32 = OpLabel + %33 = OpFunctionCall %void %smoothstep_aad1db OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.wgsl index 5ea76a82b7..38f7f8d0d7 100644 --- a/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/smoothstep/aad1db.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn smoothstep_aad1db() { - var res : vec3 = smoothstep(vec3(), vec3(), vec3()); + var res : vec3 = smoothstep(vec3(1.0f), vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl b/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl index 780618a7da..68dd6a09a8 100644 --- a/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl @@ -25,7 +25,7 @@ // fn sqrt(f32) -> f32 fn sqrt_20c74e() { - var res: f32 = sqrt(1.0); + var res: f32 = sqrt(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.wgsl index 9edd8a9348..cde62ac7a4 100644 --- a/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_20c74e() { - var res : f32 = sqrt(1.0); + var res : f32 = sqrt(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl index b89aefc3db..6141449e84 100644 --- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl @@ -25,7 +25,7 @@ // fn sqrt(vec<2, f32>) -> vec<2, f32> fn sqrt_8c7024() { - var res: vec2 = sqrt(vec2()); + var res: vec2 = sqrt(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.dxc.hlsl index 26778b8d6b..0191d7565d 100644 --- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_8c7024() { - float2 res = sqrt((0.0f).xx); + float2 res = sqrt((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.fxc.hlsl index 26778b8d6b..0191d7565d 100644 --- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sqrt_8c7024() { - float2 res = sqrt((0.0f).xx); + float2 res = sqrt((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.glsl index d942752616..baa407b6b3 100644 --- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sqrt_8c7024() { - vec2 res = sqrt(vec2(0.0f)); + vec2 res = sqrt(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sqrt_8c7024() { - vec2 res = sqrt(vec2(0.0f)); + vec2 res = sqrt(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sqrt_8c7024() { - vec2 res = sqrt(vec2(0.0f)); + vec2 res = sqrt(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.msl index f1f40b8580..b9dfbc409e 100644 --- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_8c7024() { - float2 res = sqrt(float2(0.0f)); + float2 res = sqrt(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.spvasm index 89f3e4b663..ba7cdf4ab4 100644 --- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %sqrt_8c7024 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Sqrt %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Sqrt %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sqrt_8c7024 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sqrt_8c7024 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sqrt_8c7024 + %29 = OpLabel + %30 = OpFunctionCall %void %sqrt_8c7024 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sqrt_8c7024 + %32 = OpLabel + %33 = OpFunctionCall %void %sqrt_8c7024 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.wgsl index 626d52ec7d..4f32c711a4 100644 --- a/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/8c7024.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_8c7024() { - var res : vec2 = sqrt(vec2()); + var res : vec2 = sqrt(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl index 62dc712d4d..f690fee11a 100644 --- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl @@ -25,7 +25,7 @@ // fn sqrt(vec<4, f32>) -> vec<4, f32> fn sqrt_aa0d7a() { - var res: vec4 = sqrt(vec4()); + var res: vec4 = sqrt(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.dxc.hlsl index 6b9cf558a8..776d0d4788 100644 --- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_aa0d7a() { - float4 res = sqrt((0.0f).xxxx); + float4 res = sqrt((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.fxc.hlsl index 6b9cf558a8..776d0d4788 100644 --- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sqrt_aa0d7a() { - float4 res = sqrt((0.0f).xxxx); + float4 res = sqrt((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.glsl index 7b64f32d9c..d96dc6c8a1 100644 --- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sqrt_aa0d7a() { - vec4 res = sqrt(vec4(0.0f)); + vec4 res = sqrt(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sqrt_aa0d7a() { - vec4 res = sqrt(vec4(0.0f)); + vec4 res = sqrt(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sqrt_aa0d7a() { - vec4 res = sqrt(vec4(0.0f)); + vec4 res = sqrt(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.msl index 2d45b3aae2..13a62e1ed4 100644 --- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_aa0d7a() { - float4 res = sqrt(float4(0.0f)); + float4 res = sqrt(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.spvasm index 7566b8276a..da8c047038 100644 --- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %sqrt_aa0d7a = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Sqrt %5 + %13 = OpExtInst %v4float %14 Sqrt %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %sqrt_aa0d7a +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %sqrt_aa0d7a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %sqrt_aa0d7a + %27 = OpLabel + %28 = OpFunctionCall %void %sqrt_aa0d7a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %sqrt_aa0d7a + %30 = OpLabel + %31 = OpFunctionCall %void %sqrt_aa0d7a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.wgsl index dfc5c27e1d..0a2f114d03 100644 --- a/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/aa0d7a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_aa0d7a() { - var res : vec4 = sqrt(vec4()); + var res : vec4 = sqrt(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl index d702a025fc..de891a9bcd 100644 --- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl @@ -25,7 +25,7 @@ // fn sqrt(vec<3, f32>) -> vec<3, f32> fn sqrt_f8c59a() { - var res: vec3 = sqrt(vec3()); + var res: vec3 = sqrt(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.dxc.hlsl index b7e7ea4f2b..e0c1921d59 100644 --- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_f8c59a() { - float3 res = sqrt((0.0f).xxx); + float3 res = sqrt((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.fxc.hlsl index b7e7ea4f2b..e0c1921d59 100644 --- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sqrt_f8c59a() { - float3 res = sqrt((0.0f).xxx); + float3 res = sqrt((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.glsl index 921c34fa62..9d05843ffd 100644 --- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sqrt_f8c59a() { - vec3 res = sqrt(vec3(0.0f)); + vec3 res = sqrt(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void sqrt_f8c59a() { - vec3 res = sqrt(vec3(0.0f)); + vec3 res = sqrt(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void sqrt_f8c59a() { - vec3 res = sqrt(vec3(0.0f)); + vec3 res = sqrt(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.msl index d3bc22470c..d79e601a8a 100644 --- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_f8c59a() { - float3 res = sqrt(float3(0.0f)); + float3 res = sqrt(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.spvasm index 15225e1efc..fdc4f9aaab 100644 --- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %sqrt_f8c59a = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Sqrt %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Sqrt %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sqrt_f8c59a +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sqrt_f8c59a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sqrt_f8c59a + %29 = OpLabel + %30 = OpFunctionCall %void %sqrt_f8c59a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sqrt_f8c59a + %32 = OpLabel + %33 = OpFunctionCall %void %sqrt_f8c59a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.wgsl index 9986b387b6..119dca4df9 100644 --- a/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/sqrt/f8c59a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_f8c59a() { - var res : vec3 = sqrt(vec3()); + var res : vec3 = sqrt(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/0b073b.wgsl b/test/tint/builtins/gen/literal/step/0b073b.wgsl index e7c3bc2492..fd6b6634a9 100644 --- a/test/tint/builtins/gen/literal/step/0b073b.wgsl +++ b/test/tint/builtins/gen/literal/step/0b073b.wgsl @@ -25,7 +25,7 @@ // fn step(f32, f32) -> f32 fn step_0b073b() { - var res: f32 = step(1.0, 1.0); + var res: f32 = step(1.f, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.wgsl index bd78183ba0..4564309840 100644 --- a/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/0b073b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn step_0b073b() { - var res : f32 = step(1.0, 1.0); + var res : f32 = step(1.0f, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl b/test/tint/builtins/gen/literal/step/19accd.wgsl index c3d2d7bfa0..0d888bd411 100644 --- a/test/tint/builtins/gen/literal/step/19accd.wgsl +++ b/test/tint/builtins/gen/literal/step/19accd.wgsl @@ -25,7 +25,7 @@ // fn step(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn step_19accd() { - var res: vec2 = step(vec2(), vec2()); + var res: vec2 = step(vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.dxc.hlsl index 3d4e558f4d..e4d7e03e3c 100644 --- a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void step_19accd() { - float2 res = step((0.0f).xx, (0.0f).xx); + float2 res = step((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.fxc.hlsl index 3d4e558f4d..e4d7e03e3c 100644 --- a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void step_19accd() { - float2 res = step((0.0f).xx, (0.0f).xx); + float2 res = step((1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.glsl index 78ac5a26f7..282608b526 100644 --- a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void step_19accd() { - vec2 res = step(vec2(0.0f), vec2(0.0f)); + vec2 res = step(vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void step_19accd() { - vec2 res = step(vec2(0.0f), vec2(0.0f)); + vec2 res = step(vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void step_19accd() { - vec2 res = step(vec2(0.0f), vec2(0.0f)); + vec2 res = step(vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.msl b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.msl index b01b13459a..e77bffc01b 100644 --- a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void step_19accd() { - float2 res = step(float2(0.0f), float2(0.0f)); + float2 res = step(float2(1.0f), float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.spvasm index b56876abbb..05790d4852 100644 --- a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %step_19accd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Step %16 %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Step %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %step_19accd +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %step_19accd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %step_19accd + %29 = OpLabel + %30 = OpFunctionCall %void %step_19accd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %step_19accd + %32 = OpLabel + %33 = OpFunctionCall %void %step_19accd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.wgsl index 5c188e2127..53a37af3ce 100644 --- a/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/19accd.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn step_19accd() { - var res : vec2 = step(vec2(), vec2()); + var res : vec2 = step(vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl b/test/tint/builtins/gen/literal/step/334303.wgsl index dfa502766f..58c3b01784 100644 --- a/test/tint/builtins/gen/literal/step/334303.wgsl +++ b/test/tint/builtins/gen/literal/step/334303.wgsl @@ -25,7 +25,7 @@ // fn step(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn step_334303() { - var res: vec3 = step(vec3(), vec3()); + var res: vec3 = step(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.dxc.hlsl index 7b6a0fcfdf..72b7a547d4 100644 --- a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void step_334303() { - float3 res = step((0.0f).xxx, (0.0f).xxx); + float3 res = step((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.fxc.hlsl index 7b6a0fcfdf..72b7a547d4 100644 --- a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void step_334303() { - float3 res = step((0.0f).xxx, (0.0f).xxx); + float3 res = step((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.glsl b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.glsl index be30be9089..c5508ff9e3 100644 --- a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void step_334303() { - vec3 res = step(vec3(0.0f), vec3(0.0f)); + vec3 res = step(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void step_334303() { - vec3 res = step(vec3(0.0f), vec3(0.0f)); + vec3 res = step(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void step_334303() { - vec3 res = step(vec3(0.0f), vec3(0.0f)); + vec3 res = step(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.msl b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.msl index 5d3f1a34d9..7da6a2a6f4 100644 --- a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void step_334303() { - float3 res = step(float3(0.0f), float3(0.0f)); + float3 res = step(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.spvasm index 7cc186abc9..e9513d661a 100644 --- a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %step_334303 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Step %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Step %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %step_334303 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %step_334303 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %step_334303 + %29 = OpLabel + %30 = OpFunctionCall %void %step_334303 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %step_334303 + %32 = OpLabel + %33 = OpFunctionCall %void %step_334303 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.wgsl index 75aff10758..ded0d81106 100644 --- a/test/tint/builtins/gen/literal/step/334303.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/334303.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn step_334303() { - var res : vec3 = step(vec3(), vec3()); + var res : vec3 = step(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl b/test/tint/builtins/gen/literal/step/e2b337.wgsl index 5b0f2abbef..aae930aec5 100644 --- a/test/tint/builtins/gen/literal/step/e2b337.wgsl +++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl @@ -25,7 +25,7 @@ // fn step(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn step_e2b337() { - var res: vec4 = step(vec4(), vec4()); + var res: vec4 = step(vec4(1.f), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.dxc.hlsl index d681e0958a..e9b4b3a916 100644 --- a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void step_e2b337() { - float4 res = step((0.0f).xxxx, (0.0f).xxxx); + float4 res = step((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.fxc.hlsl index d681e0958a..e9b4b3a916 100644 --- a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void step_e2b337() { - float4 res = step((0.0f).xxxx, (0.0f).xxxx); + float4 res = step((1.0f).xxxx, (1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.glsl b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.glsl index a1528473cf..30481fce20 100644 --- a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void step_e2b337() { - vec4 res = step(vec4(0.0f), vec4(0.0f)); + vec4 res = step(vec4(1.0f), vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void step_e2b337() { - vec4 res = step(vec4(0.0f), vec4(0.0f)); + vec4 res = step(vec4(1.0f), vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void step_e2b337() { - vec4 res = step(vec4(0.0f), vec4(0.0f)); + vec4 res = step(vec4(1.0f), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.msl b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.msl index 9b2aff5a6a..8d56ad45a8 100644 --- a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void step_e2b337() { - float4 res = step(float4(0.0f), float4(0.0f)); + float4 res = step(float4(1.0f), float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.spvasm index d1fcc535bd..debffef444 100644 --- a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %step_e2b337 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Step %5 %5 + %13 = OpExtInst %v4float %14 Step %16 %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %step_e2b337 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %step_e2b337 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %step_e2b337 + %27 = OpLabel + %28 = OpFunctionCall %void %step_e2b337 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %step_e2b337 + %30 = OpLabel + %31 = OpFunctionCall %void %step_e2b337 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.wgsl index bbc67efca9..ca00e44be6 100644 --- a/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/step/e2b337.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn step_e2b337() { - var res : vec4 = step(vec4(), vec4()); + var res : vec4 = step(vec4(1.0f), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl index cd9ae1142f..62e9b34e5e 100644 --- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl +++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl @@ -25,7 +25,7 @@ // fn tan(vec<4, f32>) -> vec<4, f32> fn tan_244e2a() { - var res: vec4 = tan(vec4()); + var res: vec4 = tan(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.dxc.hlsl index 6fecdec967..c3a9ade754 100644 --- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_244e2a() { - float4 res = tan((0.0f).xxxx); + float4 res = tan((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.fxc.hlsl index 6fecdec967..c3a9ade754 100644 --- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tan_244e2a() { - float4 res = tan((0.0f).xxxx); + float4 res = tan((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.glsl index f9e8554bf0..42276a14ab 100644 --- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tan_244e2a() { - vec4 res = tan(vec4(0.0f)); + vec4 res = tan(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void tan_244e2a() { - vec4 res = tan(vec4(0.0f)); + vec4 res = tan(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void tan_244e2a() { - vec4 res = tan(vec4(0.0f)); + vec4 res = tan(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.msl index 3c3ea57b94..e405aaa9df 100644 --- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_244e2a() { - float4 res = tan(float4(0.0f)); + float4 res = tan(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.spvasm index 6c6aa2fb34..13ef83a2d0 100644 --- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %tan_244e2a = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Tan %5 + %13 = OpExtInst %v4float %14 Tan %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %tan_244e2a +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %tan_244e2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %tan_244e2a + %27 = OpLabel + %28 = OpFunctionCall %void %tan_244e2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tan_244e2a + %30 = OpLabel + %31 = OpFunctionCall %void %tan_244e2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.wgsl index b8dae2888b..afbf82d556 100644 --- a/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/244e2a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_244e2a() { - var res : vec4 = tan(vec4()); + var res : vec4 = tan(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/2f030e.wgsl b/test/tint/builtins/gen/literal/tan/2f030e.wgsl index f910b855b6..8e298f8da5 100644 --- a/test/tint/builtins/gen/literal/tan/2f030e.wgsl +++ b/test/tint/builtins/gen/literal/tan/2f030e.wgsl @@ -25,7 +25,7 @@ // fn tan(f32) -> f32 fn tan_2f030e() { - var res: f32 = tan(1.0); + var res: f32 = tan(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.wgsl index cbca43bee1..dddd6dffb8 100644 --- a/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/2f030e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_2f030e() { - var res : f32 = tan(1.0); + var res : f32 = tan(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl b/test/tint/builtins/gen/literal/tan/7ea104.wgsl index 9a6f1ccb18..8ac4999230 100644 --- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl +++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl @@ -25,7 +25,7 @@ // fn tan(vec<3, f32>) -> vec<3, f32> fn tan_7ea104() { - var res: vec3 = tan(vec3()); + var res: vec3 = tan(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.dxc.hlsl index 7c98fa464b..3bfa5d96e4 100644 --- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_7ea104() { - float3 res = tan((0.0f).xxx); + float3 res = tan((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.fxc.hlsl index 7c98fa464b..3bfa5d96e4 100644 --- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tan_7ea104() { - float3 res = tan((0.0f).xxx); + float3 res = tan((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.glsl index 4d74dbe6a7..2efb95c1eb 100644 --- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tan_7ea104() { - vec3 res = tan(vec3(0.0f)); + vec3 res = tan(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void tan_7ea104() { - vec3 res = tan(vec3(0.0f)); + vec3 res = tan(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void tan_7ea104() { - vec3 res = tan(vec3(0.0f)); + vec3 res = tan(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.msl index ab23bca36a..bd468e30e4 100644 --- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_7ea104() { - float3 res = tan(float3(0.0f)); + float3 res = tan(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.spvasm index 591213795f..89ebac125e 100644 --- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %tan_7ea104 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Tan %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Tan %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tan_7ea104 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %tan_7ea104 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tan_7ea104 + %29 = OpLabel + %30 = OpFunctionCall %void %tan_7ea104 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tan_7ea104 + %32 = OpLabel + %33 = OpFunctionCall %void %tan_7ea104 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.wgsl index a4d7e753ab..c0628434eb 100644 --- a/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/7ea104.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_7ea104() { - var res : vec3 = tan(vec3()); + var res : vec3 = tan(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl index 80f7f58fd7..5e9cf9abcb 100644 --- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl +++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl @@ -25,7 +25,7 @@ // fn tan(vec<2, f32>) -> vec<2, f32> fn tan_8ce3e9() { - var res: vec2 = tan(vec2()); + var res: vec2 = tan(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.dxc.hlsl index 5504d49f65..72b2654940 100644 --- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_8ce3e9() { - float2 res = tan((0.0f).xx); + float2 res = tan((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.fxc.hlsl index 5504d49f65..72b2654940 100644 --- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tan_8ce3e9() { - float2 res = tan((0.0f).xx); + float2 res = tan((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.glsl index 538d7e9a4b..801605f315 100644 --- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tan_8ce3e9() { - vec2 res = tan(vec2(0.0f)); + vec2 res = tan(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void tan_8ce3e9() { - vec2 res = tan(vec2(0.0f)); + vec2 res = tan(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void tan_8ce3e9() { - vec2 res = tan(vec2(0.0f)); + vec2 res = tan(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.msl index e95598e606..53ffb9a889 100644 --- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_8ce3e9() { - float2 res = tan(float2(0.0f)); + float2 res = tan(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.spvasm index a649a5373c..8cbcd32f51 100644 --- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %tan_8ce3e9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Tan %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Tan %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tan_8ce3e9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %tan_8ce3e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tan_8ce3e9 + %29 = OpLabel + %30 = OpFunctionCall %void %tan_8ce3e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tan_8ce3e9 + %32 = OpLabel + %33 = OpFunctionCall %void %tan_8ce3e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.wgsl index 879d09bf50..b0d2159c71 100644 --- a/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tan/8ce3e9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_8ce3e9() { - var res : vec2 = tan(vec2()); + var res : vec2 = tan(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl index 3c18367de9..1447db0fdb 100644 --- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl +++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl @@ -25,7 +25,7 @@ // fn tanh(vec<4, f32>) -> vec<4, f32> fn tanh_5663c5() { - var res: vec4 = tanh(vec4()); + var res: vec4 = tanh(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.dxc.hlsl index 635f158c3b..44023e02dc 100644 --- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_5663c5() { - float4 res = tanh((0.0f).xxxx); + float4 res = tanh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.fxc.hlsl index 635f158c3b..44023e02dc 100644 --- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tanh_5663c5() { - float4 res = tanh((0.0f).xxxx); + float4 res = tanh((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.glsl index c2e0df0946..cfff79f682 100644 --- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tanh_5663c5() { - vec4 res = tanh(vec4(0.0f)); + vec4 res = tanh(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void tanh_5663c5() { - vec4 res = tanh(vec4(0.0f)); + vec4 res = tanh(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void tanh_5663c5() { - vec4 res = tanh(vec4(0.0f)); + vec4 res = tanh(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.msl index 706f5bb7a6..3c9c45bed3 100644 --- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_5663c5() { - float4 res = tanh(float4(0.0f)); + float4 res = tanh(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.spvasm index 0c9049a0aa..ccad998b63 100644 --- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %tanh_5663c5 = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Tanh %5 + %13 = OpExtInst %v4float %14 Tanh %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %tanh_5663c5 +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %tanh_5663c5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %tanh_5663c5 + %27 = OpLabel + %28 = OpFunctionCall %void %tanh_5663c5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %tanh_5663c5 + %30 = OpLabel + %31 = OpFunctionCall %void %tanh_5663c5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.wgsl index 006b94b596..aff1207620 100644 --- a/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/5663c5.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_5663c5() { - var res : vec4 = tanh(vec4()); + var res : vec4 = tanh(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl index 1c6f966372..35006aa3af 100644 --- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl +++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl @@ -25,7 +25,7 @@ // fn tanh(vec<2, f32>) -> vec<2, f32> fn tanh_5724b3() { - var res: vec2 = tanh(vec2()); + var res: vec2 = tanh(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.dxc.hlsl index f77defc421..b2cfae5151 100644 --- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_5724b3() { - float2 res = tanh((0.0f).xx); + float2 res = tanh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.fxc.hlsl index f77defc421..b2cfae5151 100644 --- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tanh_5724b3() { - float2 res = tanh((0.0f).xx); + float2 res = tanh((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.glsl index 6ff2733694..1bd2acfc90 100644 --- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tanh_5724b3() { - vec2 res = tanh(vec2(0.0f)); + vec2 res = tanh(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void tanh_5724b3() { - vec2 res = tanh(vec2(0.0f)); + vec2 res = tanh(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void tanh_5724b3() { - vec2 res = tanh(vec2(0.0f)); + vec2 res = tanh(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.msl index 5af0a259b2..d2b6b1b3f6 100644 --- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_5724b3() { - float2 res = tanh(float2(0.0f)); + float2 res = tanh(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.spvasm index ec85587d15..7adc88a301 100644 --- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %tanh_5724b3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Tanh %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Tanh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tanh_5724b3 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %tanh_5724b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tanh_5724b3 + %29 = OpLabel + %30 = OpFunctionCall %void %tanh_5724b3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tanh_5724b3 + %32 = OpLabel + %33 = OpFunctionCall %void %tanh_5724b3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.wgsl index bb8a266fbe..98669652e3 100644 --- a/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/5724b3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_5724b3() { - var res : vec2 = tanh(vec2()); + var res : vec2 = tanh(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl index 824046455e..3033ff8819 100644 --- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl +++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl @@ -25,7 +25,7 @@ // fn tanh(vec<3, f32>) -> vec<3, f32> fn tanh_9f9fb9() { - var res: vec3 = tanh(vec3()); + var res: vec3 = tanh(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.dxc.hlsl index 8b7d7476e8..21cc8d3743 100644 --- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_9f9fb9() { - float3 res = tanh((0.0f).xxx); + float3 res = tanh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.fxc.hlsl index 8b7d7476e8..21cc8d3743 100644 --- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tanh_9f9fb9() { - float3 res = tanh((0.0f).xxx); + float3 res = tanh((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.glsl index cbe8f65469..d065337103 100644 --- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tanh_9f9fb9() { - vec3 res = tanh(vec3(0.0f)); + vec3 res = tanh(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void tanh_9f9fb9() { - vec3 res = tanh(vec3(0.0f)); + vec3 res = tanh(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void tanh_9f9fb9() { - vec3 res = tanh(vec3(0.0f)); + vec3 res = tanh(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.msl index cbae56d8d1..326f3c41aa 100644 --- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_9f9fb9() { - float3 res = tanh(float3(0.0f)); + float3 res = tanh(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.spvasm index 3afa2634fb..63ec832c44 100644 --- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %tanh_9f9fb9 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Tanh %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Tanh %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tanh_9f9fb9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %tanh_9f9fb9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tanh_9f9fb9 + %29 = OpLabel + %30 = OpFunctionCall %void %tanh_9f9fb9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tanh_9f9fb9 + %32 = OpLabel + %33 = OpFunctionCall %void %tanh_9f9fb9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.wgsl index 24738078ce..29041ab524 100644 --- a/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/9f9fb9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_9f9fb9() { - var res : vec3 = tanh(vec3()); + var res : vec3 = tanh(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl b/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl index 32f4fa366d..9ce564f75f 100644 --- a/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl +++ b/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl @@ -25,7 +25,7 @@ // fn tanh(f32) -> f32 fn tanh_c15fdb() { - var res: f32 = tanh(1.0); + var res: f32 = tanh(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.wgsl index f6e9df7390..799e1772fe 100644 --- a/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/tanh/c15fdb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_c15fdb() { - var res : f32 = tanh(1.0); + var res : f32 = tanh(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl index 412c0b22ac..3478bfbb68 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl @@ -27,7 +27,7 @@ // fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> vec4 fn textureGatherCompare_182fd4() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.0); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl index 83881269c5..e1f2612e41 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_182fd4() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.0); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl index a322c95ec7..d903dbd9ce 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl @@ -27,7 +27,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_313add() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0, vec2()); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl index f3e2ed6d9d..ab31a89c24 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_313add() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0, vec2()); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl index 610c16b8bb..895a9ccf59 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl @@ -27,7 +27,7 @@ // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_60d2d1() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1, 1.0); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl index 820c6114b2..bb51bf9975 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_60d2d1() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1, 1.0); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl index 328834c327..87282daff3 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl @@ -27,7 +27,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> vec4 fn textureGatherCompare_6d9352() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl index 790e1a82dd..c6898c2ecc 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_6d9352() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl index 0e2dd62d99..7788e42703 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl @@ -27,7 +27,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_783e65() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl index bcb1a7f324..ac4201677b 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_783e65() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl index 137d813624..0f9fdb8933 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl @@ -27,7 +27,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_f585cc() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl index 44ba827531..a3870ffe5d 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_f585cc() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1, 1.0f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl b/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl index 1820157e14..e9ae063be4 100644 --- a/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl @@ -27,7 +27,7 @@ // fn textureSample(texture: texture_1d, sampler: sampler, coords: f32) -> vec4 fn textureSample_6e64fb() { - var res: vec4 = textureSample(arg_0, arg_1, 1.0); + var res: vec4 = textureSample(arg_0, arg_1, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.wgsl index b99b3031e6..9109eb4aad 100644 --- a/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/6e64fb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_6e64fb() { - var res : vec4 = textureSample(arg_0, arg_1, 1.0); + var res : vec4 = textureSample(arg_0, arg_1, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl index 2dd96ffa47..5528079c39 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_cube, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_53b9f7() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl index 4e65527d6d..d4680e6c98 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_53b9f7() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl index cf1c80cd7d..47a6e62a67 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32, @const offset: vec3) -> vec4 fn textureSampleBias_594824() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0, vec3()); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.f, vec3()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl index 9a41e5dbfc..3fe9740768 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_594824() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0, vec3()); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0f, vec3()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl index 007e578e4d..a747a148f2 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32) -> vec4 fn textureSampleBias_6a9113() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl index 7633115f5a..f864438f46 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_6a9113() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl index fd264c8b82..e530d92774 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_80e579() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl index d97ed3308d..8616fdc083 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_80e579() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl index 37869ce7b0..5341cbfdfb 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_9dbb51() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl index 7c1192266d..0315b849fd 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_9dbb51() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1, 1.0f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl index d1fa2e4ea9..27c44fd735 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_a161cf() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0, vec2()); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl index 0454162c54..a9dd4dd2a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_a161cf() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0, vec2()); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl index 2aa132aa9c..2ddc024c30 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_d3fa1b() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl index c29f89ce8d..88a08857cd 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_d3fa1b() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl index 6a9b3562bc..418f219e06 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl @@ -27,7 +27,7 @@ // fn textureSampleBias(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_eed7c4() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1, 1.0); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl index 2ec462647e..879359ce2d 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_eed7c4() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1, 1.0); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl index d71177cab1..d17235c782 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompare_3a5923() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl index d323888dc9..58dbd58481 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_3a5923() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl index 6c469b9b25..491a50e1bf 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompare_63fb83() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.0); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl index d70d066e78..0012b5fa4c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_63fb83() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.0); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl index 6c5555ba9d..cf9100d3a2 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_a3ca7e() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1, 1.0); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl index 33ea04e81f..a8ddb882a6 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_a3ca7e() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1, 1.0); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl index 122c74d6b4..3b439db7cd 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_af1051() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl index fe4d2ba7f8..b9f6fdea05 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_af1051() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl index 4ea72b9111..d3f622fd83 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_dd431d() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl index 2aa2a1a98e..9737d12dd9 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_dd431d() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl index c5625e9257..49c1c6f72d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_dec064() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0, vec2()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl index ded6000a85..35620f4914 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_dec064() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0, vec2()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0f, vec2()); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl index 602997dd17..511256f68a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1116ed() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl index 788644a28e..f41a8ab195 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1116ed() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl index ce8b2b85cc..866268d153 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1568e3() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.0); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl index 801af47d65..f7d7d34d7d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1568e3() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.0); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl index faac094c4f..60e904bd28 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompareLevel_2ad2b1() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl index 0a6e58334f..4eafbe218f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_2ad2b1() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl index 6f9c29ea51..5a721e12df 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_4cf3a2() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1, 1.0); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl index 278793acfd..04a1d79e81 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_4cf3a2() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1, 1.0); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl index 346810cb18..f95b96d708 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_7f2b9a() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0, vec2()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl index 7239fc17e3..360df23c2d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_7f2b9a() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0, vec2()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl index 5eb2d54325..9e0dc2510f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl @@ -27,7 +27,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_b6e47c() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl index 3a8365a1f8..250717e572 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_b6e47c() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1, 1.0f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl index 06b1e5c0e6..ccf6432ea7 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_0b0a1b() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl index 4d318da8aa..6ae1c9ed36 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_0b0a1b() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0, vec2()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl index 20fa8069a3..3be362a7fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_0bdd9a() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 1.0); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl index a9feb7c217..8cf28599d8 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_0bdd9a() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 1.0); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl index c1492eb73b..23c998a397 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_302be4() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl index ee37a819ba..d77eb70230 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_302be4() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl index 761da2a32c..a5e8620af0 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_abfcc0() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl index 1ff8adb5cc..b7ef5ae6d7 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_abfcc0() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl index 9f57d7397d..44425dd438 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_b7c55c() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl index 2590995a40..62ef601942 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_b7c55c() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0, vec2()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1, 1.0f, vec2()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl index 4ac7413708..f0f3116f54 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_cube, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_c32df7() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl index b263c664ef..3aaea11c55 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c32df7() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl index 3b5ea68aaa..3b48787d58 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32) -> vec4 fn textureSampleLevel_c6aca6() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl index 455f4d6288..535b735b8f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c6aca6() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl index 5a20c5aade..89ab82bfbf 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl @@ -27,7 +27,7 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32, @const offset: vec3) -> vec4 fn textureSampleLevel_dcbecb() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0, vec3()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.f, vec3()); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl index 74dca43960..bdcaff8d2d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_dcbecb() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0, vec3()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0f, vec3()); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl index c8f4f211de..cf292ecc0f 100644 --- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl +++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<4, 3, f32>) -> mat<3, 4, f32> fn transpose_2585cd() { - var res: mat3x4 = transpose(mat4x3()); + var res: mat3x4 = transpose(mat4x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.dxc.hlsl index 3ffeca1214..3c766c61eb 100644 --- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_2585cd() { - float3x4 res = transpose(float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx)); + float3x4 res = transpose(float4x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.fxc.hlsl index 3ffeca1214..3c766c61eb 100644 --- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_2585cd() { - float3x4 res = transpose(float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx)); + float3x4 res = transpose(float4x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.glsl index 399e5995b8..f44eac23da 100644 --- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_2585cd() { - mat3x4 res = transpose(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))); + mat3x4 res = transpose(mat4x3(vec3(1.0f), vec3(1.0f), vec3(1.0f), vec3(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_2585cd() { - mat3x4 res = transpose(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))); + mat3x4 res = transpose(mat4x3(vec3(1.0f), vec3(1.0f), vec3(1.0f), vec3(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_2585cd() { - mat3x4 res = transpose(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))); + mat3x4 res = transpose(mat4x3(vec3(1.0f), vec3(1.0f), vec3(1.0f), vec3(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.msl index 80f1d9a4ba..eb93f4986e 100644 --- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_2585cd() { - float3x4 res = transpose(float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f))); + float3x4 res = transpose(float4x3(float3(1.0f), float3(1.0f), float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.spvasm index b91c1a9ba6..09bb202d43 100644 --- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,37 +33,38 @@ %mat3v4float = OpTypeMatrix %v4float 3 %v3float = OpTypeVector %float 3 %mat4v3float = OpTypeMatrix %v3float 4 - %17 = OpConstantNull %mat4v3float -%_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float - %20 = OpConstantNull %mat3v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %19 = OpConstantComposite %mat4v3float %18 %18 %18 %18 +%_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float + %22 = OpConstantNull %mat3v4float + %23 = OpTypeFunction %v4float %transpose_2585cd = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat3v4float Function %20 - %13 = OpTranspose %mat3v4float %17 + %res = OpVariable %_ptr_Function_mat3v4float Function %22 + %13 = OpTranspose %mat3v4float %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %transpose_2585cd +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_2585cd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %transpose_2585cd + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_2585cd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_2585cd + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_2585cd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.wgsl index 56ecea9a6b..ca39b02ef7 100644 --- a/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/2585cd.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_2585cd() { - var res : mat3x4 = transpose(mat4x3()); + var res : mat3x4 = transpose(mat4x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl b/test/tint/builtins/gen/literal/transpose/31d679.wgsl index 5e9a241dd3..2775c59f5d 100644 --- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl +++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<2, 2, f32>) -> mat<2, 2, f32> fn transpose_31d679() { - var res: mat2x2 = transpose(mat2x2()); + var res: mat2x2 = transpose(mat2x2(1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.dxc.hlsl index d3ac41887b..8e9cca2d81 100644 --- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_31d679() { - float2x2 res = transpose(float2x2((0.0f).xx, (0.0f).xx)); + float2x2 res = transpose(float2x2((1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.fxc.hlsl index d3ac41887b..8e9cca2d81 100644 --- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_31d679() { - float2x2 res = transpose(float2x2((0.0f).xx, (0.0f).xx)); + float2x2 res = transpose(float2x2((1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.glsl index 72f7f8330b..efcfb50a45 100644 --- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_31d679() { - mat2 res = transpose(mat2(vec2(0.0f), vec2(0.0f))); + mat2 res = transpose(mat2(vec2(1.0f), vec2(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_31d679() { - mat2 res = transpose(mat2(vec2(0.0f), vec2(0.0f))); + mat2 res = transpose(mat2(vec2(1.0f), vec2(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_31d679() { - mat2 res = transpose(mat2(vec2(0.0f), vec2(0.0f))); + mat2 res = transpose(mat2(vec2(1.0f), vec2(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.msl index 0460811d83..d1894004cc 100644 --- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_31d679() { - float2x2 res = transpose(float2x2(float2(0.0f), float2(0.0f))); + float2x2 res = transpose(float2x2(float2(1.0f), float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.spvasm index c6e3c94eac..71a0a6859c 100644 --- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 - %16 = OpConstantNull %mat2v2float -%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 + %18 = OpConstantComposite %mat2v2float %17 %17 +%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float + %21 = OpConstantNull %mat2v2float + %22 = OpTypeFunction %v4float %transpose_31d679 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat2v2float Function %16 - %13 = OpTranspose %mat2v2float %16 + %res = OpVariable %_ptr_Function_mat2v2float Function %21 + %13 = OpTranspose %mat2v2float %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %transpose_31d679 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %transpose_31d679 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_31d679 + %30 = OpLabel + %31 = OpFunctionCall %void %transpose_31d679 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %transpose_31d679 + %33 = OpLabel + %34 = OpFunctionCall %void %transpose_31d679 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.wgsl index 20089bdf37..32267a1597 100644 --- a/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/31d679.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_31d679() { - var res : mat2x2 = transpose(mat2x2()); + var res : mat2x2 = transpose(mat2x2(1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl index 354e1ace8b..156cf53baf 100644 --- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl +++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<4, 2, f32>) -> mat<2, 4, f32> fn transpose_31e37e() { - var res: mat2x4 = transpose(mat4x2()); + var res: mat2x4 = transpose(mat4x2(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.dxc.hlsl index c16825105b..f6023f7e0c 100644 --- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_31e37e() { - float2x4 res = transpose(float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx)); + float2x4 res = transpose(float4x2((1.0f).xx, (1.0f).xx, (1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.fxc.hlsl index c16825105b..f6023f7e0c 100644 --- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_31e37e() { - float2x4 res = transpose(float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx)); + float2x4 res = transpose(float4x2((1.0f).xx, (1.0f).xx, (1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.glsl index 475b3e2bd5..b6aa71bda9 100644 --- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_31e37e() { - mat2x4 res = transpose(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))); + mat2x4 res = transpose(mat4x2(vec2(1.0f), vec2(1.0f), vec2(1.0f), vec2(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_31e37e() { - mat2x4 res = transpose(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))); + mat2x4 res = transpose(mat4x2(vec2(1.0f), vec2(1.0f), vec2(1.0f), vec2(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_31e37e() { - mat2x4 res = transpose(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))); + mat2x4 res = transpose(mat4x2(vec2(1.0f), vec2(1.0f), vec2(1.0f), vec2(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.msl index 0d19966102..b724f69dc8 100644 --- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_31e37e() { - float2x4 res = transpose(float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f))); + float2x4 res = transpose(float4x2(float2(1.0f), float2(1.0f), float2(1.0f), float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.spvasm index 3b97b35392..95213d8fdb 100644 --- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,37 +33,38 @@ %mat2v4float = OpTypeMatrix %v4float 2 %v2float = OpTypeVector %float 2 %mat4v2float = OpTypeMatrix %v2float 4 - %17 = OpConstantNull %mat4v2float -%_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float - %20 = OpConstantNull %mat2v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 + %19 = OpConstantComposite %mat4v2float %18 %18 %18 %18 +%_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float + %22 = OpConstantNull %mat2v4float + %23 = OpTypeFunction %v4float %transpose_31e37e = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat2v4float Function %20 - %13 = OpTranspose %mat2v4float %17 + %res = OpVariable %_ptr_Function_mat2v4float Function %22 + %13 = OpTranspose %mat2v4float %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %transpose_31e37e +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_31e37e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %transpose_31e37e + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_31e37e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_31e37e + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_31e37e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.wgsl index b363af9180..31e0e1c938 100644 --- a/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/31e37e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_31e37e() { - var res : mat2x4 = transpose(mat4x2()); + var res : mat2x4 = transpose(mat4x2(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl index 0ce9023534..aa5e3bc0a4 100644 --- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl +++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<2, 4, f32>) -> mat<4, 2, f32> fn transpose_4ce359() { - var res: mat4x2 = transpose(mat2x4()); + var res: mat4x2 = transpose(mat2x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.dxc.hlsl index 46342a92b7..b941117476 100644 --- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_4ce359() { - float4x2 res = transpose(float2x4((0.0f).xxxx, (0.0f).xxxx)); + float4x2 res = transpose(float2x4((1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.fxc.hlsl index 46342a92b7..b941117476 100644 --- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_4ce359() { - float4x2 res = transpose(float2x4((0.0f).xxxx, (0.0f).xxxx)); + float4x2 res = transpose(float2x4((1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.glsl index 573b373b7a..03e01ec785 100644 --- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_4ce359() { - mat4x2 res = transpose(mat2x4(vec4(0.0f), vec4(0.0f))); + mat4x2 res = transpose(mat2x4(vec4(1.0f), vec4(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_4ce359() { - mat4x2 res = transpose(mat2x4(vec4(0.0f), vec4(0.0f))); + mat4x2 res = transpose(mat2x4(vec4(1.0f), vec4(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_4ce359() { - mat4x2 res = transpose(mat2x4(vec4(0.0f), vec4(0.0f))); + mat4x2 res = transpose(mat2x4(vec4(1.0f), vec4(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.msl index 8dc8a5fad8..42cafcae57 100644 --- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_4ce359() { - float4x2 res = transpose(float2x4(float4(0.0f), float4(0.0f))); + float4x2 res = transpose(float2x4(float4(1.0f), float4(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.spvasm index 432493923b..e36521cf9d 100644 --- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,37 +33,38 @@ %v2float = OpTypeVector %float 2 %mat4v2float = OpTypeMatrix %v2float 4 %mat2v4float = OpTypeMatrix %v4float 2 - %17 = OpConstantNull %mat2v4float -%_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float - %20 = OpConstantNull %mat4v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %19 = OpConstantComposite %mat2v4float %18 %18 +%_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float + %22 = OpConstantNull %mat4v2float + %23 = OpTypeFunction %v4float %transpose_4ce359 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat4v2float Function %20 - %13 = OpTranspose %mat4v2float %17 + %res = OpVariable %_ptr_Function_mat4v2float Function %22 + %13 = OpTranspose %mat4v2float %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %transpose_4ce359 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_4ce359 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %transpose_4ce359 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_4ce359 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_4ce359 + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_4ce359 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.wgsl index 9a3d630715..47e4a28f88 100644 --- a/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/4ce359.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_4ce359() { - var res : mat4x2 = transpose(mat2x4()); + var res : mat4x2 = transpose(mat2x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl index 9cf6f13b54..d1bb18f094 100644 --- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl +++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<2, 3, f32>) -> mat<3, 2, f32> fn transpose_4dc9a1() { - var res: mat3x2 = transpose(mat2x3()); + var res: mat3x2 = transpose(mat2x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.dxc.hlsl index f84245615d..401f940565 100644 --- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_4dc9a1() { - float3x2 res = transpose(float2x3((0.0f).xxx, (0.0f).xxx)); + float3x2 res = transpose(float2x3((1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.fxc.hlsl index f84245615d..401f940565 100644 --- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_4dc9a1() { - float3x2 res = transpose(float2x3((0.0f).xxx, (0.0f).xxx)); + float3x2 res = transpose(float2x3((1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.glsl index c8b7bed1e8..e9e8cdf78e 100644 --- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_4dc9a1() { - mat3x2 res = transpose(mat2x3(vec3(0.0f), vec3(0.0f))); + mat3x2 res = transpose(mat2x3(vec3(1.0f), vec3(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_4dc9a1() { - mat3x2 res = transpose(mat2x3(vec3(0.0f), vec3(0.0f))); + mat3x2 res = transpose(mat2x3(vec3(1.0f), vec3(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_4dc9a1() { - mat3x2 res = transpose(mat2x3(vec3(0.0f), vec3(0.0f))); + mat3x2 res = transpose(mat2x3(vec3(1.0f), vec3(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.msl index e1829c85bf..33321236cb 100644 --- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_4dc9a1() { - float3x2 res = transpose(float2x3(float3(0.0f), float3(0.0f))); + float3x2 res = transpose(float2x3(float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.spvasm index a67bcffde7..ed047642c2 100644 --- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,38 @@ %mat3v2float = OpTypeMatrix %v2float 3 %v3float = OpTypeVector %float 3 %mat2v3float = OpTypeMatrix %v3float 2 - %18 = OpConstantNull %mat2v3float -%_ptr_Function_mat3v2float = OpTypePointer Function %mat3v2float - %21 = OpConstantNull %mat3v2float - %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %20 = OpConstantComposite %mat2v3float %19 %19 +%_ptr_Function_mat3v2float = OpTypePointer Function %mat3v2float + %23 = OpConstantNull %mat3v2float + %24 = OpTypeFunction %v4float %transpose_4dc9a1 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat3v2float Function %21 - %13 = OpTranspose %mat3v2float %18 + %res = OpVariable %_ptr_Function_mat3v2float Function %23 + %13 = OpTranspose %mat3v2float %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %transpose_4dc9a1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %transpose_4dc9a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %transpose_4dc9a1 + %32 = OpLabel + %33 = OpFunctionCall %void %transpose_4dc9a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %transpose_4dc9a1 + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_4dc9a1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.wgsl index 7d1b36f767..5db00a50fc 100644 --- a/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/4dc9a1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_4dc9a1() { - var res : mat3x2 = transpose(mat2x3()); + var res : mat3x2 = transpose(mat2x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl b/test/tint/builtins/gen/literal/transpose/854336.wgsl index d552afae0b..8c425db231 100644 --- a/test/tint/builtins/gen/literal/transpose/854336.wgsl +++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<3, 3, f32>) -> mat<3, 3, f32> fn transpose_854336() { - var res: mat3x3 = transpose(mat3x3()); + var res: mat3x3 = transpose(mat3x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.dxc.hlsl index 3ad467dc03..f625b2e624 100644 --- a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_854336() { - float3x3 res = transpose(float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx)); + float3x3 res = transpose(float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.fxc.hlsl index 3ad467dc03..f625b2e624 100644 --- a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_854336() { - float3x3 res = transpose(float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx)); + float3x3 res = transpose(float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.glsl index 92a05ebd4c..3673f90ba0 100644 --- a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_854336() { - mat3 res = transpose(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))); + mat3 res = transpose(mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_854336() { - mat3 res = transpose(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))); + mat3 res = transpose(mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_854336() { - mat3 res = transpose(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))); + mat3 res = transpose(mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.msl index 1b157b3ad8..2f76c107b6 100644 --- a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_854336() { - float3x3 res = transpose(float3x3(float3(0.0f), float3(0.0f), float3(0.0f))); + float3x3 res = transpose(float3x3(float3(1.0f), float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.spvasm index 21308c0ecb..557e008585 100644 --- a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,36 +32,38 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 - %16 = OpConstantNull %mat3v3float -%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %18 = OpConstantComposite %mat3v3float %17 %17 %17 +%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float + %21 = OpConstantNull %mat3v3float + %22 = OpTypeFunction %v4float %transpose_854336 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat3v3float Function %16 - %13 = OpTranspose %mat3v3float %16 + %res = OpVariable %_ptr_Function_mat3v3float Function %21 + %13 = OpTranspose %mat3v3float %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %transpose_854336 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %transpose_854336 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %transpose_854336 + %30 = OpLabel + %31 = OpFunctionCall %void %transpose_854336 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %transpose_854336 + %33 = OpLabel + %34 = OpFunctionCall %void %transpose_854336 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.wgsl index e5c13cd63c..f5aaa29c13 100644 --- a/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/854336.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_854336() { - var res : mat3x3 = transpose(mat3x3()); + var res : mat3x3 = transpose(mat3x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl index 3179333f59..d4e7b53c3d 100644 --- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl +++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<4, 4, f32>) -> mat<4, 4, f32> fn transpose_c1b600() { - var res: mat4x4 = transpose(mat4x4()); + var res: mat4x4 = transpose(mat4x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.dxc.hlsl index 512431f633..7d9120122f 100644 --- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_c1b600() { - float4x4 res = transpose(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)); + float4x4 res = transpose(float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.fxc.hlsl index 512431f633..7d9120122f 100644 --- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_c1b600() { - float4x4 res = transpose(float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)); + float4x4 res = transpose(float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.glsl index 28ee7da505..3b7dd439ed 100644 --- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_c1b600() { - mat4 res = transpose(mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); + mat4 res = transpose(mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_c1b600() { - mat4 res = transpose(mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); + mat4 res = transpose(mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_c1b600() { - mat4 res = transpose(mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); + mat4 res = transpose(mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.msl index 86ea249e54..b759ef4c0e 100644 --- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_c1b600() { - float4x4 res = transpose(float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f))); + float4x4 res = transpose(float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.spvasm index cb8a50408f..966363c11d 100644 --- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -31,36 +31,38 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %mat4v4float = OpTypeMatrix %v4float 4 - %15 = OpConstantNull %mat4v4float -%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float - %18 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %17 = OpConstantComposite %mat4v4float %16 %16 %16 %16 +%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float + %20 = OpConstantNull %mat4v4float + %21 = OpTypeFunction %v4float %transpose_c1b600 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat4v4float Function %15 - %13 = OpTranspose %mat4v4float %15 + %res = OpVariable %_ptr_Function_mat4v4float Function %20 + %13 = OpTranspose %mat4v4float %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %18 - %20 = OpLabel - %21 = OpFunctionCall %void %transpose_c1b600 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %transpose_c1b600 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %23 = OpLabel - %24 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %24 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %void %transpose_c1b600 + %29 = OpLabel + %30 = OpFunctionCall %void %transpose_c1b600 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %transpose_c1b600 + %32 = OpLabel + %33 = OpFunctionCall %void %transpose_c1b600 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.wgsl index a360f2a8d7..bf9bbeaff4 100644 --- a/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/c1b600.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_c1b600() { - var res : mat4x4 = transpose(mat4x4()); + var res : mat4x4 = transpose(mat4x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl index 31884e2339..73ee2d493f 100644 --- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl +++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<3, 4, f32>) -> mat<4, 3, f32> fn transpose_d8f8ba() { - var res: mat4x3 = transpose(mat3x4()); + var res: mat4x3 = transpose(mat3x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.dxc.hlsl index bf794d873e..0a03a8d9d4 100644 --- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_d8f8ba() { - float4x3 res = transpose(float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)); + float4x3 res = transpose(float3x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.fxc.hlsl index bf794d873e..0a03a8d9d4 100644 --- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_d8f8ba() { - float4x3 res = transpose(float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx)); + float4x3 res = transpose(float3x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.glsl index 185aebd493..46f6c33785 100644 --- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_d8f8ba() { - mat4x3 res = transpose(mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f))); + mat4x3 res = transpose(mat3x4(vec4(1.0f), vec4(1.0f), vec4(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_d8f8ba() { - mat4x3 res = transpose(mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f))); + mat4x3 res = transpose(mat3x4(vec4(1.0f), vec4(1.0f), vec4(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_d8f8ba() { - mat4x3 res = transpose(mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f))); + mat4x3 res = transpose(mat3x4(vec4(1.0f), vec4(1.0f), vec4(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.msl index 560f43efc5..4250fcf0e6 100644 --- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_d8f8ba() { - float4x3 res = transpose(float3x4(float4(0.0f), float4(0.0f), float4(0.0f))); + float4x3 res = transpose(float3x4(float4(1.0f), float4(1.0f), float4(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.spvasm index e28c4ff9f0..cc5b2cb642 100644 --- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,37 +33,38 @@ %v3float = OpTypeVector %float 3 %mat4v3float = OpTypeMatrix %v3float 4 %mat3v4float = OpTypeMatrix %v4float 3 - %17 = OpConstantNull %mat3v4float -%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float - %20 = OpConstantNull %mat4v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %19 = OpConstantComposite %mat3v4float %18 %18 %18 +%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float + %22 = OpConstantNull %mat4v3float + %23 = OpTypeFunction %v4float %transpose_d8f8ba = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat4v3float Function %20 - %13 = OpTranspose %mat4v3float %17 + %res = OpVariable %_ptr_Function_mat4v3float Function %22 + %13 = OpTranspose %mat4v3float %19 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %transpose_d8f8ba +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_d8f8ba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %transpose_d8f8ba + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_d8f8ba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_d8f8ba + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_d8f8ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.wgsl index 89b49c4ffe..c08b152caa 100644 --- a/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/d8f8ba.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_d8f8ba() { - var res : mat4x3 = transpose(mat3x4()); + var res : mat4x3 = transpose(mat3x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl index e7263997fd..7fb05f5fac 100644 --- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl +++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<3, 2, f32>) -> mat<2, 3, f32> fn transpose_ed4bdc() { - var res: mat2x3 = transpose(mat3x2()); + var res: mat2x3 = transpose(mat3x2(1.f, 1.f, 1.f, 1.f, 1.f, 1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.dxc.hlsl index 2455e31043..042c3b7691 100644 --- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_ed4bdc() { - float2x3 res = transpose(float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx)); + float2x3 res = transpose(float3x2((1.0f).xx, (1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.fxc.hlsl index 2455e31043..042c3b7691 100644 --- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_ed4bdc() { - float2x3 res = transpose(float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx)); + float2x3 res = transpose(float3x2((1.0f).xx, (1.0f).xx, (1.0f).xx)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.glsl index b1c3ea3a92..79cd1c3dc5 100644 --- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_ed4bdc() { - mat2x3 res = transpose(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))); + mat2x3 res = transpose(mat3x2(vec2(1.0f), vec2(1.0f), vec2(1.0f))); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void transpose_ed4bdc() { - mat2x3 res = transpose(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))); + mat2x3 res = transpose(mat3x2(vec2(1.0f), vec2(1.0f), vec2(1.0f))); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void transpose_ed4bdc() { - mat2x3 res = transpose(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))); + mat2x3 res = transpose(mat3x2(vec2(1.0f), vec2(1.0f), vec2(1.0f))); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.msl index f7d1ff3dde..3f1013ddc9 100644 --- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_ed4bdc() { - float2x3 res = transpose(float3x2(float2(0.0f), float2(0.0f), float2(0.0f))); + float2x3 res = transpose(float3x2(float2(1.0f), float2(1.0f), float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.spvasm index d413d04ea0..1812c0cb04 100644 --- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,37 +34,38 @@ %mat2v3float = OpTypeMatrix %v3float 2 %v2float = OpTypeVector %float 2 %mat3v2float = OpTypeMatrix %v2float 3 - %18 = OpConstantNull %mat3v2float -%_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float - %21 = OpConstantNull %mat2v3float - %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v2float %float_1 %float_1 + %20 = OpConstantComposite %mat3v2float %19 %19 %19 +%_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float + %23 = OpConstantNull %mat2v3float + %24 = OpTypeFunction %v4float %transpose_ed4bdc = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_mat2v3float Function %21 - %13 = OpTranspose %mat2v3float %18 + %res = OpVariable %_ptr_Function_mat2v3float Function %23 + %13 = OpTranspose %mat2v3float %20 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %transpose_ed4bdc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %transpose_ed4bdc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %transpose_ed4bdc + %32 = OpLabel + %33 = OpFunctionCall %void %transpose_ed4bdc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %transpose_ed4bdc + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_ed4bdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.wgsl index e1ce0ce398..f8d73e8798 100644 --- a/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/transpose/ed4bdc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_ed4bdc() { - var res : mat2x3 = transpose(mat3x2()); + var res : mat2x3 = transpose(mat3x2(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl b/test/tint/builtins/gen/literal/trunc/562d05.wgsl index e90c537cab..97b48132ab 100644 --- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl +++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl @@ -25,7 +25,7 @@ // fn trunc(vec<3, f32>) -> vec<3, f32> fn trunc_562d05() { - var res: vec3 = trunc(vec3()); + var res: vec3 = trunc(vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.dxc.hlsl index 47d7549c55..070bd71358 100644 --- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_562d05() { - float3 res = trunc((0.0f).xxx); + float3 res = trunc((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.fxc.hlsl index 47d7549c55..070bd71358 100644 --- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void trunc_562d05() { - float3 res = trunc((0.0f).xxx); + float3 res = trunc((1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.glsl index 64f9e12b7d..ef1026e378 100644 --- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void trunc_562d05() { - vec3 res = trunc(vec3(0.0f)); + vec3 res = trunc(vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void trunc_562d05() { - vec3 res = trunc(vec3(0.0f)); + vec3 res = trunc(vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void trunc_562d05() { - vec3 res = trunc(vec3(0.0f)); + vec3 res = trunc(vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.msl index 175e9c19f3..28d2dbccb7 100644 --- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_562d05() { - float3 res = trunc(float3(0.0f)); + float3 res = trunc(float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.spvasm index afd4688cfd..33af82417f 100644 --- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %trunc_562d05 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Trunc %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Trunc %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %trunc_562d05 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %trunc_562d05 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %trunc_562d05 + %29 = OpLabel + %30 = OpFunctionCall %void %trunc_562d05 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %trunc_562d05 + %32 = OpLabel + %33 = OpFunctionCall %void %trunc_562d05 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.wgsl index 590a63dbe0..c6d3bb0ad3 100644 --- a/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/562d05.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_562d05() { - var res : vec3 = trunc(vec3()); + var res : vec3 = trunc(vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl index 20cfe8a96c..cb122e56a4 100644 --- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl +++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl @@ -25,7 +25,7 @@ // fn trunc(vec<4, f32>) -> vec<4, f32> fn trunc_e183aa() { - var res: vec4 = trunc(vec4()); + var res: vec4 = trunc(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.dxc.hlsl index a133b49e63..a60a1323f1 100644 --- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_e183aa() { - float4 res = trunc((0.0f).xxxx); + float4 res = trunc((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.fxc.hlsl index a133b49e63..a60a1323f1 100644 --- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void trunc_e183aa() { - float4 res = trunc((0.0f).xxxx); + float4 res = trunc((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.glsl index b35e05562f..fe0ba3bed7 100644 --- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void trunc_e183aa() { - vec4 res = trunc(vec4(0.0f)); + vec4 res = trunc(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void trunc_e183aa() { - vec4 res = trunc(vec4(0.0f)); + vec4 res = trunc(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void trunc_e183aa() { - vec4 res = trunc(vec4(0.0f)); + vec4 res = trunc(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.msl index b2791de01e..960dffdb99 100644 --- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_e183aa() { - float4 res = trunc(float4(0.0f)); + float4 res = trunc(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.spvasm index c43501487e..715c2a5863 100644 --- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader %14 = OpExtInstImport "GLSL.std.450" @@ -31,35 +31,36 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %17 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %19 = OpTypeFunction %v4float %trunc_e183aa = OpFunction %void None %9 %12 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 - %13 = OpExtInst %v4float %14 Trunc %5 + %13 = OpExtInst %v4float %14 Trunc %16 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %17 - %19 = OpLabel - %20 = OpFunctionCall %void %trunc_e183aa +%vertex_main_inner = OpFunction %v4float None %19 + %21 = OpLabel + %22 = OpFunctionCall %void %trunc_e183aa OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %22 = OpLabel - %23 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %23 + %24 = OpLabel + %25 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %25 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %void %trunc_e183aa + %27 = OpLabel + %28 = OpFunctionCall %void %trunc_e183aa OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %trunc_e183aa + %30 = OpLabel + %31 = OpFunctionCall %void %trunc_e183aa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.wgsl index ed1ba37d8e..00a29916f9 100644 --- a/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/e183aa.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_e183aa() { - var res : vec4 = trunc(vec4()); + var res : vec4 = trunc(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/eb83df.wgsl b/test/tint/builtins/gen/literal/trunc/eb83df.wgsl index fba8f0d5ff..38fc65b367 100644 --- a/test/tint/builtins/gen/literal/trunc/eb83df.wgsl +++ b/test/tint/builtins/gen/literal/trunc/eb83df.wgsl @@ -25,7 +25,7 @@ // fn trunc(f32) -> f32 fn trunc_eb83df() { - var res: f32 = trunc(1.0); + var res: f32 = trunc(1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.wgsl index edede677f3..b1207fb551 100644 --- a/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/eb83df.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_eb83df() { - var res : f32 = trunc(1.0); + var res : f32 = trunc(1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl index 89cd3fcda0..d11bd90837 100644 --- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl +++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl @@ -25,7 +25,7 @@ // fn trunc(vec<2, f32>) -> vec<2, f32> fn trunc_f370d3() { - var res: vec2 = trunc(vec2()); + var res: vec2 = trunc(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.dxc.hlsl index 6aadd19175..8e7b9d733b 100644 --- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_f370d3() { - float2 res = trunc((0.0f).xx); + float2 res = trunc((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.fxc.hlsl index 6aadd19175..8e7b9d733b 100644 --- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void trunc_f370d3() { - float2 res = trunc((0.0f).xx); + float2 res = trunc((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.glsl index c037559f87..ff8b53fc62 100644 --- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void trunc_f370d3() { - vec2 res = trunc(vec2(0.0f)); + vec2 res = trunc(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void trunc_f370d3() { - vec2 res = trunc(vec2(0.0f)); + vec2 res = trunc(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void trunc_f370d3() { - vec2 res = trunc(vec2(0.0f)); + vec2 res = trunc(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.msl index a79f8f2f8e..ae71a0aaf3 100644 --- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_f370d3() { - float2 res = trunc(float2(0.0f)); + float2 res = trunc(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.spvasm index f02cd4c079..07e4e38729 100644 --- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %16 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %20 = OpConstantNull %v2float + %21 = OpTypeFunction %v4float %trunc_f370d3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v2float Function %16 - %13 = OpExtInst %v2float %15 Trunc %16 + %res = OpVariable %_ptr_Function_v2float Function %20 + %13 = OpExtInst %v2float %15 Trunc %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %trunc_f370d3 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %trunc_f370d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %trunc_f370d3 + %29 = OpLabel + %30 = OpFunctionCall %void %trunc_f370d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %trunc_f370d3 + %32 = OpLabel + %33 = OpFunctionCall %void %trunc_f370d3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.wgsl index 9cd166affc..75b84d8e41 100644 --- a/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/trunc/f370d3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_f370d3() { - var res : vec2 = trunc(vec2()); + var res : vec2 = trunc(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl b/test/tint/builtins/gen/var/abs/002533.wgsl index 2c4ce2338f..3277c3e87d 100644 --- a/test/tint/builtins/gen/var/abs/002533.wgsl +++ b/test/tint/builtins/gen/var/abs/002533.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<4, f32>) -> vec<4, f32> fn abs_002533() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.dxc.hlsl index 42104ccb56..6b6f00c7e9 100644 --- a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_002533() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.fxc.hlsl index 42104ccb56..6b6f00c7e9 100644 --- a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_002533() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.glsl index cf3797759f..b2b0c1e34b 100644 --- a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_002533() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = abs(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_002533() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = abs(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_002533() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.msl index ffe76fb042..ecdc7ee604 100644 --- a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_002533() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.spvasm index e420cb9706..db4456dfc5 100644 --- a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %abs_002533 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 FAbs %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 FAbs %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %abs_002533 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %abs_002533 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %abs_002533 + %29 = OpLabel + %30 = OpFunctionCall %void %abs_002533 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_002533 + %32 = OpLabel + %33 = OpFunctionCall %void %abs_002533 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.wgsl index 53257d273e..267fb80a07 100644 --- a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_002533() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl b/test/tint/builtins/gen/var/abs/005174.wgsl index ad4d4ebb94..a212e11432 100644 --- a/test/tint/builtins/gen/var/abs/005174.wgsl +++ b/test/tint/builtins/gen/var/abs/005174.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<3, f32>) -> vec<3, f32> fn abs_005174() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.dxc.hlsl index 679d38c223..812400353c 100644 --- a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_005174() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.fxc.hlsl index 679d38c223..812400353c 100644 --- a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_005174() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.glsl index bc996cc85b..eafcd88375 100644 --- a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_005174() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = abs(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_005174() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = abs(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_005174() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.msl index db44af8804..c87ee076d4 100644 --- a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_005174() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.spvasm index 8e0efabd57..62a78524f3 100644 --- a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %abs_005174 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 FAbs %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 FAbs %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %abs_005174 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %abs_005174 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_005174 + %31 = OpLabel + %32 = OpFunctionCall %void %abs_005174 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %abs_005174 + %34 = OpLabel + %35 = OpFunctionCall %void %abs_005174 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.wgsl index 4df9a6035f..2ac6dff7ba 100644 --- a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_005174() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl b/test/tint/builtins/gen/var/abs/1ce782.wgsl index 7193449a79..679c6a4f21 100644 --- a/test/tint/builtins/gen/var/abs/1ce782.wgsl +++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<4, u32>) -> vec<4, u32> fn abs_1ce782() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res: vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.dxc.hlsl index 3ddb4039cb..636bde583b 100644 --- a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_1ce782() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.fxc.hlsl index 3ddb4039cb..636bde583b 100644 --- a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_1ce782() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.glsl index 05ce517d39..118f0ffa31 100644 --- a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_1ce782() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = arg_0; } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_1ce782() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = arg_0; } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_1ce782() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = arg_0; } diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.msl index 22dc5ae8aa..18c3c5adab 100644 --- a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_1ce782() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.spvasm index 3128b60edc..e08a560b30 100644 --- a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,38 +33,40 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v4uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_1ce782 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v4uint %arg_0 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v4uint %arg_0 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %abs_1ce782 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %abs_1ce782 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_1ce782 + %32 = OpLabel + %33 = OpFunctionCall %void %abs_1ce782 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %abs_1ce782 + %35 = OpLabel + %36 = OpFunctionCall %void %abs_1ce782 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.wgsl index ad8ad33f03..92b0f35d2b 100644 --- a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_1ce782() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res : vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl b/test/tint/builtins/gen/var/abs/1e9d53.wgsl index 9e58c8af23..c8edcca67f 100644 --- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl +++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<2, f32>) -> vec<2, f32> fn abs_1e9d53() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.dxc.hlsl index aff322d2e4..8ae3d40689 100644 --- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_1e9d53() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.fxc.hlsl index aff322d2e4..8ae3d40689 100644 --- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_1e9d53() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.glsl index 907f07bd81..edb76d66dd 100644 --- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_1e9d53() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = abs(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_1e9d53() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = abs(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_1e9d53() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.msl index 87cd8bce16..87a6a67c31 100644 --- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_1e9d53() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = fabs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.spvasm index 9f60fa4468..43daf5db94 100644 --- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %abs_1e9d53 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 FAbs %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 FAbs %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %abs_1e9d53 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %abs_1e9d53 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_1e9d53 + %31 = OpLabel + %32 = OpFunctionCall %void %abs_1e9d53 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %abs_1e9d53 + %34 = OpLabel + %35 = OpFunctionCall %void %abs_1e9d53 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.wgsl index 40fca8606c..92d84c31e0 100644 --- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_1e9d53() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl b/test/tint/builtins/gen/var/abs/5ad50a.wgsl index 3ffc963fd4..34f91dff9c 100644 --- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl +++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<3, i32>) -> vec<3, i32> fn abs_5ad50a() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res: vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.dxc.hlsl index 3e97613be3..c9db60bafc 100644 --- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_5ad50a() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.fxc.hlsl index 3e97613be3..c9db60bafc 100644 --- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_5ad50a() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.glsl index c3ccd6f3b8..a3976e9607 100644 --- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_5ad50a() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = abs(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_5ad50a() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = abs(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_5ad50a() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.msl index 98f9bbd906..1ff6dc4a03 100644 --- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_5ad50a() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); int3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.spvasm index 7cb5399115..160d442be2 100644 --- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,39 +34,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v3int + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_5ad50a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v3int %arg_0 - %18 = OpExtInst %v3int %19 SAbs %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v3int %arg_0 + %20 = OpExtInst %v3int %21 SAbs %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %abs_5ad50a +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %abs_5ad50a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_5ad50a + %33 = OpLabel + %34 = OpFunctionCall %void %abs_5ad50a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %abs_5ad50a + %36 = OpLabel + %37 = OpFunctionCall %void %abs_5ad50a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.wgsl index ce94d615ab..04a451941d 100644 --- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_5ad50a() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res : vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl b/test/tint/builtins/gen/var/abs/7326de.wgsl index 67b7afa5cb..1b8edf4a03 100644 --- a/test/tint/builtins/gen/var/abs/7326de.wgsl +++ b/test/tint/builtins/gen/var/abs/7326de.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<3, u32>) -> vec<3, u32> fn abs_7326de() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res: vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.dxc.hlsl index 493215017e..d0ae4a5031 100644 --- a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_7326de() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.fxc.hlsl index 493215017e..d0ae4a5031 100644 --- a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_7326de() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.glsl index ffb4efb52e..52ac50a4f6 100644 --- a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_7326de() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = arg_0; } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_7326de() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = arg_0; } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_7326de() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = arg_0; } diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.msl index 216fa2195d..07f3f440d1 100644 --- a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_7326de() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint3 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.spvasm index 5944ba3ad6..fddef64aaf 100644 --- a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,38 +33,40 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v3uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_7326de = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v3uint %arg_0 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v3uint %arg_0 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %abs_7326de +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %abs_7326de OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_7326de + %32 = OpLabel + %33 = OpFunctionCall %void %abs_7326de OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %abs_7326de + %35 = OpLabel + %36 = OpFunctionCall %void %abs_7326de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.wgsl index c697f35a32..3b2089dd08 100644 --- a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_7326de() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res : vec3 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl b/test/tint/builtins/gen/var/abs/7f28e6.wgsl index 50ae79f8e0..a684ba1f33 100644 --- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl +++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<2, u32>) -> vec<2, u32> fn abs_7f28e6() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res: vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.dxc.hlsl index cc4964e10e..c311d9ac38 100644 --- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_7f28e6() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.fxc.hlsl index cc4964e10e..c311d9ac38 100644 --- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_7f28e6() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.glsl index 731a483a94..58a3941503 100644 --- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_7f28e6() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = arg_0; } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_7f28e6() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = arg_0; } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_7f28e6() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = arg_0; } diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.msl index a3ea2530ef..3a1d4a5c3b 100644 --- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_7f28e6() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.spvasm index fe29c4651b..ead810c77f 100644 --- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,38 +33,40 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v2uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_7f28e6 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v2uint %arg_0 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v2uint %arg_0 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %abs_7f28e6 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %abs_7f28e6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %abs_7f28e6 + %32 = OpLabel + %33 = OpFunctionCall %void %abs_7f28e6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %abs_7f28e6 + %35 = OpLabel + %36 = OpFunctionCall %void %abs_7f28e6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.wgsl index 108abf3a54..076f526ba3 100644 --- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_7f28e6() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res : vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl b/test/tint/builtins/gen/var/abs/7faa9e.wgsl index e9f14dd8c5..a112ca64ac 100644 --- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl +++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<2, i32>) -> vec<2, i32> fn abs_7faa9e() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res: vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.dxc.hlsl index 6a8e40363c..e3d0de9c0f 100644 --- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_7faa9e() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.fxc.hlsl index 6a8e40363c..e3d0de9c0f 100644 --- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_7faa9e() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.glsl index 11023ea8d0..ee151820f8 100644 --- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_7faa9e() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = abs(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_7faa9e() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = abs(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_7faa9e() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.msl index 715073456f..94be3da1b4 100644 --- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_7faa9e() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); int2 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.spvasm index fe6e8ee04f..d9187ec72a 100644 --- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,39 +34,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v2int + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_7faa9e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v2int %arg_0 - %18 = OpExtInst %v2int %19 SAbs %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v2int %arg_0 + %20 = OpExtInst %v2int %21 SAbs %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %abs_7faa9e +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %abs_7faa9e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_7faa9e + %33 = OpLabel + %34 = OpFunctionCall %void %abs_7faa9e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %abs_7faa9e + %36 = OpLabel + %37 = OpFunctionCall %void %abs_7faa9e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.wgsl index e20ea39a2c..23c2fe7830 100644 --- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_7faa9e() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res : vec2 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl b/test/tint/builtins/gen/var/abs/9c80a6.wgsl index 8ebf2c49e9..db05d8ee26 100644 --- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl +++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl @@ -25,7 +25,7 @@ // fn abs(vec<4, i32>) -> vec<4, i32> fn abs_9c80a6() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res: vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.dxc.hlsl index 9457142ded..64b41fca2d 100644 --- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void abs_9c80a6() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.fxc.hlsl index 9457142ded..64b41fca2d 100644 --- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void abs_9c80a6() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.glsl b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.glsl index bd0c1f7ff0..4a05134d90 100644 --- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void abs_9c80a6() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = abs(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void abs_9c80a6() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = abs(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void abs_9c80a6() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.msl b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.msl index e3a3aad36f..dc91c5e30b 100644 --- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void abs_9c80a6() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); int4 res = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.spvasm index 170b055281..2948a66061 100644 --- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,39 +34,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %22 = OpTypeFunction %v4float + %19 = OpConstantNull %v4int + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %abs_9c80a6 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - %20 = OpLoad %v4int %arg_0 - %18 = OpExtInst %v4int %19 SAbs %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + %22 = OpLoad %v4int %arg_0 + %20 = OpExtInst %v4int %21 SAbs %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %abs_9c80a6 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %abs_9c80a6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %abs_9c80a6 + %33 = OpLabel + %34 = OpFunctionCall %void %abs_9c80a6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %abs_9c80a6 + %36 = OpLabel + %37 = OpFunctionCall %void %abs_9c80a6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.wgsl index 50866839fc..2e3fd3ad51 100644 --- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_9c80a6() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res : vec4 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/b96037.wgsl b/test/tint/builtins/gen/var/abs/b96037.wgsl index 6ce40d8dc1..4b9da121e2 100644 --- a/test/tint/builtins/gen/var/abs/b96037.wgsl +++ b/test/tint/builtins/gen/var/abs/b96037.wgsl @@ -25,7 +25,7 @@ // fn abs(f32) -> f32 fn abs_b96037() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.wgsl b/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.wgsl index 8886335bfc..0c6d5dc100 100644 --- a/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn abs_b96037() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = abs(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/489247.wgsl b/test/tint/builtins/gen/var/acos/489247.wgsl index 65f0811bd9..061782a76c 100644 --- a/test/tint/builtins/gen/var/acos/489247.wgsl +++ b/test/tint/builtins/gen/var/acos/489247.wgsl @@ -25,7 +25,7 @@ // fn acos(f32) -> f32 fn acos_489247() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/489247.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/489247.wgsl.expected.wgsl index 80b99f64f5..9ec8e7a4dd 100644 --- a/test/tint/builtins/gen/var/acos/489247.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/489247.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_489247() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl b/test/tint/builtins/gen/var/acos/8e2acf.wgsl index b28cae58e5..ea9d87a654 100644 --- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl +++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl @@ -25,7 +25,7 @@ // fn acos(vec<4, f32>) -> vec<4, f32> fn acos_8e2acf() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.dxc.hlsl index 4e05e04d70..390e655269 100644 --- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_8e2acf() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.fxc.hlsl index 4e05e04d70..390e655269 100644 --- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void acos_8e2acf() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.glsl index c0f988199a..b8d3472288 100644 --- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void acos_8e2acf() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = acos(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void acos_8e2acf() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = acos(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void acos_8e2acf() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.msl index 6908f7caa6..4014603e42 100644 --- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_8e2acf() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.spvasm index 3d0fda7003..3e380b619e 100644 --- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %acos_8e2acf = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Acos %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Acos %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %acos_8e2acf +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %acos_8e2acf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %acos_8e2acf + %29 = OpLabel + %30 = OpFunctionCall %void %acos_8e2acf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %acos_8e2acf + %32 = OpLabel + %33 = OpFunctionCall %void %acos_8e2acf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.wgsl index 9327316eed..85e5e1205e 100644 --- a/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/8e2acf.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_8e2acf() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl b/test/tint/builtins/gen/var/acos/a610c4.wgsl index cd6969bace..463dd2183c 100644 --- a/test/tint/builtins/gen/var/acos/a610c4.wgsl +++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl @@ -25,7 +25,7 @@ // fn acos(vec<3, f32>) -> vec<3, f32> fn acos_a610c4() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.dxc.hlsl index df2b23182a..fb6c37b8f1 100644 --- a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_a610c4() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.fxc.hlsl index df2b23182a..fb6c37b8f1 100644 --- a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void acos_a610c4() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.glsl index eb76a0310c..05d24a3f79 100644 --- a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void acos_a610c4() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = acos(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void acos_a610c4() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = acos(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void acos_a610c4() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.msl index fa8d78cc25..1b5fdf10d1 100644 --- a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_a610c4() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.spvasm index 1fedd83e80..185c9a438a 100644 --- a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %acos_a610c4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Acos %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Acos %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %acos_a610c4 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %acos_a610c4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %acos_a610c4 + %31 = OpLabel + %32 = OpFunctionCall %void %acos_a610c4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %acos_a610c4 + %34 = OpLabel + %35 = OpFunctionCall %void %acos_a610c4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.wgsl index 9085b2659c..1d5d1f947c 100644 --- a/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/a610c4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_a610c4() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl b/test/tint/builtins/gen/var/acos/dfc915.wgsl index 0fd72f2028..43fd2b65f9 100644 --- a/test/tint/builtins/gen/var/acos/dfc915.wgsl +++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl @@ -25,7 +25,7 @@ // fn acos(vec<2, f32>) -> vec<2, f32> fn acos_dfc915() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.dxc.hlsl index 01e6a4ede8..872e9e2228 100644 --- a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void acos_dfc915() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.fxc.hlsl index 01e6a4ede8..872e9e2228 100644 --- a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void acos_dfc915() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.glsl b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.glsl index 7645730074..af4464ed75 100644 --- a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void acos_dfc915() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = acos(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void acos_dfc915() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = acos(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void acos_dfc915() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.msl b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.msl index 0981ef0356..ffc436fee1 100644 --- a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void acos_dfc915() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.spvasm index 0e8006651a..2165f6ee90 100644 --- a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %acos_dfc915 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Acos %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Acos %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %acos_dfc915 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %acos_dfc915 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %acos_dfc915 + %31 = OpLabel + %32 = OpFunctionCall %void %acos_dfc915 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %acos_dfc915 + %34 = OpLabel + %35 = OpFunctionCall %void %acos_dfc915 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.wgsl index 54bdaa4f20..1d627ff1fb 100644 --- a/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acos/dfc915.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acos_dfc915() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = acos(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl b/test/tint/builtins/gen/var/acosh/640883.wgsl index 29d22a8523..3c86662b86 100644 --- a/test/tint/builtins/gen/var/acosh/640883.wgsl +++ b/test/tint/builtins/gen/var/acosh/640883.wgsl @@ -25,7 +25,7 @@ // fn acosh(vec<2, f32>) -> vec<2, f32> fn acosh_640883() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.dxc.hlsl index 659e3c2cfb..9d44d7c140 100644 --- a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_acosh(float2 x) { } void acosh_640883() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.fxc.hlsl index 659e3c2cfb..9d44d7c140 100644 --- a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_acosh(float2 x) { } void acosh_640883() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.glsl index 0b20e9f0ee..3f38c89384 100644 --- a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec2 tint_acosh(vec2 x) { } void acosh_640883() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_acosh(arg_0); } @@ -30,7 +30,7 @@ vec2 tint_acosh(vec2 x) { } void acosh_640883() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_acosh(arg_0); } @@ -49,7 +49,7 @@ vec2 tint_acosh(vec2 x) { } void acosh_640883() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.msl index 1f553ad853..c8f93643e9 100644 --- a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.msl @@ -6,7 +6,7 @@ float2 tint_acosh(float2 x) { } void acosh_640883() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.spvasm index bf8f9d2fb4..4f02c2c585 100644 --- a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.spvasm @@ -55,7 +55,7 @@ %26 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2float Function %20 %res = OpVariable %_ptr_Function_v2float Function %20 - OpStore %arg_0 %20 + OpStore %arg_0 %16 %30 = OpLoad %v2float %arg_0 %29 = OpFunctionCall %v2float %tint_acosh %30 OpStore %res %29 diff --git a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.wgsl index 8c89ae1584..41b1f976c3 100644 --- a/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/640883.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_640883() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl index 4cde2e68ba..ea17e1159a 100644 --- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl +++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl @@ -25,7 +25,7 @@ // fn acosh(vec<4, f32>) -> vec<4, f32> fn acosh_d51ccb() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.dxc.hlsl index a41df74753..218bf9054c 100644 --- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_acosh(float4 x) { } void acosh_d51ccb() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.fxc.hlsl index a41df74753..218bf9054c 100644 --- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_acosh(float4 x) { } void acosh_d51ccb() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.glsl index 533ffdbccf..0b0c14c5cc 100644 --- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec4 tint_acosh(vec4 x) { } void acosh_d51ccb() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_acosh(arg_0); } @@ -30,7 +30,7 @@ vec4 tint_acosh(vec4 x) { } void acosh_d51ccb() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_acosh(arg_0); } @@ -49,7 +49,7 @@ vec4 tint_acosh(vec4 x) { } void acosh_d51ccb() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.msl index 3e0b53e017..dd27157e31 100644 --- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.msl @@ -6,7 +6,7 @@ float4 tint_acosh(float4 x) { } void acosh_d51ccb() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.spvasm index 6efff10dec..12f52f51cb 100644 --- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.spvasm @@ -53,7 +53,7 @@ %24 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 + OpStore %arg_0 %15 %28 = OpLoad %v4float %arg_0 %27 = OpFunctionCall %v4float %tint_acosh %28 OpStore %res %27 diff --git a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.wgsl index 383b9def62..3edc445af4 100644 --- a/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/d51ccb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_d51ccb() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl index 5140bc365a..5fdf276bcf 100644 --- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl +++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl @@ -25,7 +25,7 @@ // fn acosh(vec<3, f32>) -> vec<3, f32> fn acosh_e38f5c() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.dxc.hlsl index 69ded704e5..713773f94e 100644 --- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_acosh(float3 x) { } void acosh_e38f5c() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.fxc.hlsl index 69ded704e5..713773f94e 100644 --- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_acosh(float3 x) { } void acosh_e38f5c() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.glsl b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.glsl index aff4b56d15..47e4e5829f 100644 --- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec3 tint_acosh(vec3 x) { } void acosh_e38f5c() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_acosh(arg_0); } @@ -30,7 +30,7 @@ vec3 tint_acosh(vec3 x) { } void acosh_e38f5c() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_acosh(arg_0); } @@ -49,7 +49,7 @@ vec3 tint_acosh(vec3 x) { } void acosh_e38f5c() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.msl b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.msl index d5f0613375..ffdee45e4b 100644 --- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.msl @@ -6,7 +6,7 @@ float3 tint_acosh(float3 x) { } void acosh_e38f5c() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = tint_acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.spvasm index eda40cb173..cac7b8915f 100644 --- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.spvasm @@ -55,7 +55,7 @@ %26 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3float Function %20 %res = OpVariable %_ptr_Function_v3float Function %20 - OpStore %arg_0 %20 + OpStore %arg_0 %16 %30 = OpLoad %v3float %arg_0 %29 = OpFunctionCall %v3float %tint_acosh %30 OpStore %res %29 diff --git a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.wgsl index bf3d6cb02e..f3e0060e32 100644 --- a/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/e38f5c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_e38f5c() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl b/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl index 49c9755812..bb1f03c7ae 100644 --- a/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl +++ b/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl @@ -25,7 +25,7 @@ // fn acosh(f32) -> f32 fn acosh_ecf2d1() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.wgsl index 13c14ac15d..17ab657a4e 100644 --- a/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/acosh/ecf2d1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn acosh_ecf2d1() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = acosh(arg_0); } diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl b/test/tint/builtins/gen/var/all/353d6a.wgsl index 59787d6408..0e5be11923 100644 --- a/test/tint/builtins/gen/var/all/353d6a.wgsl +++ b/test/tint/builtins/gen/var/all/353d6a.wgsl @@ -25,7 +25,7 @@ // fn all(bool) -> bool fn all_353d6a() { - var arg_0 = bool(); + var arg_0 = true; var res: bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.dxc.hlsl index 2bc077889d..5a010ec57c 100644 --- a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_353d6a() { - bool arg_0 = false; + bool arg_0 = true; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.fxc.hlsl index 2bc077889d..5a010ec57c 100644 --- a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_353d6a() { - bool arg_0 = false; + bool arg_0 = true; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.glsl b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.glsl index cd35887207..483f75e719 100644 --- a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_353d6a() { - bool arg_0 = false; + bool arg_0 = true; bool res = arg_0; } @@ -22,7 +22,7 @@ void main() { precision mediump float; void all_353d6a() { - bool arg_0 = false; + bool arg_0 = true; bool res = arg_0; } @@ -37,7 +37,7 @@ void main() { #version 310 es void all_353d6a() { - bool arg_0 = false; + bool arg_0 = true; bool res = arg_0; } diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.msl b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.msl index 8e2d6a0ff8..d58dd64af8 100644 --- a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_353d6a() { - bool arg_0 = false; + bool arg_0 = true; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.spvasm index 58378ecb63..11c5919e18 100644 --- a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,38 +32,39 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %14 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %20 = OpTypeFunction %v4float + %17 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_353d6a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_bool Function %14 - %res = OpVariable %_ptr_Function_bool Function %14 - OpStore %arg_0 %14 - %18 = OpLoad %bool %arg_0 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_bool Function %17 + %res = OpVariable %_ptr_Function_bool Function %17 + OpStore %arg_0 %true + %19 = OpLoad %bool %arg_0 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %all_353d6a +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %all_353d6a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %all_353d6a + %30 = OpLabel + %31 = OpFunctionCall %void %all_353d6a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %all_353d6a + %33 = OpLabel + %34 = OpFunctionCall %void %all_353d6a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.wgsl index ae1199f24a..52757a784a 100644 --- a/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/all/353d6a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_353d6a() { - var arg_0 = bool(); + var arg_0 = true; var res : bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl b/test/tint/builtins/gen/var/all/986c7b.wgsl index 4fbd4dcf2b..758c16274a 100644 --- a/test/tint/builtins/gen/var/all/986c7b.wgsl +++ b/test/tint/builtins/gen/var/all/986c7b.wgsl @@ -25,7 +25,7 @@ // fn all(vec<4, bool>) -> bool fn all_986c7b() { - var arg_0 = vec4(); + var arg_0 = vec4(true); var res: bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.dxc.hlsl index 5bac853ce4..35919a5231 100644 --- a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_986c7b() { - bool4 arg_0 = (false).xxxx; + bool4 arg_0 = (true).xxxx; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.fxc.hlsl index 5bac853ce4..35919a5231 100644 --- a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_986c7b() { - bool4 arg_0 = (false).xxxx; + bool4 arg_0 = (true).xxxx; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.glsl b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.glsl index f64d3d7e2c..a39a23757a 100644 --- a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_986c7b() { - bvec4 arg_0 = bvec4(false); + bvec4 arg_0 = bvec4(true); bool res = all(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void all_986c7b() { - bvec4 arg_0 = bvec4(false); + bvec4 arg_0 = bvec4(true); bool res = all(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void all_986c7b() { - bvec4 arg_0 = bvec4(false); + bvec4 arg_0 = bvec4(true); bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.msl b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.msl index 42546359d1..b4328dafef 100644 --- a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_986c7b() { - bool4 arg_0 = bool4(false); + bool4 arg_0 = bool4(true); bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.spvasm index f6d2124ac3..5851658be1 100644 --- a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,41 +33,43 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %15 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool + %19 = OpConstantNull %v4bool %_ptr_Function_bool = OpTypePointer Function %bool - %22 = OpConstantNull %bool - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %bool + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_986c7b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4bool Function %15 - %res = OpVariable %_ptr_Function_bool Function %22 - OpStore %arg_0 %15 - %19 = OpLoad %v4bool %arg_0 - %18 = OpAll %bool %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4bool Function %19 + %res = OpVariable %_ptr_Function_bool Function %24 + OpStore %arg_0 %16 + %21 = OpLoad %v4bool %arg_0 + %20 = OpAll %bool %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %all_986c7b +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %all_986c7b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %all_986c7b + %34 = OpLabel + %35 = OpFunctionCall %void %all_986c7b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %all_986c7b + %37 = OpLabel + %38 = OpFunctionCall %void %all_986c7b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.wgsl index eeef0ea644..8568959cdb 100644 --- a/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/all/986c7b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_986c7b() { - var arg_0 = vec4(); + var arg_0 = vec4(true); var res : bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl b/test/tint/builtins/gen/var/all/bd2dba.wgsl index 52684ef54c..7ca4d96b6d 100644 --- a/test/tint/builtins/gen/var/all/bd2dba.wgsl +++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl @@ -25,7 +25,7 @@ // fn all(vec<3, bool>) -> bool fn all_bd2dba() { - var arg_0 = vec3(); + var arg_0 = vec3(true); var res: bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.dxc.hlsl index c9bf7afae9..472389105b 100644 --- a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_bd2dba() { - bool3 arg_0 = (false).xxx; + bool3 arg_0 = (true).xxx; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.fxc.hlsl index c9bf7afae9..472389105b 100644 --- a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_bd2dba() { - bool3 arg_0 = (false).xxx; + bool3 arg_0 = (true).xxx; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.glsl b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.glsl index 9ed5d6b380..82452d902f 100644 --- a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_bd2dba() { - bvec3 arg_0 = bvec3(false); + bvec3 arg_0 = bvec3(true); bool res = all(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void all_bd2dba() { - bvec3 arg_0 = bvec3(false); + bvec3 arg_0 = bvec3(true); bool res = all(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void all_bd2dba() { - bvec3 arg_0 = bvec3(false); + bvec3 arg_0 = bvec3(true); bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.msl b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.msl index 2e5b633c2f..31dbbfa844 100644 --- a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_bd2dba() { - bool3 arg_0 = bool3(false); + bool3 arg_0 = bool3(true); bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.spvasm b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.spvasm index 0a55820385..2fd83001dc 100644 --- a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,41 +33,43 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %15 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool + %19 = OpConstantNull %v3bool %_ptr_Function_bool = OpTypePointer Function %bool - %22 = OpConstantNull %bool - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %bool + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_bd2dba = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3bool Function %15 - %res = OpVariable %_ptr_Function_bool Function %22 - OpStore %arg_0 %15 - %19 = OpLoad %v3bool %arg_0 - %18 = OpAll %bool %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3bool Function %19 + %res = OpVariable %_ptr_Function_bool Function %24 + OpStore %arg_0 %16 + %21 = OpLoad %v3bool %arg_0 + %20 = OpAll %bool %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %all_bd2dba +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %all_bd2dba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %all_bd2dba + %34 = OpLabel + %35 = OpFunctionCall %void %all_bd2dba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %all_bd2dba + %37 = OpLabel + %38 = OpFunctionCall %void %all_bd2dba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.wgsl b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.wgsl index 94f5c4e2c1..afd3009676 100644 --- a/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/all/bd2dba.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_bd2dba() { - var arg_0 = vec3(); + var arg_0 = vec3(true); var res : bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl b/test/tint/builtins/gen/var/all/f46790.wgsl index 1d97c255fd..c7ac37f4e3 100644 --- a/test/tint/builtins/gen/var/all/f46790.wgsl +++ b/test/tint/builtins/gen/var/all/f46790.wgsl @@ -25,7 +25,7 @@ // fn all(vec<2, bool>) -> bool fn all_f46790() { - var arg_0 = vec2(); + var arg_0 = vec2(true); var res: bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.dxc.hlsl index e82b1328d3..7b82698778 100644 --- a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void all_f46790() { - bool2 arg_0 = (false).xx; + bool2 arg_0 = (true).xx; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.fxc.hlsl index e82b1328d3..7b82698778 100644 --- a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void all_f46790() { - bool2 arg_0 = (false).xx; + bool2 arg_0 = (true).xx; bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.glsl b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.glsl index 4840d1d1cb..4a0a0159d3 100644 --- a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void all_f46790() { - bvec2 arg_0 = bvec2(false); + bvec2 arg_0 = bvec2(true); bool res = all(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void all_f46790() { - bvec2 arg_0 = bvec2(false); + bvec2 arg_0 = bvec2(true); bool res = all(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void all_f46790() { - bvec2 arg_0 = bvec2(false); + bvec2 arg_0 = bvec2(true); bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.msl b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.msl index 855b1c4a6d..76fedd030a 100644 --- a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void all_f46790() { - bool2 arg_0 = bool2(false); + bool2 arg_0 = bool2(true); bool res = all(arg_0); } diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.spvasm b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.spvasm index 9efeee7d05..8582a6f0c7 100644 --- a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,41 +33,43 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %15 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool + %19 = OpConstantNull %v2bool %_ptr_Function_bool = OpTypePointer Function %bool - %22 = OpConstantNull %bool - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %bool + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %all_f46790 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2bool Function %15 - %res = OpVariable %_ptr_Function_bool Function %22 - OpStore %arg_0 %15 - %19 = OpLoad %v2bool %arg_0 - %18 = OpAll %bool %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2bool Function %19 + %res = OpVariable %_ptr_Function_bool Function %24 + OpStore %arg_0 %16 + %21 = OpLoad %v2bool %arg_0 + %20 = OpAll %bool %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %all_f46790 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %all_f46790 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %all_f46790 + %34 = OpLabel + %35 = OpFunctionCall %void %all_f46790 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %all_f46790 + %37 = OpLabel + %38 = OpFunctionCall %void %all_f46790 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.wgsl b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.wgsl index da95275480..f8f1191229 100644 --- a/test/tint/builtins/gen/var/all/f46790.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/all/f46790.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn all_f46790() { - var arg_0 = vec2(); + var arg_0 = vec2(true); var res : bool = all(arg_0); } diff --git a/test/tint/builtins/gen/var/any/083428.wgsl b/test/tint/builtins/gen/var/any/083428.wgsl index b164c4e03a..e9749dc248 100644 --- a/test/tint/builtins/gen/var/any/083428.wgsl +++ b/test/tint/builtins/gen/var/any/083428.wgsl @@ -25,7 +25,7 @@ // fn any(vec<4, bool>) -> bool fn any_083428() { - var arg_0 = vec4(); + var arg_0 = vec4(true); var res: bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/083428.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/any/083428.wgsl.expected.dxc.hlsl index 3064009338..f03531471e 100644 --- a/test/tint/builtins/gen/var/any/083428.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/any/083428.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_083428() { - bool4 arg_0 = (false).xxxx; + bool4 arg_0 = (true).xxxx; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/083428.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/any/083428.wgsl.expected.fxc.hlsl index 3064009338..f03531471e 100644 --- a/test/tint/builtins/gen/var/any/083428.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/any/083428.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_083428() { - bool4 arg_0 = (false).xxxx; + bool4 arg_0 = (true).xxxx; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/083428.wgsl.expected.glsl b/test/tint/builtins/gen/var/any/083428.wgsl.expected.glsl index 3a47aaa326..42f191fc42 100644 --- a/test/tint/builtins/gen/var/any/083428.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/any/083428.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_083428() { - bvec4 arg_0 = bvec4(false); + bvec4 arg_0 = bvec4(true); bool res = any(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void any_083428() { - bvec4 arg_0 = bvec4(false); + bvec4 arg_0 = bvec4(true); bool res = any(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void any_083428() { - bvec4 arg_0 = bvec4(false); + bvec4 arg_0 = bvec4(true); bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/083428.wgsl.expected.msl b/test/tint/builtins/gen/var/any/083428.wgsl.expected.msl index faeff8cd39..7d0c4c70fd 100644 --- a/test/tint/builtins/gen/var/any/083428.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/any/083428.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_083428() { - bool4 arg_0 = bool4(false); + bool4 arg_0 = bool4(true); bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/083428.wgsl.expected.spvasm b/test/tint/builtins/gen/var/any/083428.wgsl.expected.spvasm index 5911608390..39c3352bf2 100644 --- a/test/tint/builtins/gen/var/any/083428.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/any/083428.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,41 +33,43 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %15 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool + %19 = OpConstantNull %v4bool %_ptr_Function_bool = OpTypePointer Function %bool - %22 = OpConstantNull %bool - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %bool + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_083428 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4bool Function %15 - %res = OpVariable %_ptr_Function_bool Function %22 - OpStore %arg_0 %15 - %19 = OpLoad %v4bool %arg_0 - %18 = OpAny %bool %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4bool Function %19 + %res = OpVariable %_ptr_Function_bool Function %24 + OpStore %arg_0 %16 + %21 = OpLoad %v4bool %arg_0 + %20 = OpAny %bool %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %any_083428 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %any_083428 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %any_083428 + %34 = OpLabel + %35 = OpFunctionCall %void %any_083428 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %any_083428 + %37 = OpLabel + %38 = OpFunctionCall %void %any_083428 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/any/083428.wgsl.expected.wgsl b/test/tint/builtins/gen/var/any/083428.wgsl.expected.wgsl index 3df99c6538..a6292463cf 100644 --- a/test/tint/builtins/gen/var/any/083428.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/any/083428.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_083428() { - var arg_0 = vec4(); + var arg_0 = vec4(true); var res : bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl b/test/tint/builtins/gen/var/any/0e3e58.wgsl index 557b4a9fb7..48f7d21f18 100644 --- a/test/tint/builtins/gen/var/any/0e3e58.wgsl +++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl @@ -25,7 +25,7 @@ // fn any(vec<2, bool>) -> bool fn any_0e3e58() { - var arg_0 = vec2(); + var arg_0 = vec2(true); var res: bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.dxc.hlsl index 2662733182..54cf0d3e51 100644 --- a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_0e3e58() { - bool2 arg_0 = (false).xx; + bool2 arg_0 = (true).xx; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.fxc.hlsl index 2662733182..54cf0d3e51 100644 --- a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_0e3e58() { - bool2 arg_0 = (false).xx; + bool2 arg_0 = (true).xx; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.glsl b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.glsl index 6b9459a29f..45938a5c6c 100644 --- a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_0e3e58() { - bvec2 arg_0 = bvec2(false); + bvec2 arg_0 = bvec2(true); bool res = any(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void any_0e3e58() { - bvec2 arg_0 = bvec2(false); + bvec2 arg_0 = bvec2(true); bool res = any(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void any_0e3e58() { - bvec2 arg_0 = bvec2(false); + bvec2 arg_0 = bvec2(true); bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.msl b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.msl index 8890ff57b2..05e39b7ed9 100644 --- a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_0e3e58() { - bool2 arg_0 = bool2(false); + bool2 arg_0 = bool2(true); bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.spvasm b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.spvasm index 1dc30ea83c..dd08859074 100644 --- a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,41 +33,43 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %15 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool + %19 = OpConstantNull %v2bool %_ptr_Function_bool = OpTypePointer Function %bool - %22 = OpConstantNull %bool - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %bool + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_0e3e58 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2bool Function %15 - %res = OpVariable %_ptr_Function_bool Function %22 - OpStore %arg_0 %15 - %19 = OpLoad %v2bool %arg_0 - %18 = OpAny %bool %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2bool Function %19 + %res = OpVariable %_ptr_Function_bool Function %24 + OpStore %arg_0 %16 + %21 = OpLoad %v2bool %arg_0 + %20 = OpAny %bool %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %any_0e3e58 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %any_0e3e58 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %any_0e3e58 + %34 = OpLabel + %35 = OpFunctionCall %void %any_0e3e58 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %any_0e3e58 + %37 = OpLabel + %38 = OpFunctionCall %void %any_0e3e58 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.wgsl b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.wgsl index 839986709e..512dd96503 100644 --- a/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/any/0e3e58.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_0e3e58() { - var arg_0 = vec2(); + var arg_0 = vec2(true); var res : bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl b/test/tint/builtins/gen/var/any/2ab91a.wgsl index a4764b9d91..2a944304e4 100644 --- a/test/tint/builtins/gen/var/any/2ab91a.wgsl +++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl @@ -25,7 +25,7 @@ // fn any(bool) -> bool fn any_2ab91a() { - var arg_0 = bool(); + var arg_0 = true; var res: bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.dxc.hlsl index d34bc39aaa..075ef6788b 100644 --- a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_2ab91a() { - bool arg_0 = false; + bool arg_0 = true; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.fxc.hlsl index d34bc39aaa..075ef6788b 100644 --- a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_2ab91a() { - bool arg_0 = false; + bool arg_0 = true; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.glsl b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.glsl index 05c92361f6..4ace3e4220 100644 --- a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_2ab91a() { - bool arg_0 = false; + bool arg_0 = true; bool res = arg_0; } @@ -22,7 +22,7 @@ void main() { precision mediump float; void any_2ab91a() { - bool arg_0 = false; + bool arg_0 = true; bool res = arg_0; } @@ -37,7 +37,7 @@ void main() { #version 310 es void any_2ab91a() { - bool arg_0 = false; + bool arg_0 = true; bool res = arg_0; } diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.msl b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.msl index c304db3ea5..80537b5490 100644 --- a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_2ab91a() { - bool arg_0 = false; + bool arg_0 = true; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.spvasm index d50f7f8af8..f28dbc84e2 100644 --- a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,38 +32,39 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %14 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %20 = OpTypeFunction %v4float + %17 = OpConstantNull %bool + %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_2ab91a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_bool Function %14 - %res = OpVariable %_ptr_Function_bool Function %14 - OpStore %arg_0 %14 - %18 = OpLoad %bool %arg_0 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_bool Function %17 + %res = OpVariable %_ptr_Function_bool Function %17 + OpStore %arg_0 %true + %19 = OpLoad %bool %arg_0 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %any_2ab91a +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %any_2ab91a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %any_2ab91a + %30 = OpLabel + %31 = OpFunctionCall %void %any_2ab91a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %any_2ab91a + %33 = OpLabel + %34 = OpFunctionCall %void %any_2ab91a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.wgsl index d1bde99d1f..578a2629e1 100644 --- a/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/any/2ab91a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_2ab91a() { - var arg_0 = bool(); + var arg_0 = true; var res : bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl b/test/tint/builtins/gen/var/any/e755c1.wgsl index 78ba288a80..836ed8d152 100644 --- a/test/tint/builtins/gen/var/any/e755c1.wgsl +++ b/test/tint/builtins/gen/var/any/e755c1.wgsl @@ -25,7 +25,7 @@ // fn any(vec<3, bool>) -> bool fn any_e755c1() { - var arg_0 = vec3(); + var arg_0 = vec3(true); var res: bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.dxc.hlsl index cac18b451c..11aa9b36c5 100644 --- a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void any_e755c1() { - bool3 arg_0 = (false).xxx; + bool3 arg_0 = (true).xxx; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.fxc.hlsl index cac18b451c..11aa9b36c5 100644 --- a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void any_e755c1() { - bool3 arg_0 = (false).xxx; + bool3 arg_0 = (true).xxx; bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.glsl b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.glsl index 355f53ac65..37def14b1c 100644 --- a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void any_e755c1() { - bvec3 arg_0 = bvec3(false); + bvec3 arg_0 = bvec3(true); bool res = any(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void any_e755c1() { - bvec3 arg_0 = bvec3(false); + bvec3 arg_0 = bvec3(true); bool res = any(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void any_e755c1() { - bvec3 arg_0 = bvec3(false); + bvec3 arg_0 = bvec3(true); bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.msl b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.msl index 9ae6049e58..62caabf8c4 100644 --- a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void any_e755c1() { - bool3 arg_0 = bool3(false); + bool3 arg_0 = bool3(true); bool res = any(arg_0); } diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.spvasm index b0c24069d9..033d47f5b4 100644 --- a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,41 +33,43 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %15 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool + %19 = OpConstantNull %v3bool %_ptr_Function_bool = OpTypePointer Function %bool - %22 = OpConstantNull %bool - %23 = OpTypeFunction %v4float + %24 = OpConstantNull %bool + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %any_e755c1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3bool Function %15 - %res = OpVariable %_ptr_Function_bool Function %22 - OpStore %arg_0 %15 - %19 = OpLoad %v3bool %arg_0 - %18 = OpAny %bool %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3bool Function %19 + %res = OpVariable %_ptr_Function_bool Function %24 + OpStore %arg_0 %16 + %21 = OpLoad %v3bool %arg_0 + %20 = OpAny %bool %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %any_e755c1 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %any_e755c1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %any_e755c1 + %34 = OpLabel + %35 = OpFunctionCall %void %any_e755c1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %any_e755c1 + %37 = OpLabel + %38 = OpFunctionCall %void %any_e755c1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.wgsl index fe5fc2e283..8d532b5df7 100644 --- a/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/any/e755c1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn any_e755c1() { - var arg_0 = vec3(); + var arg_0 = vec3(true); var res : bool = any(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl b/test/tint/builtins/gen/var/asin/064953.wgsl index d7dcf36ece..a4c8589691 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl @@ -25,7 +25,7 @@ // fn asin(vec<4, f32>) -> vec<4, f32> fn asin_064953() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl index 21168e7ea4..932c5da428 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl index 21168e7ea4..932c5da428 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_064953() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl index 3ea2994796..26c0c37a14 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_064953() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = asin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asin_064953() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = asin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asin_064953() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl index ee8a542c8c..481b8b1d6e 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_064953() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm index 632fae465f..d5813cdc79 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %asin_064953 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Asin %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Asin %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %asin_064953 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %asin_064953 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %asin_064953 + %29 = OpLabel + %30 = OpFunctionCall %void %asin_064953 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asin_064953 + %32 = OpLabel + %33 = OpFunctionCall %void %asin_064953 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl index 41134627e8..205c94de61 100644 --- a/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/064953.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_064953() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl index 6102dabedb..5f71447f5b 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl @@ -25,7 +25,7 @@ // fn asin(vec<2, f32>) -> vec<2, f32> fn asin_7b6a44() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl index 306769cdce..2491ebdaf6 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl index 306769cdce..2491ebdaf6 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_7b6a44() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl index 28c990f2b1..0604e88c9d 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_7b6a44() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = asin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asin_7b6a44() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = asin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asin_7b6a44() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl index f1e70f4223..37b62137cc 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_7b6a44() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm index a77325ca41..21aa1abc7d 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %asin_7b6a44 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Asin %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Asin %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %asin_7b6a44 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %asin_7b6a44 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asin_7b6a44 + %31 = OpLabel + %32 = OpFunctionCall %void %asin_7b6a44 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %asin_7b6a44 + %34 = OpLabel + %35 = OpFunctionCall %void %asin_7b6a44 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl index 6e08cad515..4f0c2fd816 100644 --- a/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/7b6a44.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_7b6a44() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl index 18bd04f2ad..124fac2352 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl @@ -25,7 +25,7 @@ // fn asin(vec<3, f32>) -> vec<3, f32> fn asin_8cd9c9() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl index ba54cdc4db..96d0acac1c 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl index ba54cdc4db..96d0acac1c 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void asin_8cd9c9() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl index f1a29671c4..95a2e1c272 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asin_8cd9c9() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = asin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asin_8cd9c9() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = asin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asin_8cd9c9() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl index 848555c240..8ff1ba728a 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asin_8cd9c9() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm index 85c702db70..734c4e8b6e 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %asin_8cd9c9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Asin %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Asin %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %asin_8cd9c9 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %asin_8cd9c9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asin_8cd9c9 + %31 = OpLabel + %32 = OpFunctionCall %void %asin_8cd9c9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %asin_8cd9c9 + %34 = OpLabel + %35 = OpFunctionCall %void %asin_8cd9c9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl index 598fd675f5..db757e53ba 100644 --- a/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/8cd9c9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_8cd9c9() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl b/test/tint/builtins/gen/var/asin/c0c272.wgsl index 0dc0a862d5..1e9428c02a 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl @@ -25,7 +25,7 @@ // fn asin(f32) -> f32 fn asin_c0c272() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl index 242fe4094f..c9af00fcff 100644 --- a/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asin/c0c272.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asin_c0c272() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = asin(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/157447.wgsl b/test/tint/builtins/gen/var/asinh/157447.wgsl index dcc267bf3d..8fb2281cce 100644 --- a/test/tint/builtins/gen/var/asinh/157447.wgsl +++ b/test/tint/builtins/gen/var/asinh/157447.wgsl @@ -25,7 +25,7 @@ // fn asinh(f32) -> f32 fn asinh_157447() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.wgsl index 5502ce9a94..ba5660d7ce 100644 --- a/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/157447.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_157447() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl b/test/tint/builtins/gen/var/asinh/2265ee.wgsl index f92cc0b919..33091c4a5d 100644 --- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl +++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl @@ -25,7 +25,7 @@ // fn asinh(vec<3, f32>) -> vec<3, f32> fn asinh_2265ee() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.dxc.hlsl index 7929b51a45..2e876fa737 100644 --- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_sinh(float3 x) { } void asinh_2265ee() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.fxc.hlsl index 7929b51a45..2e876fa737 100644 --- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_sinh(float3 x) { } void asinh_2265ee() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.glsl index 88be9a24dc..b9ed885987 100644 --- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asinh_2265ee() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = asinh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asinh_2265ee() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = asinh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asinh_2265ee() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.msl index 299765586d..30f2f78bf1 100644 --- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_2265ee() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.spvasm index adaa820e16..96b36e62e5 100644 --- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %asinh_2265ee = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Asinh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Asinh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %asinh_2265ee +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %asinh_2265ee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asinh_2265ee + %31 = OpLabel + %32 = OpFunctionCall %void %asinh_2265ee OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %asinh_2265ee + %34 = OpLabel + %35 = OpFunctionCall %void %asinh_2265ee OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.wgsl index d2312916aa..60d90c523d 100644 --- a/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/2265ee.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_2265ee() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl b/test/tint/builtins/gen/var/asinh/4a2226.wgsl index 54120cf0b0..a620a9717c 100644 --- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl +++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl @@ -25,7 +25,7 @@ // fn asinh(vec<2, f32>) -> vec<2, f32> fn asinh_4a2226() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.dxc.hlsl index a00baa3abc..5c1e542b90 100644 --- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_sinh(float2 x) { } void asinh_4a2226() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.fxc.hlsl index a00baa3abc..5c1e542b90 100644 --- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_sinh(float2 x) { } void asinh_4a2226() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.glsl index e325b23fbd..3b555dd85e 100644 --- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asinh_4a2226() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = asinh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asinh_4a2226() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = asinh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asinh_4a2226() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.msl index 1a7fbf6ddf..ebfb3267f6 100644 --- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_4a2226() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.spvasm index 8c0c97a0ba..49303738f3 100644 --- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %asinh_4a2226 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Asinh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Asinh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %asinh_4a2226 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %asinh_4a2226 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %asinh_4a2226 + %31 = OpLabel + %32 = OpFunctionCall %void %asinh_4a2226 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %asinh_4a2226 + %34 = OpLabel + %35 = OpFunctionCall %void %asinh_4a2226 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.wgsl index 178f3e37a4..be7f9d4a3e 100644 --- a/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/4a2226.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_4a2226() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl index 2332d29e02..435e796b0d 100644 --- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl +++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl @@ -25,7 +25,7 @@ // fn asinh(vec<4, f32>) -> vec<4, f32> fn asinh_8d2e51() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.dxc.hlsl index 826939d689..f0ec74af92 100644 --- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_sinh(float4 x) { } void asinh_8d2e51() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.fxc.hlsl index 826939d689..f0ec74af92 100644 --- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_sinh(float4 x) { } void asinh_8d2e51() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.glsl b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.glsl index 6d7b915f6d..0cdcad1ae5 100644 --- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void asinh_8d2e51() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = asinh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void asinh_8d2e51() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = asinh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void asinh_8d2e51() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.msl b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.msl index 78553dac38..9a20b10ffb 100644 --- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void asinh_8d2e51() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.spvasm b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.spvasm index b4552d8a85..b4d1182eff 100644 --- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %asinh_8d2e51 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Asinh %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Asinh %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %asinh_8d2e51 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %asinh_8d2e51 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %asinh_8d2e51 + %29 = OpLabel + %30 = OpFunctionCall %void %asinh_8d2e51 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %asinh_8d2e51 + %32 = OpLabel + %33 = OpFunctionCall %void %asinh_8d2e51 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.wgsl b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.wgsl index f8b3bd2300..865abf72ea 100644 --- a/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/asinh/8d2e51.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn asinh_8d2e51() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = asinh(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/02979a.wgsl b/test/tint/builtins/gen/var/atan/02979a.wgsl index 29d6910824..fd873c540f 100644 --- a/test/tint/builtins/gen/var/atan/02979a.wgsl +++ b/test/tint/builtins/gen/var/atan/02979a.wgsl @@ -25,7 +25,7 @@ // fn atan(f32) -> f32 fn atan_02979a() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.wgsl index 74ef4026cf..b5dd9d01b5 100644 --- a/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/02979a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_02979a() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl b/test/tint/builtins/gen/var/atan/331e6d.wgsl index 4cd7a1a72e..6e62cfe5a9 100644 --- a/test/tint/builtins/gen/var/atan/331e6d.wgsl +++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl @@ -25,7 +25,7 @@ // fn atan(vec<3, f32>) -> vec<3, f32> fn atan_331e6d() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.dxc.hlsl index 11f8b76ec9..7ab750dd9a 100644 --- a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_331e6d() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.fxc.hlsl index 11f8b76ec9..7ab750dd9a 100644 --- a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan_331e6d() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.glsl index 89f42e6b56..b48d70d013 100644 --- a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan_331e6d() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = atan(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void atan_331e6d() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = atan(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void atan_331e6d() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.msl index 4594dbc311..964c412f24 100644 --- a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_331e6d() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.spvasm index 3f6e2f0cb6..cfd498de56 100644 --- a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %atan_331e6d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Atan %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Atan %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %atan_331e6d +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %atan_331e6d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan_331e6d + %31 = OpLabel + %32 = OpFunctionCall %void %atan_331e6d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %atan_331e6d + %34 = OpLabel + %35 = OpFunctionCall %void %atan_331e6d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.wgsl index 09a051fbdb..43496f2c56 100644 --- a/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/331e6d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_331e6d() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl b/test/tint/builtins/gen/var/atan/a8b696.wgsl index 760bfb56b7..218f5fb0c7 100644 --- a/test/tint/builtins/gen/var/atan/a8b696.wgsl +++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl @@ -25,7 +25,7 @@ // fn atan(vec<4, f32>) -> vec<4, f32> fn atan_a8b696() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.dxc.hlsl index 952af660e9..15a19264a7 100644 --- a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_a8b696() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.fxc.hlsl index 952af660e9..15a19264a7 100644 --- a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan_a8b696() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.glsl index 358182986a..61e17ddde8 100644 --- a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan_a8b696() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = atan(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void atan_a8b696() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = atan(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void atan_a8b696() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.msl index 28232e0e5e..350a03842f 100644 --- a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_a8b696() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.spvasm index 71ce407ba5..694b6bf913 100644 --- a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %atan_a8b696 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Atan %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Atan %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %atan_a8b696 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %atan_a8b696 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %atan_a8b696 + %29 = OpLabel + %30 = OpFunctionCall %void %atan_a8b696 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %atan_a8b696 + %32 = OpLabel + %33 = OpFunctionCall %void %atan_a8b696 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.wgsl index be3ee4481f..38016aab1b 100644 --- a/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/a8b696.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_a8b696() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl b/test/tint/builtins/gen/var/atan/ad96e4.wgsl index a4885e5267..47242531d1 100644 --- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl +++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl @@ -25,7 +25,7 @@ // fn atan(vec<2, f32>) -> vec<2, f32> fn atan_ad96e4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.dxc.hlsl index dca78eb327..86c25dc2a7 100644 --- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void atan_ad96e4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.fxc.hlsl index dca78eb327..86c25dc2a7 100644 --- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void atan_ad96e4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.glsl index cef5994a60..0c07baffe3 100644 --- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void atan_ad96e4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = atan(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void atan_ad96e4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = atan(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void atan_ad96e4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.msl b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.msl index 683f31d709..1928597ed0 100644 --- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void atan_ad96e4() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.spvasm index 2434fef6ed..b6e02818f7 100644 --- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %atan_ad96e4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Atan %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Atan %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %atan_ad96e4 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %atan_ad96e4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan_ad96e4 + %31 = OpLabel + %32 = OpFunctionCall %void %atan_ad96e4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %atan_ad96e4 + %34 = OpLabel + %35 = OpFunctionCall %void %atan_ad96e4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.wgsl index f226ebee6d..35b3936322 100644 --- a/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan/ad96e4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atan_ad96e4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = atan(arg_0); } diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl b/test/tint/builtins/gen/var/atan2/57fb13.wgsl index b411fdeb21..7c0e46c167 100644 --- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl +++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl @@ -25,8 +25,8 @@ // fn atan2(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn atan2_57fb13() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: vec2 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.dxc.hlsl index 8cccbb73f1..8056f7df1a 100644 --- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void atan2_57fb13() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.fxc.hlsl index 8cccbb73f1..8056f7df1a 100644 --- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void atan2_57fb13() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.glsl index b3a643bf41..e763d96883 100644 --- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void atan2_57fb13() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = atan(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void atan2_57fb13() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = atan(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void atan2_57fb13() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = atan(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.msl index 4db45ca72b..e7a3592f7e 100644 --- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void atan2_57fb13() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float2 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.spvasm index 32423fa3da..50706eab73 100644 --- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %25 = OpTypeFunction %v4float %atan2_57fb13 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v2float %arg_0 - %21 = OpLoad %v2float %arg_1 - %18 = OpExtInst %v2float %19 Atan2 %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v2float %arg_0 + %23 = OpLoad %v2float %arg_1 + %20 = OpExtInst %v2float %21 Atan2 %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %atan2_57fb13 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %atan2_57fb13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %atan2_57fb13 + %33 = OpLabel + %34 = OpFunctionCall %void %atan2_57fb13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %atan2_57fb13 + %36 = OpLabel + %37 = OpFunctionCall %void %atan2_57fb13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.wgsl index 37d8508a19..b9d5b3334a 100644 --- a/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/57fb13.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn atan2_57fb13() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : vec2 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/96057c.wgsl b/test/tint/builtins/gen/var/atan2/96057c.wgsl index a452d55fc4..a1bf62f954 100644 --- a/test/tint/builtins/gen/var/atan2/96057c.wgsl +++ b/test/tint/builtins/gen/var/atan2/96057c.wgsl @@ -25,8 +25,8 @@ // fn atan2(f32, f32) -> f32 fn atan2_96057c() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; var res: f32 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.wgsl index d30026b9ab..311e811d27 100644 --- a/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/96057c.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn atan2_96057c() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; var res : f32 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl index 79229abfc3..c8b2dbb5cf 100644 --- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl +++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl @@ -25,8 +25,8 @@ // fn atan2(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn atan2_a70d0d() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: vec3 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.dxc.hlsl index e21a03a93b..6e544eea6c 100644 --- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void atan2_a70d0d() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.fxc.hlsl index e21a03a93b..6e544eea6c 100644 --- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void atan2_a70d0d() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.glsl index 4a5efeb10d..a489410883 100644 --- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void atan2_a70d0d() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = atan(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void atan2_a70d0d() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = atan(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void atan2_a70d0d() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = atan(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.msl index e76e753a57..ec2a783f69 100644 --- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void atan2_a70d0d() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float3 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.spvasm index e6675dc9cf..89d66414b8 100644 --- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %atan2_a70d0d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %v3float %19 Atan2 %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %v3float %21 Atan2 %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %atan2_a70d0d +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %atan2_a70d0d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %atan2_a70d0d + %33 = OpLabel + %34 = OpFunctionCall %void %atan2_a70d0d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %atan2_a70d0d + %36 = OpLabel + %37 = OpFunctionCall %void %atan2_a70d0d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.wgsl index 111155b210..3caf18d2f9 100644 --- a/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/a70d0d.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn atan2_a70d0d() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : vec3 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl b/test/tint/builtins/gen/var/atan2/ae713e.wgsl index b8165377ab..b7414acd55 100644 --- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl +++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl @@ -25,8 +25,8 @@ // fn atan2(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn atan2_ae713e() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: vec4 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.dxc.hlsl index 68a82e0006..e262cb425b 100644 --- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void atan2_ae713e() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.fxc.hlsl index 68a82e0006..e262cb425b 100644 --- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void atan2_ae713e() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.glsl b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.glsl index 54f87fdf18..80c808f69e 100644 --- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void atan2_ae713e() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = atan(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void atan2_ae713e() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = atan(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void atan2_ae713e() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = atan(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.msl b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.msl index 1fb8aa2331..100f2dc520 100644 --- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void atan2_ae713e() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float4 res = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.spvasm index 7b4ac1877d..b54fe82983 100644 --- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,41 +33,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %23 = OpTypeFunction %v4float %atan2_ae713e = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %18 = OpLoad %v4float %arg_0 - %19 = OpLoad %v4float %arg_1 - %16 = OpExtInst %v4float %17 Atan2 %18 %19 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %20 = OpLoad %v4float %arg_0 + %21 = OpLoad %v4float %arg_1 + %18 = OpExtInst %v4float %19 Atan2 %20 %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %atan2_ae713e +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %atan2_ae713e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %atan2_ae713e + %31 = OpLabel + %32 = OpFunctionCall %void %atan2_ae713e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %atan2_ae713e + %34 = OpLabel + %35 = OpFunctionCall %void %atan2_ae713e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.wgsl index 2421b3e693..cc0e1fff70 100644 --- a/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atan2/ae713e.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn atan2_ae713e() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : vec4 = atan2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl b/test/tint/builtins/gen/var/atanh/440cca.wgsl index 0e433ad144..b6555c6dad 100644 --- a/test/tint/builtins/gen/var/atanh/440cca.wgsl +++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl @@ -25,7 +25,7 @@ // fn atanh(vec<3, f32>) -> vec<3, f32> fn atanh_440cca() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.dxc.hlsl index e3fad1f743..703758d97b 100644 --- a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_atanh(float3 x) { } void atanh_440cca() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.fxc.hlsl index e3fad1f743..703758d97b 100644 --- a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_atanh(float3 x) { } void atanh_440cca() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.glsl index d5d2f38502..4e5fb6b3e2 100644 --- a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec3 tint_atanh(vec3 x) { } void atanh_440cca() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_atanh(arg_0); } @@ -30,7 +30,7 @@ vec3 tint_atanh(vec3 x) { } void atanh_440cca() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_atanh(arg_0); } @@ -49,7 +49,7 @@ vec3 tint_atanh(vec3 x) { } void atanh_440cca() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.msl index 3e87ecbb04..00cc45ce68 100644 --- a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.msl @@ -6,7 +6,7 @@ float3 tint_atanh(float3 x) { } void atanh_440cca() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.spvasm index 578e7171f1..4b60b5112c 100644 --- a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.spvasm @@ -55,7 +55,7 @@ %26 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3float Function %20 %res = OpVariable %_ptr_Function_v3float Function %20 - OpStore %arg_0 %20 + OpStore %arg_0 %16 %30 = OpLoad %v3float %arg_0 %29 = OpFunctionCall %v3float %tint_atanh %30 OpStore %res %29 diff --git a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.wgsl index 50e1931da6..b2d4a5a520 100644 --- a/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/440cca.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_440cca() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/7997d8.wgsl b/test/tint/builtins/gen/var/atanh/7997d8.wgsl index 85bc7ffbc1..e6e495090a 100644 --- a/test/tint/builtins/gen/var/atanh/7997d8.wgsl +++ b/test/tint/builtins/gen/var/atanh/7997d8.wgsl @@ -25,7 +25,7 @@ // fn atanh(f32) -> f32 fn atanh_7997d8() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.wgsl index b85c2e94ac..4355659004 100644 --- a/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/7997d8.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_7997d8() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl b/test/tint/builtins/gen/var/atanh/c0e634.wgsl index d29f14f44d..4cfd7c1b69 100644 --- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl +++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl @@ -25,7 +25,7 @@ // fn atanh(vec<2, f32>) -> vec<2, f32> fn atanh_c0e634() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.dxc.hlsl index 1932b37b60..2573bee49b 100644 --- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_atanh(float2 x) { } void atanh_c0e634() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.fxc.hlsl index 1932b37b60..2573bee49b 100644 --- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_atanh(float2 x) { } void atanh_c0e634() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.glsl index 1ef3386d78..a6857cd97d 100644 --- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec2 tint_atanh(vec2 x) { } void atanh_c0e634() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_atanh(arg_0); } @@ -30,7 +30,7 @@ vec2 tint_atanh(vec2 x) { } void atanh_c0e634() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_atanh(arg_0); } @@ -49,7 +49,7 @@ vec2 tint_atanh(vec2 x) { } void atanh_c0e634() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.msl index e6b4da64e6..a407911fb1 100644 --- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.msl @@ -6,7 +6,7 @@ float2 tint_atanh(float2 x) { } void atanh_c0e634() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.spvasm index da46f91b1d..3bfbe162ff 100644 --- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.spvasm @@ -55,7 +55,7 @@ %26 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2float Function %20 %res = OpVariable %_ptr_Function_v2float Function %20 - OpStore %arg_0 %20 + OpStore %arg_0 %16 %30 = OpLoad %v2float %arg_0 %29 = OpFunctionCall %v2float %tint_atanh %30 OpStore %res %29 diff --git a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.wgsl index ef9f1e42de..e9d9908b06 100644 --- a/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/c0e634.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_c0e634() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl index 66ba47e454..c758a2b8ce 100644 --- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl +++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl @@ -25,7 +25,7 @@ // fn atanh(vec<4, f32>) -> vec<4, f32> fn atanh_f3e01b() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.dxc.hlsl index a7bf020a75..f85a7e62a4 100644 --- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_atanh(float4 x) { } void atanh_f3e01b() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.fxc.hlsl index a7bf020a75..f85a7e62a4 100644 --- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_atanh(float4 x) { } void atanh_f3e01b() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.glsl b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.glsl index 953101c02f..75486c5f35 100644 --- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.glsl @@ -5,7 +5,7 @@ vec4 tint_atanh(vec4 x) { } void atanh_f3e01b() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_atanh(arg_0); } @@ -30,7 +30,7 @@ vec4 tint_atanh(vec4 x) { } void atanh_f3e01b() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_atanh(arg_0); } @@ -49,7 +49,7 @@ vec4 tint_atanh(vec4 x) { } void atanh_f3e01b() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.msl b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.msl index 027cdb3fe9..41b2f08ff2 100644 --- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.msl @@ -6,7 +6,7 @@ float4 tint_atanh(float4 x) { } void atanh_f3e01b() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = tint_atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.spvasm index d689b271d5..e78165eaa5 100644 --- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.spvasm @@ -53,7 +53,7 @@ %24 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 + OpStore %arg_0 %15 %28 = OpLoad %v4float %arg_0 %27 = OpFunctionCall %v4float %tint_atanh %28 OpStore %res %27 diff --git a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.wgsl index e21197dc84..ead0ca86cc 100644 --- a/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/atanh/f3e01b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn atanh_f3e01b() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = atanh(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl b/test/tint/builtins/gen/var/ceil/34064b.wgsl index cbc875dfa1..0fd0303784 100644 --- a/test/tint/builtins/gen/var/ceil/34064b.wgsl +++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl @@ -25,7 +25,7 @@ // fn ceil(vec<3, f32>) -> vec<3, f32> fn ceil_34064b() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.dxc.hlsl index 3e070fef0c..cf62426b25 100644 --- a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_34064b() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.fxc.hlsl index 3e070fef0c..cf62426b25 100644 --- a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ceil_34064b() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.glsl index 0ec90dac8a..068e52ae00 100644 --- a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ceil_34064b() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = ceil(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void ceil_34064b() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = ceil(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void ceil_34064b() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.msl index 4861263d95..ce94f136c0 100644 --- a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_34064b() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.spvasm index c66ed701c6..d9674bfc02 100644 --- a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %ceil_34064b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Ceil %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Ceil %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %ceil_34064b +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %ceil_34064b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ceil_34064b + %31 = OpLabel + %32 = OpFunctionCall %void %ceil_34064b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ceil_34064b + %34 = OpLabel + %35 = OpFunctionCall %void %ceil_34064b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.wgsl index 2d02fec004..ec9cd284b0 100644 --- a/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/34064b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_34064b() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/678655.wgsl b/test/tint/builtins/gen/var/ceil/678655.wgsl index ddb10727ea..19fb6a45a1 100644 --- a/test/tint/builtins/gen/var/ceil/678655.wgsl +++ b/test/tint/builtins/gen/var/ceil/678655.wgsl @@ -25,7 +25,7 @@ // fn ceil(f32) -> f32 fn ceil_678655() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.wgsl index 459d76bf23..d3cc9b4d7b 100644 --- a/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/678655.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_678655() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl b/test/tint/builtins/gen/var/ceil/96f597.wgsl index c9b10f5aee..b3c9c7a0ef 100644 --- a/test/tint/builtins/gen/var/ceil/96f597.wgsl +++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl @@ -25,7 +25,7 @@ // fn ceil(vec<2, f32>) -> vec<2, f32> fn ceil_96f597() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.dxc.hlsl index 828c98abda..7bdb61b698 100644 --- a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_96f597() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.fxc.hlsl index 828c98abda..7bdb61b698 100644 --- a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ceil_96f597() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.glsl index 391c9e876d..3c93695c8b 100644 --- a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ceil_96f597() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = ceil(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void ceil_96f597() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = ceil(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void ceil_96f597() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.msl index c7c020053f..e3cb08bb9c 100644 --- a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_96f597() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.spvasm index e78d1d248b..ba9ec75480 100644 --- a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %ceil_96f597 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Ceil %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Ceil %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %ceil_96f597 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %ceil_96f597 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %ceil_96f597 + %31 = OpLabel + %32 = OpFunctionCall %void %ceil_96f597 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %ceil_96f597 + %34 = OpLabel + %35 = OpFunctionCall %void %ceil_96f597 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.wgsl index 03c02ba861..a08c2befd5 100644 --- a/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/96f597.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_96f597() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl b/test/tint/builtins/gen/var/ceil/b74c16.wgsl index 23a03bbb3f..9b6ea01775 100644 --- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl +++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl @@ -25,7 +25,7 @@ // fn ceil(vec<4, f32>) -> vec<4, f32> fn ceil_b74c16() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.dxc.hlsl index f660b33e57..f914edfc0e 100644 --- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void ceil_b74c16() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.fxc.hlsl index f660b33e57..f914edfc0e 100644 --- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void ceil_b74c16() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.glsl b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.glsl index 3d4f524d75..f630971992 100644 --- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void ceil_b74c16() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = ceil(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void ceil_b74c16() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = ceil(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void ceil_b74c16() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.msl b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.msl index cb59b28556..66c5898efe 100644 --- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void ceil_b74c16() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.spvasm index 745b300e18..0e581a1a62 100644 --- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %ceil_b74c16 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Ceil %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Ceil %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %ceil_b74c16 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %ceil_b74c16 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %ceil_b74c16 + %29 = OpLabel + %30 = OpFunctionCall %void %ceil_b74c16 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %ceil_b74c16 + %32 = OpLabel + %33 = OpFunctionCall %void %ceil_b74c16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.wgsl index ebc8d63803..e2a7c63218 100644 --- a/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ceil/b74c16.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ceil_b74c16() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = ceil(arg_0); } diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl index 7cf569cd8f..ed3a94b64a 100644 --- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl +++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn clamp_0acf8f() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = vec2(1.f); var res: vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.dxc.hlsl index 439c442216..db83687deb 100644 --- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_0acf8f() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.fxc.hlsl index 439c442216..db83687deb 100644 --- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_0acf8f() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.glsl index c2877d749a..440ce35f98 100644 --- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_0acf8f() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_0acf8f() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_0acf8f() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.msl index 99108a06bc..a8a7875023 100644 --- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_0acf8f() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); - float2 arg_2 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); + float2 arg_2 = float2(1.0f); float2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.spvasm index 0b65aa7381..9d32a7b5bd 100644 --- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %27 = OpTypeFunction %v4float %clamp_0acf8f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %arg_2 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v2float %arg_0 - %22 = OpLoad %v2float %arg_1 - %23 = OpLoad %v2float %arg_2 - %19 = OpExtInst %v2float %20 NClamp %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %arg_2 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v2float %arg_0 + %24 = OpLoad %v2float %arg_1 + %25 = OpLoad %v2float %arg_2 + %21 = OpExtInst %v2float %22 NClamp %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %clamp_0acf8f +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_0acf8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_0acf8f + %35 = OpLabel + %36 = OpFunctionCall %void %clamp_0acf8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %clamp_0acf8f + %38 = OpLabel + %39 = OpFunctionCall %void %clamp_0acf8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.wgsl index ab94dd3756..a217c189c2 100644 --- a/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/0acf8f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_0acf8f() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = vec2(1.0f); var res : vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl index 72820a9cc8..76f0fac841 100644 --- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl +++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<4, i32>, vec<4, i32>, vec<4, i32>) -> vec<4, i32> fn clamp_1a32e3() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); + var arg_2 = vec4(1); var res: vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.dxc.hlsl index 824f7f2f6b..5df22b18dc 100644 --- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_1a32e3() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; - int4 arg_2 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; + int4 arg_2 = (1).xxxx; int4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.fxc.hlsl index 824f7f2f6b..5df22b18dc 100644 --- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_1a32e3() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; - int4 arg_2 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; + int4 arg_2 = (1).xxxx; int4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl index 72345f9bda..ed2339ae25 100644 --- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_1a32e3() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - ivec4 arg_2 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + ivec4 arg_2 = ivec4(1); ivec4 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_1a32e3() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - ivec4 arg_2 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + ivec4 arg_2 = ivec4(1); ivec4 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_1a32e3() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - ivec4 arg_2 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + ivec4 arg_2 = ivec4(1); ivec4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.msl index 18046667a5..16ff83af8e 100644 --- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_1a32e3() { - int4 arg_0 = int4(0); - int4 arg_1 = int4(0); - int4 arg_2 = int4(0); + int4 arg_0 = int4(1); + int4 arg_1 = int4(1); + int4 arg_2 = int4(1); int4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.spvasm index 576948f324..5945c1298a 100644 --- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -36,45 +36,47 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_1a32e3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %arg_1 = OpVariable %_ptr_Function_v4int Function %15 - %arg_2 = OpVariable %_ptr_Function_v4int Function %15 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v4int %arg_0 - %23 = OpLoad %v4int %arg_1 - %24 = OpLoad %v4int %arg_2 - %20 = OpExtInst %v4int %21 SClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %arg_1 = OpVariable %_ptr_Function_v4int Function %19 + %arg_2 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v4int %arg_0 + %25 = OpLoad %v4int %arg_1 + %26 = OpLoad %v4int %arg_2 + %22 = OpExtInst %v4int %23 SClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_1a32e3 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_1a32e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_1a32e3 + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_1a32e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_1a32e3 + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_1a32e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.wgsl index 71ff9a68b0..3b2884dd25 100644 --- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_1a32e3() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); + var arg_2 = vec4(1); var res : vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bd567.wgsl b/test/tint/builtins/gen/var/clamp/2bd567.wgsl index 9e94cc25d7..ab5087f7e1 100644 --- a/test/tint/builtins/gen/var/clamp/2bd567.wgsl +++ b/test/tint/builtins/gen/var/clamp/2bd567.wgsl @@ -25,9 +25,9 @@ // fn clamp(f32, f32, f32) -> f32 fn clamp_2bd567() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; + var arg_2 = 1.f; var res: f32 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.wgsl index e5148b543b..54ea1337fc 100644 --- a/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/2bd567.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_2bd567() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; + var arg_2 = 1.0f; var res : f32 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl b/test/tint/builtins/gen/var/clamp/2bde41.wgsl index 4cc18eaf27..09e041ebec 100644 --- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl +++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn clamp_2bde41() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = vec4(1.f); var res: vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.dxc.hlsl index d7d8d5438a..78e4d3f1c5 100644 --- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_2bde41() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.fxc.hlsl index d7d8d5438a..78e4d3f1c5 100644 --- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_2bde41() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.glsl index d8b0d40e6e..6be8122bd3 100644 --- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_2bde41() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_2bde41() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_2bde41() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.msl index c116dd7d72..e8206cd6f2 100644 --- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_2bde41() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); - float4 arg_2 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); + float4 arg_2 = float4(1.0f); float4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.spvasm index f8b46a3caf..e481bf2cfe 100644 --- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,44 +34,45 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %25 = OpTypeFunction %v4float %clamp_2bde41 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - OpStore %arg_2 %5 - %19 = OpLoad %v4float %arg_0 - %20 = OpLoad %v4float %arg_1 - %21 = OpLoad %v4float %arg_2 - %17 = OpExtInst %v4float %18 NClamp %19 %20 %21 - OpStore %res %17 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + OpStore %arg_2 %14 + %21 = OpLoad %v4float %arg_0 + %22 = OpLoad %v4float %arg_1 + %23 = OpLoad %v4float %arg_2 + %19 = OpExtInst %v4float %20 NClamp %21 %22 %23 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %clamp_2bde41 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %clamp_2bde41 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %clamp_2bde41 + %33 = OpLabel + %34 = OpFunctionCall %void %clamp_2bde41 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_2bde41 + %36 = OpLabel + %37 = OpFunctionCall %void %clamp_2bde41 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.wgsl index dc20a1ca34..0b42465cd2 100644 --- a/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/2bde41.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_2bde41() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = vec4(1.0f); var res : vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl index 3b65837835..a3eabf99ce 100644 --- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl +++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<3, u32>, vec<3, u32>, vec<3, u32>) -> vec<3, u32> fn clamp_548fc7() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); + var arg_2 = vec3(1u); var res: vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.dxc.hlsl index e74913b434..50830b07ce 100644 --- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_548fc7() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; - uint3 arg_2 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; + uint3 arg_2 = (1u).xxx; uint3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.fxc.hlsl index e74913b434..50830b07ce 100644 --- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_548fc7() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; - uint3 arg_2 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; + uint3 arg_2 = (1u).xxx; uint3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl index 96687576d7..49510412f1 100644 --- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_548fc7() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - uvec3 arg_2 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + uvec3 arg_2 = uvec3(1u); uvec3 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_548fc7() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - uvec3 arg_2 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + uvec3 arg_2 = uvec3(1u); uvec3 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_548fc7() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - uvec3 arg_2 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + uvec3 arg_2 = uvec3(1u); uvec3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.msl index b1b67365bb..d7b9b9ce80 100644 --- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_548fc7() { - uint3 arg_0 = uint3(0u); - uint3 arg_1 = uint3(0u); - uint3 arg_2 = uint3(0u); + uint3 arg_0 = uint3(1u); + uint3 arg_1 = uint3(1u); + uint3 arg_2 = uint3(1u); uint3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.spvasm index 80218b99e5..d1dabc9a6e 100644 --- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -36,45 +36,47 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_548fc7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_2 = OpVariable %_ptr_Function_v3uint Function %15 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v3uint %arg_0 - %23 = OpLoad %v3uint %arg_1 - %24 = OpLoad %v3uint %arg_2 - %20 = OpExtInst %v3uint %21 UClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_2 = OpVariable %_ptr_Function_v3uint Function %19 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v3uint %arg_0 + %25 = OpLoad %v3uint %arg_1 + %26 = OpLoad %v3uint %arg_2 + %22 = OpExtInst %v3uint %23 UClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_548fc7 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_548fc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_548fc7 + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_548fc7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_548fc7 + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_548fc7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.wgsl index 379f026af6..c2ff699d85 100644 --- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_548fc7() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); + var arg_2 = vec3(1u); var res : vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl index 7f51c24638..301c6e7fa6 100644 --- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl +++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<3, i32>, vec<3, i32>, vec<3, i32>) -> vec<3, i32> fn clamp_5f0819() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); + var arg_2 = vec3(1); var res: vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.dxc.hlsl index b09cac0f90..aa13f0d7d2 100644 --- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_5f0819() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; - int3 arg_2 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; + int3 arg_2 = (1).xxx; int3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.fxc.hlsl index b09cac0f90..aa13f0d7d2 100644 --- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_5f0819() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; - int3 arg_2 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; + int3 arg_2 = (1).xxx; int3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl index c33d7f6702..d56a2105db 100644 --- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_5f0819() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - ivec3 arg_2 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + ivec3 arg_2 = ivec3(1); ivec3 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_5f0819() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - ivec3 arg_2 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + ivec3 arg_2 = ivec3(1); ivec3 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_5f0819() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - ivec3 arg_2 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + ivec3 arg_2 = ivec3(1); ivec3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.msl index dee705b7a2..e4086213e0 100644 --- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_5f0819() { - int3 arg_0 = int3(0); - int3 arg_1 = int3(0); - int3 arg_2 = int3(0); + int3 arg_0 = int3(1); + int3 arg_1 = int3(1); + int3 arg_2 = int3(1); int3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.spvasm index 9006081021..44ca5d7722 100644 --- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -36,45 +36,47 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v3int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_5f0819 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %arg_1 = OpVariable %_ptr_Function_v3int Function %15 - %arg_2 = OpVariable %_ptr_Function_v3int Function %15 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v3int %arg_0 - %23 = OpLoad %v3int %arg_1 - %24 = OpLoad %v3int %arg_2 - %20 = OpExtInst %v3int %21 SClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %19 + %arg_2 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v3int %arg_0 + %25 = OpLoad %v3int %arg_1 + %26 = OpLoad %v3int %arg_2 + %22 = OpExtInst %v3int %23 SClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_5f0819 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_5f0819 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_5f0819 + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_5f0819 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_5f0819 + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_5f0819 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.wgsl index dcc0a15578..198a03ed60 100644 --- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_5f0819() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); + var arg_2 = vec3(1); var res : vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl index 35f286608e..a7e94dfb28 100644 --- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl +++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<2, i32>, vec<2, i32>, vec<2, i32>) -> vec<2, i32> fn clamp_6c1749() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); + var arg_2 = vec2(1); var res: vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.dxc.hlsl index 934e1d44c1..77e3d802b8 100644 --- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_6c1749() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; - int2 arg_2 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; + int2 arg_2 = (1).xx; int2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.fxc.hlsl index 934e1d44c1..77e3d802b8 100644 --- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_6c1749() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; - int2 arg_2 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; + int2 arg_2 = (1).xx; int2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl index f1d0fbfc83..40d616fe73 100644 --- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_6c1749() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - ivec2 arg_2 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + ivec2 arg_2 = ivec2(1); ivec2 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_6c1749() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - ivec2 arg_2 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + ivec2 arg_2 = ivec2(1); ivec2 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_6c1749() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - ivec2 arg_2 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + ivec2 arg_2 = ivec2(1); ivec2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.msl index 0faacb464f..dd11a3f796 100644 --- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_6c1749() { - int2 arg_0 = int2(0); - int2 arg_1 = int2(0); - int2 arg_2 = int2(0); + int2 arg_0 = int2(1); + int2 arg_1 = int2(1); + int2 arg_2 = int2(1); int2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.spvasm index 643fab2c9a..490c50a703 100644 --- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -36,45 +36,47 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_6c1749 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %arg_1 = OpVariable %_ptr_Function_v2int Function %15 - %arg_2 = OpVariable %_ptr_Function_v2int Function %15 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v2int %arg_0 - %23 = OpLoad %v2int %arg_1 - %24 = OpLoad %v2int %arg_2 - %20 = OpExtInst %v2int %21 SClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %19 + %arg_2 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v2int %arg_0 + %25 = OpLoad %v2int %arg_1 + %26 = OpLoad %v2int %arg_2 + %22 = OpExtInst %v2int %23 SClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_6c1749 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_6c1749 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_6c1749 + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_6c1749 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_6c1749 + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_6c1749 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.wgsl index 6f0e8a31a8..8e4a5ac1a6 100644 --- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_6c1749() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); + var arg_2 = vec2(1); var res : vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl index 8833b83ead..d7fa5b9995 100644 --- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl +++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<2, u32>, vec<2, u32>, vec<2, u32>) -> vec<2, u32> fn clamp_7706d7() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); + var arg_2 = vec2(1u); var res: vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.dxc.hlsl index 89aea9d0f7..bb60ac2388 100644 --- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_7706d7() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; - uint2 arg_2 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; + uint2 arg_2 = (1u).xx; uint2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.fxc.hlsl index 89aea9d0f7..bb60ac2388 100644 --- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_7706d7() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; - uint2 arg_2 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; + uint2 arg_2 = (1u).xx; uint2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl index 643a5533d8..993b295425 100644 --- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_7706d7() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - uvec2 arg_2 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + uvec2 arg_2 = uvec2(1u); uvec2 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_7706d7() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - uvec2 arg_2 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + uvec2 arg_2 = uvec2(1u); uvec2 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_7706d7() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - uvec2 arg_2 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + uvec2 arg_2 = uvec2(1u); uvec2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.msl index 1655a2b622..e70e2d5832 100644 --- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_7706d7() { - uint2 arg_0 = uint2(0u); - uint2 arg_1 = uint2(0u); - uint2 arg_2 = uint2(0u); + uint2 arg_0 = uint2(1u); + uint2 arg_1 = uint2(1u); + uint2 arg_2 = uint2(1u); uint2 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.spvasm index 8f20ceae7c..5bd65879c1 100644 --- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -36,45 +36,47 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v2uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_7706d7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_2 = OpVariable %_ptr_Function_v2uint Function %15 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v2uint %arg_0 - %23 = OpLoad %v2uint %arg_1 - %24 = OpLoad %v2uint %arg_2 - %20 = OpExtInst %v2uint %21 UClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_2 = OpVariable %_ptr_Function_v2uint Function %19 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v2uint %arg_0 + %25 = OpLoad %v2uint %arg_1 + %26 = OpLoad %v2uint %arg_2 + %22 = OpExtInst %v2uint %23 UClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_7706d7 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_7706d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_7706d7 + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_7706d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_7706d7 + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_7706d7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.wgsl index 44b7096d1c..ca14f76cb2 100644 --- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_7706d7() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); + var arg_2 = vec2(1u); var res : vec2 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl b/test/tint/builtins/gen/var/clamp/867397.wgsl index 1ecea11404..1fc535db0d 100644 --- a/test/tint/builtins/gen/var/clamp/867397.wgsl +++ b/test/tint/builtins/gen/var/clamp/867397.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn clamp_867397() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = vec3(1.f); var res: vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.dxc.hlsl index 5a3607e2dc..08aaf748e9 100644 --- a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_867397() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.fxc.hlsl index 5a3607e2dc..08aaf748e9 100644 --- a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_867397() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.glsl index 73c0f824c1..3fd741c6c8 100644 --- a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_867397() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_867397() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_867397() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.msl index b722368891..0e88a81ddb 100644 --- a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_867397() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); - float3 arg_2 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); + float3 arg_2 = float3(1.0f); float3 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.spvasm index a27fcf4c44..6283a26f69 100644 --- a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %27 = OpTypeFunction %v4float %clamp_867397 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %arg_2 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v3float %arg_0 - %22 = OpLoad %v3float %arg_1 - %23 = OpLoad %v3float %arg_2 - %19 = OpExtInst %v3float %20 NClamp %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %arg_2 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v3float %arg_0 + %24 = OpLoad %v3float %arg_1 + %25 = OpLoad %v3float %arg_2 + %21 = OpExtInst %v3float %22 NClamp %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %clamp_867397 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %clamp_867397 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %clamp_867397 + %35 = OpLabel + %36 = OpFunctionCall %void %clamp_867397 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %clamp_867397 + %38 = OpLabel + %39 = OpFunctionCall %void %clamp_867397 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.wgsl index 48f43ad7e0..9f64a6ee9f 100644 --- a/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/867397.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_867397() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = vec3(1.0f); var res : vec3 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl index 64f80bbf01..5114870756 100644 --- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl +++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl @@ -25,9 +25,9 @@ // fn clamp(vec<4, u32>, vec<4, u32>, vec<4, u32>) -> vec<4, u32> fn clamp_bd43ce() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); + var arg_2 = vec4(1u); var res: vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.dxc.hlsl index 44a95928e3..871fa94ee7 100644 --- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void clamp_bd43ce() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; - uint4 arg_2 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; + uint4 arg_2 = (1u).xxxx; uint4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.fxc.hlsl index 44a95928e3..871fa94ee7 100644 --- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void clamp_bd43ce() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; - uint4 arg_2 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; + uint4 arg_2 = (1u).xxxx; uint4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl index 37aca593ba..be421b3334 100644 --- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void clamp_bd43ce() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - uvec4 arg_2 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + uvec4 arg_2 = uvec4(1u); uvec4 res = clamp(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void clamp_bd43ce() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - uvec4 arg_2 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + uvec4 arg_2 = uvec4(1u); uvec4 res = clamp(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void clamp_bd43ce() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - uvec4 arg_2 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + uvec4 arg_2 = uvec4(1u); uvec4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.msl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.msl index a20ab6d0ba..b4af656bc0 100644 --- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void clamp_bd43ce() { - uint4 arg_0 = uint4(0u); - uint4 arg_1 = uint4(0u); - uint4 arg_2 = uint4(0u); + uint4 arg_0 = uint4(1u); + uint4 arg_1 = uint4(1u); + uint4 arg_2 = uint4(1u); uint4 res = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.spvasm index c4c81a1ea5..465e316359 100644 --- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -36,45 +36,47 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpTypeFunction %v4float + %19 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %clamp_bd43ce = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %15 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %22 = OpLoad %v4uint %arg_0 - %23 = OpLoad %v4uint %arg_1 - %24 = OpLoad %v4uint %arg_2 - %20 = OpExtInst %v4uint %21 UClamp %22 %23 %24 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %19 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %24 = OpLoad %v4uint %arg_0 + %25 = OpLoad %v4uint %arg_1 + %26 = OpLoad %v4uint %arg_2 + %22 = OpExtInst %v4uint %23 UClamp %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %clamp_bd43ce +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %clamp_bd43ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %clamp_bd43ce + %37 = OpLabel + %38 = OpFunctionCall %void %clamp_bd43ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %clamp_bd43ce + %40 = OpLabel + %41 = OpFunctionCall %void %clamp_bd43ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.wgsl index fddc51d48c..ef14a311cf 100644 --- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn clamp_bd43ce() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); + var arg_2 = vec4(1u); var res : vec4 = clamp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl b/test/tint/builtins/gen/var/cos/16dc15.wgsl index af1d95bfb8..0e5b2db9cf 100644 --- a/test/tint/builtins/gen/var/cos/16dc15.wgsl +++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl @@ -25,7 +25,7 @@ // fn cos(vec<3, f32>) -> vec<3, f32> fn cos_16dc15() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.dxc.hlsl index 73f5a2f83e..aeb63a709b 100644 --- a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_16dc15() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.fxc.hlsl index 73f5a2f83e..aeb63a709b 100644 --- a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cos_16dc15() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.glsl index 21b1448297..84d1b0f61a 100644 --- a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cos_16dc15() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = cos(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void cos_16dc15() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = cos(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void cos_16dc15() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.msl index a93875edd9..69d0bd099b 100644 --- a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_16dc15() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.spvasm index d2308306e0..2f74c5bf49 100644 --- a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %cos_16dc15 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Cos %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Cos %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %cos_16dc15 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %cos_16dc15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %cos_16dc15 + %31 = OpLabel + %32 = OpFunctionCall %void %cos_16dc15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %cos_16dc15 + %34 = OpLabel + %35 = OpFunctionCall %void %cos_16dc15 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.wgsl index 0e3ad8b68f..7e3aef05c1 100644 --- a/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/16dc15.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_16dc15() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl b/test/tint/builtins/gen/var/cos/29d66d.wgsl index bc78623738..6f69458947 100644 --- a/test/tint/builtins/gen/var/cos/29d66d.wgsl +++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl @@ -25,7 +25,7 @@ // fn cos(vec<4, f32>) -> vec<4, f32> fn cos_29d66d() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.dxc.hlsl index 9a9e05eb3b..127e2fbb3c 100644 --- a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_29d66d() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.fxc.hlsl index 9a9e05eb3b..127e2fbb3c 100644 --- a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cos_29d66d() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.glsl index 65c80351d2..263c8d3211 100644 --- a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cos_29d66d() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = cos(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void cos_29d66d() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = cos(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void cos_29d66d() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.msl index 6f3ca2bb1b..b30c90be6f 100644 --- a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_29d66d() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.spvasm index 8c921e770a..1b4d38f60b 100644 --- a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %cos_29d66d = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Cos %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Cos %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cos_29d66d +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cos_29d66d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cos_29d66d + %29 = OpLabel + %30 = OpFunctionCall %void %cos_29d66d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cos_29d66d + %32 = OpLabel + %33 = OpFunctionCall %void %cos_29d66d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.wgsl index bc19b1f4eb..090cbe1361 100644 --- a/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/29d66d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_29d66d() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl b/test/tint/builtins/gen/var/cos/c3b486.wgsl index 979475c771..858d8b9641 100644 --- a/test/tint/builtins/gen/var/cos/c3b486.wgsl +++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl @@ -25,7 +25,7 @@ // fn cos(vec<2, f32>) -> vec<2, f32> fn cos_c3b486() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.dxc.hlsl index cd82afc767..1e1389c63b 100644 --- a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cos_c3b486() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.fxc.hlsl index cd82afc767..1e1389c63b 100644 --- a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cos_c3b486() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.glsl b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.glsl index 03fb395b16..c4851f5c62 100644 --- a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cos_c3b486() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = cos(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void cos_c3b486() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = cos(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void cos_c3b486() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.msl b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.msl index 4e0e3b4a08..cade059182 100644 --- a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cos_c3b486() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.spvasm index a4bb57fde2..b8a58de530 100644 --- a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %cos_c3b486 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Cos %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Cos %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %cos_c3b486 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %cos_c3b486 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %cos_c3b486 + %31 = OpLabel + %32 = OpFunctionCall %void %cos_c3b486 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %cos_c3b486 + %34 = OpLabel + %35 = OpFunctionCall %void %cos_c3b486 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.wgsl index 3fa3a8af53..c4f69019f1 100644 --- a/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/c3b486.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_c3b486() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c5c28e.wgsl b/test/tint/builtins/gen/var/cos/c5c28e.wgsl index d680525caa..3cd4f822b9 100644 --- a/test/tint/builtins/gen/var/cos/c5c28e.wgsl +++ b/test/tint/builtins/gen/var/cos/c5c28e.wgsl @@ -25,7 +25,7 @@ // fn cos(f32) -> f32 fn cos_c5c28e() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.wgsl index f4a349634a..0356754222 100644 --- a/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cos/c5c28e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cos_c5c28e() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = cos(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl b/test/tint/builtins/gen/var/cosh/377652.wgsl index 4be962335f..2fcfb8a509 100644 --- a/test/tint/builtins/gen/var/cosh/377652.wgsl +++ b/test/tint/builtins/gen/var/cosh/377652.wgsl @@ -25,7 +25,7 @@ // fn cosh(vec<3, f32>) -> vec<3, f32> fn cosh_377652() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.dxc.hlsl index 4b6ec3e6ab..1a8733f161 100644 --- a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_377652() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.fxc.hlsl index 4b6ec3e6ab..1a8733f161 100644 --- a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cosh_377652() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.glsl index bd306d800b..e6afbd866d 100644 --- a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cosh_377652() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = cosh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void cosh_377652() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = cosh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void cosh_377652() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.msl index e177d54dbc..baa735beb6 100644 --- a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_377652() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.spvasm index 4007fb3c59..8f33d505b9 100644 --- a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %cosh_377652 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Cosh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Cosh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %cosh_377652 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %cosh_377652 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %cosh_377652 + %31 = OpLabel + %32 = OpFunctionCall %void %cosh_377652 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %cosh_377652 + %34 = OpLabel + %35 = OpFunctionCall %void %cosh_377652 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.wgsl index 1fbd605fc3..6196cadb85 100644 --- a/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/377652.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_377652() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl b/test/tint/builtins/gen/var/cosh/c13756.wgsl index 64cf4ca45f..2cd78b8f78 100644 --- a/test/tint/builtins/gen/var/cosh/c13756.wgsl +++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl @@ -25,7 +25,7 @@ // fn cosh(vec<2, f32>) -> vec<2, f32> fn cosh_c13756() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.dxc.hlsl index 1c53a74ef4..7136500a20 100644 --- a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_c13756() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.fxc.hlsl index 1c53a74ef4..7136500a20 100644 --- a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cosh_c13756() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.glsl index 4d9ef69341..b484ca753d 100644 --- a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cosh_c13756() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = cosh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void cosh_c13756() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = cosh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void cosh_c13756() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.msl index 4ce9fd6e1a..93ce84c77e 100644 --- a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_c13756() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.spvasm index faad53484f..246ed00bcc 100644 --- a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %cosh_c13756 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Cosh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Cosh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %cosh_c13756 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %cosh_c13756 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %cosh_c13756 + %31 = OpLabel + %32 = OpFunctionCall %void %cosh_c13756 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %cosh_c13756 + %34 = OpLabel + %35 = OpFunctionCall %void %cosh_c13756 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.wgsl index 174271b1b5..2b9a859ab8 100644 --- a/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/c13756.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_c13756() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/da92dd.wgsl b/test/tint/builtins/gen/var/cosh/da92dd.wgsl index 46149314ab..721670330c 100644 --- a/test/tint/builtins/gen/var/cosh/da92dd.wgsl +++ b/test/tint/builtins/gen/var/cosh/da92dd.wgsl @@ -25,7 +25,7 @@ // fn cosh(f32) -> f32 fn cosh_da92dd() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.wgsl index aa89982df4..92c780e9f7 100644 --- a/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/da92dd.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_da92dd() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl index 20b68e279c..a525a5b340 100644 --- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl +++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl @@ -25,7 +25,7 @@ // fn cosh(vec<4, f32>) -> vec<4, f32> fn cosh_e0c1de() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.dxc.hlsl index 57edfcd129..37d3c569eb 100644 --- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cosh_e0c1de() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.fxc.hlsl index 57edfcd129..37d3c569eb 100644 --- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cosh_e0c1de() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.glsl b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.glsl index 713d23de4f..48eb02fe6e 100644 --- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cosh_e0c1de() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = cosh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void cosh_e0c1de() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = cosh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void cosh_e0c1de() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.msl b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.msl index dba84b5ff0..c96ffa68c5 100644 --- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cosh_e0c1de() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.spvasm index b788bac726..fba4a835b2 100644 --- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %cosh_e0c1de = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Cosh %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Cosh %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cosh_e0c1de +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cosh_e0c1de OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cosh_e0c1de + %29 = OpLabel + %30 = OpFunctionCall %void %cosh_e0c1de OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cosh_e0c1de + %32 = OpLabel + %33 = OpFunctionCall %void %cosh_e0c1de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.wgsl index 5464947f7f..46f14b868a 100644 --- a/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cosh/e0c1de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cosh_e0c1de() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = cosh(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl index 708e39eed7..3f858d3b1a 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<2, u32>) -> vec<2, u32> fn countLeadingZeros_70783f() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res: vec2 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl index 90d4b5bdcd..d1fb0c6d14 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_leading_zeros(uint2 v) { } void countLeadingZeros_70783f() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl index 90d4b5bdcd..d1fb0c6d14 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_leading_zeros(uint2 v) { } void countLeadingZeros_70783f() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl index c7763c590e..22a8c45e9f 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_count_leading_zeros(uvec2 v) { } void countLeadingZeros_70783f() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_count_leading_zeros(arg_0); } @@ -52,7 +52,7 @@ uvec2 tint_count_leading_zeros(uvec2 v) { } void countLeadingZeros_70783f() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_count_leading_zeros(arg_0); } @@ -82,7 +82,7 @@ uvec2 tint_count_leading_zeros(uvec2 v) { } void countLeadingZeros_70783f() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.msl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.msl index eb39a9f318..e79069ae67 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_70783f() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint2 res = clz(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.spvasm index 6bf8e615cc..869590d9e2 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.spvasm @@ -109,7 +109,7 @@ %76 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2uint Function %18 %res = OpVariable %_ptr_Function_v2uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %63 %79 = OpLoad %v2uint %arg_0 %78 = OpFunctionCall %v2uint %tint_count_leading_zeros %79 OpStore %res %78 diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.wgsl index 1be223d26f..27e31b6105 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_70783f() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res : vec2 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl index e85aae2fd5..039ba56f69 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<3, i32>) -> vec<3, i32> fn countLeadingZeros_7c38a6() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res: vec3 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl index a22216298f..07c2c53af0 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_leading_zeros(int3 v) { } void countLeadingZeros_7c38a6() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl index a22216298f..07c2c53af0 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_leading_zeros(int3 v) { } void countLeadingZeros_7c38a6() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl index 56378593c8..bfef89e604 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_count_leading_zeros(ivec3 v) { } void countLeadingZeros_7c38a6() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_count_leading_zeros(arg_0); } @@ -52,7 +52,7 @@ ivec3 tint_count_leading_zeros(ivec3 v) { } void countLeadingZeros_7c38a6() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_count_leading_zeros(arg_0); } @@ -82,7 +82,7 @@ ivec3 tint_count_leading_zeros(ivec3 v) { } void countLeadingZeros_7c38a6() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.msl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.msl index d6a5cf646d..05f2c9c52a 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_7c38a6() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); int3 res = clz(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.spvasm index 13be646769..fa15928f9f 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 99 +; Bound: 101 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,9 +63,11 @@ %65 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %75 = OpTypeFunction %void - %79 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %80 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %85 = OpTypeFunction %v4float + %83 = OpConstantNull %v3int + %87 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_leading_zeros = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -113,33 +115,33 @@ OpFunctionEnd %countLeadingZeros_7c38a6 = OpFunction %void None %75 %78 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %79 - %res = OpVariable %_ptr_Function_v3int Function %79 - OpStore %arg_0 %79 - %83 = OpLoad %v3int %arg_0 - %82 = OpFunctionCall %v3int %tint_count_leading_zeros %83 - OpStore %res %82 + %arg_0 = OpVariable %_ptr_Function_v3int Function %83 + %res = OpVariable %_ptr_Function_v3int Function %83 + OpStore %arg_0 %80 + %85 = OpLoad %v3int %arg_0 + %84 = OpFunctionCall %v3int %tint_count_leading_zeros %85 + OpStore %res %84 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %85 - %87 = OpLabel - %88 = OpFunctionCall %void %countLeadingZeros_7c38a6 +%vertex_main_inner = OpFunction %v4float None %87 + %89 = OpLabel + %90 = OpFunctionCall %void %countLeadingZeros_7c38a6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %75 - %90 = OpLabel - %91 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %91 + %92 = OpLabel + %93 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %93 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %75 - %94 = OpLabel - %95 = OpFunctionCall %void %countLeadingZeros_7c38a6 + %96 = OpLabel + %97 = OpFunctionCall %void %countLeadingZeros_7c38a6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %75 - %97 = OpLabel - %98 = OpFunctionCall %void %countLeadingZeros_7c38a6 + %99 = OpLabel + %100 = OpFunctionCall %void %countLeadingZeros_7c38a6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.wgsl index 8134473594..3e75705fc5 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_7c38a6() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res : vec3 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl index bbc1b6ce6c..56249d3d07 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<2, i32>) -> vec<2, i32> fn countLeadingZeros_858d40() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res: vec2 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl index 554c876e9f..d7b466fa18 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_leading_zeros(int2 v) { } void countLeadingZeros_858d40() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl index 554c876e9f..d7b466fa18 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_leading_zeros(int2 v) { } void countLeadingZeros_858d40() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl index 37ad0cdc21..5608edd9e8 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_count_leading_zeros(ivec2 v) { } void countLeadingZeros_858d40() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_count_leading_zeros(arg_0); } @@ -52,7 +52,7 @@ ivec2 tint_count_leading_zeros(ivec2 v) { } void countLeadingZeros_858d40() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_count_leading_zeros(arg_0); } @@ -82,7 +82,7 @@ ivec2 tint_count_leading_zeros(ivec2 v) { } void countLeadingZeros_858d40() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.msl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.msl index 936cead3aa..cb4b096ac9 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_858d40() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); int2 res = clz(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.spvasm index 9713d96256..f09f222492 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 99 +; Bound: 101 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,9 +63,11 @@ %65 = OpConstantComposite %v2uint %uint_1 %uint_1 %void = OpTypeVoid %75 = OpTypeFunction %void - %79 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %80 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %85 = OpTypeFunction %v4float + %83 = OpConstantNull %v2int + %87 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_leading_zeros = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -113,33 +115,33 @@ OpFunctionEnd %countLeadingZeros_858d40 = OpFunction %void None %75 %78 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %79 - %res = OpVariable %_ptr_Function_v2int Function %79 - OpStore %arg_0 %79 - %83 = OpLoad %v2int %arg_0 - %82 = OpFunctionCall %v2int %tint_count_leading_zeros %83 - OpStore %res %82 + %arg_0 = OpVariable %_ptr_Function_v2int Function %83 + %res = OpVariable %_ptr_Function_v2int Function %83 + OpStore %arg_0 %80 + %85 = OpLoad %v2int %arg_0 + %84 = OpFunctionCall %v2int %tint_count_leading_zeros %85 + OpStore %res %84 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %85 - %87 = OpLabel - %88 = OpFunctionCall %void %countLeadingZeros_858d40 +%vertex_main_inner = OpFunction %v4float None %87 + %89 = OpLabel + %90 = OpFunctionCall %void %countLeadingZeros_858d40 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %75 - %90 = OpLabel - %91 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %91 + %92 = OpLabel + %93 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %93 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %75 - %94 = OpLabel - %95 = OpFunctionCall %void %countLeadingZeros_858d40 + %96 = OpLabel + %97 = OpFunctionCall %void %countLeadingZeros_858d40 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %75 - %97 = OpLabel - %98 = OpFunctionCall %void %countLeadingZeros_858d40 + %99 = OpLabel + %100 = OpFunctionCall %void %countLeadingZeros_858d40 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.wgsl index 41f4dedf83..9641853620 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_858d40() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res : vec2 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl index e9073605d9..ad4cb83532 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<3, u32>) -> vec<3, u32> fn countLeadingZeros_ab6345() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res: vec3 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl index 8ce7db4836..2ca1c78096 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_leading_zeros(uint3 v) { } void countLeadingZeros_ab6345() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl index 8ce7db4836..2ca1c78096 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_leading_zeros(uint3 v) { } void countLeadingZeros_ab6345() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl index 9718304023..5da2eb62c9 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_count_leading_zeros(uvec3 v) { } void countLeadingZeros_ab6345() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_count_leading_zeros(arg_0); } @@ -52,7 +52,7 @@ uvec3 tint_count_leading_zeros(uvec3 v) { } void countLeadingZeros_ab6345() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_count_leading_zeros(arg_0); } @@ -82,7 +82,7 @@ uvec3 tint_count_leading_zeros(uvec3 v) { } void countLeadingZeros_ab6345() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.msl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.msl index da91869393..080bc735e7 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_ab6345() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint3 res = clz(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.spvasm index fbe6e6a017..e152518f90 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.spvasm @@ -109,7 +109,7 @@ %76 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3uint Function %18 %res = OpVariable %_ptr_Function_v3uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %63 %79 = OpLoad %v3uint %arg_0 %78 = OpFunctionCall %v3uint %tint_count_leading_zeros %79 OpStore %res %78 diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.wgsl index 70c66e2ab0..abf1355c3a 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_ab6345() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res : vec3 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl index 25d15db376..95308b63fd 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<4, i32>) -> vec<4, i32> fn countLeadingZeros_eab32b() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res: vec4 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl index 0c0038e915..945fbe238e 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_leading_zeros(int4 v) { } void countLeadingZeros_eab32b() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl index 0c0038e915..945fbe238e 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_leading_zeros(int4 v) { } void countLeadingZeros_eab32b() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl index 54da7b1035..32c3d54e7d 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_count_leading_zeros(ivec4 v) { } void countLeadingZeros_eab32b() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_count_leading_zeros(arg_0); } @@ -52,7 +52,7 @@ ivec4 tint_count_leading_zeros(ivec4 v) { } void countLeadingZeros_eab32b() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_count_leading_zeros(arg_0); } @@ -82,7 +82,7 @@ ivec4 tint_count_leading_zeros(ivec4 v) { } void countLeadingZeros_eab32b() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.msl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.msl index e057ee92e2..dc41bfefbd 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_eab32b() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); int4 res = clz(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.spvasm index e5abbcf218..da49ea1253 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 99 +; Bound: 101 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,9 +63,11 @@ %65 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %75 = OpTypeFunction %void - %79 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %80 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %85 = OpTypeFunction %v4float + %83 = OpConstantNull %v4int + %87 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_leading_zeros = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -113,33 +115,33 @@ OpFunctionEnd %countLeadingZeros_eab32b = OpFunction %void None %75 %78 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %79 - %res = OpVariable %_ptr_Function_v4int Function %79 - OpStore %arg_0 %79 - %83 = OpLoad %v4int %arg_0 - %82 = OpFunctionCall %v4int %tint_count_leading_zeros %83 - OpStore %res %82 + %arg_0 = OpVariable %_ptr_Function_v4int Function %83 + %res = OpVariable %_ptr_Function_v4int Function %83 + OpStore %arg_0 %80 + %85 = OpLoad %v4int %arg_0 + %84 = OpFunctionCall %v4int %tint_count_leading_zeros %85 + OpStore %res %84 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %85 - %87 = OpLabel - %88 = OpFunctionCall %void %countLeadingZeros_eab32b +%vertex_main_inner = OpFunction %v4float None %87 + %89 = OpLabel + %90 = OpFunctionCall %void %countLeadingZeros_eab32b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %75 - %90 = OpLabel - %91 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %91 + %92 = OpLabel + %93 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %93 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %75 - %94 = OpLabel - %95 = OpFunctionCall %void %countLeadingZeros_eab32b + %96 = OpLabel + %97 = OpFunctionCall %void %countLeadingZeros_eab32b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %75 - %97 = OpLabel - %98 = OpFunctionCall %void %countLeadingZeros_eab32b + %99 = OpLabel + %100 = OpFunctionCall %void %countLeadingZeros_eab32b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.wgsl index 148e8dda3e..c7057d3355 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_eab32b() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res : vec4 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl index 5d7ba1ecc5..761c2082e6 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl @@ -25,7 +25,7 @@ // fn countLeadingZeros(vec<4, u32>) -> vec<4, u32> fn countLeadingZeros_f70103() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res: vec4 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl index 073158b3ee..d5f3876346 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_leading_zeros(uint4 v) { } void countLeadingZeros_f70103() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl index 073158b3ee..d5f3876346 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_leading_zeros(uint4 v) { } void countLeadingZeros_f70103() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl index 3f589ec3fd..472ba3213b 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_count_leading_zeros(uvec4 v) { } void countLeadingZeros_f70103() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_count_leading_zeros(arg_0); } @@ -52,7 +52,7 @@ uvec4 tint_count_leading_zeros(uvec4 v) { } void countLeadingZeros_f70103() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_count_leading_zeros(arg_0); } @@ -82,7 +82,7 @@ uvec4 tint_count_leading_zeros(uvec4 v) { } void countLeadingZeros_f70103() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_count_leading_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.msl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.msl index ff67225ae4..2f462c8153 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countLeadingZeros_f70103() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint4 res = clz(arg_0); } diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.spvasm index a28fd9cc0c..03ed1f963e 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.spvasm @@ -109,7 +109,7 @@ %76 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4uint Function %18 %res = OpVariable %_ptr_Function_v4uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %63 %79 = OpLoad %v4uint %arg_0 %78 = OpFunctionCall %v4uint %tint_count_leading_zeros %79 OpStore %res %78 diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.wgsl index 335e6b57fc..7ff370cd5d 100644 --- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countLeadingZeros_f70103() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res : vec4 = countLeadingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl index ae4744b0b9..bcf54c12f0 100644 --- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<4, u32>) -> vec<4, u32> fn countOneBits_0d0e46() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res: vec4 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.dxc.hlsl index 65d9518f22..3c1a064914 100644 --- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0d0e46() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = countbits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.fxc.hlsl index 65d9518f22..3c1a064914 100644 --- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0d0e46() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = countbits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.glsl b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.glsl index a5c7b974b2..72feada534 100644 --- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_0d0e46() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = uvec4(bitCount(arg_0)); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void countOneBits_0d0e46() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = uvec4(bitCount(arg_0)); } @@ -37,7 +37,7 @@ void main() { #version 310 es void countOneBits_0d0e46() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = uvec4(bitCount(arg_0)); } diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.msl b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.msl index a08898f16c..d7e418d964 100644 --- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_0d0e46() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint4 res = popcount(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.spvasm index d80bfd798f..8ce78110da 100644 --- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v4uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_0d0e46 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v4uint %arg_0 - %18 = OpBitCount %v4uint %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v4uint %arg_0 + %20 = OpBitCount %v4uint %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %countOneBits_0d0e46 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %countOneBits_0d0e46 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %countOneBits_0d0e46 + %32 = OpLabel + %33 = OpFunctionCall %void %countOneBits_0d0e46 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %countOneBits_0d0e46 + %35 = OpLabel + %36 = OpFunctionCall %void %countOneBits_0d0e46 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.wgsl index a63706539b..af94001510 100644 --- a/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/0d0e46.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_0d0e46() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res : vec4 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl index e838c5f43c..aaedeb2cab 100644 --- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<4, i32>) -> vec<4, i32> fn countOneBits_0f7980() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res: vec4 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.dxc.hlsl index 0fd2b2eac8..6e2d8352b9 100644 --- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0f7980() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = asint(countbits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.fxc.hlsl index 0fd2b2eac8..6e2d8352b9 100644 --- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_0f7980() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = asint(countbits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.glsl b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.glsl index 627bd2b597..693d84ea72 100644 --- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_0f7980() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = ivec4(bitCount(arg_0)); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void countOneBits_0f7980() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = ivec4(bitCount(arg_0)); } @@ -37,7 +37,7 @@ void main() { #version 310 es void countOneBits_0f7980() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = ivec4(bitCount(arg_0)); } diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.msl b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.msl index 39c833d903..f54cd90cdf 100644 --- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_0f7980() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); int4 res = popcount(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.spvasm index 31f4f89952..b3ecc12356 100644 --- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v4int + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_0f7980 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v4int %arg_0 - %18 = OpBitCount %v4int %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v4int %arg_0 + %20 = OpBitCount %v4int %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %countOneBits_0f7980 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %countOneBits_0f7980 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %countOneBits_0f7980 + %32 = OpLabel + %33 = OpFunctionCall %void %countOneBits_0f7980 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %countOneBits_0f7980 + %35 = OpLabel + %36 = OpFunctionCall %void %countOneBits_0f7980 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.wgsl index d96bd55565..739f34dffe 100644 --- a/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/0f7980.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_0f7980() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res : vec4 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl index 6fff4584d2..9d40c1c8d0 100644 --- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<3, i32>) -> vec<3, i32> fn countOneBits_65d2ae() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res: vec3 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.dxc.hlsl index d93901e7c4..ef6ef81421 100644 --- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_65d2ae() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = asint(countbits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.fxc.hlsl index d93901e7c4..ef6ef81421 100644 --- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_65d2ae() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = asint(countbits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.glsl b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.glsl index f7f55d377b..62f967fb9c 100644 --- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_65d2ae() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = ivec3(bitCount(arg_0)); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void countOneBits_65d2ae() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = ivec3(bitCount(arg_0)); } @@ -37,7 +37,7 @@ void main() { #version 310 es void countOneBits_65d2ae() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = ivec3(bitCount(arg_0)); } diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.msl b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.msl index 862de76224..e1151d4c9a 100644 --- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_65d2ae() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); int3 res = popcount(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.spvasm index c0d6318401..7b6122e42e 100644 --- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v3int + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_65d2ae = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v3int %arg_0 - %18 = OpBitCount %v3int %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v3int %arg_0 + %20 = OpBitCount %v3int %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %countOneBits_65d2ae +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %countOneBits_65d2ae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %countOneBits_65d2ae + %32 = OpLabel + %33 = OpFunctionCall %void %countOneBits_65d2ae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %countOneBits_65d2ae + %35 = OpLabel + %36 = OpFunctionCall %void %countOneBits_65d2ae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.wgsl index 7822ad944c..e3c751adf3 100644 --- a/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/65d2ae.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_65d2ae() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res : vec3 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl index ce01495b9f..f5447ca39f 100644 --- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<3, u32>) -> vec<3, u32> fn countOneBits_690cfc() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res: vec3 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.dxc.hlsl index 41849453dd..cde2efd10b 100644 --- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_690cfc() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = countbits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.fxc.hlsl index 41849453dd..cde2efd10b 100644 --- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_690cfc() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = countbits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.glsl b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.glsl index 038c4a9e28..583c4c9067 100644 --- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_690cfc() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = uvec3(bitCount(arg_0)); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void countOneBits_690cfc() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = uvec3(bitCount(arg_0)); } @@ -37,7 +37,7 @@ void main() { #version 310 es void countOneBits_690cfc() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = uvec3(bitCount(arg_0)); } diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.msl b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.msl index d0460a80a9..9ac2be0798 100644 --- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_690cfc() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint3 res = popcount(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.spvasm index b6ddf63556..097fb8e1aa 100644 --- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v3uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_690cfc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v3uint %arg_0 - %18 = OpBitCount %v3uint %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v3uint %arg_0 + %20 = OpBitCount %v3uint %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %countOneBits_690cfc +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %countOneBits_690cfc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %countOneBits_690cfc + %32 = OpLabel + %33 = OpFunctionCall %void %countOneBits_690cfc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %countOneBits_690cfc + %35 = OpLabel + %36 = OpFunctionCall %void %countOneBits_690cfc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.wgsl index 15f3f7fdbe..cf36f505e9 100644 --- a/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/690cfc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_690cfc() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res : vec3 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl index 829ed10ae6..ab466cc4dd 100644 --- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<2, u32>) -> vec<2, u32> fn countOneBits_94fd81() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res: vec2 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.dxc.hlsl index 962e4478cc..016aa3c684 100644 --- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_94fd81() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = countbits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.fxc.hlsl index 962e4478cc..016aa3c684 100644 --- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_94fd81() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = countbits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.glsl b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.glsl index abbdc4c5eb..e092a1941e 100644 --- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_94fd81() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = uvec2(bitCount(arg_0)); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void countOneBits_94fd81() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = uvec2(bitCount(arg_0)); } @@ -37,7 +37,7 @@ void main() { #version 310 es void countOneBits_94fd81() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = uvec2(bitCount(arg_0)); } diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.msl b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.msl index f41704e7e2..7f22c6bfd1 100644 --- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_94fd81() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint2 res = popcount(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.spvasm index d099bc2561..60720c8c1b 100644 --- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v2uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_94fd81 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v2uint %arg_0 - %18 = OpBitCount %v2uint %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v2uint %arg_0 + %20 = OpBitCount %v2uint %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %countOneBits_94fd81 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %countOneBits_94fd81 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %countOneBits_94fd81 + %32 = OpLabel + %33 = OpFunctionCall %void %countOneBits_94fd81 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %countOneBits_94fd81 + %35 = OpLabel + %36 = OpFunctionCall %void %countOneBits_94fd81 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.wgsl index 6925afb241..e237e7ac09 100644 --- a/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/94fd81.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_94fd81() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res : vec2 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl index 5d14ec563a..9ab34889dc 100644 --- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl @@ -25,7 +25,7 @@ // fn countOneBits(vec<2, i32>) -> vec<2, i32> fn countOneBits_af90e2() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res: vec2 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.dxc.hlsl index c68afc7207..533b326674 100644 --- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_af90e2() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = asint(countbits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.fxc.hlsl index c68afc7207..533b326674 100644 --- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void countOneBits_af90e2() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = asint(countbits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.glsl b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.glsl index 9ce908d137..3db2472363 100644 --- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void countOneBits_af90e2() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = ivec2(bitCount(arg_0)); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void countOneBits_af90e2() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = ivec2(bitCount(arg_0)); } @@ -37,7 +37,7 @@ void main() { #version 310 es void countOneBits_af90e2() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = ivec2(bitCount(arg_0)); } diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.msl b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.msl index 8239226feb..afda6524d2 100644 --- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countOneBits_af90e2() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); int2 res = popcount(arg_0); } diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.spvasm index 4b30596666..814be8ba5b 100644 --- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v2int + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %countOneBits_af90e2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v2int %arg_0 - %18 = OpBitCount %v2int %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v2int %arg_0 + %20 = OpBitCount %v2int %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %countOneBits_af90e2 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %countOneBits_af90e2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %countOneBits_af90e2 + %32 = OpLabel + %33 = OpFunctionCall %void %countOneBits_af90e2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %countOneBits_af90e2 + %35 = OpLabel + %36 = OpFunctionCall %void %countOneBits_af90e2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.wgsl index d64dedad3b..363086fac5 100644 --- a/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countOneBits/af90e2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countOneBits_af90e2() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res : vec2 = countOneBits(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl index 5f68b883f9..d2c3e69709 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<2, u32>) -> vec<2, u32> fn countTrailingZeros_1ad138() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res: vec2 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl index 789f233fd6..afb63e86e0 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_trailing_zeros(uint2 v) { } void countTrailingZeros_1ad138() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl index 789f233fd6..afb63e86e0 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_count_trailing_zeros(uint2 v) { } void countTrailingZeros_1ad138() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl index 1c3447b1bd..e3cd7e91f5 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_count_trailing_zeros(uvec2 v) { } void countTrailingZeros_1ad138() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_count_trailing_zeros(arg_0); } @@ -52,7 +52,7 @@ uvec2 tint_count_trailing_zeros(uvec2 v) { } void countTrailingZeros_1ad138() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_count_trailing_zeros(arg_0); } @@ -82,7 +82,7 @@ uvec2 tint_count_trailing_zeros(uvec2 v) { } void countTrailingZeros_1ad138() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.msl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.msl index c9a3f49fb6..347a560bc1 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_1ad138() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint2 res = ctz(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.spvasm index e782aa6160..beda11c11a 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %79 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2uint Function %18 %res = OpVariable %_ptr_Function_v2uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %65 %82 = OpLoad %v2uint %arg_0 %81 = OpFunctionCall %v2uint %tint_count_trailing_zeros %82 OpStore %res %81 diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.wgsl index b11da61029..e80e5fedaa 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_1ad138() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res : vec2 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl index 61c6cc2b4e..b8e49b95d7 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<4, i32>) -> vec<4, i32> fn countTrailingZeros_1dc84a() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res: vec4 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl index 54f1937ad5..596f2110a5 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_trailing_zeros(int4 v) { } void countTrailingZeros_1dc84a() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl index 54f1937ad5..596f2110a5 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_count_trailing_zeros(int4 v) { } void countTrailingZeros_1dc84a() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl index 5868bbe169..c94ebd8f7c 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_count_trailing_zeros(ivec4 v) { } void countTrailingZeros_1dc84a() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_count_trailing_zeros(arg_0); } @@ -52,7 +52,7 @@ ivec4 tint_count_trailing_zeros(ivec4 v) { } void countTrailingZeros_1dc84a() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_count_trailing_zeros(arg_0); } @@ -82,7 +82,7 @@ ivec4 tint_count_trailing_zeros(ivec4 v) { } void countTrailingZeros_1dc84a() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.msl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.msl index 0d8f6ecee6..a7c85816b5 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_1dc84a() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); int4 res = ctz(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.spvasm index e4f2586b9f..f3f97a816e 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 102 +; Bound: 104 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -61,9 +61,11 @@ %67 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %78 = OpTypeFunction %void - %82 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %83 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %88 = OpTypeFunction %v4float + %86 = OpConstantNull %v4int + %90 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_trailing_zeros = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -116,33 +118,33 @@ OpFunctionEnd %countTrailingZeros_1dc84a = OpFunction %void None %78 %81 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %82 - %res = OpVariable %_ptr_Function_v4int Function %82 - OpStore %arg_0 %82 - %86 = OpLoad %v4int %arg_0 - %85 = OpFunctionCall %v4int %tint_count_trailing_zeros %86 - OpStore %res %85 + %arg_0 = OpVariable %_ptr_Function_v4int Function %86 + %res = OpVariable %_ptr_Function_v4int Function %86 + OpStore %arg_0 %83 + %88 = OpLoad %v4int %arg_0 + %87 = OpFunctionCall %v4int %tint_count_trailing_zeros %88 + OpStore %res %87 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %88 - %90 = OpLabel - %91 = OpFunctionCall %void %countTrailingZeros_1dc84a +%vertex_main_inner = OpFunction %v4float None %90 + %92 = OpLabel + %93 = OpFunctionCall %void %countTrailingZeros_1dc84a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %78 - %93 = OpLabel - %94 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %94 + %95 = OpLabel + %96 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %96 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %78 - %97 = OpLabel - %98 = OpFunctionCall %void %countTrailingZeros_1dc84a + %99 = OpLabel + %100 = OpFunctionCall %void %countTrailingZeros_1dc84a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %78 - %100 = OpLabel - %101 = OpFunctionCall %void %countTrailingZeros_1dc84a + %102 = OpLabel + %103 = OpFunctionCall %void %countTrailingZeros_1dc84a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.wgsl index ea85d0fe82..4556332577 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_1dc84a() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res : vec4 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl index bace43dad4..e62371e712 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<2, i32>) -> vec<2, i32> fn countTrailingZeros_327c37() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res: vec2 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl index 2be49d7fd1..0e85869696 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_trailing_zeros(int2 v) { } void countTrailingZeros_327c37() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl index 2be49d7fd1..0e85869696 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_count_trailing_zeros(int2 v) { } void countTrailingZeros_327c37() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl index 192df0727d..8dd29793bc 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_count_trailing_zeros(ivec2 v) { } void countTrailingZeros_327c37() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_count_trailing_zeros(arg_0); } @@ -52,7 +52,7 @@ ivec2 tint_count_trailing_zeros(ivec2 v) { } void countTrailingZeros_327c37() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_count_trailing_zeros(arg_0); } @@ -82,7 +82,7 @@ ivec2 tint_count_trailing_zeros(ivec2 v) { } void countTrailingZeros_327c37() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.msl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.msl index c0a88c524a..fb1d1dff48 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_327c37() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); int2 res = ctz(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.spvasm index 8c108bdd48..d086314bba 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 102 +; Bound: 104 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -61,9 +61,11 @@ %67 = OpConstantComposite %v2uint %uint_1 %uint_1 %void = OpTypeVoid %78 = OpTypeFunction %void - %82 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %83 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %88 = OpTypeFunction %v4float + %86 = OpConstantNull %v2int + %90 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_trailing_zeros = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -116,33 +118,33 @@ OpFunctionEnd %countTrailingZeros_327c37 = OpFunction %void None %78 %81 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %82 - %res = OpVariable %_ptr_Function_v2int Function %82 - OpStore %arg_0 %82 - %86 = OpLoad %v2int %arg_0 - %85 = OpFunctionCall %v2int %tint_count_trailing_zeros %86 - OpStore %res %85 + %arg_0 = OpVariable %_ptr_Function_v2int Function %86 + %res = OpVariable %_ptr_Function_v2int Function %86 + OpStore %arg_0 %83 + %88 = OpLoad %v2int %arg_0 + %87 = OpFunctionCall %v2int %tint_count_trailing_zeros %88 + OpStore %res %87 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %88 - %90 = OpLabel - %91 = OpFunctionCall %void %countTrailingZeros_327c37 +%vertex_main_inner = OpFunction %v4float None %90 + %92 = OpLabel + %93 = OpFunctionCall %void %countTrailingZeros_327c37 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %78 - %93 = OpLabel - %94 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %94 + %95 = OpLabel + %96 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %96 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %78 - %97 = OpLabel - %98 = OpFunctionCall %void %countTrailingZeros_327c37 + %99 = OpLabel + %100 = OpFunctionCall %void %countTrailingZeros_327c37 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %78 - %100 = OpLabel - %101 = OpFunctionCall %void %countTrailingZeros_327c37 + %102 = OpLabel + %103 = OpFunctionCall %void %countTrailingZeros_327c37 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.wgsl index 292b0a710d..22d9fb892c 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_327c37() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res : vec2 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl index 134ed8457d..ea048b40bf 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<3, u32>) -> vec<3, u32> fn countTrailingZeros_8ed26f() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res: vec3 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl index 8f96543f78..12171a800c 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_trailing_zeros(uint3 v) { } void countTrailingZeros_8ed26f() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl index 8f96543f78..12171a800c 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_count_trailing_zeros(uint3 v) { } void countTrailingZeros_8ed26f() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl index 84eee228ab..0fcada9132 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_count_trailing_zeros(uvec3 v) { } void countTrailingZeros_8ed26f() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_count_trailing_zeros(arg_0); } @@ -52,7 +52,7 @@ uvec3 tint_count_trailing_zeros(uvec3 v) { } void countTrailingZeros_8ed26f() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_count_trailing_zeros(arg_0); } @@ -82,7 +82,7 @@ uvec3 tint_count_trailing_zeros(uvec3 v) { } void countTrailingZeros_8ed26f() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.msl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.msl index 04bd4b100c..2545f18ddc 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_8ed26f() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint3 res = ctz(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.spvasm index bc80f734d6..37e494814c 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %79 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3uint Function %18 %res = OpVariable %_ptr_Function_v3uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %65 %82 = OpLoad %v3uint %arg_0 %81 = OpFunctionCall %v3uint %tint_count_trailing_zeros %82 OpStore %res %81 diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.wgsl index 8fa99cc170..b3d15ef437 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_8ed26f() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res : vec3 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl index 91531cc763..d95adb18cf 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<3, i32>) -> vec<3, i32> fn countTrailingZeros_acfacb() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res: vec3 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl index c3f8ccdb55..54a07377a7 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_trailing_zeros(int3 v) { } void countTrailingZeros_acfacb() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl index c3f8ccdb55..54a07377a7 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_count_trailing_zeros(int3 v) { } void countTrailingZeros_acfacb() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl index 01d97fb727..78fee76b05 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_count_trailing_zeros(ivec3 v) { } void countTrailingZeros_acfacb() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_count_trailing_zeros(arg_0); } @@ -52,7 +52,7 @@ ivec3 tint_count_trailing_zeros(ivec3 v) { } void countTrailingZeros_acfacb() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_count_trailing_zeros(arg_0); } @@ -82,7 +82,7 @@ ivec3 tint_count_trailing_zeros(ivec3 v) { } void countTrailingZeros_acfacb() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.msl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.msl index 53c17f485e..ed30e64f53 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_acfacb() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); int3 res = ctz(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.spvasm index b931079d15..441385376c 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 102 +; Bound: 104 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -61,9 +61,11 @@ %67 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %void = OpTypeVoid %78 = OpTypeFunction %void - %82 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %83 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %88 = OpTypeFunction %v4float + %86 = OpConstantNull %v3int + %90 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_count_trailing_zeros = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -116,33 +118,33 @@ OpFunctionEnd %countTrailingZeros_acfacb = OpFunction %void None %78 %81 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %82 - %res = OpVariable %_ptr_Function_v3int Function %82 - OpStore %arg_0 %82 - %86 = OpLoad %v3int %arg_0 - %85 = OpFunctionCall %v3int %tint_count_trailing_zeros %86 - OpStore %res %85 + %arg_0 = OpVariable %_ptr_Function_v3int Function %86 + %res = OpVariable %_ptr_Function_v3int Function %86 + OpStore %arg_0 %83 + %88 = OpLoad %v3int %arg_0 + %87 = OpFunctionCall %v3int %tint_count_trailing_zeros %88 + OpStore %res %87 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %88 - %90 = OpLabel - %91 = OpFunctionCall %void %countTrailingZeros_acfacb +%vertex_main_inner = OpFunction %v4float None %90 + %92 = OpLabel + %93 = OpFunctionCall %void %countTrailingZeros_acfacb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %78 - %93 = OpLabel - %94 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %94 + %95 = OpLabel + %96 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %96 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %78 - %97 = OpLabel - %98 = OpFunctionCall %void %countTrailingZeros_acfacb + %99 = OpLabel + %100 = OpFunctionCall %void %countTrailingZeros_acfacb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %78 - %100 = OpLabel - %101 = OpFunctionCall %void %countTrailingZeros_acfacb + %102 = OpLabel + %103 = OpFunctionCall %void %countTrailingZeros_acfacb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.wgsl index 395641c9e0..4e95b9c1e6 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_acfacb() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res : vec3 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl index b9fb2578b5..93c1e8e299 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl @@ -25,7 +25,7 @@ // fn countTrailingZeros(vec<4, u32>) -> vec<4, u32> fn countTrailingZeros_d2b4a0() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res: vec4 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl index 0c41a61fc0..2af8797582 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_trailing_zeros(uint4 v) { } void countTrailingZeros_d2b4a0() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl index 0c41a61fc0..2af8797582 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_count_trailing_zeros(uint4 v) { } void countTrailingZeros_d2b4a0() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl index 10c75b15d7..474e8d5c9e 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_count_trailing_zeros(uvec4 v) { } void countTrailingZeros_d2b4a0() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_count_trailing_zeros(arg_0); } @@ -52,7 +52,7 @@ uvec4 tint_count_trailing_zeros(uvec4 v) { } void countTrailingZeros_d2b4a0() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_count_trailing_zeros(arg_0); } @@ -82,7 +82,7 @@ uvec4 tint_count_trailing_zeros(uvec4 v) { } void countTrailingZeros_d2b4a0() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_count_trailing_zeros(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.msl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.msl index 9a23cef436..f6ae4d06e3 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void countTrailingZeros_d2b4a0() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint4 res = ctz(arg_0); } diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.spvasm index ebce4b7db4..cd58a155e8 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.spvasm @@ -112,7 +112,7 @@ %79 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4uint Function %18 %res = OpVariable %_ptr_Function_v4uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %65 %82 = OpLoad %v4uint %arg_0 %81 = OpFunctionCall %v4uint %tint_count_trailing_zeros %82 OpStore %res %81 diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.wgsl index a43d88431b..940212de0d 100644 --- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn countTrailingZeros_d2b4a0() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res : vec4 = countTrailingZeros(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/0d170c.wgsl b/test/tint/builtins/gen/var/degrees/0d170c.wgsl index 53dfc0f733..ed78d63737 100644 --- a/test/tint/builtins/gen/var/degrees/0d170c.wgsl +++ b/test/tint/builtins/gen/var/degrees/0d170c.wgsl @@ -25,7 +25,7 @@ // fn degrees(vec<4, f32>) -> vec<4, f32> fn degrees_0d170c() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.dxc.hlsl index 707abe1468..2f7e58a897 100644 --- a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_degrees(float4 param_0) { } void degrees_0d170c() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.fxc.hlsl index 707abe1468..2f7e58a897 100644 --- a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_degrees(float4 param_0) { } void degrees_0d170c() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.glsl index 7050d431cc..cccb0e9946 100644 --- a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec4 tint_degrees(vec4 param_0) { void degrees_0d170c() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_degrees(arg_0); } @@ -32,7 +32,7 @@ vec4 tint_degrees(vec4 param_0) { void degrees_0d170c() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_degrees(arg_0); } @@ -52,7 +52,7 @@ vec4 tint_degrees(vec4 param_0) { void degrees_0d170c() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.msl index 7f80ac70eb..d1297cc1ab 100644 --- a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.msl @@ -7,7 +7,7 @@ float4 tint_degrees(float4 param_0) { } void degrees_0d170c() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.spvasm index b0850ee290..ebb45b3ce9 100644 --- a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %degrees_0d170c = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Degrees %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Degrees %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %degrees_0d170c +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %degrees_0d170c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %degrees_0d170c + %29 = OpLabel + %30 = OpFunctionCall %void %degrees_0d170c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %degrees_0d170c + %32 = OpLabel + %33 = OpFunctionCall %void %degrees_0d170c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.wgsl index 1fd7099b9c..27c944eaae 100644 --- a/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/0d170c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_0d170c() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl index 9fc75c15e8..cb1fb48993 100644 --- a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl +++ b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl @@ -25,7 +25,7 @@ // fn degrees(vec<2, f32>) -> vec<2, f32> fn degrees_1ad5df() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.dxc.hlsl index c2b98c5165..ff76e46111 100644 --- a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_degrees(float2 param_0) { } void degrees_1ad5df() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.fxc.hlsl index c2b98c5165..ff76e46111 100644 --- a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_degrees(float2 param_0) { } void degrees_1ad5df() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.glsl index 303eb31dfa..018202baa5 100644 --- a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec2 tint_degrees(vec2 param_0) { void degrees_1ad5df() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_degrees(arg_0); } @@ -32,7 +32,7 @@ vec2 tint_degrees(vec2 param_0) { void degrees_1ad5df() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_degrees(arg_0); } @@ -52,7 +52,7 @@ vec2 tint_degrees(vec2 param_0) { void degrees_1ad5df() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.msl index e53ab1e233..8c258eb67c 100644 --- a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.msl @@ -7,7 +7,7 @@ float2 tint_degrees(float2 param_0) { } void degrees_1ad5df() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.spvasm index 84f8a46746..b941f0cc8b 100644 --- a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %degrees_1ad5df = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Degrees %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Degrees %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %degrees_1ad5df +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %degrees_1ad5df OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %degrees_1ad5df + %31 = OpLabel + %32 = OpFunctionCall %void %degrees_1ad5df OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %degrees_1ad5df + %34 = OpLabel + %35 = OpFunctionCall %void %degrees_1ad5df OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.wgsl index 150971073f..b1ee3c95e2 100644 --- a/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/1ad5df.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_1ad5df() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/2af623.wgsl b/test/tint/builtins/gen/var/degrees/2af623.wgsl index 22f9b491b6..acea39c286 100644 --- a/test/tint/builtins/gen/var/degrees/2af623.wgsl +++ b/test/tint/builtins/gen/var/degrees/2af623.wgsl @@ -25,7 +25,7 @@ // fn degrees(vec<3, f32>) -> vec<3, f32> fn degrees_2af623() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.dxc.hlsl index acc4754c4f..b16be3da81 100644 --- a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_degrees(float3 param_0) { } void degrees_2af623() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.fxc.hlsl index acc4754c4f..b16be3da81 100644 --- a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_degrees(float3 param_0) { } void degrees_2af623() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.glsl b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.glsl index e8ac3a76f3..707337efc8 100644 --- a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec3 tint_degrees(vec3 param_0) { void degrees_2af623() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_degrees(arg_0); } @@ -32,7 +32,7 @@ vec3 tint_degrees(vec3 param_0) { void degrees_2af623() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_degrees(arg_0); } @@ -52,7 +52,7 @@ vec3 tint_degrees(vec3 param_0) { void degrees_2af623() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.msl b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.msl index 122c1a1cf1..46aaa0b740 100644 --- a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.msl @@ -7,7 +7,7 @@ float3 tint_degrees(float3 param_0) { } void degrees_2af623() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = tint_degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.spvasm b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.spvasm index 68c45febba..65830c83aa 100644 --- a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %degrees_2af623 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Degrees %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Degrees %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %degrees_2af623 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %degrees_2af623 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %degrees_2af623 + %31 = OpLabel + %32 = OpFunctionCall %void %degrees_2af623 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %degrees_2af623 + %34 = OpLabel + %35 = OpFunctionCall %void %degrees_2af623 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.wgsl index eb2f038a9d..20f580e013 100644 --- a/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/2af623.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_2af623() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/51f705.wgsl b/test/tint/builtins/gen/var/degrees/51f705.wgsl index 2e70d6c87c..080f0c231b 100644 --- a/test/tint/builtins/gen/var/degrees/51f705.wgsl +++ b/test/tint/builtins/gen/var/degrees/51f705.wgsl @@ -25,7 +25,7 @@ // fn degrees(f32) -> f32 fn degrees_51f705() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/degrees/51f705.wgsl.expected.wgsl b/test/tint/builtins/gen/var/degrees/51f705.wgsl.expected.wgsl index 80f87242f8..5321c3a473 100644 --- a/test/tint/builtins/gen/var/degrees/51f705.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/degrees/51f705.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn degrees_51f705() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = degrees(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl index a1d55c2e3f..bc40276124 100644 --- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl +++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl @@ -25,7 +25,7 @@ // fn determinant(mat<3, 3, f32>) -> f32 fn determinant_2b62ba() { - var arg_0 = mat3x3(); + var arg_0 = mat3x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: f32 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.dxc.hlsl index 273a3f71aa..4d562cdfcb 100644 --- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_2b62ba() { - float3x3 arg_0 = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3x3 arg_0 = float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.fxc.hlsl index 273a3f71aa..4d562cdfcb 100644 --- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void determinant_2b62ba() { - float3x3 arg_0 = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3x3 arg_0 = float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.glsl index 97b89e5975..618def4222 100644 --- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void determinant_2b62ba() { - mat3 arg_0 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat3 arg_0 = mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f)); float res = determinant(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void determinant_2b62ba() { - mat3 arg_0 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat3 arg_0 = mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f)); float res = determinant(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void determinant_2b62ba() { - mat3 arg_0 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat3 arg_0 = mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f)); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.msl index e57373d27b..d04b49ccfa 100644 --- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_2b62ba() { - float3x3 arg_0 = float3x3(float3(0.0f), float3(0.0f), float3(0.0f)); + float3x3 arg_0 = float3x3(float3(1.0f), float3(1.0f), float3(1.0f)); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.spvasm index cdf2d43147..6d9142b027 100644 --- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,40 +34,42 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 - %15 = OpConstantNull %mat3v3float -%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%_ptr_Function_float = OpTypePointer Function %float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %17 = OpConstantComposite %mat3v3float %16 %16 %16 +%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float + %20 = OpConstantNull %mat3v3float +%_ptr_Function_float = OpTypePointer Function %float + %26 = OpTypeFunction %v4float %determinant_2b62ba = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v3float Function %15 + %arg_0 = OpVariable %_ptr_Function_mat3v3float Function %20 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %15 - %20 = OpLoad %mat3v3float %arg_0 - %18 = OpExtInst %float %19 Determinant %20 - OpStore %res %18 + OpStore %arg_0 %17 + %23 = OpLoad %mat3v3float %arg_0 + %21 = OpExtInst %float %22 Determinant %23 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %determinant_2b62ba +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %determinant_2b62ba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %determinant_2b62ba + %34 = OpLabel + %35 = OpFunctionCall %void %determinant_2b62ba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %determinant_2b62ba + %37 = OpLabel + %38 = OpFunctionCall %void %determinant_2b62ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.wgsl index cbd87c5b1c..effc94f1eb 100644 --- a/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/determinant/2b62ba.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn determinant_2b62ba() { - var arg_0 = mat3x3(); + var arg_0 = mat3x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : f32 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl index b3beba9fae..2619b84dfa 100644 --- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl +++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl @@ -25,7 +25,7 @@ // fn determinant(mat<4, 4, f32>) -> f32 fn determinant_a0a87c() { - var arg_0 = mat4x4(); + var arg_0 = mat4x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: f32 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.dxc.hlsl index 48842502fd..dfae910a6d 100644 --- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_a0a87c() { - float4x4 arg_0 = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4x4 arg_0 = float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.fxc.hlsl index 48842502fd..dfae910a6d 100644 --- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void determinant_a0a87c() { - float4x4 arg_0 = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4x4 arg_0 = float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.glsl index e3848a22cb..3428e8ac38 100644 --- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void determinant_a0a87c() { - mat4 arg_0 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat4 arg_0 = mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f)); float res = determinant(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void determinant_a0a87c() { - mat4 arg_0 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat4 arg_0 = mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f)); float res = determinant(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void determinant_a0a87c() { - mat4 arg_0 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat4 arg_0 = mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f)); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.msl index f369381d21..470aa403c8 100644 --- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_a0a87c() { - float4x4 arg_0 = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)); + float4x4 arg_0 = float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f)); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.spvasm index c05d133426..6c4acf3448 100644 --- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 38 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,40 +33,42 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %mat4v4float = OpTypeMatrix %v4float 4 - %14 = OpConstantNull %mat4v4float -%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%_ptr_Function_float = OpTypePointer Function %float - %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %16 = OpConstantComposite %mat4v4float %15 %15 %15 %15 +%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float + %19 = OpConstantNull %mat4v4float +%_ptr_Function_float = OpTypePointer Function %float + %25 = OpTypeFunction %v4float %determinant_a0a87c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v4float Function %14 + %arg_0 = OpVariable %_ptr_Function_mat4v4float Function %19 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %14 - %19 = OpLoad %mat4v4float %arg_0 - %17 = OpExtInst %float %18 Determinant %19 - OpStore %res %17 + OpStore %arg_0 %16 + %22 = OpLoad %mat4v4float %arg_0 + %20 = OpExtInst %float %21 Determinant %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %determinant_a0a87c +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %determinant_a0a87c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %determinant_a0a87c + %33 = OpLabel + %34 = OpFunctionCall %void %determinant_a0a87c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %determinant_a0a87c + %36 = OpLabel + %37 = OpFunctionCall %void %determinant_a0a87c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.wgsl index a49da48054..5409069897 100644 --- a/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/determinant/a0a87c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn determinant_a0a87c() { - var arg_0 = mat4x4(); + var arg_0 = mat4x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : f32 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl b/test/tint/builtins/gen/var/determinant/e19305.wgsl index 46af1ce02d..1335616a55 100644 --- a/test/tint/builtins/gen/var/determinant/e19305.wgsl +++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl @@ -25,7 +25,7 @@ // fn determinant(mat<2, 2, f32>) -> f32 fn determinant_e19305() { - var arg_0 = mat2x2(); + var arg_0 = mat2x2(1.f, 1.f, 1.f, 1.f); var res: f32 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.dxc.hlsl index 84a0eda0b8..2869e99214 100644 --- a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void determinant_e19305() { - float2x2 arg_0 = float2x2((0.0f).xx, (0.0f).xx); + float2x2 arg_0 = float2x2((1.0f).xx, (1.0f).xx); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.fxc.hlsl index 84a0eda0b8..2869e99214 100644 --- a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void determinant_e19305() { - float2x2 arg_0 = float2x2((0.0f).xx, (0.0f).xx); + float2x2 arg_0 = float2x2((1.0f).xx, (1.0f).xx); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.glsl b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.glsl index 6cf0e5d2d2..4834f5ed3a 100644 --- a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void determinant_e19305() { - mat2 arg_0 = mat2(vec2(0.0f), vec2(0.0f)); + mat2 arg_0 = mat2(vec2(1.0f), vec2(1.0f)); float res = determinant(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void determinant_e19305() { - mat2 arg_0 = mat2(vec2(0.0f), vec2(0.0f)); + mat2 arg_0 = mat2(vec2(1.0f), vec2(1.0f)); float res = determinant(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void determinant_e19305() { - mat2 arg_0 = mat2(vec2(0.0f), vec2(0.0f)); + mat2 arg_0 = mat2(vec2(1.0f), vec2(1.0f)); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.msl b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.msl index b74f1f50e7..9a9604bef4 100644 --- a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void determinant_e19305() { - float2x2 arg_0 = float2x2(float2(0.0f), float2(0.0f)); + float2x2 arg_0 = float2x2(float2(1.0f), float2(1.0f)); float res = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.spvasm b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.spvasm index 2ef5af2147..f0741cb48e 100644 --- a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,40 +34,42 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 - %15 = OpConstantNull %mat2v2float -%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%_ptr_Function_float = OpTypePointer Function %float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v2float %float_1 %float_1 + %17 = OpConstantComposite %mat2v2float %16 %16 +%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float + %20 = OpConstantNull %mat2v2float +%_ptr_Function_float = OpTypePointer Function %float + %26 = OpTypeFunction %v4float %determinant_e19305 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v2float Function %15 + %arg_0 = OpVariable %_ptr_Function_mat2v2float Function %20 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %15 - %20 = OpLoad %mat2v2float %arg_0 - %18 = OpExtInst %float %19 Determinant %20 - OpStore %res %18 + OpStore %arg_0 %17 + %23 = OpLoad %mat2v2float %arg_0 + %21 = OpExtInst %float %22 Determinant %23 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %determinant_e19305 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %determinant_e19305 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %determinant_e19305 + %34 = OpLabel + %35 = OpFunctionCall %void %determinant_e19305 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %determinant_e19305 + %37 = OpLabel + %38 = OpFunctionCall %void %determinant_e19305 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.wgsl b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.wgsl index cba31835f0..fa8b4f6fd2 100644 --- a/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/determinant/e19305.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn determinant_e19305() { - var arg_0 = mat2x2(); + var arg_0 = mat2x2(1.0f, 1.0f, 1.0f, 1.0f); var res : f32 = determinant(arg_0); } diff --git a/test/tint/builtins/gen/var/distance/0657d4.wgsl b/test/tint/builtins/gen/var/distance/0657d4.wgsl index e7db5e3248..dbdd45f021 100644 --- a/test/tint/builtins/gen/var/distance/0657d4.wgsl +++ b/test/tint/builtins/gen/var/distance/0657d4.wgsl @@ -25,8 +25,8 @@ // fn distance(vec<3, f32>, vec<3, f32>) -> f32 fn distance_0657d4() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.dxc.hlsl index 0155edfdd2..d6d090cca7 100644 --- a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void distance_0657d4() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.fxc.hlsl index 0155edfdd2..d6d090cca7 100644 --- a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void distance_0657d4() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.glsl index b040bd062b..6ce3dea3e6 100644 --- a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void distance_0657d4() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float res = distance(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void distance_0657d4() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float res = distance(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void distance_0657d4() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.msl index 7821e690c0..caefb1ae6a 100644 --- a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void distance_0657d4() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.spvasm index bdb8c3f1ee..41dfc73a6f 100644 --- a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,43 +34,44 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float -%_ptr_Function_float = OpTypePointer Function %float - %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float +%_ptr_Function_float = OpTypePointer Function %float + %26 = OpTypeFunction %v4float %distance_0657d4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %float %19 Distance %20 %21 - OpStore %res %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %float %21 Distance %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %distance_0657d4 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %distance_0657d4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %distance_0657d4 + %34 = OpLabel + %35 = OpFunctionCall %void %distance_0657d4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %distance_0657d4 + %37 = OpLabel + %38 = OpFunctionCall %void %distance_0657d4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.wgsl index ebbcdd4217..8a96f48c06 100644 --- a/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/0657d4.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn distance_0657d4() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/9646ea.wgsl b/test/tint/builtins/gen/var/distance/9646ea.wgsl index 7727a18f81..832bf92529 100644 --- a/test/tint/builtins/gen/var/distance/9646ea.wgsl +++ b/test/tint/builtins/gen/var/distance/9646ea.wgsl @@ -25,8 +25,8 @@ // fn distance(vec<4, f32>, vec<4, f32>) -> f32 fn distance_9646ea() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.dxc.hlsl index 31d25bb5ac..d4f1a67b0a 100644 --- a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void distance_9646ea() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.fxc.hlsl index 31d25bb5ac..d4f1a67b0a 100644 --- a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void distance_9646ea() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.glsl index c13093cf5d..6d31f7e51e 100644 --- a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void distance_9646ea() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float res = distance(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void distance_9646ea() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float res = distance(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void distance_9646ea() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.msl index 640769f649..e2657c4029 100644 --- a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void distance_9646ea() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.spvasm index 3909a97072..733a196da4 100644 --- a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,42 +33,43 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_float = OpTypePointer Function %float - %22 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %24 = OpTypeFunction %v4float %distance_9646ea = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %18 = OpLoad %v4float %arg_0 - %19 = OpLoad %v4float %arg_1 - %16 = OpExtInst %float %17 Distance %18 %19 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %20 = OpLoad %v4float %arg_0 + %21 = OpLoad %v4float %arg_1 + %18 = OpExtInst %float %19 Distance %20 %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %distance_9646ea +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %distance_9646ea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %distance_9646ea + %32 = OpLabel + %33 = OpFunctionCall %void %distance_9646ea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %distance_9646ea + %35 = OpLabel + %36 = OpFunctionCall %void %distance_9646ea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.wgsl index b1d5775e92..fc9c86a087 100644 --- a/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/9646ea.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn distance_9646ea() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/aa4055.wgsl b/test/tint/builtins/gen/var/distance/aa4055.wgsl index 549b29faf5..2498471da9 100644 --- a/test/tint/builtins/gen/var/distance/aa4055.wgsl +++ b/test/tint/builtins/gen/var/distance/aa4055.wgsl @@ -25,8 +25,8 @@ // fn distance(vec<2, f32>, vec<2, f32>) -> f32 fn distance_aa4055() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.dxc.hlsl index 49d49f9e13..f9cc0da96e 100644 --- a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void distance_aa4055() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.fxc.hlsl index 49d49f9e13..f9cc0da96e 100644 --- a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void distance_aa4055() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.glsl b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.glsl index 391ff0d312..a16e7bbd52 100644 --- a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void distance_aa4055() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float res = distance(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void distance_aa4055() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float res = distance(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void distance_aa4055() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.msl b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.msl index 748f9f0db2..0bd15e19e2 100644 --- a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void distance_aa4055() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float res = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.spvasm b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.spvasm index 92c9b13271..0bc74bc143 100644 --- a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,43 +34,44 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float -%_ptr_Function_float = OpTypePointer Function %float - %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float +%_ptr_Function_float = OpTypePointer Function %float + %26 = OpTypeFunction %v4float %distance_aa4055 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v2float %arg_0 - %21 = OpLoad %v2float %arg_1 - %18 = OpExtInst %float %19 Distance %20 %21 - OpStore %res %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v2float %arg_0 + %23 = OpLoad %v2float %arg_1 + %20 = OpExtInst %float %21 Distance %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %distance_aa4055 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %distance_aa4055 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %distance_aa4055 + %34 = OpLabel + %35 = OpFunctionCall %void %distance_aa4055 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %distance_aa4055 + %37 = OpLabel + %38 = OpFunctionCall %void %distance_aa4055 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.wgsl index 9ed4bda21f..9846b11cc5 100644 --- a/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/aa4055.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn distance_aa4055() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/cfed73.wgsl b/test/tint/builtins/gen/var/distance/cfed73.wgsl index 24ddffd2a7..7d52075870 100644 --- a/test/tint/builtins/gen/var/distance/cfed73.wgsl +++ b/test/tint/builtins/gen/var/distance/cfed73.wgsl @@ -25,8 +25,8 @@ // fn distance(f32, f32) -> f32 fn distance_cfed73() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; var res: f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/distance/cfed73.wgsl.expected.wgsl b/test/tint/builtins/gen/var/distance/cfed73.wgsl.expected.wgsl index 1237f46b83..e52cb2a4f6 100644 --- a/test/tint/builtins/gen/var/distance/cfed73.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/distance/cfed73.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn distance_cfed73() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; var res : f32 = distance(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/0c577b.wgsl b/test/tint/builtins/gen/var/dot/0c577b.wgsl index 7d967e91bf..7fb487375e 100644 --- a/test/tint/builtins/gen/var/dot/0c577b.wgsl +++ b/test/tint/builtins/gen/var/dot/0c577b.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<4, f32>, vec<4, f32>) -> f32 fn dot_0c577b() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: f32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.dxc.hlsl index 9ffbdc32ae..8487fa9b84 100644 --- a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_0c577b() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.fxc.hlsl index 9ffbdc32ae..8487fa9b84 100644 --- a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_0c577b() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.glsl index 82d5eb9d18..f469ef1266 100644 --- a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void dot_0c577b() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float res = dot(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void dot_0c577b() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float res = dot(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void dot_0c577b() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.msl index 5641d75c2f..f9d4bd8c76 100644 --- a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void dot_0c577b() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.spvasm index 3ab41ab4f4..9b003e92c7 100644 --- a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,42 +32,43 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_float = OpTypePointer Function %float - %21 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %23 = OpTypeFunction %v4float %dot_0c577b = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %17 = OpLoad %v4float %arg_0 - %18 = OpLoad %v4float %arg_1 - %16 = OpDot %float %17 %18 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %19 = OpLoad %v4float %arg_0 + %20 = OpLoad %v4float %arg_1 + %18 = OpDot %float %19 %20 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %dot_0c577b +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %dot_0c577b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %dot_0c577b + %31 = OpLabel + %32 = OpFunctionCall %void %dot_0c577b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %dot_0c577b + %34 = OpLabel + %35 = OpFunctionCall %void %dot_0c577b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.wgsl index 01269fb595..69cc640b7b 100644 --- a/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/0c577b.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_0c577b() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : f32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/7548a0.wgsl b/test/tint/builtins/gen/var/dot/7548a0.wgsl index c0fbe308d0..cdb523ce93 100644 --- a/test/tint/builtins/gen/var/dot/7548a0.wgsl +++ b/test/tint/builtins/gen/var/dot/7548a0.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<3, u32>, vec<3, u32>) -> u32 fn dot_7548a0() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var res: u32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.dxc.hlsl index 4c889b1441..5f70435589 100644 --- a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_7548a0() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.fxc.hlsl index 4c889b1441..5f70435589 100644 --- a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_7548a0() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.glsl index c70297d8e4..45a7402ac3 100644 --- a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.glsl @@ -5,8 +5,8 @@ uint tint_int_dot(uvec3 a, uvec3 b) { } void dot_7548a0() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uint res = tint_int_dot(arg_0, arg_1); } @@ -31,8 +31,8 @@ uint tint_int_dot(uvec3 a, uvec3 b) { } void dot_7548a0() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uint res = tint_int_dot(arg_0, arg_1); } @@ -51,8 +51,8 @@ uint tint_int_dot(uvec3 a, uvec3 b) { } void dot_7548a0() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uint res = tint_int_dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.msl index 383b56f177..6649a395fb 100644 --- a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.msl @@ -7,8 +7,8 @@ T tint_dot3(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; } void dot_7548a0() { - uint3 arg_0 = uint3(0u); - uint3 arg_1 = uint3(0u); + uint3 arg_0 = uint3(1u); + uint3 arg_1 = uint3(1u); uint res = tint_dot3(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.spvasm index 7212878836..23f432bbec 100644 --- a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,54 +34,56 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %19 = OpConstantNull %v3uint %_ptr_Function_uint = OpTypePointer Function %uint - %34 = OpConstantNull %uint - %35 = OpTypeFunction %v4float + %36 = OpConstantNull %uint + %37 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_7548a0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v3uint Function %15 - %res = OpVariable %_ptr_Function_uint Function %34 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v3uint %arg_0 - %21 = OpLoad %v3uint %arg_1 - %22 = OpCompositeExtract %uint %20 0 - %23 = OpCompositeExtract %uint %21 0 - %24 = OpIMul %uint %22 %23 - %25 = OpCompositeExtract %uint %20 1 - %26 = OpCompositeExtract %uint %21 1 - %27 = OpIMul %uint %25 %26 - %28 = OpIAdd %uint %24 %27 - %29 = OpCompositeExtract %uint %20 2 - %30 = OpCompositeExtract %uint %21 2 - %31 = OpIMul %uint %29 %30 - %19 = OpIAdd %uint %28 %31 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 + %res = OpVariable %_ptr_Function_uint Function %36 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v3uint %arg_0 + %23 = OpLoad %v3uint %arg_1 + %24 = OpCompositeExtract %uint %22 0 + %25 = OpCompositeExtract %uint %23 0 + %26 = OpIMul %uint %24 %25 + %27 = OpCompositeExtract %uint %22 1 + %28 = OpCompositeExtract %uint %23 1 + %29 = OpIMul %uint %27 %28 + %30 = OpIAdd %uint %26 %29 + %31 = OpCompositeExtract %uint %22 2 + %32 = OpCompositeExtract %uint %23 2 + %33 = OpIMul %uint %31 %32 + %21 = OpIAdd %uint %30 %33 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %dot_7548a0 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %dot_7548a0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %44 = OpLabel - %45 = OpFunctionCall %void %dot_7548a0 + %46 = OpLabel + %47 = OpFunctionCall %void %dot_7548a0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %47 = OpLabel - %48 = OpFunctionCall %void %dot_7548a0 + %49 = OpLabel + %50 = OpFunctionCall %void %dot_7548a0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.wgsl index c9f97f72a1..0ff92a3aad 100644 --- a/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/7548a0.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_7548a0() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var res : u32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/883f0e.wgsl b/test/tint/builtins/gen/var/dot/883f0e.wgsl index 3e8cf0302c..e12a75ede3 100644 --- a/test/tint/builtins/gen/var/dot/883f0e.wgsl +++ b/test/tint/builtins/gen/var/dot/883f0e.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<2, f32>, vec<2, f32>) -> f32 fn dot_883f0e() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: f32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.dxc.hlsl index f38608aa9a..dea3692513 100644 --- a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_883f0e() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.fxc.hlsl index f38608aa9a..dea3692513 100644 --- a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_883f0e() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.glsl index 4eec4f9a87..05ac5dd550 100644 --- a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void dot_883f0e() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float res = dot(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void dot_883f0e() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float res = dot(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void dot_883f0e() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.msl index b039afafb1..0c1415dbb8 100644 --- a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void dot_883f0e() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.spvasm index 0292485abe..10882a041e 100644 --- a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,43 +33,44 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float -%_ptr_Function_float = OpTypePointer Function %float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float +%_ptr_Function_float = OpTypePointer Function %float + %25 = OpTypeFunction %v4float %dot_883f0e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %19 = OpLoad %v2float %arg_0 - %20 = OpLoad %v2float %arg_1 - %18 = OpDot %float %19 %20 - OpStore %res %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %21 = OpLoad %v2float %arg_0 + %22 = OpLoad %v2float %arg_1 + %20 = OpDot %float %21 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %dot_883f0e +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %dot_883f0e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %dot_883f0e + %33 = OpLabel + %34 = OpFunctionCall %void %dot_883f0e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %dot_883f0e + %36 = OpLabel + %37 = OpFunctionCall %void %dot_883f0e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.wgsl index daca8aec24..263f3dd47a 100644 --- a/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/883f0e.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_883f0e() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : f32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/97c7ee.wgsl b/test/tint/builtins/gen/var/dot/97c7ee.wgsl index db27a08698..0fa83db166 100644 --- a/test/tint/builtins/gen/var/dot/97c7ee.wgsl +++ b/test/tint/builtins/gen/var/dot/97c7ee.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<2, u32>, vec<2, u32>) -> u32 fn dot_97c7ee() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var res: u32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.dxc.hlsl index d3d8cf4746..f537c336cf 100644 --- a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_97c7ee() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.fxc.hlsl index d3d8cf4746..f537c336cf 100644 --- a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_97c7ee() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.glsl index 4db4b19ed2..246c21ba65 100644 --- a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.glsl @@ -5,8 +5,8 @@ uint tint_int_dot(uvec2 a, uvec2 b) { } void dot_97c7ee() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uint res = tint_int_dot(arg_0, arg_1); } @@ -31,8 +31,8 @@ uint tint_int_dot(uvec2 a, uvec2 b) { } void dot_97c7ee() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uint res = tint_int_dot(arg_0, arg_1); } @@ -51,8 +51,8 @@ uint tint_int_dot(uvec2 a, uvec2 b) { } void dot_97c7ee() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uint res = tint_int_dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.msl index 5fa5114e5e..6957fe4a01 100644 --- a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.msl @@ -7,8 +7,8 @@ T tint_dot2(vec a, vec b) { return a[0]*b[0] + a[1]*b[1]; } void dot_97c7ee() { - uint2 arg_0 = uint2(0u); - uint2 arg_1 = uint2(0u); + uint2 arg_0 = uint2(1u); + uint2 arg_1 = uint2(1u); uint res = tint_dot2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.spvasm index b3879a61da..480735d77d 100644 --- a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,50 +34,52 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %19 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %30 = OpConstantNull %uint - %31 = OpTypeFunction %v4float + %32 = OpConstantNull %uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_97c7ee = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v2uint Function %15 - %res = OpVariable %_ptr_Function_uint Function %30 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v2uint %arg_0 - %21 = OpLoad %v2uint %arg_1 - %22 = OpCompositeExtract %uint %20 0 - %23 = OpCompositeExtract %uint %21 0 - %24 = OpIMul %uint %22 %23 - %25 = OpCompositeExtract %uint %20 1 - %26 = OpCompositeExtract %uint %21 1 - %27 = OpIMul %uint %25 %26 - %19 = OpIAdd %uint %24 %27 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 + %res = OpVariable %_ptr_Function_uint Function %32 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v2uint %arg_0 + %23 = OpLoad %v2uint %arg_1 + %24 = OpCompositeExtract %uint %22 0 + %25 = OpCompositeExtract %uint %23 0 + %26 = OpIMul %uint %24 %25 + %27 = OpCompositeExtract %uint %22 1 + %28 = OpCompositeExtract %uint %23 1 + %29 = OpIMul %uint %27 %28 + %21 = OpIAdd %uint %26 %29 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %dot_97c7ee +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %dot_97c7ee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %dot_97c7ee + %42 = OpLabel + %43 = OpFunctionCall %void %dot_97c7ee OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %dot_97c7ee + %45 = OpLabel + %46 = OpFunctionCall %void %dot_97c7ee OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.wgsl index c0b83f70c4..9c2b5c2706 100644 --- a/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/97c7ee.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_97c7ee() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var res : u32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ba4246.wgsl b/test/tint/builtins/gen/var/dot/ba4246.wgsl index 3cc417b549..272ac1233f 100644 --- a/test/tint/builtins/gen/var/dot/ba4246.wgsl +++ b/test/tint/builtins/gen/var/dot/ba4246.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<3, f32>, vec<3, f32>) -> f32 fn dot_ba4246() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: f32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.dxc.hlsl index 426f56da23..a69fd9eba7 100644 --- a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_ba4246() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.fxc.hlsl index 426f56da23..a69fd9eba7 100644 --- a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_ba4246() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.glsl index 6c29d852b7..a43c686a10 100644 --- a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void dot_ba4246() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float res = dot(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void dot_ba4246() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float res = dot(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void dot_ba4246() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.msl index 775db06dcc..7a789d08fa 100644 --- a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void dot_ba4246() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.spvasm index 2e99e39692..ebb73d635e 100644 --- a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,43 +33,44 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float -%_ptr_Function_float = OpTypePointer Function %float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float +%_ptr_Function_float = OpTypePointer Function %float + %25 = OpTypeFunction %v4float %dot_ba4246 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %19 = OpLoad %v3float %arg_0 - %20 = OpLoad %v3float %arg_1 - %18 = OpDot %float %19 %20 - OpStore %res %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %21 = OpLoad %v3float %arg_0 + %22 = OpLoad %v3float %arg_1 + %20 = OpDot %float %21 %22 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %dot_ba4246 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %dot_ba4246 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %dot_ba4246 + %33 = OpLabel + %34 = OpFunctionCall %void %dot_ba4246 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %dot_ba4246 + %36 = OpLabel + %37 = OpFunctionCall %void %dot_ba4246 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.wgsl index ceff01cfc6..9964247a1a 100644 --- a/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/ba4246.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_ba4246() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : f32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/e994c7.wgsl b/test/tint/builtins/gen/var/dot/e994c7.wgsl index 729088e021..4ca91df3cd 100644 --- a/test/tint/builtins/gen/var/dot/e994c7.wgsl +++ b/test/tint/builtins/gen/var/dot/e994c7.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<4, u32>, vec<4, u32>) -> u32 fn dot_e994c7() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var res: u32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.dxc.hlsl index 2e609e9fb7..c75a1db55a 100644 --- a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_e994c7() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.fxc.hlsl index 2e609e9fb7..c75a1db55a 100644 --- a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_e994c7() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.glsl index 097eb9fdb2..9a4aa4d6b4 100644 --- a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.glsl @@ -5,8 +5,8 @@ uint tint_int_dot(uvec4 a, uvec4 b) { } void dot_e994c7() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uint res = tint_int_dot(arg_0, arg_1); } @@ -31,8 +31,8 @@ uint tint_int_dot(uvec4 a, uvec4 b) { } void dot_e994c7() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uint res = tint_int_dot(arg_0, arg_1); } @@ -51,8 +51,8 @@ uint tint_int_dot(uvec4 a, uvec4 b) { } void dot_e994c7() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uint res = tint_int_dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.msl index 48c480a2ee..6429d76e19 100644 --- a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.msl @@ -7,8 +7,8 @@ T tint_dot4(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]; } void dot_e994c7() { - uint4 arg_0 = uint4(0u); - uint4 arg_1 = uint4(0u); + uint4 arg_0 = uint4(1u); + uint4 arg_1 = uint4(1u); uint res = tint_dot4(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.spvasm index 0e9a6dea4e..e285599f3d 100644 --- a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,58 +34,60 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %19 = OpConstantNull %v4uint %_ptr_Function_uint = OpTypePointer Function %uint - %38 = OpConstantNull %uint - %39 = OpTypeFunction %v4float + %40 = OpConstantNull %uint + %41 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_e994c7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v4uint Function %15 - %res = OpVariable %_ptr_Function_uint Function %38 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v4uint %arg_0 - %21 = OpLoad %v4uint %arg_1 - %22 = OpCompositeExtract %uint %20 0 - %23 = OpCompositeExtract %uint %21 0 - %24 = OpIMul %uint %22 %23 - %25 = OpCompositeExtract %uint %20 1 - %26 = OpCompositeExtract %uint %21 1 - %27 = OpIMul %uint %25 %26 - %28 = OpIAdd %uint %24 %27 - %29 = OpCompositeExtract %uint %20 2 - %30 = OpCompositeExtract %uint %21 2 - %31 = OpIMul %uint %29 %30 - %32 = OpIAdd %uint %28 %31 - %33 = OpCompositeExtract %uint %20 3 - %34 = OpCompositeExtract %uint %21 3 - %35 = OpIMul %uint %33 %34 - %19 = OpIAdd %uint %32 %35 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v4uint Function %19 + %res = OpVariable %_ptr_Function_uint Function %40 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v4uint %arg_0 + %23 = OpLoad %v4uint %arg_1 + %24 = OpCompositeExtract %uint %22 0 + %25 = OpCompositeExtract %uint %23 0 + %26 = OpIMul %uint %24 %25 + %27 = OpCompositeExtract %uint %22 1 + %28 = OpCompositeExtract %uint %23 1 + %29 = OpIMul %uint %27 %28 + %30 = OpIAdd %uint %26 %29 + %31 = OpCompositeExtract %uint %22 2 + %32 = OpCompositeExtract %uint %23 2 + %33 = OpIMul %uint %31 %32 + %34 = OpIAdd %uint %30 %33 + %35 = OpCompositeExtract %uint %22 3 + %36 = OpCompositeExtract %uint %23 3 + %37 = OpIMul %uint %35 %36 + %21 = OpIAdd %uint %34 %37 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %dot_e994c7 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %dot_e994c7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %48 = OpLabel - %49 = OpFunctionCall %void %dot_e994c7 + %50 = OpLabel + %51 = OpFunctionCall %void %dot_e994c7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %51 = OpLabel - %52 = OpFunctionCall %void %dot_e994c7 + %53 = OpLabel + %54 = OpFunctionCall %void %dot_e994c7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.wgsl index bc7a4ad258..9deb5995f5 100644 --- a/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/e994c7.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_e994c7() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var res : u32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl index 8403d48834..46ae724998 100644 --- a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl +++ b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<4, i32>, vec<4, i32>) -> i32 fn dot_ef6b1d() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var res: i32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.dxc.hlsl index 0889c70e61..96174b6763 100644 --- a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_ef6b1d() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; int res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.fxc.hlsl index 0889c70e61..96174b6763 100644 --- a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_ef6b1d() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; int res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.glsl index cb1c1d5050..f5ab0f232c 100644 --- a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.glsl @@ -5,8 +5,8 @@ int tint_int_dot(ivec4 a, ivec4 b) { } void dot_ef6b1d() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); int res = tint_int_dot(arg_0, arg_1); } @@ -31,8 +31,8 @@ int tint_int_dot(ivec4 a, ivec4 b) { } void dot_ef6b1d() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); int res = tint_int_dot(arg_0, arg_1); } @@ -51,8 +51,8 @@ int tint_int_dot(ivec4 a, ivec4 b) { } void dot_ef6b1d() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); int res = tint_int_dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.msl index dcbda3d012..700a2af47a 100644 --- a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.msl @@ -7,8 +7,8 @@ T tint_dot4(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]; } void dot_ef6b1d() { - int4 arg_0 = int4(0); - int4 arg_1 = int4(0); + int4 arg_0 = int4(1); + int4 arg_1 = int4(1); int res = tint_dot4(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.spvasm index 22f397dfc3..a640cfbbbe 100644 --- a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,58 +34,60 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %19 = OpConstantNull %v4int %_ptr_Function_int = OpTypePointer Function %int - %38 = OpConstantNull %int - %39 = OpTypeFunction %v4float + %40 = OpConstantNull %int + %41 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_ef6b1d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %arg_1 = OpVariable %_ptr_Function_v4int Function %15 - %res = OpVariable %_ptr_Function_int Function %38 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v4int %arg_0 - %21 = OpLoad %v4int %arg_1 - %22 = OpCompositeExtract %int %20 0 - %23 = OpCompositeExtract %int %21 0 - %24 = OpIMul %int %22 %23 - %25 = OpCompositeExtract %int %20 1 - %26 = OpCompositeExtract %int %21 1 - %27 = OpIMul %int %25 %26 - %28 = OpIAdd %int %24 %27 - %29 = OpCompositeExtract %int %20 2 - %30 = OpCompositeExtract %int %21 2 - %31 = OpIMul %int %29 %30 - %32 = OpIAdd %int %28 %31 - %33 = OpCompositeExtract %int %20 3 - %34 = OpCompositeExtract %int %21 3 - %35 = OpIMul %int %33 %34 - %19 = OpIAdd %int %32 %35 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %arg_1 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_int Function %40 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v4int %arg_0 + %23 = OpLoad %v4int %arg_1 + %24 = OpCompositeExtract %int %22 0 + %25 = OpCompositeExtract %int %23 0 + %26 = OpIMul %int %24 %25 + %27 = OpCompositeExtract %int %22 1 + %28 = OpCompositeExtract %int %23 1 + %29 = OpIMul %int %27 %28 + %30 = OpIAdd %int %26 %29 + %31 = OpCompositeExtract %int %22 2 + %32 = OpCompositeExtract %int %23 2 + %33 = OpIMul %int %31 %32 + %34 = OpIAdd %int %30 %33 + %35 = OpCompositeExtract %int %22 3 + %36 = OpCompositeExtract %int %23 3 + %37 = OpIMul %int %35 %36 + %21 = OpIAdd %int %34 %37 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %dot_ef6b1d +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %dot_ef6b1d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %48 = OpLabel - %49 = OpFunctionCall %void %dot_ef6b1d + %50 = OpLabel + %51 = OpFunctionCall %void %dot_ef6b1d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %51 = OpLabel - %52 = OpFunctionCall %void %dot_ef6b1d + %53 = OpLabel + %54 = OpFunctionCall %void %dot_ef6b1d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.wgsl index 0711b1b180..19a334c045 100644 --- a/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/ef6b1d.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_ef6b1d() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var res : i32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/f1312c.wgsl b/test/tint/builtins/gen/var/dot/f1312c.wgsl index fbd1d52076..f8520cc3fd 100644 --- a/test/tint/builtins/gen/var/dot/f1312c.wgsl +++ b/test/tint/builtins/gen/var/dot/f1312c.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<3, i32>, vec<3, i32>) -> i32 fn dot_f1312c() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var res: i32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.dxc.hlsl index 6562925b32..68dde1e96d 100644 --- a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_f1312c() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; int res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.fxc.hlsl index 6562925b32..68dde1e96d 100644 --- a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_f1312c() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; int res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.glsl index 9699e6fac5..24335d93ad 100644 --- a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.glsl @@ -5,8 +5,8 @@ int tint_int_dot(ivec3 a, ivec3 b) { } void dot_f1312c() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); int res = tint_int_dot(arg_0, arg_1); } @@ -31,8 +31,8 @@ int tint_int_dot(ivec3 a, ivec3 b) { } void dot_f1312c() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); int res = tint_int_dot(arg_0, arg_1); } @@ -51,8 +51,8 @@ int tint_int_dot(ivec3 a, ivec3 b) { } void dot_f1312c() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); int res = tint_int_dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.msl index 22d6fb32ee..4707e730cd 100644 --- a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.msl @@ -7,8 +7,8 @@ T tint_dot3(vec a, vec b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; } void dot_f1312c() { - int3 arg_0 = int3(0); - int3 arg_1 = int3(0); + int3 arg_0 = int3(1); + int3 arg_1 = int3(1); int res = tint_dot3(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.spvasm index bc03d168a3..9a72f60f93 100644 --- a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,54 +34,56 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %19 = OpConstantNull %v3int %_ptr_Function_int = OpTypePointer Function %int - %34 = OpConstantNull %int - %35 = OpTypeFunction %v4float + %36 = OpConstantNull %int + %37 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_f1312c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %arg_1 = OpVariable %_ptr_Function_v3int Function %15 - %res = OpVariable %_ptr_Function_int Function %34 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v3int %arg_0 - %21 = OpLoad %v3int %arg_1 - %22 = OpCompositeExtract %int %20 0 - %23 = OpCompositeExtract %int %21 0 - %24 = OpIMul %int %22 %23 - %25 = OpCompositeExtract %int %20 1 - %26 = OpCompositeExtract %int %21 1 - %27 = OpIMul %int %25 %26 - %28 = OpIAdd %int %24 %27 - %29 = OpCompositeExtract %int %20 2 - %30 = OpCompositeExtract %int %21 2 - %31 = OpIMul %int %29 %30 - %19 = OpIAdd %int %28 %31 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_int Function %36 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v3int %arg_0 + %23 = OpLoad %v3int %arg_1 + %24 = OpCompositeExtract %int %22 0 + %25 = OpCompositeExtract %int %23 0 + %26 = OpIMul %int %24 %25 + %27 = OpCompositeExtract %int %22 1 + %28 = OpCompositeExtract %int %23 1 + %29 = OpIMul %int %27 %28 + %30 = OpIAdd %int %26 %29 + %31 = OpCompositeExtract %int %22 2 + %32 = OpCompositeExtract %int %23 2 + %33 = OpIMul %int %31 %32 + %21 = OpIAdd %int %30 %33 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %dot_f1312c +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %dot_f1312c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %44 = OpLabel - %45 = OpFunctionCall %void %dot_f1312c + %46 = OpLabel + %47 = OpFunctionCall %void %dot_f1312c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %47 = OpLabel - %48 = OpFunctionCall %void %dot_f1312c + %49 = OpLabel + %50 = OpFunctionCall %void %dot_f1312c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.wgsl index 96f1cebd2e..e260aa688b 100644 --- a/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/f1312c.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_f1312c() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var res : i32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl index ff1f457769..7543866ef6 100644 --- a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl +++ b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl @@ -25,8 +25,8 @@ // fn dot(vec<2, i32>, vec<2, i32>) -> i32 fn dot_fc5f7c() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var res: i32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.dxc.hlsl index 19af42f9f5..14ede0a827 100644 --- a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void dot_fc5f7c() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; int res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.fxc.hlsl index 19af42f9f5..14ede0a827 100644 --- a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void dot_fc5f7c() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; int res = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.glsl b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.glsl index 64e9e0cafc..b83abe5caa 100644 --- a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.glsl @@ -5,8 +5,8 @@ int tint_int_dot(ivec2 a, ivec2 b) { } void dot_fc5f7c() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); int res = tint_int_dot(arg_0, arg_1); } @@ -31,8 +31,8 @@ int tint_int_dot(ivec2 a, ivec2 b) { } void dot_fc5f7c() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); int res = tint_int_dot(arg_0, arg_1); } @@ -51,8 +51,8 @@ int tint_int_dot(ivec2 a, ivec2 b) { } void dot_fc5f7c() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); int res = tint_int_dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.msl b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.msl index ca3576932c..e3da2a2663 100644 --- a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.msl @@ -7,8 +7,8 @@ T tint_dot2(vec a, vec b) { return a[0]*b[0] + a[1]*b[1]; } void dot_fc5f7c() { - int2 arg_0 = int2(0); - int2 arg_1 = int2(0); + int2 arg_0 = int2(1); + int2 arg_1 = int2(1); int res = tint_dot2(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.spvasm index 81ca2fd01f..8406ecc1ae 100644 --- a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,50 +34,52 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %19 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %30 = OpConstantNull %int - %31 = OpTypeFunction %v4float + %32 = OpConstantNull %int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %dot_fc5f7c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %arg_1 = OpVariable %_ptr_Function_v2int Function %15 - %res = OpVariable %_ptr_Function_int Function %30 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %20 = OpLoad %v2int %arg_0 - %21 = OpLoad %v2int %arg_1 - %22 = OpCompositeExtract %int %20 0 - %23 = OpCompositeExtract %int %21 0 - %24 = OpIMul %int %22 %23 - %25 = OpCompositeExtract %int %20 1 - %26 = OpCompositeExtract %int %21 1 - %27 = OpIMul %int %25 %26 - %19 = OpIAdd %int %24 %27 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_int Function %32 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %22 = OpLoad %v2int %arg_0 + %23 = OpLoad %v2int %arg_1 + %24 = OpCompositeExtract %int %22 0 + %25 = OpCompositeExtract %int %23 0 + %26 = OpIMul %int %24 %25 + %27 = OpCompositeExtract %int %22 1 + %28 = OpCompositeExtract %int %23 1 + %29 = OpIMul %int %27 %28 + %21 = OpIAdd %int %26 %29 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %dot_fc5f7c +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %dot_fc5f7c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %dot_fc5f7c + %42 = OpLabel + %43 = OpFunctionCall %void %dot_fc5f7c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %43 = OpLabel - %44 = OpFunctionCall %void %dot_fc5f7c + %45 = OpLabel + %46 = OpFunctionCall %void %dot_fc5f7c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.wgsl index 677e29d71d..8778c2320f 100644 --- a/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dot/fc5f7c.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn dot_fc5f7c() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var res : i32 = dot(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl index 7bb5ccd3a8..44265bbea2 100644 --- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl +++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl @@ -25,7 +25,7 @@ // fn dpdx(vec<3, f32>) -> vec<3, f32> fn dpdx_0763f7() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.dxc.hlsl index 452f7005fa..8b7fe53c99 100644 --- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdx_0763f7() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.fxc.hlsl index 452f7005fa..8b7fe53c99 100644 --- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdx_0763f7() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.glsl index 4b8112140c..2bfea7d55a 100644 --- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdx_0763f7() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.msl index 6fdb57eadc..2cacfcd985 100644 --- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdx_0763f7() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.spvasm index a797d841c8..cdcc699b65 100644 --- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %dpdx_0763f7 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpDPdx %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpDPdx %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdx_0763f7 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdx_0763f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.wgsl index 9b99c5a07e..9fff661a0e 100644 --- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_0763f7() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl index 3775ea1a3d..7e69bded25 100644 --- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl +++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl @@ -25,7 +25,7 @@ // fn dpdx(vec<2, f32>) -> vec<2, f32> fn dpdx_99edb1() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.dxc.hlsl index 5251f081cc..d63d96b6ce 100644 --- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdx_99edb1() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.fxc.hlsl index 5251f081cc..d63d96b6ce 100644 --- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdx_99edb1() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.glsl index a112826fa7..4229e0f8f0 100644 --- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdx_99edb1() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.msl index c9d152ac24..e48ad6b638 100644 --- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdx_99edb1() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.spvasm index 0aa334a7d5..8740414a03 100644 --- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %dpdx_99edb1 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpDPdx %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpDPdx %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdx_99edb1 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdx_99edb1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.wgsl index bc0b07b3c0..fe4f948d97 100644 --- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_99edb1() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl index a284be1996..df343c07d5 100644 --- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl +++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl @@ -25,7 +25,7 @@ // fn dpdx(vec<4, f32>) -> vec<4, f32> fn dpdx_c487fa() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.dxc.hlsl index b36fbdd768..00894e79fd 100644 --- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdx_c487fa() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.fxc.hlsl index b36fbdd768..00894e79fd 100644 --- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdx_c487fa() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.glsl index 750d4af2f2..6991ecbb48 100644 --- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdx_c487fa() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.msl index 50ee8868de..b6af68cf2e 100644 --- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdx_c487fa() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.spvasm index 3ef2fd8897..7eb298015f 100644 --- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %dpdx_c487fa = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpDPdx %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpDPdx %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdx_c487fa + %16 = OpLabel + %17 = OpFunctionCall %void %dpdx_c487fa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.wgsl index 93d12c19a0..24dead72b2 100644 --- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_c487fa() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/e263de.wgsl b/test/tint/builtins/gen/var/dpdx/e263de.wgsl index d5c076ad94..7e6d077558 100644 --- a/test/tint/builtins/gen/var/dpdx/e263de.wgsl +++ b/test/tint/builtins/gen/var/dpdx/e263de.wgsl @@ -25,7 +25,7 @@ // fn dpdx(f32) -> f32 fn dpdx_e263de() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.wgsl index ff07c04332..803a3d32b0 100644 --- a/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdx_e263de() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = dpdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl index c43ba0a4e3..f4bec9e9db 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(f32) -> f32 fn dpdxCoarse_029152() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.wgsl index 88ed8cfd81..ff88b0e1af 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_029152() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl index e28033371e..fdd090c487 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(vec<2, f32>) -> vec<2, f32> fn dpdxCoarse_9581cf() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl index 54a39b4037..b9505f1f19 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_9581cf() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddx_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl index 54a39b4037..b9505f1f19 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_9581cf() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddx_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.glsl index c65e7f2be0..47d14b3f7c 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxCoarse_9581cf() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.msl index d36bcaa078..334f231714 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxCoarse_9581cf() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.spvasm index 72c01956e0..b4a4163e70 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %dpdxCoarse_9581cf = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpDPdxCoarse %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpDPdxCoarse %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdxCoarse_9581cf + %16 = OpLabel + %17 = OpFunctionCall %void %dpdxCoarse_9581cf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.wgsl index e45226f24f..75c0d80ed1 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_9581cf() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl index 897369a030..e5b9063b80 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(vec<4, f32>) -> vec<4, f32> fn dpdxCoarse_c28641() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl index 202bff3922..1000e18133 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_c28641() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddx_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl index 202bff3922..1000e18133 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_c28641() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddx_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.glsl index 11ac01c572..08f05dd04c 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxCoarse_c28641() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.msl index a86c65764e..84e40cdd97 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxCoarse_c28641() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.spvasm index ce6a0ef918..49d4ad65d4 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %dpdxCoarse_c28641 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpDPdxCoarse %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpDPdxCoarse %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdxCoarse_c28641 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdxCoarse_c28641 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.wgsl index 5e662b1218..4cfb2262ff 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_c28641() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl index 1bca5ec348..f800ec62e6 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl @@ -25,7 +25,7 @@ // fn dpdxCoarse(vec<3, f32>) -> vec<3, f32> fn dpdxCoarse_f64d7b() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl index e5d5ca6398..fe12d76fed 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_f64d7b() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddx_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl index e5d5ca6398..fe12d76fed 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxCoarse_f64d7b() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddx_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.glsl index 842689b084..bef053eab3 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxCoarse_f64d7b() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.msl index af992b26fd..ef8fc2766a 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxCoarse_f64d7b() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.spvasm index a58ab28f40..79a6c0916b 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %dpdxCoarse_f64d7b = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpDPdxCoarse %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpDPdxCoarse %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdxCoarse_f64d7b + %16 = OpLabel + %17 = OpFunctionCall %void %dpdxCoarse_f64d7b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.wgsl index 941ebfb172..b11e280993 100644 --- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxCoarse_f64d7b() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = dpdxCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl index ef27450d0e..ce2cc1f5c6 100644 --- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(vec<4, f32>) -> vec<4, f32> fn dpdxFine_8c5069() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.dxc.hlsl index b348c27344..d95c391163 100644 --- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_8c5069() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddx_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.fxc.hlsl index b348c27344..d95c391163 100644 --- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_8c5069() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddx_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.glsl index 0a43a92245..023e3be131 100644 --- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxFine_8c5069() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.msl index 0ed9d358e1..80b43a1169 100644 --- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxFine_8c5069() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.spvasm index 8b5116096b..2936feec63 100644 --- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %dpdxFine_8c5069 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpDPdxFine %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpDPdxFine %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdxFine_8c5069 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdxFine_8c5069 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.wgsl index f7069f507d..4d3515826d 100644 --- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_8c5069() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl index 48a03c4f1d..0793e7f1fc 100644 --- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(vec<2, f32>) -> vec<2, f32> fn dpdxFine_9631de() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.dxc.hlsl index 1e4b48df34..271d791341 100644 --- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_9631de() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddx_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.fxc.hlsl index 1e4b48df34..271d791341 100644 --- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_9631de() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddx_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.glsl index d1c4c17f41..53e7fb4285 100644 --- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxFine_9631de() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.msl index 0416ec58d8..93b0911cdc 100644 --- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxFine_9631de() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.spvasm index ea0dbf6c06..dd97e0c95b 100644 --- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %dpdxFine_9631de = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpDPdxFine %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpDPdxFine %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdxFine_9631de + %16 = OpLabel + %17 = OpFunctionCall %void %dpdxFine_9631de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.wgsl index d2ffa27e20..e6a892f494 100644 --- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_9631de() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl index 4ae18c099d..e4ad8beade 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(f32) -> f32 fn dpdxFine_f401a2() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.wgsl index a045b088da..b0842b2249 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_f401a2() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl index dbeece3cfc..e5e672d027 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl @@ -25,7 +25,7 @@ // fn dpdxFine(vec<3, f32>) -> vec<3, f32> fn dpdxFine_f92fb6() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl index 0177f32b7d..60d0b82c0d 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_f92fb6() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddx_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl index 0177f32b7d..60d0b82c0d 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdxFine_f92fb6() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddx_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.glsl index 6e72e58745..4dab9bcf11 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdxFine_f92fb6() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = dFdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.msl index 020368e6b7..654abac1f9 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdxFine_f92fb6() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = dfdx(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.spvasm index eec936d714..dee390d8da 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %dpdxFine_f92fb6 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpDPdxFine %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpDPdxFine %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdxFine_f92fb6 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdxFine_f92fb6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.wgsl index 35478f0648..8c4849b542 100644 --- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdxFine_f92fb6() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = dpdxFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl index d94a0c5628..88867f4ccf 100644 --- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl +++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl @@ -25,7 +25,7 @@ // fn dpdy(vec<4, f32>) -> vec<4, f32> fn dpdy_699a05() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.dxc.hlsl index 32602bee6b..8ba18415b0 100644 --- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdy_699a05() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.fxc.hlsl index 32602bee6b..8ba18415b0 100644 --- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdy_699a05() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.glsl index 7dd547a6fa..dcb3024974 100644 --- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdy_699a05() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.msl index fedc72ef3e..3ac1a30786 100644 --- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdy_699a05() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.spvasm index 8664d492f1..66f394627f 100644 --- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %dpdy_699a05 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpDPdy %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpDPdy %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdy_699a05 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdy_699a05 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.wgsl index f77aa143bf..a64ad342c7 100644 --- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_699a05() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl index daa8e824b7..3d970a907a 100644 --- a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl +++ b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl @@ -25,7 +25,7 @@ // fn dpdy(f32) -> f32 fn dpdy_7f8d84() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.wgsl index d724ec0f73..b538f0fd87 100644 --- a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_7f8d84() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl index be609cdcd1..8f43963155 100644 --- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl +++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl @@ -25,7 +25,7 @@ // fn dpdy(vec<2, f32>) -> vec<2, f32> fn dpdy_a8b56e() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.dxc.hlsl index 87d014da6b..fb0a29984a 100644 --- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdy_a8b56e() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.fxc.hlsl index 87d014da6b..fb0a29984a 100644 --- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdy_a8b56e() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.glsl index b9d4fcc059..5078de0766 100644 --- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdy_a8b56e() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.msl index fb3233e159..0fdd9382cb 100644 --- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdy_a8b56e() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.spvasm index 432eb0f715..62f7bb3152 100644 --- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %dpdy_a8b56e = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpDPdy %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpDPdy %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdy_a8b56e + %16 = OpLabel + %17 = OpFunctionCall %void %dpdy_a8b56e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.wgsl index 6b1dca8677..772a595de4 100644 --- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_a8b56e() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl index 0e526f4b59..d5c0a7d741 100644 --- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl +++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl @@ -25,7 +25,7 @@ // fn dpdy(vec<3, f32>) -> vec<3, f32> fn dpdy_feb40f() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.dxc.hlsl index 1dc58b95ab..595c0afd0a 100644 --- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdy_feb40f() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.fxc.hlsl index 1dc58b95ab..595c0afd0a 100644 --- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdy_feb40f() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.glsl index 100bd2def5..e7ff0a6b2b 100644 --- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdy_feb40f() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.msl index 867b92f975..786b30e932 100644 --- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdy_feb40f() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.spvasm index 27dd550f34..19026075eb 100644 --- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %dpdy_feb40f = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpDPdy %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpDPdy %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdy_feb40f + %16 = OpLabel + %17 = OpFunctionCall %void %dpdy_feb40f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.wgsl index b0d794e403..f1d84707b4 100644 --- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdy_feb40f() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = dpdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl index 90de753af9..0cbf812a97 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(vec<2, f32>) -> vec<2, f32> fn dpdyCoarse_3e1ab4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl index 1820d16199..c5a7e6f68e 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_3e1ab4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddy_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl index 1820d16199..c5a7e6f68e 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_3e1ab4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddy_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.glsl index cbed1c7818..0565b5be2d 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyCoarse_3e1ab4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.msl index 59a448b478..b36ba5dc17 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyCoarse_3e1ab4() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.spvasm index bd5f5b3be7..55909a53fc 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %dpdyCoarse_3e1ab4 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpDPdyCoarse %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpDPdyCoarse %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdyCoarse_3e1ab4 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdyCoarse_3e1ab4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.wgsl index 9a1f51432f..4d32658093 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_3e1ab4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl index 676632787b..dfa5174350 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(vec<4, f32>) -> vec<4, f32> fn dpdyCoarse_445d24() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl index 0f2904c8c0..e12a367c98 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_445d24() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddy_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl index 0f2904c8c0..e12a367c98 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_445d24() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddy_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.glsl index 048d6d9d69..bf231ff228 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyCoarse_445d24() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.msl index 17ae635ce2..9e132ba210 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyCoarse_445d24() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.spvasm index 7fc9b3e886..5a787f3232 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %dpdyCoarse_445d24 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpDPdyCoarse %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpDPdyCoarse %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdyCoarse_445d24 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdyCoarse_445d24 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.wgsl index 66f4b20a9f..58965af6cc 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_445d24() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl index 3c7d7b8a31..510feb655c 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(f32) -> f32 fn dpdyCoarse_870a7e() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.wgsl index 0cfff79ac0..cbb4a1fa4f 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_870a7e() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl index 2d3b754a8d..a705a2a9c1 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl @@ -25,7 +25,7 @@ // fn dpdyCoarse(vec<3, f32>) -> vec<3, f32> fn dpdyCoarse_ae1873() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl index 3518fc69f0..7fa49bfa47 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_ae1873() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddy_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl index 3518fc69f0..7fa49bfa47 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyCoarse_ae1873() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddy_coarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.glsl index 74aa42a1f2..76f66f649c 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyCoarse_ae1873() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.msl index b24d9489b1..439b32e537 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyCoarse_ae1873() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.spvasm index 89cc4b9e13..3b409ff456 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %dpdyCoarse_ae1873 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpDPdyCoarse %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpDPdyCoarse %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdyCoarse_ae1873 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdyCoarse_ae1873 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.wgsl index 0725af00f0..8a04b99f49 100644 --- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyCoarse_ae1873() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = dpdyCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl index 75b8cd3447..b7877df61d 100644 --- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(vec<3, f32>) -> vec<3, f32> fn dpdyFine_1fb7ab() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl index e20864095e..e5d56fa8fd 100644 --- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_1fb7ab() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddy_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl index e20864095e..e5d56fa8fd 100644 --- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_1fb7ab() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = ddy_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.glsl index ec2f9957cc..6717b929f9 100644 --- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyFine_1fb7ab() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.msl index d58e455fa5..f4c0101bea 100644 --- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyFine_1fb7ab() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.spvasm index 56521ec052..3891288ecf 100644 --- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %dpdyFine_1fb7ab = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpDPdyFine %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpDPdyFine %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdyFine_1fb7ab + %16 = OpLabel + %17 = OpFunctionCall %void %dpdyFine_1fb7ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.wgsl index a9ef3845fc..09af0c8fb8 100644 --- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_1fb7ab() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl index 932f7026af..7cda9be117 100644 --- a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(f32) -> f32 fn dpdyFine_6eb673() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.wgsl index 016163d747..2eeb69c0ea 100644 --- a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_6eb673() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl index 31a1a9490a..ff99ecd40d 100644 --- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(vec<4, f32>) -> vec<4, f32> fn dpdyFine_d0a648() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.dxc.hlsl index 0384f5ce31..a0519e8310 100644 --- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_d0a648() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddy_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.fxc.hlsl index 0384f5ce31..a0519e8310 100644 --- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_d0a648() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = ddy_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.glsl index 41f6256a6b..a641baa3dd 100644 --- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyFine_d0a648() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.msl index 73afd1b1d4..ff8d7275ea 100644 --- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyFine_d0a648() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.spvasm index 4f2cf98e65..c5aff59c75 100644 --- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %dpdyFine_d0a648 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpDPdyFine %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpDPdyFine %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdyFine_d0a648 + %16 = OpLabel + %17 = OpFunctionCall %void %dpdyFine_d0a648 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.wgsl index 4e3ad88bad..5587c56b03 100644 --- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_d0a648() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl index 8946eab6a7..35e8c25275 100644 --- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl @@ -25,7 +25,7 @@ // fn dpdyFine(vec<2, f32>) -> vec<2, f32> fn dpdyFine_df33aa() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.dxc.hlsl index d68bfb36df..22b13fde50 100644 --- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_df33aa() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddy_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.fxc.hlsl index d68bfb36df..22b13fde50 100644 --- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void dpdyFine_df33aa() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = ddy_fine(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.glsl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.glsl index e9489e37e6..fc4c4abcf5 100644 --- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void dpdyFine_df33aa() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = dFdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.msl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.msl index 6c0c0fcddc..936c707af9 100644 --- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void dpdyFine_df33aa() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = dfdy(arg_0); } diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.spvasm index 1a9ef5b20d..eefe1d13e1 100644 --- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %dpdyFine_df33aa = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpDPdyFine %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpDPdyFine %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %dpdyFine_df33aa + %16 = OpLabel + %17 = OpFunctionCall %void %dpdyFine_df33aa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.wgsl index 557d47333f..17ff43f064 100644 --- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn dpdyFine_df33aa() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = dpdyFine(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl b/test/tint/builtins/gen/var/exp/0f70eb.wgsl index 10c64bd9eb..c351932221 100644 --- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl +++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl @@ -25,7 +25,7 @@ // fn exp(vec<4, f32>) -> vec<4, f32> fn exp_0f70eb() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.dxc.hlsl index c99c41ae17..8aaf090cf6 100644 --- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_0f70eb() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.fxc.hlsl index c99c41ae17..8aaf090cf6 100644 --- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp_0f70eb() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.glsl index 7de8d8c417..23953b3270 100644 --- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp_0f70eb() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = exp(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void exp_0f70eb() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = exp(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void exp_0f70eb() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.msl index fefd0a2757..533177b619 100644 --- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_0f70eb() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.spvasm index 18b79bb925..9ce96e74d0 100644 --- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %exp_0f70eb = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Exp %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Exp %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp_0f70eb +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %exp_0f70eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp_0f70eb + %29 = OpLabel + %30 = OpFunctionCall %void %exp_0f70eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp_0f70eb + %32 = OpLabel + %33 = OpFunctionCall %void %exp_0f70eb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.wgsl index 33a815cf48..25f940408b 100644 --- a/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/0f70eb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_0f70eb() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl b/test/tint/builtins/gen/var/exp/1951e7.wgsl index f916d7e2c8..36166fa081 100644 --- a/test/tint/builtins/gen/var/exp/1951e7.wgsl +++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl @@ -25,7 +25,7 @@ // fn exp(vec<2, f32>) -> vec<2, f32> fn exp_1951e7() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.dxc.hlsl index b809cecfb5..ab01f7f8b9 100644 --- a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_1951e7() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.fxc.hlsl index b809cecfb5..ab01f7f8b9 100644 --- a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp_1951e7() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.glsl index 159debe91f..535a3078e7 100644 --- a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp_1951e7() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = exp(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void exp_1951e7() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = exp(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void exp_1951e7() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.msl index 3b0e694012..0f7df5c08c 100644 --- a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_1951e7() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.spvasm index 83e21b7a53..0f4a41e7bf 100644 --- a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %exp_1951e7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Exp %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Exp %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %exp_1951e7 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %exp_1951e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %exp_1951e7 + %31 = OpLabel + %32 = OpFunctionCall %void %exp_1951e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %exp_1951e7 + %34 = OpLabel + %35 = OpFunctionCall %void %exp_1951e7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.wgsl index ff1e940840..a72dfbf93e 100644 --- a/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/1951e7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_1951e7() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/771fd2.wgsl b/test/tint/builtins/gen/var/exp/771fd2.wgsl index 5d7d206cbf..8906c10cd2 100644 --- a/test/tint/builtins/gen/var/exp/771fd2.wgsl +++ b/test/tint/builtins/gen/var/exp/771fd2.wgsl @@ -25,7 +25,7 @@ // fn exp(f32) -> f32 fn exp_771fd2() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.wgsl index fd24d08a21..0e9c5f19d9 100644 --- a/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/771fd2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_771fd2() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl b/test/tint/builtins/gen/var/exp/d98450.wgsl index 291d149d1c..19c8650bec 100644 --- a/test/tint/builtins/gen/var/exp/d98450.wgsl +++ b/test/tint/builtins/gen/var/exp/d98450.wgsl @@ -25,7 +25,7 @@ // fn exp(vec<3, f32>) -> vec<3, f32> fn exp_d98450() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.dxc.hlsl index 090d2fc4df..1b70b1807b 100644 --- a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp_d98450() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.fxc.hlsl index 090d2fc4df..1b70b1807b 100644 --- a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp_d98450() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.glsl index 495a77ad2d..0ebf07ec24 100644 --- a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp_d98450() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = exp(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void exp_d98450() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = exp(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void exp_d98450() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.msl b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.msl index 3dcaac10a3..30443738dd 100644 --- a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp_d98450() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.spvasm index 905659e3ec..12759c0497 100644 --- a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %exp_d98450 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Exp %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Exp %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %exp_d98450 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %exp_d98450 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %exp_d98450 + %31 = OpLabel + %32 = OpFunctionCall %void %exp_d98450 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %exp_d98450 + %34 = OpLabel + %35 = OpFunctionCall %void %exp_d98450 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.wgsl index 067d9e6d96..b37eb28f79 100644 --- a/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp/d98450.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp_d98450() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = exp(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl b/test/tint/builtins/gen/var/exp2/1f8680.wgsl index 336979f06f..f0a4b1a7a7 100644 --- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl +++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl @@ -25,7 +25,7 @@ // fn exp2(vec<3, f32>) -> vec<3, f32> fn exp2_1f8680() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.dxc.hlsl index 5265000f00..ecfc371d95 100644 --- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_1f8680() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.fxc.hlsl index 5265000f00..ecfc371d95 100644 --- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp2_1f8680() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.glsl index 0cb5d7a4a1..b22fadacd1 100644 --- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp2_1f8680() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = exp2(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void exp2_1f8680() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = exp2(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void exp2_1f8680() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.msl index 85188c44a6..06fee444ff 100644 --- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_1f8680() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.spvasm index efcb2f9c12..7101abcae1 100644 --- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %exp2_1f8680 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Exp2 %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Exp2 %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %exp2_1f8680 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %exp2_1f8680 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %exp2_1f8680 + %31 = OpLabel + %32 = OpFunctionCall %void %exp2_1f8680 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %exp2_1f8680 + %34 = OpLabel + %35 = OpFunctionCall %void %exp2_1f8680 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.wgsl index cb888ca5aa..409bfde884 100644 --- a/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/1f8680.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_1f8680() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl index 2be13c8e53..08fb289d90 100644 --- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl +++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl @@ -25,7 +25,7 @@ // fn exp2(vec<4, f32>) -> vec<4, f32> fn exp2_a9d0a7() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.dxc.hlsl index 9223653db8..18f11f22c3 100644 --- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_a9d0a7() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.fxc.hlsl index 9223653db8..18f11f22c3 100644 --- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp2_a9d0a7() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.glsl index bbf87b31ea..3fbbba0332 100644 --- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp2_a9d0a7() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = exp2(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void exp2_a9d0a7() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = exp2(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void exp2_a9d0a7() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.msl index ee5cb73ed2..c0807017f2 100644 --- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_a9d0a7() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.spvasm index eab9cbe9cf..35fb41a304 100644 --- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %exp2_a9d0a7 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Exp2 %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Exp2 %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %exp2_a9d0a7 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %exp2_a9d0a7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %exp2_a9d0a7 + %29 = OpLabel + %30 = OpFunctionCall %void %exp2_a9d0a7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %exp2_a9d0a7 + %32 = OpLabel + %33 = OpFunctionCall %void %exp2_a9d0a7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.wgsl index 61b61ce069..f10b3ddc43 100644 --- a/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/a9d0a7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_a9d0a7() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl b/test/tint/builtins/gen/var/exp2/d6777c.wgsl index 4f64ee2bdd..5a6e3aa34d 100644 --- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl +++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl @@ -25,7 +25,7 @@ // fn exp2(vec<2, f32>) -> vec<2, f32> fn exp2_d6777c() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.dxc.hlsl index 487bb0ac28..d70fa34015 100644 --- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void exp2_d6777c() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.fxc.hlsl index 487bb0ac28..d70fa34015 100644 --- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void exp2_d6777c() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.glsl b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.glsl index cc18345665..2367875f5c 100644 --- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void exp2_d6777c() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = exp2(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void exp2_d6777c() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = exp2(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void exp2_d6777c() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.msl b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.msl index dcda2879fc..93d9152e1f 100644 --- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void exp2_d6777c() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.spvasm index 8902f1bd43..f2c0806e6f 100644 --- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %exp2_d6777c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Exp2 %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Exp2 %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %exp2_d6777c +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %exp2_d6777c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %exp2_d6777c + %31 = OpLabel + %32 = OpFunctionCall %void %exp2_d6777c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %exp2_d6777c + %34 = OpLabel + %35 = OpFunctionCall %void %exp2_d6777c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.wgsl index 33a244ff93..11b0aa5f38 100644 --- a/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/d6777c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_d6777c() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/dea523.wgsl b/test/tint/builtins/gen/var/exp2/dea523.wgsl index ed1a4e6788..02624e378a 100644 --- a/test/tint/builtins/gen/var/exp2/dea523.wgsl +++ b/test/tint/builtins/gen/var/exp2/dea523.wgsl @@ -25,7 +25,7 @@ // fn exp2(f32) -> f32 fn exp2_dea523() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.wgsl b/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.wgsl index eff335446b..b696280a62 100644 --- a/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/exp2/dea523.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn exp2_dea523() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = exp2(arg_0); } diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl index e19468b22b..cc9770b9fe 100644 --- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl +++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<3, u32>, u32, u32) -> vec<3, u32> fn extractBits_12b197() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var arg_1 = 1u; var arg_2 = 1u; var res: vec3 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.dxc.hlsl index bfd2b857b5..d5d112534f 100644 --- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ uint3 tint_extract_bits(uint3 v, uint offset, uint count) { } void extractBits_12b197() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint arg_1 = 1u; uint arg_2 = 1u; uint3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.fxc.hlsl index bfd2b857b5..d5d112534f 100644 --- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ uint3 tint_extract_bits(uint3 v, uint offset, uint count) { } void extractBits_12b197() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint arg_1 = 1u; uint arg_2 = 1u; uint3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl index 3ad6ce84d7..6372fc9474 100644 --- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec3 tint_extract_bits(uvec3 v, uint offset, uint count) { } void extractBits_12b197() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec3 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -36,7 +36,7 @@ uvec3 tint_extract_bits(uvec3 v, uint offset, uint count) { } void extractBits_12b197() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec3 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -59,7 +59,7 @@ uvec3 tint_extract_bits(uvec3 v, uint offset, uint count) { } void extractBits_12b197() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.msl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.msl index 74f5767824..9ef807a344 100644 --- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.msl @@ -8,7 +8,7 @@ uint3 tint_extract_bits(uint3 v, uint offset, uint count) { } void extractBits_12b197() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint arg_1 = 1u; uint arg_2 = 1u; uint3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.spvasm b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.spvasm index e436392234..2038b02b54 100644 --- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 56 ; Schema: 0 OpCapability Shader %18 = OpExtInstImport "GLSL.std.450" @@ -42,12 +42,13 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %24 = OpTypeFunction %void - %28 = OpConstantNull %v3uint -%_ptr_Function_v3uint = OpTypePointer Function %v3uint %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 +%_ptr_Function_v3uint = OpTypePointer Function %v3uint + %32 = OpConstantNull %v3uint %_ptr_Function_uint = OpTypePointer Function %uint - %34 = OpConstantNull %uint - %41 = OpTypeFunction %v4float + %35 = OpConstantNull %uint + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v3uint None %9 %v = OpFunctionParameter %v3uint @@ -63,39 +64,39 @@ OpFunctionEnd %extractBits_12b197 = OpFunction %void None %24 %27 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %28 - %arg_1 = OpVariable %_ptr_Function_uint Function %34 - %arg_2 = OpVariable %_ptr_Function_uint Function %34 - %res = OpVariable %_ptr_Function_v3uint Function %28 - OpStore %arg_0 %28 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %32 + %arg_1 = OpVariable %_ptr_Function_uint Function %35 + %arg_2 = OpVariable %_ptr_Function_uint Function %35 + %res = OpVariable %_ptr_Function_v3uint Function %32 + OpStore %arg_0 %29 OpStore %arg_1 %uint_1 OpStore %arg_2 %uint_1 - %37 = OpLoad %v3uint %arg_0 - %38 = OpLoad %uint %arg_1 - %39 = OpLoad %uint %arg_2 - %36 = OpFunctionCall %v3uint %tint_extract_bits %37 %38 %39 - OpStore %res %36 + %38 = OpLoad %v3uint %arg_0 + %39 = OpLoad %uint %arg_1 + %40 = OpLoad %uint %arg_2 + %37 = OpFunctionCall %v3uint %tint_extract_bits %38 %39 %40 + OpStore %res %37 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %extractBits_12b197 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %extractBits_12b197 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %50 = OpLabel - %51 = OpFunctionCall %void %extractBits_12b197 + %51 = OpLabel + %52 = OpFunctionCall %void %extractBits_12b197 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %53 = OpLabel - %54 = OpFunctionCall %void %extractBits_12b197 + %54 = OpLabel + %55 = OpFunctionCall %void %extractBits_12b197 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.wgsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.wgsl index 926eb6be7b..8728cc5cf5 100644 --- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_12b197() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var arg_1 = 1u; var arg_2 = 1u; var res : vec3 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl index fa2c000d39..e107acf6f9 100644 --- a/test/tint/builtins/gen/var/extractBits/631377.wgsl +++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<4, u32>, u32, u32) -> vec<4, u32> fn extractBits_631377() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var arg_1 = 1u; var arg_2 = 1u; var res: vec4 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.dxc.hlsl index 6ee22caf24..5f5832cab7 100644 --- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ uint4 tint_extract_bits(uint4 v, uint offset, uint count) { } void extractBits_631377() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint arg_1 = 1u; uint arg_2 = 1u; uint4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.fxc.hlsl index 6ee22caf24..5f5832cab7 100644 --- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ uint4 tint_extract_bits(uint4 v, uint offset, uint count) { } void extractBits_631377() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint arg_1 = 1u; uint arg_2 = 1u; uint4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl index ecb1aac35e..e8221d989b 100644 --- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec4 tint_extract_bits(uvec4 v, uint offset, uint count) { } void extractBits_631377() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec4 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -36,7 +36,7 @@ uvec4 tint_extract_bits(uvec4 v, uint offset, uint count) { } void extractBits_631377() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec4 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -59,7 +59,7 @@ uvec4 tint_extract_bits(uvec4 v, uint offset, uint count) { } void extractBits_631377() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.msl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.msl index b19cf254be..e641ab58f8 100644 --- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.msl @@ -8,7 +8,7 @@ uint4 tint_extract_bits(uint4 v, uint offset, uint count) { } void extractBits_631377() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint arg_1 = 1u; uint arg_2 = 1u; uint4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.spvasm b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.spvasm index 1c51271310..531a1c3d53 100644 --- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 56 ; Schema: 0 OpCapability Shader %18 = OpExtInstImport "GLSL.std.450" @@ -42,12 +42,13 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %24 = OpTypeFunction %void - %28 = OpConstantNull %v4uint -%_ptr_Function_v4uint = OpTypePointer Function %v4uint %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 +%_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %_ptr_Function_uint = OpTypePointer Function %uint - %34 = OpConstantNull %uint - %41 = OpTypeFunction %v4float + %35 = OpConstantNull %uint + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v4uint None %9 %v = OpFunctionParameter %v4uint @@ -63,39 +64,39 @@ OpFunctionEnd %extractBits_631377 = OpFunction %void None %24 %27 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %28 - %arg_1 = OpVariable %_ptr_Function_uint Function %34 - %arg_2 = OpVariable %_ptr_Function_uint Function %34 - %res = OpVariable %_ptr_Function_v4uint Function %28 - OpStore %arg_0 %28 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %32 + %arg_1 = OpVariable %_ptr_Function_uint Function %35 + %arg_2 = OpVariable %_ptr_Function_uint Function %35 + %res = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_0 %29 OpStore %arg_1 %uint_1 OpStore %arg_2 %uint_1 - %37 = OpLoad %v4uint %arg_0 - %38 = OpLoad %uint %arg_1 - %39 = OpLoad %uint %arg_2 - %36 = OpFunctionCall %v4uint %tint_extract_bits %37 %38 %39 - OpStore %res %36 + %38 = OpLoad %v4uint %arg_0 + %39 = OpLoad %uint %arg_1 + %40 = OpLoad %uint %arg_2 + %37 = OpFunctionCall %v4uint %tint_extract_bits %38 %39 %40 + OpStore %res %37 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %extractBits_631377 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %extractBits_631377 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %50 = OpLabel - %51 = OpFunctionCall %void %extractBits_631377 + %51 = OpLabel + %52 = OpFunctionCall %void %extractBits_631377 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %53 = OpLabel - %54 = OpFunctionCall %void %extractBits_631377 + %54 = OpLabel + %55 = OpFunctionCall %void %extractBits_631377 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.wgsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.wgsl index 0ea85f9ce7..f3136d97f3 100644 --- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_631377() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var arg_1 = 1u; var arg_2 = 1u; var res : vec4 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl index c4d869cdc7..85c89e9d47 100644 --- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl +++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<2, i32>, u32, u32) -> vec<2, i32> fn extractBits_a99a8d() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var arg_1 = 1u; var arg_2 = 1u; var res: vec2 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.dxc.hlsl index 4307614ad5..4971f269a4 100644 --- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ int2 tint_extract_bits(int2 v, uint offset, uint count) { } void extractBits_a99a8d() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; uint arg_1 = 1u; uint arg_2 = 1u; int2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.fxc.hlsl index 4307614ad5..4971f269a4 100644 --- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ int2 tint_extract_bits(int2 v, uint offset, uint count) { } void extractBits_a99a8d() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; uint arg_1 = 1u; uint arg_2 = 1u; int2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl index 18db5eda25..9cfb4f29ab 100644 --- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec2 tint_extract_bits(ivec2 v, uint offset, uint count) { } void extractBits_a99a8d() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec2 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -36,7 +36,7 @@ ivec2 tint_extract_bits(ivec2 v, uint offset, uint count) { } void extractBits_a99a8d() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec2 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -59,7 +59,7 @@ ivec2 tint_extract_bits(ivec2 v, uint offset, uint count) { } void extractBits_a99a8d() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.msl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.msl index 80650664ed..3aa841b003 100644 --- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.msl @@ -8,7 +8,7 @@ int2 tint_extract_bits(int2 v, uint offset, uint count) { } void extractBits_a99a8d() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); uint arg_1 = 1u; uint arg_2 = 1u; int2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.spvasm index 717854ed3c..135fd673b9 100644 --- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 58 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -43,12 +43,14 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %33 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %35 = OpConstantNull %uint - %42 = OpTypeFunction %v4float + %37 = OpConstantNull %uint + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -64,39 +66,39 @@ OpFunctionEnd %extractBits_a99a8d = OpFunction %void None %25 %28 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %29 - %arg_1 = OpVariable %_ptr_Function_uint Function %35 - %arg_2 = OpVariable %_ptr_Function_uint Function %35 - %res = OpVariable %_ptr_Function_v2int Function %29 - OpStore %arg_0 %29 + %arg_0 = OpVariable %_ptr_Function_v2int Function %33 + %arg_1 = OpVariable %_ptr_Function_uint Function %37 + %arg_2 = OpVariable %_ptr_Function_uint Function %37 + %res = OpVariable %_ptr_Function_v2int Function %33 + OpStore %arg_0 %30 OpStore %arg_1 %uint_1 OpStore %arg_2 %uint_1 - %38 = OpLoad %v2int %arg_0 - %39 = OpLoad %uint %arg_1 - %40 = OpLoad %uint %arg_2 - %37 = OpFunctionCall %v2int %tint_extract_bits %38 %39 %40 - OpStore %res %37 + %40 = OpLoad %v2int %arg_0 + %41 = OpLoad %uint %arg_1 + %42 = OpLoad %uint %arg_2 + %39 = OpFunctionCall %v2int %tint_extract_bits %40 %41 %42 + OpStore %res %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %extractBits_a99a8d +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %extractBits_a99a8d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %51 = OpLabel - %52 = OpFunctionCall %void %extractBits_a99a8d + %53 = OpLabel + %54 = OpFunctionCall %void %extractBits_a99a8d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %54 = OpLabel - %55 = OpFunctionCall %void %extractBits_a99a8d + %56 = OpLabel + %57 = OpFunctionCall %void %extractBits_a99a8d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.wgsl index 480f46ae2b..1f814034b9 100644 --- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_a99a8d() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var arg_1 = 1u; var arg_2 = 1u; var res : vec2 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl index 4bc5ff0948..6d8ef4ae71 100644 --- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl +++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<3, i32>, u32, u32) -> vec<3, i32> fn extractBits_e04f5d() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var arg_1 = 1u; var arg_2 = 1u; var res: vec3 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.dxc.hlsl index f1cb606579..c45a595f13 100644 --- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ int3 tint_extract_bits(int3 v, uint offset, uint count) { } void extractBits_e04f5d() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; uint arg_1 = 1u; uint arg_2 = 1u; int3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.fxc.hlsl index f1cb606579..c45a595f13 100644 --- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ int3 tint_extract_bits(int3 v, uint offset, uint count) { } void extractBits_e04f5d() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; uint arg_1 = 1u; uint arg_2 = 1u; int3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl index 80e3d78976..66f53085a6 100644 --- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec3 tint_extract_bits(ivec3 v, uint offset, uint count) { } void extractBits_e04f5d() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec3 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -36,7 +36,7 @@ ivec3 tint_extract_bits(ivec3 v, uint offset, uint count) { } void extractBits_e04f5d() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec3 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -59,7 +59,7 @@ ivec3 tint_extract_bits(ivec3 v, uint offset, uint count) { } void extractBits_e04f5d() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.msl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.msl index 9587087701..bbc7412b42 100644 --- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.msl @@ -8,7 +8,7 @@ int3 tint_extract_bits(int3 v, uint offset, uint count) { } void extractBits_e04f5d() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); uint arg_1 = 1u; uint arg_2 = 1u; int3 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.spvasm index fd159b9c7c..3efe52e030 100644 --- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 58 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -43,12 +43,14 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %29 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %33 = OpConstantNull %v3int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %35 = OpConstantNull %uint - %42 = OpTypeFunction %v4float + %37 = OpConstantNull %uint + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -64,39 +66,39 @@ OpFunctionEnd %extractBits_e04f5d = OpFunction %void None %25 %28 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %29 - %arg_1 = OpVariable %_ptr_Function_uint Function %35 - %arg_2 = OpVariable %_ptr_Function_uint Function %35 - %res = OpVariable %_ptr_Function_v3int Function %29 - OpStore %arg_0 %29 + %arg_0 = OpVariable %_ptr_Function_v3int Function %33 + %arg_1 = OpVariable %_ptr_Function_uint Function %37 + %arg_2 = OpVariable %_ptr_Function_uint Function %37 + %res = OpVariable %_ptr_Function_v3int Function %33 + OpStore %arg_0 %30 OpStore %arg_1 %uint_1 OpStore %arg_2 %uint_1 - %38 = OpLoad %v3int %arg_0 - %39 = OpLoad %uint %arg_1 - %40 = OpLoad %uint %arg_2 - %37 = OpFunctionCall %v3int %tint_extract_bits %38 %39 %40 - OpStore %res %37 + %40 = OpLoad %v3int %arg_0 + %41 = OpLoad %uint %arg_1 + %42 = OpLoad %uint %arg_2 + %39 = OpFunctionCall %v3int %tint_extract_bits %40 %41 %42 + OpStore %res %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %extractBits_e04f5d +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %extractBits_e04f5d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %51 = OpLabel - %52 = OpFunctionCall %void %extractBits_e04f5d + %53 = OpLabel + %54 = OpFunctionCall %void %extractBits_e04f5d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %54 = OpLabel - %55 = OpFunctionCall %void %extractBits_e04f5d + %56 = OpLabel + %57 = OpFunctionCall %void %extractBits_e04f5d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.wgsl index 7bad596f27..f15bb47a07 100644 --- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_e04f5d() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var arg_1 = 1u; var arg_2 = 1u; var res : vec3 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl index 882b2742c8..e15581a2d6 100644 --- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl +++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<2, u32>, u32, u32) -> vec<2, u32> fn extractBits_f28f69() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var arg_1 = 1u; var arg_2 = 1u; var res: vec2 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.dxc.hlsl index d5e4931bdc..c56231c894 100644 --- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ uint2 tint_extract_bits(uint2 v, uint offset, uint count) { } void extractBits_f28f69() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint arg_1 = 1u; uint arg_2 = 1u; uint2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.fxc.hlsl index d5e4931bdc..c56231c894 100644 --- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ uint2 tint_extract_bits(uint2 v, uint offset, uint count) { } void extractBits_f28f69() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint arg_1 = 1u; uint arg_2 = 1u; uint2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl index a5b640be43..019abe98ee 100644 --- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl @@ -7,7 +7,7 @@ uvec2 tint_extract_bits(uvec2 v, uint offset, uint count) { } void extractBits_f28f69() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec2 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -36,7 +36,7 @@ uvec2 tint_extract_bits(uvec2 v, uint offset, uint count) { } void extractBits_f28f69() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec2 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -59,7 +59,7 @@ uvec2 tint_extract_bits(uvec2 v, uint offset, uint count) { } void extractBits_f28f69() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uint arg_1 = 1u; uint arg_2 = 1u; uvec2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.msl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.msl index bd0078e42e..660fe43873 100644 --- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.msl @@ -8,7 +8,7 @@ uint2 tint_extract_bits(uint2 v, uint offset, uint count) { } void extractBits_f28f69() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint arg_1 = 1u; uint arg_2 = 1u; uint2 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.spvasm b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.spvasm index fb2a5f67a5..61e11491e2 100644 --- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 56 ; Schema: 0 OpCapability Shader %18 = OpExtInstImport "GLSL.std.450" @@ -42,12 +42,13 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %24 = OpTypeFunction %void - %28 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %32 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %34 = OpConstantNull %uint - %41 = OpTypeFunction %v4float + %35 = OpConstantNull %uint + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v2uint None %9 %v = OpFunctionParameter %v2uint @@ -63,39 +64,39 @@ OpFunctionEnd %extractBits_f28f69 = OpFunction %void None %24 %27 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %28 - %arg_1 = OpVariable %_ptr_Function_uint Function %34 - %arg_2 = OpVariable %_ptr_Function_uint Function %34 - %res = OpVariable %_ptr_Function_v2uint Function %28 - OpStore %arg_0 %28 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %32 + %arg_1 = OpVariable %_ptr_Function_uint Function %35 + %arg_2 = OpVariable %_ptr_Function_uint Function %35 + %res = OpVariable %_ptr_Function_v2uint Function %32 + OpStore %arg_0 %29 OpStore %arg_1 %uint_1 OpStore %arg_2 %uint_1 - %37 = OpLoad %v2uint %arg_0 - %38 = OpLoad %uint %arg_1 - %39 = OpLoad %uint %arg_2 - %36 = OpFunctionCall %v2uint %tint_extract_bits %37 %38 %39 - OpStore %res %36 + %38 = OpLoad %v2uint %arg_0 + %39 = OpLoad %uint %arg_1 + %40 = OpLoad %uint %arg_2 + %37 = OpFunctionCall %v2uint %tint_extract_bits %38 %39 %40 + OpStore %res %37 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %extractBits_f28f69 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %extractBits_f28f69 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %24 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %24 - %50 = OpLabel - %51 = OpFunctionCall %void %extractBits_f28f69 + %51 = OpLabel + %52 = OpFunctionCall %void %extractBits_f28f69 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %24 - %53 = OpLabel - %54 = OpFunctionCall %void %extractBits_f28f69 + %54 = OpLabel + %55 = OpFunctionCall %void %extractBits_f28f69 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.wgsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.wgsl index 69d9578a96..f3b0b7d398 100644 --- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_f28f69() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var arg_1 = 1u; var arg_2 = 1u; var res : vec2 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl index bfb55a33e4..ddfc40eb9a 100644 --- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl +++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl @@ -25,7 +25,7 @@ // fn extractBits(vec<4, i32>, u32, u32) -> vec<4, i32> fn extractBits_fb850f() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var arg_1 = 1u; var arg_2 = 1u; var res: vec4 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.dxc.hlsl index e6a538d2bd..40ab22ce85 100644 --- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.dxc.hlsl @@ -7,7 +7,7 @@ int4 tint_extract_bits(int4 v, uint offset, uint count) { } void extractBits_fb850f() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; uint arg_1 = 1u; uint arg_2 = 1u; int4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.fxc.hlsl index e6a538d2bd..40ab22ce85 100644 --- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.fxc.hlsl @@ -7,7 +7,7 @@ int4 tint_extract_bits(int4 v, uint offset, uint count) { } void extractBits_fb850f() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; uint arg_1 = 1u; uint arg_2 = 1u; int4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl index db67c074a1..36e408950d 100644 --- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl @@ -7,7 +7,7 @@ ivec4 tint_extract_bits(ivec4 v, uint offset, uint count) { } void extractBits_fb850f() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec4 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -36,7 +36,7 @@ ivec4 tint_extract_bits(ivec4 v, uint offset, uint count) { } void extractBits_fb850f() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec4 res = tint_extract_bits(arg_0, arg_1, arg_2); @@ -59,7 +59,7 @@ ivec4 tint_extract_bits(ivec4 v, uint offset, uint count) { } void extractBits_fb850f() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); uint arg_1 = 1u; uint arg_2 = 1u; ivec4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.msl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.msl index ff1e0a1b28..bc83c627d8 100644 --- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.msl @@ -8,7 +8,7 @@ int4 tint_extract_bits(int4 v, uint offset, uint count) { } void extractBits_fb850f() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); uint arg_1 = 1u; uint arg_2 = 1u; int4 res = tint_extract_bits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.spvasm index 33149d6f86..0b66eed101 100644 --- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 58 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -43,12 +43,14 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %29 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %33 = OpConstantNull %v4int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %35 = OpConstantNull %uint - %42 = OpTypeFunction %v4float + %37 = OpConstantNull %uint + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_extract_bits = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -64,39 +66,39 @@ OpFunctionEnd %extractBits_fb850f = OpFunction %void None %25 %28 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %29 - %arg_1 = OpVariable %_ptr_Function_uint Function %35 - %arg_2 = OpVariable %_ptr_Function_uint Function %35 - %res = OpVariable %_ptr_Function_v4int Function %29 - OpStore %arg_0 %29 + %arg_0 = OpVariable %_ptr_Function_v4int Function %33 + %arg_1 = OpVariable %_ptr_Function_uint Function %37 + %arg_2 = OpVariable %_ptr_Function_uint Function %37 + %res = OpVariable %_ptr_Function_v4int Function %33 + OpStore %arg_0 %30 OpStore %arg_1 %uint_1 OpStore %arg_2 %uint_1 - %38 = OpLoad %v4int %arg_0 - %39 = OpLoad %uint %arg_1 - %40 = OpLoad %uint %arg_2 - %37 = OpFunctionCall %v4int %tint_extract_bits %38 %39 %40 - OpStore %res %37 + %40 = OpLoad %v4int %arg_0 + %41 = OpLoad %uint %arg_1 + %42 = OpLoad %uint %arg_2 + %39 = OpFunctionCall %v4int %tint_extract_bits %40 %41 %42 + OpStore %res %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %extractBits_fb850f +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %extractBits_fb850f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %51 = OpLabel - %52 = OpFunctionCall %void %extractBits_fb850f + %53 = OpLabel + %54 = OpFunctionCall %void %extractBits_fb850f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %54 = OpLabel - %55 = OpFunctionCall %void %extractBits_fb850f + %56 = OpLabel + %57 = OpFunctionCall %void %extractBits_fb850f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.wgsl index 2df9fbd70f..f8b9c66600 100644 --- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn extractBits_fb850f() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var arg_1 = 1u; var arg_2 = 1u; var res : vec4 = extractBits(arg_0, arg_1, arg_2); diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl index 8d29491ebd..c68d954858 100644 --- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl +++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl @@ -25,9 +25,9 @@ // fn faceForward(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn faceForward_5afbd5() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = vec3(1.f); var res: vec3 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.dxc.hlsl index 6983f1b580..d4dbbc14ec 100644 --- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void faceForward_5afbd5() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.fxc.hlsl index 6983f1b580..d4dbbc14ec 100644 --- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void faceForward_5afbd5() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.glsl index d14d0d69e7..cc2d73df8d 100644 --- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void faceForward_5afbd5() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = faceforward(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void faceForward_5afbd5() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = faceforward(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void faceForward_5afbd5() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.msl index 74f5cd113a..adb259e042 100644 --- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void faceForward_5afbd5() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); - float3 arg_2 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); + float3 arg_2 = float3(1.0f); float3 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.spvasm index 278ef67958..3cfa4894be 100644 --- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %27 = OpTypeFunction %v4float %faceForward_5afbd5 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %arg_2 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v3float %arg_0 - %22 = OpLoad %v3float %arg_1 - %23 = OpLoad %v3float %arg_2 - %19 = OpExtInst %v3float %20 FaceForward %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %arg_2 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v3float %arg_0 + %24 = OpLoad %v3float %arg_1 + %25 = OpLoad %v3float %arg_2 + %21 = OpExtInst %v3float %22 FaceForward %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %faceForward_5afbd5 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %faceForward_5afbd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %faceForward_5afbd5 + %35 = OpLabel + %36 = OpFunctionCall %void %faceForward_5afbd5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %faceForward_5afbd5 + %38 = OpLabel + %39 = OpFunctionCall %void %faceForward_5afbd5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.wgsl index 8b5bbee9b9..56a1589748 100644 --- a/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/faceForward/5afbd5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn faceForward_5afbd5() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = vec3(1.0f); var res : vec3 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl index 85d4fac778..efb532d92c 100644 --- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl +++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl @@ -25,9 +25,9 @@ // fn faceForward(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn faceForward_b316e5() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = vec4(1.f); var res: vec4 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.dxc.hlsl index b11b1da97a..1ec3bc9000 100644 --- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void faceForward_b316e5() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.fxc.hlsl index b11b1da97a..1ec3bc9000 100644 --- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void faceForward_b316e5() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.glsl index 99adf65d96..2df8c57627 100644 --- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void faceForward_b316e5() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = faceforward(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void faceForward_b316e5() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = faceforward(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void faceForward_b316e5() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.msl index 72ccfcb06d..d94bb16fdb 100644 --- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void faceForward_b316e5() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); - float4 arg_2 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); + float4 arg_2 = float4(1.0f); float4 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.spvasm index f88252bef7..9baaf65542 100644 --- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,44 +34,45 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %25 = OpTypeFunction %v4float %faceForward_b316e5 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - OpStore %arg_2 %5 - %19 = OpLoad %v4float %arg_0 - %20 = OpLoad %v4float %arg_1 - %21 = OpLoad %v4float %arg_2 - %17 = OpExtInst %v4float %18 FaceForward %19 %20 %21 - OpStore %res %17 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + OpStore %arg_2 %14 + %21 = OpLoad %v4float %arg_0 + %22 = OpLoad %v4float %arg_1 + %23 = OpLoad %v4float %arg_2 + %19 = OpExtInst %v4float %20 FaceForward %21 %22 %23 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %faceForward_b316e5 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %faceForward_b316e5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %faceForward_b316e5 + %33 = OpLabel + %34 = OpFunctionCall %void %faceForward_b316e5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %faceForward_b316e5 + %36 = OpLabel + %37 = OpFunctionCall %void %faceForward_b316e5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.wgsl index c8a389f055..cc70986e21 100644 --- a/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/faceForward/b316e5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn faceForward_b316e5() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = vec4(1.0f); var res : vec4 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl index 065fa6d8bd..8810cb80be 100644 --- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl +++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl @@ -25,9 +25,9 @@ // fn faceForward(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn faceForward_e6908b() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = vec2(1.f); var res: vec2 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.dxc.hlsl index 9f71b86e26..420451bde7 100644 --- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void faceForward_e6908b() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.fxc.hlsl index 9f71b86e26..420451bde7 100644 --- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void faceForward_e6908b() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.glsl b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.glsl index d2f0fd3db9..d15e8d677c 100644 --- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void faceForward_e6908b() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = faceforward(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void faceForward_e6908b() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = faceforward(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void faceForward_e6908b() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.msl b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.msl index ca6e3a76e5..a932e4fe0a 100644 --- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void faceForward_e6908b() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); - float2 arg_2 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); + float2 arg_2 = float2(1.0f); float2 res = faceforward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.spvasm index 461a75ab79..e02d85ebe7 100644 --- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %27 = OpTypeFunction %v4float %faceForward_e6908b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %arg_2 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v2float %arg_0 - %22 = OpLoad %v2float %arg_1 - %23 = OpLoad %v2float %arg_2 - %19 = OpExtInst %v2float %20 FaceForward %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %arg_2 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v2float %arg_0 + %24 = OpLoad %v2float %arg_1 + %25 = OpLoad %v2float %arg_2 + %21 = OpExtInst %v2float %22 FaceForward %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %faceForward_e6908b +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %faceForward_e6908b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %faceForward_e6908b + %35 = OpLabel + %36 = OpFunctionCall %void %faceForward_e6908b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %faceForward_e6908b + %38 = OpLabel + %39 = OpFunctionCall %void %faceForward_e6908b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.wgsl index 5dba944d5d..b2a922b78a 100644 --- a/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/faceForward/e6908b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn faceForward_e6908b() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = vec2(1.0f); var res : vec2 = faceForward(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl index 650a35afec..06426c2478 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<4, u32>) -> vec<4, u32> fn firstLeadingBit_000ff3() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res: vec4 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl index aa95d7190b..a7aba557e0 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_leading_bit(uint4 v) { } void firstLeadingBit_000ff3() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl index aa95d7190b..a7aba557e0 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_leading_bit(uint4 v) { } void firstLeadingBit_000ff3() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl index acfe1bc672..f468c8a1c0 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_first_leading_bit(uvec4 v) { } void firstLeadingBit_000ff3() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_first_leading_bit(arg_0); } @@ -52,7 +52,7 @@ uvec4 tint_first_leading_bit(uvec4 v) { } void firstLeadingBit_000ff3() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_first_leading_bit(arg_0); } @@ -82,7 +82,7 @@ uvec4 tint_first_leading_bit(uvec4 v) { } void firstLeadingBit_000ff3() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.msl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.msl index f5e731b05c..cdf2e4bb6a 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.msl @@ -17,7 +17,7 @@ uint4 tint_first_leading_bit(uint4 v) { } void firstLeadingBit_000ff3() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.spvasm index dc0c5a032b..99937e2c47 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.spvasm @@ -114,7 +114,7 @@ %80 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4uint Function %17 %res = OpVariable %_ptr_Function_v4uint Function %17 - OpStore %arg_0 %17 + OpStore %arg_0 %65 %83 = OpLoad %v4uint %arg_0 %82 = OpFunctionCall %v4uint %tint_first_leading_bit %83 OpStore %res %82 diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.wgsl index ce5a31bff8..a3a7d0c4cb 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_000ff3() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res : vec4 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl index f2e1c459f9..498d4a4804 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<3, i32>) -> vec<3, i32> fn firstLeadingBit_35053e() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res: vec3 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl index f514b46a87..2a9bbbc78d 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_leading_bit(int3 v) { } void firstLeadingBit_35053e() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl index f514b46a87..2a9bbbc78d 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_leading_bit(int3 v) { } void firstLeadingBit_35053e() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl index 180ee53749..4fa238305e 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_first_leading_bit(ivec3 v) { } void firstLeadingBit_35053e() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_first_leading_bit(arg_0); } @@ -52,7 +52,7 @@ ivec3 tint_first_leading_bit(ivec3 v) { } void firstLeadingBit_35053e() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_first_leading_bit(arg_0); } @@ -82,7 +82,7 @@ ivec3 tint_first_leading_bit(ivec3 v) { } void firstLeadingBit_35053e() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.msl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.msl index 73d3d90ba9..584154aca7 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.msl @@ -17,7 +17,7 @@ int3 tint_first_leading_bit(int3 v) { } void firstLeadingBit_35053e() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); int3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.spvasm index f076535f5e..ca524f380b 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 108 +; Bound: 110 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -64,8 +64,10 @@ %78 = OpConstantComposite %v3uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %85 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %90 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %94 = OpTypeFunction %v4float + %96 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_leading_bit = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -124,31 +126,31 @@ %88 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3int Function %18 %res = OpVariable %_ptr_Function_v3int Function %18 - OpStore %arg_0 %18 - %92 = OpLoad %v3int %arg_0 - %91 = OpFunctionCall %v3int %tint_first_leading_bit %92 - OpStore %res %91 + OpStore %arg_0 %90 + %94 = OpLoad %v3int %arg_0 + %93 = OpFunctionCall %v3int %tint_first_leading_bit %94 + OpStore %res %93 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %94 - %96 = OpLabel - %97 = OpFunctionCall %void %firstLeadingBit_35053e +%vertex_main_inner = OpFunction %v4float None %96 + %98 = OpLabel + %99 = OpFunctionCall %void %firstLeadingBit_35053e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %85 - %99 = OpLabel - %100 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %100 + %101 = OpLabel + %102 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %102 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %85 - %103 = OpLabel - %104 = OpFunctionCall %void %firstLeadingBit_35053e + %105 = OpLabel + %106 = OpFunctionCall %void %firstLeadingBit_35053e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %85 - %106 = OpLabel - %107 = OpFunctionCall %void %firstLeadingBit_35053e + %108 = OpLabel + %109 = OpFunctionCall %void %firstLeadingBit_35053e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.wgsl index d3dec7318b..af23e37014 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_35053e() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res : vec3 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl index e586d8d4c7..a53a242c4a 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<3, u32>) -> vec<3, u32> fn firstLeadingBit_3fd7d0() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res: vec3 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl index 626469192f..f782560180 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_leading_bit(uint3 v) { } void firstLeadingBit_3fd7d0() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl index 626469192f..f782560180 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_leading_bit(uint3 v) { } void firstLeadingBit_3fd7d0() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl index 0a9b223a14..a1f7c6f5ca 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_first_leading_bit(uvec3 v) { } void firstLeadingBit_3fd7d0() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_first_leading_bit(arg_0); } @@ -52,7 +52,7 @@ uvec3 tint_first_leading_bit(uvec3 v) { } void firstLeadingBit_3fd7d0() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_first_leading_bit(arg_0); } @@ -82,7 +82,7 @@ uvec3 tint_first_leading_bit(uvec3 v) { } void firstLeadingBit_3fd7d0() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.msl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.msl index 2d31007ebd..2a6a83630d 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.msl @@ -17,7 +17,7 @@ uint3 tint_first_leading_bit(uint3 v) { } void firstLeadingBit_3fd7d0() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint3 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.spvasm index ac50c76896..43a1b12fda 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.spvasm @@ -114,7 +114,7 @@ %80 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3uint Function %17 %res = OpVariable %_ptr_Function_v3uint Function %17 - OpStore %arg_0 %17 + OpStore %arg_0 %65 %83 = OpLoad %v3uint %arg_0 %82 = OpFunctionCall %v3uint %tint_first_leading_bit %83 OpStore %res %82 diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.wgsl index d64dfc65e1..9bf81547c8 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_3fd7d0() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res : vec3 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl index dcbb406bdf..dfb8ba698f 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<2, u32>) -> vec<2, u32> fn firstLeadingBit_6fe804() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res: vec2 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl index fa7b9cbeae..451630ecae 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_leading_bit(uint2 v) { } void firstLeadingBit_6fe804() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl index fa7b9cbeae..451630ecae 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_leading_bit(uint2 v) { } void firstLeadingBit_6fe804() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl index e01f3f211b..b45183ba1f 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_first_leading_bit(uvec2 v) { } void firstLeadingBit_6fe804() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_first_leading_bit(arg_0); } @@ -52,7 +52,7 @@ uvec2 tint_first_leading_bit(uvec2 v) { } void firstLeadingBit_6fe804() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_first_leading_bit(arg_0); } @@ -82,7 +82,7 @@ uvec2 tint_first_leading_bit(uvec2 v) { } void firstLeadingBit_6fe804() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.msl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.msl index 0dce90927a..d81e18029a 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.msl @@ -17,7 +17,7 @@ uint2 tint_first_leading_bit(uint2 v) { } void firstLeadingBit_6fe804() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.spvasm index 77c6c00d29..2a85a2b488 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.spvasm @@ -114,7 +114,7 @@ %80 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2uint Function %17 %res = OpVariable %_ptr_Function_v2uint Function %17 - OpStore %arg_0 %17 + OpStore %arg_0 %65 %83 = OpLoad %v2uint %arg_0 %82 = OpFunctionCall %v2uint %tint_first_leading_bit %83 OpStore %res %82 diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.wgsl index 84ab995fbb..8ae1f87fc0 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_6fe804() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res : vec2 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl index 115596e3e3..ab0e936a28 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<2, i32>) -> vec<2, i32> fn firstLeadingBit_a622c2() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res: vec2 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl index d1da967a54..25765f1ab8 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_leading_bit(int2 v) { } void firstLeadingBit_a622c2() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl index d1da967a54..25765f1ab8 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_leading_bit(int2 v) { } void firstLeadingBit_a622c2() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl index b12c7d5047..b893de3026 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_first_leading_bit(ivec2 v) { } void firstLeadingBit_a622c2() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_first_leading_bit(arg_0); } @@ -52,7 +52,7 @@ ivec2 tint_first_leading_bit(ivec2 v) { } void firstLeadingBit_a622c2() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_first_leading_bit(arg_0); } @@ -82,7 +82,7 @@ ivec2 tint_first_leading_bit(ivec2 v) { } void firstLeadingBit_a622c2() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.msl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.msl index 8e55a5cad5..321198c644 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.msl @@ -17,7 +17,7 @@ int2 tint_first_leading_bit(int2 v) { } void firstLeadingBit_a622c2() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); int2 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.spvasm index ab66d0b2db..908ce65578 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 108 +; Bound: 110 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -64,8 +64,10 @@ %78 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %85 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %90 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %94 = OpTypeFunction %v4float + %96 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_leading_bit = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -124,31 +126,31 @@ %88 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2int Function %18 %res = OpVariable %_ptr_Function_v2int Function %18 - OpStore %arg_0 %18 - %92 = OpLoad %v2int %arg_0 - %91 = OpFunctionCall %v2int %tint_first_leading_bit %92 - OpStore %res %91 + OpStore %arg_0 %90 + %94 = OpLoad %v2int %arg_0 + %93 = OpFunctionCall %v2int %tint_first_leading_bit %94 + OpStore %res %93 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %94 - %96 = OpLabel - %97 = OpFunctionCall %void %firstLeadingBit_a622c2 +%vertex_main_inner = OpFunction %v4float None %96 + %98 = OpLabel + %99 = OpFunctionCall %void %firstLeadingBit_a622c2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %85 - %99 = OpLabel - %100 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %100 + %101 = OpLabel + %102 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %102 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %85 - %103 = OpLabel - %104 = OpFunctionCall %void %firstLeadingBit_a622c2 + %105 = OpLabel + %106 = OpFunctionCall %void %firstLeadingBit_a622c2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %85 - %106 = OpLabel - %107 = OpFunctionCall %void %firstLeadingBit_a622c2 + %108 = OpLabel + %109 = OpFunctionCall %void %firstLeadingBit_a622c2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.wgsl index e089f78a43..457d5f1d2e 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_a622c2() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res : vec2 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl index 2997ff4515..ff7a806d62 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl @@ -25,7 +25,7 @@ // fn firstLeadingBit(vec<4, i32>) -> vec<4, i32> fn firstLeadingBit_c1f940() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res: vec4 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl index 2103853bf4..c05d3dcd69 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_leading_bit(int4 v) { } void firstLeadingBit_c1f940() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl index 2103853bf4..c05d3dcd69 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_leading_bit(int4 v) { } void firstLeadingBit_c1f940() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl index 442f3b20c9..ef4ab88498 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_first_leading_bit(ivec4 v) { } void firstLeadingBit_c1f940() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_first_leading_bit(arg_0); } @@ -52,7 +52,7 @@ ivec4 tint_first_leading_bit(ivec4 v) { } void firstLeadingBit_c1f940() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_first_leading_bit(arg_0); } @@ -82,7 +82,7 @@ ivec4 tint_first_leading_bit(ivec4 v) { } void firstLeadingBit_c1f940() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.msl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.msl index 950e9b655f..042e4178b7 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.msl @@ -17,7 +17,7 @@ int4 tint_first_leading_bit(int4 v) { } void firstLeadingBit_c1f940() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); int4 res = tint_first_leading_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.spvasm index 7c6ee54707..581af1df40 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 108 +; Bound: 110 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -64,8 +64,10 @@ %78 = OpConstantComposite %v4uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %85 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %90 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %94 = OpTypeFunction %v4float + %96 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_leading_bit = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -124,31 +126,31 @@ %88 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4int Function %18 %res = OpVariable %_ptr_Function_v4int Function %18 - OpStore %arg_0 %18 - %92 = OpLoad %v4int %arg_0 - %91 = OpFunctionCall %v4int %tint_first_leading_bit %92 - OpStore %res %91 + OpStore %arg_0 %90 + %94 = OpLoad %v4int %arg_0 + %93 = OpFunctionCall %v4int %tint_first_leading_bit %94 + OpStore %res %93 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %94 - %96 = OpLabel - %97 = OpFunctionCall %void %firstLeadingBit_c1f940 +%vertex_main_inner = OpFunction %v4float None %96 + %98 = OpLabel + %99 = OpFunctionCall %void %firstLeadingBit_c1f940 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %85 - %99 = OpLabel - %100 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %100 + %101 = OpLabel + %102 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %102 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %85 - %103 = OpLabel - %104 = OpFunctionCall %void %firstLeadingBit_c1f940 + %105 = OpLabel + %106 = OpFunctionCall %void %firstLeadingBit_c1f940 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %85 - %106 = OpLabel - %107 = OpFunctionCall %void %firstLeadingBit_c1f940 + %108 = OpLabel + %109 = OpFunctionCall %void %firstLeadingBit_c1f940 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.wgsl index de02acfd03..06fd90f3c8 100644 --- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstLeadingBit_c1f940() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res : vec4 = firstLeadingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl index fcc2127415..76e38791da 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<4, u32>) -> vec<4, u32> fn firstTrailingBit_110f2c() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res: vec4 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl index ed6e500c31..65939d8468 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_trailing_bit(uint4 v) { } void firstTrailingBit_110f2c() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl index ed6e500c31..65939d8468 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint4 tint_first_trailing_bit(uint4 v) { } void firstTrailingBit_110f2c() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl index dc7ca074cb..907cba7cce 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec4 tint_first_trailing_bit(uvec4 v) { } void firstTrailingBit_110f2c() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_first_trailing_bit(arg_0); } @@ -52,7 +52,7 @@ uvec4 tint_first_trailing_bit(uvec4 v) { } void firstTrailingBit_110f2c() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_first_trailing_bit(arg_0); } @@ -82,7 +82,7 @@ uvec4 tint_first_trailing_bit(uvec4 v) { } void firstTrailingBit_110f2c() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.msl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.msl index e1dfe906f9..7a1f15894a 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.msl @@ -17,7 +17,7 @@ uint4 tint_first_trailing_bit(uint4 v) { } void firstTrailingBit_110f2c() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.spvasm index e4d1cbba84..aa68727462 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.spvasm @@ -114,7 +114,7 @@ %81 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4uint Function %18 %res = OpVariable %_ptr_Function_v4uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %65 %84 = OpLoad %v4uint %arg_0 %83 = OpFunctionCall %v4uint %tint_first_trailing_bit %84 OpStore %res %83 diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.wgsl index e35d085151..2cd770d555 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_110f2c() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res : vec4 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl index 1d39c64f05..8bf5a4fcbf 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<2, u32>) -> vec<2, u32> fn firstTrailingBit_45eb10() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res: vec2 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl index e8fe8a1552..2891be4bde 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_trailing_bit(uint2 v) { } void firstTrailingBit_45eb10() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl index e8fe8a1552..2891be4bde 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint2 tint_first_trailing_bit(uint2 v) { } void firstTrailingBit_45eb10() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl index e31b527163..0675a95a29 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec2 tint_first_trailing_bit(uvec2 v) { } void firstTrailingBit_45eb10() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_first_trailing_bit(arg_0); } @@ -52,7 +52,7 @@ uvec2 tint_first_trailing_bit(uvec2 v) { } void firstTrailingBit_45eb10() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_first_trailing_bit(arg_0); } @@ -82,7 +82,7 @@ uvec2 tint_first_trailing_bit(uvec2 v) { } void firstTrailingBit_45eb10() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.msl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.msl index 89138e0de5..35d9b6a4e0 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.msl @@ -17,7 +17,7 @@ uint2 tint_first_trailing_bit(uint2 v) { } void firstTrailingBit_45eb10() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.spvasm index 0e6e0873ab..c2e7c3874b 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.spvasm @@ -114,7 +114,7 @@ %81 = OpLabel %arg_0 = OpVariable %_ptr_Function_v2uint Function %18 %res = OpVariable %_ptr_Function_v2uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %65 %84 = OpLoad %v2uint %arg_0 %83 = OpFunctionCall %v2uint %tint_first_trailing_bit %84 OpStore %res %83 diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.wgsl index 7585a47ebf..8c02e95d91 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_45eb10() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res : vec2 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl index 6d7cd0ea20..760e056b66 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<2, i32>) -> vec<2, i32> fn firstTrailingBit_50c072() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res: vec2 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl index e0358e93e2..85abd4a103 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_trailing_bit(int2 v) { } void firstTrailingBit_50c072() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl index e0358e93e2..85abd4a103 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int2 tint_first_trailing_bit(int2 v) { } void firstTrailingBit_50c072() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl index a56cd3844c..68c8393a7f 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec2 tint_first_trailing_bit(ivec2 v) { } void firstTrailingBit_50c072() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_first_trailing_bit(arg_0); } @@ -52,7 +52,7 @@ ivec2 tint_first_trailing_bit(ivec2 v) { } void firstTrailingBit_50c072() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_first_trailing_bit(arg_0); } @@ -82,7 +82,7 @@ ivec2 tint_first_trailing_bit(ivec2 v) { } void firstTrailingBit_50c072() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.msl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.msl index ad8bc33c64..1b4e0cfb1a 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.msl @@ -17,7 +17,7 @@ int2 tint_first_trailing_bit(int2 v) { } void firstTrailingBit_50c072() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); int2 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.spvasm index b428e65e3b..c7663e131a 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 104 +; Bound: 106 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,9 +63,11 @@ %73 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %80 = OpTypeFunction %void - %84 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %85 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %90 = OpTypeFunction %v4float + %88 = OpConstantNull %v2int + %92 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_trailing_bit = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -118,33 +120,33 @@ OpFunctionEnd %firstTrailingBit_50c072 = OpFunction %void None %80 %83 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %84 - %res = OpVariable %_ptr_Function_v2int Function %84 - OpStore %arg_0 %84 - %88 = OpLoad %v2int %arg_0 - %87 = OpFunctionCall %v2int %tint_first_trailing_bit %88 - OpStore %res %87 + %arg_0 = OpVariable %_ptr_Function_v2int Function %88 + %res = OpVariable %_ptr_Function_v2int Function %88 + OpStore %arg_0 %85 + %90 = OpLoad %v2int %arg_0 + %89 = OpFunctionCall %v2int %tint_first_trailing_bit %90 + OpStore %res %89 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %90 - %92 = OpLabel - %93 = OpFunctionCall %void %firstTrailingBit_50c072 +%vertex_main_inner = OpFunction %v4float None %92 + %94 = OpLabel + %95 = OpFunctionCall %void %firstTrailingBit_50c072 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %80 - %95 = OpLabel - %96 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %96 + %97 = OpLabel + %98 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %98 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %80 - %99 = OpLabel - %100 = OpFunctionCall %void %firstTrailingBit_50c072 + %101 = OpLabel + %102 = OpFunctionCall %void %firstTrailingBit_50c072 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %80 - %102 = OpLabel - %103 = OpFunctionCall %void %firstTrailingBit_50c072 + %104 = OpLabel + %105 = OpFunctionCall %void %firstTrailingBit_50c072 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.wgsl index 8e35398359..055d7c801d 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_50c072() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res : vec2 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl index 83185f36d5..0d13613eb7 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<3, i32>) -> vec<3, i32> fn firstTrailingBit_7496d6() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res: vec3 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl index dcdf8e7ada..91c45c1629 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_trailing_bit(int3 v) { } void firstTrailingBit_7496d6() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl index dcdf8e7ada..91c45c1629 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int3 tint_first_trailing_bit(int3 v) { } void firstTrailingBit_7496d6() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl index b80c1b4b8d..43ab7d83ab 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec3 tint_first_trailing_bit(ivec3 v) { } void firstTrailingBit_7496d6() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_first_trailing_bit(arg_0); } @@ -52,7 +52,7 @@ ivec3 tint_first_trailing_bit(ivec3 v) { } void firstTrailingBit_7496d6() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_first_trailing_bit(arg_0); } @@ -82,7 +82,7 @@ ivec3 tint_first_trailing_bit(ivec3 v) { } void firstTrailingBit_7496d6() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.msl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.msl index babf2c8cc6..c1b2b08189 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.msl @@ -17,7 +17,7 @@ int3 tint_first_trailing_bit(int3 v) { } void firstTrailingBit_7496d6() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); int3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.spvasm index 843ea9326d..de9c0d8445 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 104 +; Bound: 106 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,9 +63,11 @@ %73 = OpConstantComposite %v3uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %80 = OpTypeFunction %void - %84 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %85 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %90 = OpTypeFunction %v4float + %88 = OpConstantNull %v3int + %92 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_trailing_bit = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -118,33 +120,33 @@ OpFunctionEnd %firstTrailingBit_7496d6 = OpFunction %void None %80 %83 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %84 - %res = OpVariable %_ptr_Function_v3int Function %84 - OpStore %arg_0 %84 - %88 = OpLoad %v3int %arg_0 - %87 = OpFunctionCall %v3int %tint_first_trailing_bit %88 - OpStore %res %87 + %arg_0 = OpVariable %_ptr_Function_v3int Function %88 + %res = OpVariable %_ptr_Function_v3int Function %88 + OpStore %arg_0 %85 + %90 = OpLoad %v3int %arg_0 + %89 = OpFunctionCall %v3int %tint_first_trailing_bit %90 + OpStore %res %89 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %90 - %92 = OpLabel - %93 = OpFunctionCall %void %firstTrailingBit_7496d6 +%vertex_main_inner = OpFunction %v4float None %92 + %94 = OpLabel + %95 = OpFunctionCall %void %firstTrailingBit_7496d6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %80 - %95 = OpLabel - %96 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %96 + %97 = OpLabel + %98 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %98 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %80 - %99 = OpLabel - %100 = OpFunctionCall %void %firstTrailingBit_7496d6 + %101 = OpLabel + %102 = OpFunctionCall %void %firstTrailingBit_7496d6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %80 - %102 = OpLabel - %103 = OpFunctionCall %void %firstTrailingBit_7496d6 + %104 = OpLabel + %105 = OpFunctionCall %void %firstTrailingBit_7496d6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.wgsl index 97e20460f8..8d9963671b 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_7496d6() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res : vec3 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl index 9bf0b287aa..cff54f2552 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<4, i32>) -> vec<4, i32> fn firstTrailingBit_86551b() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res: vec4 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl index ea2a5fb98d..3af45b0288 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_trailing_bit(int4 v) { } void firstTrailingBit_86551b() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl index ea2a5fb98d..3af45b0288 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ int4 tint_first_trailing_bit(int4 v) { } void firstTrailingBit_86551b() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl index 91d2633a80..5738b7c6e6 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl @@ -16,7 +16,7 @@ ivec4 tint_first_trailing_bit(ivec4 v) { } void firstTrailingBit_86551b() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_first_trailing_bit(arg_0); } @@ -52,7 +52,7 @@ ivec4 tint_first_trailing_bit(ivec4 v) { } void firstTrailingBit_86551b() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_first_trailing_bit(arg_0); } @@ -82,7 +82,7 @@ ivec4 tint_first_trailing_bit(ivec4 v) { } void firstTrailingBit_86551b() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.msl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.msl index 62718e0eae..a74be59c9a 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.msl @@ -17,7 +17,7 @@ int4 tint_first_trailing_bit(int4 v) { } void firstTrailingBit_86551b() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); int4 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.spvasm index b6e04f1817..b62d585f21 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 104 +; Bound: 106 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -63,9 +63,11 @@ %73 = OpConstantComposite %v4uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %uint_4294967295 %void = OpTypeVoid %80 = OpTypeFunction %void - %84 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %85 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %90 = OpTypeFunction %v4float + %88 = OpConstantNull %v4int + %92 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_first_trailing_bit = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -118,33 +120,33 @@ OpFunctionEnd %firstTrailingBit_86551b = OpFunction %void None %80 %83 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %84 - %res = OpVariable %_ptr_Function_v4int Function %84 - OpStore %arg_0 %84 - %88 = OpLoad %v4int %arg_0 - %87 = OpFunctionCall %v4int %tint_first_trailing_bit %88 - OpStore %res %87 + %arg_0 = OpVariable %_ptr_Function_v4int Function %88 + %res = OpVariable %_ptr_Function_v4int Function %88 + OpStore %arg_0 %85 + %90 = OpLoad %v4int %arg_0 + %89 = OpFunctionCall %v4int %tint_first_trailing_bit %90 + OpStore %res %89 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %90 - %92 = OpLabel - %93 = OpFunctionCall %void %firstTrailingBit_86551b +%vertex_main_inner = OpFunction %v4float None %92 + %94 = OpLabel + %95 = OpFunctionCall %void %firstTrailingBit_86551b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %80 - %95 = OpLabel - %96 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %96 + %97 = OpLabel + %98 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %98 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %80 - %99 = OpLabel - %100 = OpFunctionCall %void %firstTrailingBit_86551b + %101 = OpLabel + %102 = OpFunctionCall %void %firstTrailingBit_86551b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %80 - %102 = OpLabel - %103 = OpFunctionCall %void %firstTrailingBit_86551b + %104 = OpLabel + %105 = OpFunctionCall %void %firstTrailingBit_86551b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.wgsl index dcbc82e986..83011241a4 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_86551b() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res : vec4 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl index a251b04e65..c8252c180c 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl @@ -25,7 +25,7 @@ // fn firstTrailingBit(vec<3, u32>) -> vec<3, u32> fn firstTrailingBit_cb51ce() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res: vec3 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl index 747300c9fc..27105f4273 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.dxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_trailing_bit(uint3 v) { } void firstTrailingBit_cb51ce() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl index 747300c9fc..27105f4273 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.fxc.hlsl @@ -14,7 +14,7 @@ uint3 tint_first_trailing_bit(uint3 v) { } void firstTrailingBit_cb51ce() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl index f01c16c3cc..3afc2b037e 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl @@ -16,7 +16,7 @@ uvec3 tint_first_trailing_bit(uvec3 v) { } void firstTrailingBit_cb51ce() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_first_trailing_bit(arg_0); } @@ -52,7 +52,7 @@ uvec3 tint_first_trailing_bit(uvec3 v) { } void firstTrailingBit_cb51ce() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_first_trailing_bit(arg_0); } @@ -82,7 +82,7 @@ uvec3 tint_first_trailing_bit(uvec3 v) { } void firstTrailingBit_cb51ce() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.msl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.msl index 4cd8f3a2c4..d35012ccc6 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.msl @@ -17,7 +17,7 @@ uint3 tint_first_trailing_bit(uint3 v) { } void firstTrailingBit_cb51ce() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint3 res = tint_first_trailing_bit(arg_0); } diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.spvasm index 742b42ba17..e1d62698fe 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.spvasm @@ -114,7 +114,7 @@ %81 = OpLabel %arg_0 = OpVariable %_ptr_Function_v3uint Function %18 %res = OpVariable %_ptr_Function_v3uint Function %18 - OpStore %arg_0 %18 + OpStore %arg_0 %65 %84 = OpLoad %v3uint %arg_0 %83 = OpFunctionCall %v3uint %tint_first_trailing_bit %84 OpStore %res %83 diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.wgsl index 908b5b8167..cb7c799f4a 100644 --- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn firstTrailingBit_cb51ce() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res : vec3 = firstTrailingBit(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl b/test/tint/builtins/gen/var/floor/3bccc4.wgsl index 47be64ff26..2f1bf48fc0 100644 --- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl +++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl @@ -25,7 +25,7 @@ // fn floor(vec<4, f32>) -> vec<4, f32> fn floor_3bccc4() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.dxc.hlsl index 18d11a34b2..550e52d01e 100644 --- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_3bccc4() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.fxc.hlsl index 18d11a34b2..550e52d01e 100644 --- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void floor_3bccc4() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.glsl index 3b91e5d61d..431bdefc65 100644 --- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void floor_3bccc4() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = floor(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void floor_3bccc4() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = floor(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void floor_3bccc4() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.msl index 1c6a7e75a0..b9607dc6a4 100644 --- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_3bccc4() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.spvasm index b2e800a036..dadadc8826 100644 --- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %floor_3bccc4 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Floor %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Floor %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %floor_3bccc4 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %floor_3bccc4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %floor_3bccc4 + %29 = OpLabel + %30 = OpFunctionCall %void %floor_3bccc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %floor_3bccc4 + %32 = OpLabel + %33 = OpFunctionCall %void %floor_3bccc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.wgsl index a5c860d3b6..6600c70305 100644 --- a/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/3bccc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_3bccc4() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl index 9670f23935..bfcdef1908 100644 --- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl +++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl @@ -25,7 +25,7 @@ // fn floor(vec<2, f32>) -> vec<2, f32> fn floor_5fc9ac() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.dxc.hlsl index 74dd9c53d3..dca7290a48 100644 --- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_5fc9ac() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.fxc.hlsl index 74dd9c53d3..dca7290a48 100644 --- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void floor_5fc9ac() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.glsl index 570e48b050..abd2378146 100644 --- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void floor_5fc9ac() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = floor(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void floor_5fc9ac() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = floor(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void floor_5fc9ac() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.msl index 01c6b5f922..5e718db49b 100644 --- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_5fc9ac() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.spvasm index 0ce4a88330..045c8c9e5e 100644 --- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %floor_5fc9ac = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Floor %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Floor %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %floor_5fc9ac +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %floor_5fc9ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %floor_5fc9ac + %31 = OpLabel + %32 = OpFunctionCall %void %floor_5fc9ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %floor_5fc9ac + %34 = OpLabel + %35 = OpFunctionCall %void %floor_5fc9ac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.wgsl index 3d5dbb338a..a961b8d966 100644 --- a/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/5fc9ac.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_5fc9ac() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl b/test/tint/builtins/gen/var/floor/60d7ea.wgsl index 06603e530c..0ae7868907 100644 --- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl +++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl @@ -25,7 +25,7 @@ // fn floor(vec<3, f32>) -> vec<3, f32> fn floor_60d7ea() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.dxc.hlsl index 7659782421..2c0000b321 100644 --- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void floor_60d7ea() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.fxc.hlsl index 7659782421..2c0000b321 100644 --- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void floor_60d7ea() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.glsl b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.glsl index 22fae37bc1..03b1b4a7a9 100644 --- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void floor_60d7ea() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = floor(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void floor_60d7ea() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = floor(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void floor_60d7ea() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.msl b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.msl index fd7f6d5623..74b2f97f60 100644 --- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void floor_60d7ea() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.spvasm index 0da636b061..94973ec905 100644 --- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %floor_60d7ea = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Floor %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Floor %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %floor_60d7ea +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %floor_60d7ea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %floor_60d7ea + %31 = OpLabel + %32 = OpFunctionCall %void %floor_60d7ea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %floor_60d7ea + %34 = OpLabel + %35 = OpFunctionCall %void %floor_60d7ea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.wgsl index 798ced8f8a..d1427d9e06 100644 --- a/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/60d7ea.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_60d7ea() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/66f154.wgsl b/test/tint/builtins/gen/var/floor/66f154.wgsl index 4ef714238a..da486f1fbf 100644 --- a/test/tint/builtins/gen/var/floor/66f154.wgsl +++ b/test/tint/builtins/gen/var/floor/66f154.wgsl @@ -25,7 +25,7 @@ // fn floor(f32) -> f32 fn floor_66f154() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.wgsl b/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.wgsl index 40b95bec01..72c13767a0 100644 --- a/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/floor/66f154.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn floor_66f154() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = floor(arg_0); } diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl b/test/tint/builtins/gen/var/fma/26a7a9.wgsl index 6f7401802b..6e6d4533fa 100644 --- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl +++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl @@ -25,9 +25,9 @@ // fn fma(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn fma_26a7a9() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = vec2(1.f); var res: vec2 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.dxc.hlsl index b8a1465814..8f2ec1e29b 100644 --- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void fma_26a7a9() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.fxc.hlsl index b8a1465814..8f2ec1e29b 100644 --- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void fma_26a7a9() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.glsl index dbc3037b33..f2f2970ca5 100644 --- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void fma_26a7a9() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void fma_26a7a9() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -41,9 +41,9 @@ void main() { #version 310 es void fma_26a7a9() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = ((arg_0) * (arg_1) + (arg_2)); } diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.msl index 678c2ce86e..c863f64eb1 100644 --- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void fma_26a7a9() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); - float2 arg_2 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); + float2 arg_2 = float2(1.0f); float2 res = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.spvasm index 6f96fbed11..46a54af7ca 100644 --- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %27 = OpTypeFunction %v4float %fma_26a7a9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %arg_2 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v2float %arg_0 - %22 = OpLoad %v2float %arg_1 - %23 = OpLoad %v2float %arg_2 - %19 = OpExtInst %v2float %20 Fma %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %arg_2 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v2float %arg_0 + %24 = OpLoad %v2float %arg_1 + %25 = OpLoad %v2float %arg_2 + %21 = OpExtInst %v2float %22 Fma %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %fma_26a7a9 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %fma_26a7a9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %fma_26a7a9 + %35 = OpLabel + %36 = OpFunctionCall %void %fma_26a7a9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %fma_26a7a9 + %38 = OpLabel + %39 = OpFunctionCall %void %fma_26a7a9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.wgsl index f1c4a777ec..213d68077c 100644 --- a/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/26a7a9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn fma_26a7a9() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = vec2(1.0f); var res : vec2 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl b/test/tint/builtins/gen/var/fma/6a3283.wgsl index 87668f700d..2cf0922830 100644 --- a/test/tint/builtins/gen/var/fma/6a3283.wgsl +++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl @@ -25,9 +25,9 @@ // fn fma(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn fma_6a3283() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = vec4(1.f); var res: vec4 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.dxc.hlsl index 8786af1a0a..52370323bb 100644 --- a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void fma_6a3283() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.fxc.hlsl index 8786af1a0a..52370323bb 100644 --- a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void fma_6a3283() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.glsl index 2b0fd3d0dd..381001c265 100644 --- a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void fma_6a3283() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void fma_6a3283() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -41,9 +41,9 @@ void main() { #version 310 es void fma_6a3283() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = ((arg_0) * (arg_1) + (arg_2)); } diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.msl index 34687c1a67..0e48f02a40 100644 --- a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void fma_6a3283() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); - float4 arg_2 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); + float4 arg_2 = float4(1.0f); float4 res = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.spvasm index ab7b9b8958..a33378950d 100644 --- a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,44 +34,45 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %25 = OpTypeFunction %v4float %fma_6a3283 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - OpStore %arg_2 %5 - %19 = OpLoad %v4float %arg_0 - %20 = OpLoad %v4float %arg_1 - %21 = OpLoad %v4float %arg_2 - %17 = OpExtInst %v4float %18 Fma %19 %20 %21 - OpStore %res %17 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + OpStore %arg_2 %14 + %21 = OpLoad %v4float %arg_0 + %22 = OpLoad %v4float %arg_1 + %23 = OpLoad %v4float %arg_2 + %19 = OpExtInst %v4float %20 Fma %21 %22 %23 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %fma_6a3283 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %fma_6a3283 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %fma_6a3283 + %33 = OpLabel + %34 = OpFunctionCall %void %fma_6a3283 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %fma_6a3283 + %36 = OpLabel + %37 = OpFunctionCall %void %fma_6a3283 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.wgsl index 85c3990ae2..a514d9da21 100644 --- a/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/6a3283.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn fma_6a3283() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = vec4(1.0f); var res : vec4 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/c10ba3.wgsl b/test/tint/builtins/gen/var/fma/c10ba3.wgsl index 383b2437b9..7de288afc0 100644 --- a/test/tint/builtins/gen/var/fma/c10ba3.wgsl +++ b/test/tint/builtins/gen/var/fma/c10ba3.wgsl @@ -25,9 +25,9 @@ // fn fma(f32, f32, f32) -> f32 fn fma_c10ba3() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; + var arg_2 = 1.f; var res: f32 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.wgsl index 43693c4f8a..1ccb70f458 100644 --- a/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/c10ba3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn fma_c10ba3() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; + var arg_2 = 1.0f; var res : f32 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl b/test/tint/builtins/gen/var/fma/e17c5c.wgsl index 40128a43d8..e61ae0c359 100644 --- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl +++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl @@ -25,9 +25,9 @@ // fn fma(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn fma_e17c5c() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = vec3(1.f); var res: vec3 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.dxc.hlsl index 5e4d025bd7..a2f5cba230 100644 --- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void fma_e17c5c() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.fxc.hlsl index 5e4d025bd7..a2f5cba230 100644 --- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void fma_e17c5c() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = mad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.glsl b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.glsl index 548579c276..aabb648150 100644 --- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void fma_e17c5c() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void fma_e17c5c() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = ((arg_0) * (arg_1) + (arg_2)); } @@ -41,9 +41,9 @@ void main() { #version 310 es void fma_e17c5c() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = ((arg_0) * (arg_1) + (arg_2)); } diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.msl b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.msl index ac34e5c6e5..3931c86512 100644 --- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void fma_e17c5c() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); - float3 arg_2 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); + float3 arg_2 = float3(1.0f); float3 res = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.spvasm index 9b4d8bf7e7..15197e2e82 100644 --- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %27 = OpTypeFunction %v4float %fma_e17c5c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %arg_2 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v3float %arg_0 - %22 = OpLoad %v3float %arg_1 - %23 = OpLoad %v3float %arg_2 - %19 = OpExtInst %v3float %20 Fma %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %arg_2 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v3float %arg_0 + %24 = OpLoad %v3float %arg_1 + %25 = OpLoad %v3float %arg_2 + %21 = OpExtInst %v3float %22 Fma %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %fma_e17c5c +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %fma_e17c5c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %fma_e17c5c + %35 = OpLabel + %36 = OpFunctionCall %void %fma_e17c5c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %fma_e17c5c + %38 = OpLabel + %39 = OpFunctionCall %void %fma_e17c5c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.wgsl index ce1be54097..83a46ea1bc 100644 --- a/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fma/e17c5c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn fma_e17c5c() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = vec3(1.0f); var res : vec3 = fma(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl index afbd094ae2..128bdc8b35 100644 --- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl +++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl @@ -25,7 +25,7 @@ // fn fract(vec<4, f32>) -> vec<4, f32> fn fract_8bc1e9() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.dxc.hlsl index cc5fa7c5d5..3fc1143b9b 100644 --- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_8bc1e9() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.fxc.hlsl index cc5fa7c5d5..3fc1143b9b 100644 --- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fract_8bc1e9() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.glsl index 10d6f35f56..a931954b01 100644 --- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fract_8bc1e9() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = fract(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void fract_8bc1e9() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = fract(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void fract_8bc1e9() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.msl index 10b36c8db9..de4a03dae9 100644 --- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_8bc1e9() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.spvasm index 5b20c6f263..2fce3d9e9b 100644 --- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %fract_8bc1e9 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Fract %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Fract %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %fract_8bc1e9 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %fract_8bc1e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %fract_8bc1e9 + %29 = OpLabel + %30 = OpFunctionCall %void %fract_8bc1e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %fract_8bc1e9 + %32 = OpLabel + %33 = OpFunctionCall %void %fract_8bc1e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.wgsl index 6143b139aa..31c9a04c0b 100644 --- a/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/8bc1e9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_8bc1e9() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl b/test/tint/builtins/gen/var/fract/943cb1.wgsl index 3773846425..5cd9d58b83 100644 --- a/test/tint/builtins/gen/var/fract/943cb1.wgsl +++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl @@ -25,7 +25,7 @@ // fn fract(vec<2, f32>) -> vec<2, f32> fn fract_943cb1() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.dxc.hlsl index 38f6505413..7ebeca26a5 100644 --- a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_943cb1() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.fxc.hlsl index 38f6505413..7ebeca26a5 100644 --- a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fract_943cb1() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.glsl index ba5a3f76ed..0cdaa88a5c 100644 --- a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fract_943cb1() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = fract(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void fract_943cb1() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = fract(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void fract_943cb1() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.msl index c80a69bad0..1d5202fd3f 100644 --- a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_943cb1() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.spvasm index d63463bf11..1c141d57a3 100644 --- a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %fract_943cb1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Fract %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Fract %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %fract_943cb1 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %fract_943cb1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %fract_943cb1 + %31 = OpLabel + %32 = OpFunctionCall %void %fract_943cb1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %fract_943cb1 + %34 = OpLabel + %35 = OpFunctionCall %void %fract_943cb1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.wgsl index 60d5d65a19..456ab98d63 100644 --- a/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/943cb1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_943cb1() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl b/test/tint/builtins/gen/var/fract/a49758.wgsl index 2312f38ec6..04bd1b95fd 100644 --- a/test/tint/builtins/gen/var/fract/a49758.wgsl +++ b/test/tint/builtins/gen/var/fract/a49758.wgsl @@ -25,7 +25,7 @@ // fn fract(vec<3, f32>) -> vec<3, f32> fn fract_a49758() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.dxc.hlsl index 1efd8ae7cb..cbd7af2d90 100644 --- a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fract_a49758() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.fxc.hlsl index 1efd8ae7cb..cbd7af2d90 100644 --- a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fract_a49758() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = frac(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.glsl b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.glsl index 9f2b8f53da..0f4157fc04 100644 --- a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void fract_a49758() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = fract(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void fract_a49758() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = fract(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void fract_a49758() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.msl b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.msl index ee497e71ae..2814c3ec9d 100644 --- a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fract_a49758() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.spvasm index 7aed99e1af..b2d7346033 100644 --- a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %fract_a49758 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Fract %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Fract %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %fract_a49758 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %fract_a49758 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %fract_a49758 + %31 = OpLabel + %32 = OpFunctionCall %void %fract_a49758 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %fract_a49758 + %34 = OpLabel + %35 = OpFunctionCall %void %fract_a49758 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.wgsl index a173b027dd..637345259c 100644 --- a/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/a49758.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_a49758() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/fa5c71.wgsl b/test/tint/builtins/gen/var/fract/fa5c71.wgsl index 90beba6f5c..4e8b3b7ede 100644 --- a/test/tint/builtins/gen/var/fract/fa5c71.wgsl +++ b/test/tint/builtins/gen/var/fract/fa5c71.wgsl @@ -25,7 +25,7 @@ // fn fract(f32) -> f32 fn fract_fa5c71() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.wgsl index 7b985944e5..e69460b456 100644 --- a/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fract/fa5c71.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fract_fa5c71() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = fract(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/368997.wgsl b/test/tint/builtins/gen/var/frexp/368997.wgsl index 7f26bb3201..8d2dacf2fa 100644 --- a/test/tint/builtins/gen/var/frexp/368997.wgsl +++ b/test/tint/builtins/gen/var/frexp/368997.wgsl @@ -25,7 +25,7 @@ // fn frexp(vec<3, f32>) -> __frexp_result_vec<3> fn frexp_368997() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.dxc.hlsl index 59aa53adf7..a453143f38 100644 --- a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec3 tint_frexp(float3 param_0) { } void frexp_368997() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; frexp_result_vec3 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.fxc.hlsl index 59aa53adf7..a453143f38 100644 --- a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec3 tint_frexp(float3 param_0) { } void frexp_368997() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; frexp_result_vec3 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.glsl index 122794f3a3..70fcae6267 100644 --- a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.glsl @@ -13,7 +13,7 @@ frexp_result_vec3 tint_frexp(vec3 param_0) { void frexp_368997() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); frexp_result_vec3 res = tint_frexp(arg_0); } @@ -46,7 +46,7 @@ frexp_result_vec3 tint_frexp(vec3 param_0) { void frexp_368997() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); frexp_result_vec3 res = tint_frexp(arg_0); } @@ -73,7 +73,7 @@ frexp_result_vec3 tint_frexp(vec3 param_0) { void frexp_368997() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); frexp_result_vec3 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.msl index a94bf9677c..880edbbb0a 100644 --- a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec3 tint_frexp(float3 param_0) { } void frexp_368997() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); frexp_result_vec3 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.spvasm index 020e6a47ef..0fc5b26e87 100644 --- a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,44 +38,45 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 %__frexp_result_vec3 = OpTypeStruct %v3float %v3int %_ptr_Function___frexp_result_vec3 = OpTypePointer Function %__frexp_result_vec3 - %25 = OpConstantNull %__frexp_result_vec3 - %26 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %27 = OpConstantNull %__frexp_result_vec3 + %28 = OpTypeFunction %v4float %frexp_368997 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function___frexp_result_vec3 Function %25 - OpStore %arg_0 %14 - %22 = OpLoad %v3float %arg_0 - %17 = OpExtInst %__frexp_result_vec3 %21 FrexpStruct %22 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function___frexp_result_vec3 Function %27 + OpStore %arg_0 %15 + %24 = OpLoad %v3float %arg_0 + %19 = OpExtInst %__frexp_result_vec3 %23 FrexpStruct %24 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %frexp_368997 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %frexp_368997 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %frexp_368997 + %36 = OpLabel + %37 = OpFunctionCall %void %frexp_368997 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %frexp_368997 + %39 = OpLabel + %40 = OpFunctionCall %void %frexp_368997 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.wgsl index f8f40dc03d..58847e0810 100644 --- a/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/368997.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_368997() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl index e1f79e230b..0e193ac11c 100644 --- a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl +++ b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl @@ -25,7 +25,7 @@ // fn frexp(vec<4, f32>) -> __frexp_result_vec<4> fn frexp_3c4f48() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.dxc.hlsl index 7997378e87..176553cd76 100644 --- a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec4 tint_frexp(float4 param_0) { } void frexp_3c4f48() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; frexp_result_vec4 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.fxc.hlsl index 7997378e87..176553cd76 100644 --- a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec4 tint_frexp(float4 param_0) { } void frexp_3c4f48() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; frexp_result_vec4 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.glsl index fbee2193be..eb9b7d19ed 100644 --- a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.glsl @@ -13,7 +13,7 @@ frexp_result_vec4 tint_frexp(vec4 param_0) { void frexp_3c4f48() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); frexp_result_vec4 res = tint_frexp(arg_0); } @@ -46,7 +46,7 @@ frexp_result_vec4 tint_frexp(vec4 param_0) { void frexp_3c4f48() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); frexp_result_vec4 res = tint_frexp(arg_0); } @@ -73,7 +73,7 @@ frexp_result_vec4 tint_frexp(vec4 param_0) { void frexp_3c4f48() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); frexp_result_vec4 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.msl index a4a3e889d2..0b0f6565e1 100644 --- a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec4 tint_frexp(float4 param_0) { } void frexp_3c4f48() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); frexp_result_vec4 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.spvasm index 093c05c56d..e09db9d93a 100644 --- a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,43 +37,44 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 %__frexp_result_vec4 = OpTypeStruct %v4float %v4int %_ptr_Function___frexp_result_vec4 = OpTypePointer Function %__frexp_result_vec4 - %23 = OpConstantNull %__frexp_result_vec4 - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %__frexp_result_vec4 + %26 = OpTypeFunction %v4float %frexp_3c4f48 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 - %res = OpVariable %_ptr_Function___frexp_result_vec4 Function %23 - OpStore %arg_0 %5 - %20 = OpLoad %v4float %arg_0 - %15 = OpExtInst %__frexp_result_vec4 %19 FrexpStruct %20 - OpStore %res %15 + %res = OpVariable %_ptr_Function___frexp_result_vec4 Function %25 + OpStore %arg_0 %14 + %22 = OpLoad %v4float %arg_0 + %17 = OpExtInst %__frexp_result_vec4 %21 FrexpStruct %22 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %frexp_3c4f48 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %frexp_3c4f48 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %frexp_3c4f48 + %34 = OpLabel + %35 = OpFunctionCall %void %frexp_3c4f48 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %frexp_3c4f48 + %37 = OpLabel + %38 = OpFunctionCall %void %frexp_3c4f48 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.wgsl index d0cd5f9e62..37c167f3fb 100644 --- a/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/3c4f48.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_3c4f48() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl index af86233067..24390b72d1 100644 --- a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl +++ b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl @@ -25,7 +25,7 @@ // fn frexp(vec<2, f32>) -> __frexp_result_vec<2> fn frexp_4bdfc7() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.dxc.hlsl index f47aba8e6e..2b1bb58d4e 100644 --- a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec2 tint_frexp(float2 param_0) { } void frexp_4bdfc7() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; frexp_result_vec2 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.fxc.hlsl index f47aba8e6e..2b1bb58d4e 100644 --- a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ frexp_result_vec2 tint_frexp(float2 param_0) { } void frexp_4bdfc7() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; frexp_result_vec2 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.glsl b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.glsl index 479ea01e80..9d88b61f2c 100644 --- a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.glsl @@ -13,7 +13,7 @@ frexp_result_vec2 tint_frexp(vec2 param_0) { void frexp_4bdfc7() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); frexp_result_vec2 res = tint_frexp(arg_0); } @@ -46,7 +46,7 @@ frexp_result_vec2 tint_frexp(vec2 param_0) { void frexp_4bdfc7() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); frexp_result_vec2 res = tint_frexp(arg_0); } @@ -73,7 +73,7 @@ frexp_result_vec2 tint_frexp(vec2 param_0) { void frexp_4bdfc7() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); frexp_result_vec2 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.msl b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.msl index 51dac58510..cd5d42b586 100644 --- a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.msl @@ -13,7 +13,7 @@ frexp_result_vec2 tint_frexp(float2 param_0) { } void frexp_4bdfc7() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); frexp_result_vec2 res = tint_frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.spvasm index 0b5e768480..a0d4a79803 100644 --- a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,44 +38,45 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 %__frexp_result_vec2 = OpTypeStruct %v2float %v2int %_ptr_Function___frexp_result_vec2 = OpTypePointer Function %__frexp_result_vec2 - %25 = OpConstantNull %__frexp_result_vec2 - %26 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %27 = OpConstantNull %__frexp_result_vec2 + %28 = OpTypeFunction %v4float %frexp_4bdfc7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function___frexp_result_vec2 Function %25 - OpStore %arg_0 %14 - %22 = OpLoad %v2float %arg_0 - %17 = OpExtInst %__frexp_result_vec2 %21 FrexpStruct %22 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function___frexp_result_vec2 Function %27 + OpStore %arg_0 %15 + %24 = OpLoad %v2float %arg_0 + %19 = OpExtInst %__frexp_result_vec2 %23 FrexpStruct %24 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %frexp_4bdfc7 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %frexp_4bdfc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %frexp_4bdfc7 + %36 = OpLabel + %37 = OpFunctionCall %void %frexp_4bdfc7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %frexp_4bdfc7 + %39 = OpLabel + %40 = OpFunctionCall %void %frexp_4bdfc7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.wgsl index 07cd661366..476cafeaf5 100644 --- a/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/4bdfc7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_4bdfc7() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/eabd40.wgsl b/test/tint/builtins/gen/var/frexp/eabd40.wgsl index b8463dc44c..141f20976d 100644 --- a/test/tint/builtins/gen/var/frexp/eabd40.wgsl +++ b/test/tint/builtins/gen/var/frexp/eabd40.wgsl @@ -25,7 +25,7 @@ // fn frexp(f32) -> __frexp_result fn frexp_eabd40() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/frexp/eabd40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/frexp/eabd40.wgsl.expected.wgsl index f21c0f64e3..1c79907809 100644 --- a/test/tint/builtins/gen/var/frexp/eabd40.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/frexp/eabd40.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn frexp_eabd40() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res = frexp(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl index 7cd2722ad5..b4a6d5fc33 100644 --- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl +++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl @@ -25,7 +25,7 @@ // fn fwidth(vec<3, f32>) -> vec<3, f32> fn fwidth_5d1b39() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.dxc.hlsl index 6e992c3091..53c95e243d 100644 --- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidth_5d1b39() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.fxc.hlsl index 6e992c3091..53c95e243d 100644 --- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidth_5d1b39() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.glsl index 876dc56841..d0789a86fb 100644 --- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidth_5d1b39() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.msl index 1afd1e81eb..3611773ea3 100644 --- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidth_5d1b39() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.spvasm index 4bd061cc7b..1683a434cd 100644 --- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %fwidth_5d1b39 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpFwidth %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpFwidth %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidth_5d1b39 + %16 = OpLabel + %17 = OpFunctionCall %void %fwidth_5d1b39 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.wgsl index 52743fc248..b402cb22f8 100644 --- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_5d1b39() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl index 3f82513896..c18cbf4692 100644 --- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl +++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl @@ -25,7 +25,7 @@ // fn fwidth(vec<2, f32>) -> vec<2, f32> fn fwidth_b83ebb() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.dxc.hlsl index 7452af760c..b8655729be 100644 --- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidth_b83ebb() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.fxc.hlsl index 7452af760c..b8655729be 100644 --- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidth_b83ebb() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.glsl index fa2ef3e989..ced1f2922b 100644 --- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidth_b83ebb() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.msl index 0d58110fb4..b5ecf5d03c 100644 --- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidth_b83ebb() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.spvasm index 29986304ee..cc85924328 100644 --- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %fwidth_b83ebb = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpFwidth %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpFwidth %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidth_b83ebb + %16 = OpLabel + %17 = OpFunctionCall %void %fwidth_b83ebb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.wgsl index 307420af0d..d3b1b6e84a 100644 --- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_b83ebb() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl index 27a4d2d4d5..bd12a3b63a 100644 --- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl +++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl @@ -25,7 +25,7 @@ // fn fwidth(vec<4, f32>) -> vec<4, f32> fn fwidth_d2ab9a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.dxc.hlsl index 7b21ef9ff1..535124d62b 100644 --- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidth_d2ab9a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.fxc.hlsl index 7b21ef9ff1..535124d62b 100644 --- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidth_d2ab9a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.glsl index efc08b0526..5fa156078e 100644 --- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidth_d2ab9a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.msl index 9da0673289..2290a21aa2 100644 --- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidth_d2ab9a() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.spvasm index 996a65b449..fadc0f60f3 100644 --- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,20 +15,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %fwidth_d2ab9a = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpFwidth %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpFwidth %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidth_d2ab9a + %16 = OpLabel + %17 = OpFunctionCall %void %fwidth_d2ab9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.wgsl index 82fda09057..82baa9f6d3 100644 --- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_d2ab9a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl index b9a38cfe16..7d51d9c562 100644 --- a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl +++ b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl @@ -25,7 +25,7 @@ // fn fwidth(f32) -> f32 fn fwidth_df38ef() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.wgsl index e13a01e604..b168e0c3ca 100644 --- a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidth_df38ef() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl index f549f76460..f128397a6f 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(f32) -> f32 fn fwidthCoarse_159c8a() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.wgsl index 1cea21041b..ee9e1cbd08 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_159c8a() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl index 1e2c9028cd..24549ea51d 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(vec<3, f32>) -> vec<3, f32> fn fwidthCoarse_1e59d9() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl index 881032666e..b35c76ca4f 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_1e59d9() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl index 881032666e..b35c76ca4f 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_1e59d9() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.glsl index d856f71faa..2e0b4701b9 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthCoarse_1e59d9() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.msl index 86aeda0dd1..2b697391e0 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthCoarse_1e59d9() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.spvasm index ddcd3968ef..2afcab00cf 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %fwidthCoarse_1e59d9 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpFwidthCoarse %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpFwidthCoarse %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidthCoarse_1e59d9 + %16 = OpLabel + %17 = OpFunctionCall %void %fwidthCoarse_1e59d9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.wgsl index c218f89e6c..7ba840c1d6 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_1e59d9() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl index 84b6d02b2d..136a40457d 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(vec<4, f32>) -> vec<4, f32> fn fwidthCoarse_4e4fc4() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl index f010dac4b9..2ed8dd6900 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_4e4fc4() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl index f010dac4b9..2ed8dd6900 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_4e4fc4() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.glsl index ad154c6fca..5415252db2 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthCoarse_4e4fc4() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.msl index 9d388bc5b9..714e8b9dbf 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthCoarse_4e4fc4() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.spvasm index e4b1f93725..c26ac6780d 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %fwidthCoarse_4e4fc4 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpFwidthCoarse %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpFwidthCoarse %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidthCoarse_4e4fc4 + %16 = OpLabel + %17 = OpFunctionCall %void %fwidthCoarse_4e4fc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.wgsl index ba992a4768..9468c41e93 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_4e4fc4() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl index a98230c077..cebb716415 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl @@ -25,7 +25,7 @@ // fn fwidthCoarse(vec<2, f32>) -> vec<2, f32> fn fwidthCoarse_e653f7() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl index e4fdde674e..be7258d0e0 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_e653f7() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl index e4fdde674e..be7258d0e0 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthCoarse_e653f7() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.glsl index 585997c0da..d480dba0bf 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthCoarse_e653f7() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.msl index 522cf8ceb8..dc0784380a 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthCoarse_e653f7() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.spvasm index 3ff087efc0..64daf80d9e 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %fwidthCoarse_e653f7 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpFwidthCoarse %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpFwidthCoarse %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidthCoarse_e653f7 + %16 = OpLabel + %17 = OpFunctionCall %void %fwidthCoarse_e653f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.wgsl index df4db7b55d..daeca58c06 100644 --- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthCoarse_e653f7() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = fwidthCoarse(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl index 0f60071be2..5a9a3c6dd2 100644 --- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(vec<3, f32>) -> vec<3, f32> fn fwidthFine_523fdc() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.dxc.hlsl index 48a6f0a607..bb1e86bc15 100644 --- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_523fdc() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.fxc.hlsl index 48a6f0a607..bb1e86bc15 100644 --- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_523fdc() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.glsl index 5dc113935b..67dca6ca3a 100644 --- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthFine_523fdc() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.msl index fd137a834b..d64921d1ef 100644 --- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthFine_523fdc() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.spvasm index 2ba3204778..47cb385f36 100644 --- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 - %7 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %11 = OpConstantNull %v3float %fwidthFine_523fdc = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %7 - %res = OpVariable %_ptr_Function_v3float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v3float %arg_0 - %10 = OpFwidthFine %v3float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v3float Function %11 + %res = OpVariable %_ptr_Function_v3float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v3float %arg_0 + %12 = OpFwidthFine %v3float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidthFine_523fdc + %16 = OpLabel + %17 = OpFunctionCall %void %fwidthFine_523fdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.wgsl index 44240300f6..a82a25039d 100644 --- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_523fdc() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl index dc8020e952..0aec4780a3 100644 --- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(vec<4, f32>) -> vec<4, f32> fn fwidthFine_68f4ef() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl index 99d0ae4509..a9ede9547f 100644 --- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_68f4ef() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl index 99d0ae4509..a9ede9547f 100644 --- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_68f4ef() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.glsl index 232c00e25c..ff47798197 100644 --- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthFine_68f4ef() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.msl index aa4051397c..d6c8c437bb 100644 --- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthFine_68f4ef() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.spvasm index d3a07dd4b6..635d2b0f05 100644 --- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 - %7 = OpConstantNull %v4float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float + %11 = OpConstantNull %v4float %fwidthFine_68f4ef = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4float Function %7 - %res = OpVariable %_ptr_Function_v4float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v4float %arg_0 - %10 = OpFwidthFine %v4float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v4float Function %11 + %res = OpVariable %_ptr_Function_v4float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v4float %arg_0 + %12 = OpFwidthFine %v4float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidthFine_68f4ef + %16 = OpLabel + %17 = OpFunctionCall %void %fwidthFine_68f4ef OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.wgsl index 9061e3038c..23978b3e2f 100644 --- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_68f4ef() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl index 53641a600d..e8bce224bc 100644 --- a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(f32) -> f32 fn fwidthFine_f1742d() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.wgsl index e6f9daa077..78a6eb9382 100644 --- a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_f1742d() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl index 910332a32a..eeb7c5ca3e 100644 --- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl @@ -25,7 +25,7 @@ // fn fwidthFine(vec<2, f32>) -> vec<2, f32> fn fwidthFine_ff6aa0() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl index 3ac7b17e10..7c2303f724 100644 --- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_ff6aa0() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl index 3ac7b17e10..7c2303f724 100644 --- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void fwidthFine_ff6aa0() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.glsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.glsl index d28ae67e3c..18a0c6f939 100644 --- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.glsl @@ -2,7 +2,7 @@ precision mediump float; void fwidthFine_ff6aa0() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.msl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.msl index 857729e9f3..4397415113 100644 --- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void fwidthFine_ff6aa0() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = fwidth(arg_0); } diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.spvasm index 3bad08fb6f..fad56e4c4a 100644 --- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 16 +; Bound: 18 ; Schema: 0 OpCapability Shader OpCapability DerivativeControl @@ -16,20 +16,22 @@ %1 = OpTypeFunction %void %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 - %7 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %8 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %11 = OpConstantNull %v2float %fwidthFine_ff6aa0 = OpFunction %void None %1 %4 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %7 - %res = OpVariable %_ptr_Function_v2float Function %7 - OpStore %arg_0 %7 - %11 = OpLoad %v2float %arg_0 - %10 = OpFwidthFine %v2float %11 - OpStore %res %10 + %arg_0 = OpVariable %_ptr_Function_v2float Function %11 + %res = OpVariable %_ptr_Function_v2float Function %11 + OpStore %arg_0 %8 + %13 = OpLoad %v2float %arg_0 + %12 = OpFwidthFine %v2float %13 + OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %1 - %14 = OpLabel - %15 = OpFunctionCall %void %fwidthFine_ff6aa0 + %16 = OpLabel + %17 = OpFunctionCall %void %fwidthFine_ff6aa0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.wgsl index 51f08e170b..9175e3ebb8 100644 --- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn fwidthFine_ff6aa0() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = fwidthFine(arg_0); } diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl index 1c765ea718..275c10b081 100644 --- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl +++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl @@ -25,8 +25,8 @@ // fn insertBits(vec<2, u32>, vec<2, u32>, u32, u32) -> vec<2, u32> fn insertBits_3c7ba5() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res: vec2 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.dxc.hlsl index 027a68f46e..e84e9b82ce 100644 --- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.dxc.hlsl @@ -6,8 +6,8 @@ uint2 tint_insert_bits(uint2 v, uint2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; uint2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.fxc.hlsl index 027a68f46e..e84e9b82ce 100644 --- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.fxc.hlsl @@ -6,8 +6,8 @@ uint2 tint_insert_bits(uint2 v, uint2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; uint2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl index 5b8eaca520..ae7fd8a896 100644 --- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl @@ -7,8 +7,8 @@ uvec2 tint_insert_bits(uvec2 v, uvec2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -37,8 +37,8 @@ uvec2 tint_insert_bits(uvec2 v, uvec2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -61,8 +61,8 @@ uvec2 tint_insert_bits(uvec2 v, uvec2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.msl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.msl index fb8a854380..8cee554f31 100644 --- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.msl @@ -8,8 +8,8 @@ uint2 tint_insert_bits(uint2 v, uint2 n, uint offset, uint count) { } void insertBits_3c7ba5() { - uint2 arg_0 = uint2(0u); - uint2 arg_1 = uint2(0u); + uint2 arg_0 = uint2(1u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uint2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.spvasm index 801c089fdb..98fd575eca 100644 --- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -44,12 +44,13 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %29 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %30 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %33 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %36 = OpConstantNull %uint - %44 = OpTypeFunction %v4float + %37 = OpConstantNull %uint + %45 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v2uint None %9 %v = OpFunctionParameter %v2uint @@ -66,42 +67,42 @@ OpFunctionEnd %insertBits_3c7ba5 = OpFunction %void None %25 %28 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %29 - %arg_1 = OpVariable %_ptr_Function_v2uint Function %29 - %arg_2 = OpVariable %_ptr_Function_uint Function %36 - %arg_3 = OpVariable %_ptr_Function_uint Function %36 - %res = OpVariable %_ptr_Function_v2uint Function %29 - OpStore %arg_0 %29 - OpStore %arg_1 %29 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %33 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %33 + %arg_2 = OpVariable %_ptr_Function_uint Function %37 + %arg_3 = OpVariable %_ptr_Function_uint Function %37 + %res = OpVariable %_ptr_Function_v2uint Function %33 + OpStore %arg_0 %30 + OpStore %arg_1 %30 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %39 = OpLoad %v2uint %arg_0 - %40 = OpLoad %v2uint %arg_1 - %41 = OpLoad %uint %arg_2 - %42 = OpLoad %uint %arg_3 - %38 = OpFunctionCall %v2uint %tint_insert_bits %39 %40 %41 %42 - OpStore %res %38 + %40 = OpLoad %v2uint %arg_0 + %41 = OpLoad %v2uint %arg_1 + %42 = OpLoad %uint %arg_2 + %43 = OpLoad %uint %arg_3 + %39 = OpFunctionCall %v2uint %tint_insert_bits %40 %41 %42 %43 + OpStore %res %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %insertBits_3c7ba5 +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %insertBits_3c7ba5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %53 = OpLabel - %54 = OpFunctionCall %void %insertBits_3c7ba5 + %54 = OpLabel + %55 = OpFunctionCall %void %insertBits_3c7ba5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %56 = OpLabel - %57 = OpFunctionCall %void %insertBits_3c7ba5 + %57 = OpLabel + %58 = OpFunctionCall %void %insertBits_3c7ba5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.wgsl index 31cfb26318..78175d62c1 100644 --- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn insertBits_3c7ba5() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res : vec2 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl index 8eae28804b..f7d5fe853a 100644 --- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl +++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl @@ -25,8 +25,8 @@ // fn insertBits(vec<3, i32>, vec<3, i32>, u32, u32) -> vec<3, i32> fn insertBits_428b0b() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var arg_2 = 1u; var arg_3 = 1u; var res: vec3 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.dxc.hlsl index 20225c7eb3..2991280163 100644 --- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.dxc.hlsl @@ -6,8 +6,8 @@ int3 tint_insert_bits(int3 v, int3 n, uint offset, uint count) { } void insertBits_428b0b() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; uint arg_3 = 1u; int3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.fxc.hlsl index 20225c7eb3..2991280163 100644 --- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.fxc.hlsl @@ -6,8 +6,8 @@ int3 tint_insert_bits(int3 v, int3 n, uint offset, uint count) { } void insertBits_428b0b() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; uint arg_3 = 1u; int3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl index 1bda33f349..f4ed94fe2b 100644 --- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl @@ -7,8 +7,8 @@ ivec3 tint_insert_bits(ivec3 v, ivec3 n, uint offset, uint count) { } void insertBits_428b0b() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -37,8 +37,8 @@ ivec3 tint_insert_bits(ivec3 v, ivec3 n, uint offset, uint count) { } void insertBits_428b0b() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -61,8 +61,8 @@ ivec3 tint_insert_bits(ivec3 v, ivec3 n, uint offset, uint count) { } void insertBits_428b0b() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.msl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.msl index 6c8fd4d814..3034164499 100644 --- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.msl @@ -8,8 +8,8 @@ int3 tint_insert_bits(int3 v, int3 n, uint offset, uint count) { } void insertBits_428b0b() { - int3 arg_0 = int3(0); - int3 arg_1 = int3(0); + int3 arg_0 = int3(1); + int3 arg_1 = int3(1); uint arg_2 = 1u; uint arg_3 = 1u; int3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.spvasm index 3de50bb9a5..7f7625b822 100644 --- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 61 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -45,12 +45,14 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %26 = OpTypeFunction %void - %30 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %34 = OpConstantNull %v3int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %37 = OpConstantNull %uint - %45 = OpTypeFunction %v4float + %39 = OpConstantNull %uint + %47 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v3int None %9 %v = OpFunctionParameter %v3int @@ -67,42 +69,42 @@ OpFunctionEnd %insertBits_428b0b = OpFunction %void None %26 %29 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %30 - %arg_1 = OpVariable %_ptr_Function_v3int Function %30 - %arg_2 = OpVariable %_ptr_Function_uint Function %37 - %arg_3 = OpVariable %_ptr_Function_uint Function %37 - %res = OpVariable %_ptr_Function_v3int Function %30 - OpStore %arg_0 %30 - OpStore %arg_1 %30 + %arg_0 = OpVariable %_ptr_Function_v3int Function %34 + %arg_1 = OpVariable %_ptr_Function_v3int Function %34 + %arg_2 = OpVariable %_ptr_Function_uint Function %39 + %arg_3 = OpVariable %_ptr_Function_uint Function %39 + %res = OpVariable %_ptr_Function_v3int Function %34 + OpStore %arg_0 %31 + OpStore %arg_1 %31 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %40 = OpLoad %v3int %arg_0 - %41 = OpLoad %v3int %arg_1 - %42 = OpLoad %uint %arg_2 - %43 = OpLoad %uint %arg_3 - %39 = OpFunctionCall %v3int %tint_insert_bits %40 %41 %42 %43 - OpStore %res %39 + %42 = OpLoad %v3int %arg_0 + %43 = OpLoad %v3int %arg_1 + %44 = OpLoad %uint %arg_2 + %45 = OpLoad %uint %arg_3 + %41 = OpFunctionCall %v3int %tint_insert_bits %42 %43 %44 %45 + OpStore %res %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %insertBits_428b0b +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %insertBits_428b0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %26 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %26 - %54 = OpLabel - %55 = OpFunctionCall %void %insertBits_428b0b + %56 = OpLabel + %57 = OpFunctionCall %void %insertBits_428b0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %26 - %57 = OpLabel - %58 = OpFunctionCall %void %insertBits_428b0b + %59 = OpLabel + %60 = OpFunctionCall %void %insertBits_428b0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.wgsl index bea28a0dbf..3c5e1eea18 100644 --- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn insertBits_428b0b() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var arg_2 = 1u; var arg_3 = 1u; var res : vec3 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl index 05d9e82571..5f8eca3af9 100644 --- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl +++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl @@ -25,8 +25,8 @@ // fn insertBits(vec<4, u32>, vec<4, u32>, u32, u32) -> vec<4, u32> fn insertBits_51ede1() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.dxc.hlsl index d4a9778375..46f552abaa 100644 --- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.dxc.hlsl @@ -6,8 +6,8 @@ uint4 tint_insert_bits(uint4 v, uint4 n, uint offset, uint count) { } void insertBits_51ede1() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.fxc.hlsl index d4a9778375..46f552abaa 100644 --- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.fxc.hlsl @@ -6,8 +6,8 @@ uint4 tint_insert_bits(uint4 v, uint4 n, uint offset, uint count) { } void insertBits_51ede1() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl index e2a8070c05..2832d7b8bc 100644 --- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl @@ -7,8 +7,8 @@ uvec4 tint_insert_bits(uvec4 v, uvec4 n, uint offset, uint count) { } void insertBits_51ede1() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -37,8 +37,8 @@ uvec4 tint_insert_bits(uvec4 v, uvec4 n, uint offset, uint count) { } void insertBits_51ede1() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -61,8 +61,8 @@ uvec4 tint_insert_bits(uvec4 v, uvec4 n, uint offset, uint count) { } void insertBits_51ede1() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.msl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.msl index 7f65c996be..2dbc14f661 100644 --- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.msl @@ -8,8 +8,8 @@ uint4 tint_insert_bits(uint4 v, uint4 n, uint offset, uint count) { } void insertBits_51ede1() { - uint4 arg_0 = uint4(0u); - uint4 arg_1 = uint4(0u); + uint4 arg_0 = uint4(1u); + uint4 arg_1 = uint4(1u); uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.spvasm index da0edfc4b8..cbbcd39486 100644 --- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -44,12 +44,13 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %29 = OpConstantNull %v4uint -%_ptr_Function_v4uint = OpTypePointer Function %v4uint %uint_1 = OpConstant %uint 1 + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 +%_ptr_Function_v4uint = OpTypePointer Function %v4uint + %33 = OpConstantNull %v4uint %_ptr_Function_uint = OpTypePointer Function %uint - %36 = OpConstantNull %uint - %44 = OpTypeFunction %v4float + %37 = OpConstantNull %uint + %45 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v4uint None %9 %v = OpFunctionParameter %v4uint @@ -66,42 +67,42 @@ OpFunctionEnd %insertBits_51ede1 = OpFunction %void None %25 %28 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %29 - %arg_1 = OpVariable %_ptr_Function_v4uint Function %29 - %arg_2 = OpVariable %_ptr_Function_uint Function %36 - %arg_3 = OpVariable %_ptr_Function_uint Function %36 - %res = OpVariable %_ptr_Function_v4uint Function %29 - OpStore %arg_0 %29 - OpStore %arg_1 %29 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %33 + %arg_1 = OpVariable %_ptr_Function_v4uint Function %33 + %arg_2 = OpVariable %_ptr_Function_uint Function %37 + %arg_3 = OpVariable %_ptr_Function_uint Function %37 + %res = OpVariable %_ptr_Function_v4uint Function %33 + OpStore %arg_0 %30 + OpStore %arg_1 %30 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %39 = OpLoad %v4uint %arg_0 - %40 = OpLoad %v4uint %arg_1 - %41 = OpLoad %uint %arg_2 - %42 = OpLoad %uint %arg_3 - %38 = OpFunctionCall %v4uint %tint_insert_bits %39 %40 %41 %42 - OpStore %res %38 + %40 = OpLoad %v4uint %arg_0 + %41 = OpLoad %v4uint %arg_1 + %42 = OpLoad %uint %arg_2 + %43 = OpLoad %uint %arg_3 + %39 = OpFunctionCall %v4uint %tint_insert_bits %40 %41 %42 %43 + OpStore %res %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %insertBits_51ede1 +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %insertBits_51ede1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %53 = OpLabel - %54 = OpFunctionCall %void %insertBits_51ede1 + %54 = OpLabel + %55 = OpFunctionCall %void %insertBits_51ede1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %56 = OpLabel - %57 = OpFunctionCall %void %insertBits_51ede1 + %57 = OpLabel + %58 = OpFunctionCall %void %insertBits_51ede1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.wgsl index 0293f8f185..76a46b8350 100644 --- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn insertBits_51ede1() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl index 42d41aab83..79537de4b5 100644 --- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl +++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl @@ -25,8 +25,8 @@ // fn insertBits(vec<3, u32>, vec<3, u32>, u32, u32) -> vec<3, u32> fn insertBits_87826b() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var arg_2 = 1u; var arg_3 = 1u; var res: vec3 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.dxc.hlsl index c7b4134186..a820be8691 100644 --- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.dxc.hlsl @@ -6,8 +6,8 @@ uint3 tint_insert_bits(uint3 v, uint3 n, uint offset, uint count) { } void insertBits_87826b() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; uint arg_3 = 1u; uint3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.fxc.hlsl index c7b4134186..a820be8691 100644 --- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.fxc.hlsl @@ -6,8 +6,8 @@ uint3 tint_insert_bits(uint3 v, uint3 n, uint offset, uint count) { } void insertBits_87826b() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; uint arg_3 = 1u; uint3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl index 3c9a3ade34..cebc13a434 100644 --- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl @@ -7,8 +7,8 @@ uvec3 tint_insert_bits(uvec3 v, uvec3 n, uint offset, uint count) { } void insertBits_87826b() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -37,8 +37,8 @@ uvec3 tint_insert_bits(uvec3 v, uvec3 n, uint offset, uint count) { } void insertBits_87826b() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -61,8 +61,8 @@ uvec3 tint_insert_bits(uvec3 v, uvec3 n, uint offset, uint count) { } void insertBits_87826b() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.msl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.msl index 7c093e44c2..e4901f91de 100644 --- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.msl @@ -8,8 +8,8 @@ uint3 tint_insert_bits(uint3 v, uint3 n, uint offset, uint count) { } void insertBits_87826b() { - uint3 arg_0 = uint3(0u); - uint3 arg_1 = uint3(0u); + uint3 arg_0 = uint3(1u); + uint3 arg_1 = uint3(1u); uint arg_2 = 1u; uint arg_3 = 1u; uint3 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.spvasm index 397311eb5e..23c2e7afdf 100644 --- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader %19 = OpExtInstImport "GLSL.std.450" @@ -44,12 +44,13 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %25 = OpTypeFunction %void - %29 = OpConstantNull %v3uint -%_ptr_Function_v3uint = OpTypePointer Function %v3uint %uint_1 = OpConstant %uint 1 + %30 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 +%_ptr_Function_v3uint = OpTypePointer Function %v3uint + %33 = OpConstantNull %v3uint %_ptr_Function_uint = OpTypePointer Function %uint - %36 = OpConstantNull %uint - %44 = OpTypeFunction %v4float + %37 = OpConstantNull %uint + %45 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v3uint None %9 %v = OpFunctionParameter %v3uint @@ -66,42 +67,42 @@ OpFunctionEnd %insertBits_87826b = OpFunction %void None %25 %28 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %29 - %arg_1 = OpVariable %_ptr_Function_v3uint Function %29 - %arg_2 = OpVariable %_ptr_Function_uint Function %36 - %arg_3 = OpVariable %_ptr_Function_uint Function %36 - %res = OpVariable %_ptr_Function_v3uint Function %29 - OpStore %arg_0 %29 - OpStore %arg_1 %29 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %33 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %33 + %arg_2 = OpVariable %_ptr_Function_uint Function %37 + %arg_3 = OpVariable %_ptr_Function_uint Function %37 + %res = OpVariable %_ptr_Function_v3uint Function %33 + OpStore %arg_0 %30 + OpStore %arg_1 %30 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %39 = OpLoad %v3uint %arg_0 - %40 = OpLoad %v3uint %arg_1 - %41 = OpLoad %uint %arg_2 - %42 = OpLoad %uint %arg_3 - %38 = OpFunctionCall %v3uint %tint_insert_bits %39 %40 %41 %42 - OpStore %res %38 + %40 = OpLoad %v3uint %arg_0 + %41 = OpLoad %v3uint %arg_1 + %42 = OpLoad %uint %arg_2 + %43 = OpLoad %uint %arg_3 + %39 = OpFunctionCall %v3uint %tint_insert_bits %40 %41 %42 %43 + OpStore %res %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %insertBits_87826b +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %insertBits_87826b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %25 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %25 - %53 = OpLabel - %54 = OpFunctionCall %void %insertBits_87826b + %54 = OpLabel + %55 = OpFunctionCall %void %insertBits_87826b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %25 - %56 = OpLabel - %57 = OpFunctionCall %void %insertBits_87826b + %57 = OpLabel + %58 = OpFunctionCall %void %insertBits_87826b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.wgsl index 48d6d38ed4..cfbc74eaa9 100644 --- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn insertBits_87826b() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var arg_2 = 1u; var arg_3 = 1u; var res : vec3 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl index 73da46a148..e556ae53d8 100644 --- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl +++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl @@ -25,8 +25,8 @@ // fn insertBits(vec<4, i32>, vec<4, i32>, u32, u32) -> vec<4, i32> fn insertBits_d86978() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.dxc.hlsl index a6689bba5f..fdf1dd3c2b 100644 --- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.dxc.hlsl @@ -6,8 +6,8 @@ int4 tint_insert_bits(int4 v, int4 n, uint offset, uint count) { } void insertBits_d86978() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; uint arg_2 = 1u; uint arg_3 = 1u; int4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.fxc.hlsl index a6689bba5f..fdf1dd3c2b 100644 --- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.fxc.hlsl @@ -6,8 +6,8 @@ int4 tint_insert_bits(int4 v, int4 n, uint offset, uint count) { } void insertBits_d86978() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; uint arg_2 = 1u; uint arg_3 = 1u; int4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl index ac28a7e4ad..ff4206ae07 100644 --- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl @@ -7,8 +7,8 @@ ivec4 tint_insert_bits(ivec4 v, ivec4 n, uint offset, uint count) { } void insertBits_d86978() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -37,8 +37,8 @@ ivec4 tint_insert_bits(ivec4 v, ivec4 n, uint offset, uint count) { } void insertBits_d86978() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -61,8 +61,8 @@ ivec4 tint_insert_bits(ivec4 v, ivec4 n, uint offset, uint count) { } void insertBits_d86978() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.msl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.msl index 7cb5abcab1..da3e5a1f78 100644 --- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.msl @@ -8,8 +8,8 @@ int4 tint_insert_bits(int4 v, int4 n, uint offset, uint count) { } void insertBits_d86978() { - int4 arg_0 = int4(0); - int4 arg_1 = int4(0); + int4 arg_0 = int4(1); + int4 arg_1 = int4(1); uint arg_2 = 1u; uint arg_3 = 1u; int4 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.spvasm b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.spvasm index 9591bbf453..b9ea59ef76 100644 --- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 61 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -45,12 +45,14 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %26 = OpTypeFunction %void - %30 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %34 = OpConstantNull %v4int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %37 = OpConstantNull %uint - %45 = OpTypeFunction %v4float + %39 = OpConstantNull %uint + %47 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v4int None %9 %v = OpFunctionParameter %v4int @@ -67,42 +69,42 @@ OpFunctionEnd %insertBits_d86978 = OpFunction %void None %26 %29 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %30 - %arg_1 = OpVariable %_ptr_Function_v4int Function %30 - %arg_2 = OpVariable %_ptr_Function_uint Function %37 - %arg_3 = OpVariable %_ptr_Function_uint Function %37 - %res = OpVariable %_ptr_Function_v4int Function %30 - OpStore %arg_0 %30 - OpStore %arg_1 %30 + %arg_0 = OpVariable %_ptr_Function_v4int Function %34 + %arg_1 = OpVariable %_ptr_Function_v4int Function %34 + %arg_2 = OpVariable %_ptr_Function_uint Function %39 + %arg_3 = OpVariable %_ptr_Function_uint Function %39 + %res = OpVariable %_ptr_Function_v4int Function %34 + OpStore %arg_0 %31 + OpStore %arg_1 %31 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %40 = OpLoad %v4int %arg_0 - %41 = OpLoad %v4int %arg_1 - %42 = OpLoad %uint %arg_2 - %43 = OpLoad %uint %arg_3 - %39 = OpFunctionCall %v4int %tint_insert_bits %40 %41 %42 %43 - OpStore %res %39 + %42 = OpLoad %v4int %arg_0 + %43 = OpLoad %v4int %arg_1 + %44 = OpLoad %uint %arg_2 + %45 = OpLoad %uint %arg_3 + %41 = OpFunctionCall %v4int %tint_insert_bits %42 %43 %44 %45 + OpStore %res %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %insertBits_d86978 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %insertBits_d86978 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %26 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %26 - %54 = OpLabel - %55 = OpFunctionCall %void %insertBits_d86978 + %56 = OpLabel + %57 = OpFunctionCall %void %insertBits_d86978 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %26 - %57 = OpLabel - %58 = OpFunctionCall %void %insertBits_d86978 + %59 = OpLabel + %60 = OpFunctionCall %void %insertBits_d86978 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.wgsl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.wgsl index 94ec9b8659..a54232509f 100644 --- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn insertBits_d86978() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl index 9935070682..3ae6848c62 100644 --- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl +++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl @@ -25,8 +25,8 @@ // fn insertBits(vec<2, i32>, vec<2, i32>, u32, u32) -> vec<2, i32> fn insertBits_fe6ba6() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var arg_2 = 1u; var arg_3 = 1u; var res: vec2 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.dxc.hlsl index c00768bf1a..d2a307318f 100644 --- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.dxc.hlsl @@ -6,8 +6,8 @@ int2 tint_insert_bits(int2 v, int2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; int2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.fxc.hlsl index c00768bf1a..d2a307318f 100644 --- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.fxc.hlsl @@ -6,8 +6,8 @@ int2 tint_insert_bits(int2 v, int2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; int2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl index 2cfb3a09a5..775c87c54a 100644 --- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl @@ -7,8 +7,8 @@ ivec2 tint_insert_bits(ivec2 v, ivec2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -37,8 +37,8 @@ ivec2 tint_insert_bits(ivec2 v, ivec2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); @@ -61,8 +61,8 @@ ivec2 tint_insert_bits(ivec2 v, ivec2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.msl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.msl index da47190bf6..9720049d62 100644 --- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.msl @@ -8,8 +8,8 @@ int2 tint_insert_bits(int2 v, int2 n, uint offset, uint count) { } void insertBits_fe6ba6() { - int2 arg_0 = int2(0); - int2 arg_1 = int2(0); + int2 arg_0 = int2(1); + int2 arg_1 = int2(1); uint arg_2 = 1u; uint arg_3 = 1u; int2 res = tint_insert_bits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.spvasm index e67ff066e5..9d41b6eb40 100644 --- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 61 ; Schema: 0 OpCapability Shader %20 = OpExtInstImport "GLSL.std.450" @@ -45,12 +45,14 @@ %uint_32 = OpConstant %uint 32 %void = OpTypeVoid %26 = OpTypeFunction %void - %30 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %34 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %37 = OpConstantNull %uint - %45 = OpTypeFunction %v4float + %39 = OpConstantNull %uint + %47 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %tint_insert_bits = OpFunction %v2int None %9 %v = OpFunctionParameter %v2int @@ -67,42 +69,42 @@ OpFunctionEnd %insertBits_fe6ba6 = OpFunction %void None %26 %29 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %30 - %arg_1 = OpVariable %_ptr_Function_v2int Function %30 - %arg_2 = OpVariable %_ptr_Function_uint Function %37 - %arg_3 = OpVariable %_ptr_Function_uint Function %37 - %res = OpVariable %_ptr_Function_v2int Function %30 - OpStore %arg_0 %30 - OpStore %arg_1 %30 + %arg_0 = OpVariable %_ptr_Function_v2int Function %34 + %arg_1 = OpVariable %_ptr_Function_v2int Function %34 + %arg_2 = OpVariable %_ptr_Function_uint Function %39 + %arg_3 = OpVariable %_ptr_Function_uint Function %39 + %res = OpVariable %_ptr_Function_v2int Function %34 + OpStore %arg_0 %31 + OpStore %arg_1 %31 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %40 = OpLoad %v2int %arg_0 - %41 = OpLoad %v2int %arg_1 - %42 = OpLoad %uint %arg_2 - %43 = OpLoad %uint %arg_3 - %39 = OpFunctionCall %v2int %tint_insert_bits %40 %41 %42 %43 - OpStore %res %39 + %42 = OpLoad %v2int %arg_0 + %43 = OpLoad %v2int %arg_1 + %44 = OpLoad %uint %arg_2 + %45 = OpLoad %uint %arg_3 + %41 = OpFunctionCall %v2int %tint_insert_bits %42 %43 %44 %45 + OpStore %res %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %insertBits_fe6ba6 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %insertBits_fe6ba6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %26 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %26 - %54 = OpLabel - %55 = OpFunctionCall %void %insertBits_fe6ba6 + %56 = OpLabel + %57 = OpFunctionCall %void %insertBits_fe6ba6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %26 - %57 = OpLabel - %58 = OpFunctionCall %void %insertBits_fe6ba6 + %59 = OpLabel + %60 = OpFunctionCall %void %insertBits_fe6ba6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.wgsl index 9cdbb2e2e2..d6efd197b4 100644 --- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn insertBits_fe6ba6() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var arg_2 = 1u; var arg_3 = 1u; var res : vec2 = insertBits(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl b/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl index 9a4210f3a7..afedefc312 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(f32) -> f32 fn inverseSqrt_84407e() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.wgsl index 1ceb9d7745..6ab5da9b76 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/84407e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_84407e() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl index 75a8336ea0..6e58954737 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(vec<2, f32>) -> vec<2, f32> fn inverseSqrt_8f2bd2() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl index 88d14d465f..6956b0b431 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_8f2bd2() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl index 88d14d465f..6956b0b431 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_8f2bd2() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.glsl index c84d6e02be..5cd5fdb0d5 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void inverseSqrt_8f2bd2() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = inversesqrt(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void inverseSqrt_8f2bd2() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = inversesqrt(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void inverseSqrt_8f2bd2() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = inversesqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.msl index 3d79e943c3..3c9cc54e48 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_8f2bd2() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.spvasm index 36b4d36125..db0bc7f49b 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %inverseSqrt_8f2bd2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 InverseSqrt %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 InverseSqrt %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %inverseSqrt_8f2bd2 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %inverseSqrt_8f2bd2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %inverseSqrt_8f2bd2 + %31 = OpLabel + %32 = OpFunctionCall %void %inverseSqrt_8f2bd2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %inverseSqrt_8f2bd2 + %34 = OpLabel + %35 = OpFunctionCall %void %inverseSqrt_8f2bd2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.wgsl index 0f364d3419..6d49dff6ed 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/8f2bd2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_8f2bd2() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl index 191c6ff04a..40d34ab0f8 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(vec<3, f32>) -> vec<3, f32> fn inverseSqrt_b197b1() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl index eeeabc5aad..77b75e25c4 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_b197b1() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl index eeeabc5aad..77b75e25c4 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_b197b1() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.glsl index f44044d8d7..07deb2d286 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void inverseSqrt_b197b1() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = inversesqrt(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void inverseSqrt_b197b1() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = inversesqrt(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void inverseSqrt_b197b1() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = inversesqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.msl index d31ca3b877..686c30f552 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_b197b1() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.spvasm index aac400fe74..18110312bd 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %inverseSqrt_b197b1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 InverseSqrt %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 InverseSqrt %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %inverseSqrt_b197b1 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %inverseSqrt_b197b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %inverseSqrt_b197b1 + %31 = OpLabel + %32 = OpFunctionCall %void %inverseSqrt_b197b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %inverseSqrt_b197b1 + %34 = OpLabel + %35 = OpFunctionCall %void %inverseSqrt_b197b1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.wgsl index 3dc7542b47..4b7c5f6462 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/b197b1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_b197b1() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl index 30b6828658..17389eb568 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl @@ -25,7 +25,7 @@ // fn inverseSqrt(vec<4, f32>) -> vec<4, f32> fn inverseSqrt_c22347() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.dxc.hlsl index 70323e614b..bbc1a79de3 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_c22347() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.fxc.hlsl index 70323e614b..bbc1a79de3 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void inverseSqrt_c22347() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.glsl b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.glsl index 4665d41acf..ca6a413b52 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void inverseSqrt_c22347() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = inversesqrt(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void inverseSqrt_c22347() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = inversesqrt(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void inverseSqrt_c22347() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = inversesqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.msl b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.msl index 01d5eea322..a0933d1469 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void inverseSqrt_c22347() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = rsqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.spvasm b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.spvasm index ed02dc64c7..4c1b062b52 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %inverseSqrt_c22347 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 InverseSqrt %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 InverseSqrt %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %inverseSqrt_c22347 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %inverseSqrt_c22347 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %inverseSqrt_c22347 + %29 = OpLabel + %30 = OpFunctionCall %void %inverseSqrt_c22347 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %inverseSqrt_c22347 + %32 = OpLabel + %33 = OpFunctionCall %void %inverseSqrt_c22347 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.wgsl b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.wgsl index 5a025bc43b..d5aeee3f3d 100644 --- a/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/inverseSqrt/c22347.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn inverseSqrt_c22347() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = inverseSqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl index e5ba76a976..0fdae55e30 100644 --- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl +++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl @@ -25,8 +25,8 @@ // fn ldexp(vec<3, f32>, vec<3, i32>) -> vec<3, f32> fn ldexp_a31cdc() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1); var res: vec3 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.dxc.hlsl index 206b643af7..feac4453ee 100644 --- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void ldexp_a31cdc() { - float3 arg_0 = (0.0f).xxx; - int3 arg_1 = (0).xxx; + float3 arg_0 = (1.0f).xxx; + int3 arg_1 = (1).xxx; float3 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.fxc.hlsl index 206b643af7..feac4453ee 100644 --- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void ldexp_a31cdc() { - float3 arg_0 = (0.0f).xxx; - int3 arg_1 = (0).xxx; + float3 arg_0 = (1.0f).xxx; + int3 arg_1 = (1).xxx; float3 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.glsl index 6336a2e400..c9bc4617fb 100644 --- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void ldexp_a31cdc() { - vec3 arg_0 = vec3(0.0f); - ivec3 arg_1 = ivec3(0); + vec3 arg_0 = vec3(1.0f); + ivec3 arg_1 = ivec3(1); vec3 res = ldexp(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void ldexp_a31cdc() { - vec3 arg_0 = vec3(0.0f); - ivec3 arg_1 = ivec3(0); + vec3 arg_0 = vec3(1.0f); + ivec3 arg_1 = ivec3(1); vec3 res = ldexp(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void ldexp_a31cdc() { - vec3 arg_0 = vec3(0.0f); - ivec3 arg_1 = ivec3(0); + vec3 arg_0 = vec3(1.0f); + ivec3 arg_1 = ivec3(1); vec3 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.msl index 1d81f5ad3c..f8215af477 100644 --- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void ldexp_a31cdc() { - float3 arg_0 = float3(0.0f); - int3 arg_1 = int3(0); + float3 arg_0 = float3(1.0f); + int3 arg_1 = int3(1); float3 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.spvasm index 83ab21b295..560f0ab5c3 100644 --- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader - %23 = OpExtInstImport "GLSL.std.450" + %27 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,46 +34,49 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %27 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %v3int + %31 = OpTypeFunction %v4float %ldexp_a31cdc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %19 - %24 = OpLoad %v3float %arg_0 - %25 = OpLoad %v3int %arg_1 - %22 = OpExtInst %v3float %23 Ldexp %24 %25 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %25 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %22 + %28 = OpLoad %v3float %arg_0 + %29 = OpLoad %v3int %arg_1 + %26 = OpExtInst %v3float %27 Ldexp %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %ldexp_a31cdc +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %ldexp_a31cdc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_a31cdc - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %39 = OpLabel %40 = OpFunctionCall %void %ldexp_a31cdc OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %42 = OpLabel + %43 = OpFunctionCall %void %ldexp_a31cdc + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.wgsl index e6303b2090..2e5f870926 100644 --- a/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/a31cdc.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn ldexp_a31cdc() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1); var res : vec3 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl b/test/tint/builtins/gen/var/ldexp/abd718.wgsl index a966f03756..5f837e3f9e 100644 --- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl +++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl @@ -25,8 +25,8 @@ // fn ldexp(vec<2, f32>, vec<2, i32>) -> vec<2, f32> fn ldexp_abd718() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1); var res: vec2 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.dxc.hlsl index 5399f52369..47cfc47b77 100644 --- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void ldexp_abd718() { - float2 arg_0 = (0.0f).xx; - int2 arg_1 = (0).xx; + float2 arg_0 = (1.0f).xx; + int2 arg_1 = (1).xx; float2 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.fxc.hlsl index 5399f52369..47cfc47b77 100644 --- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void ldexp_abd718() { - float2 arg_0 = (0.0f).xx; - int2 arg_1 = (0).xx; + float2 arg_0 = (1.0f).xx; + int2 arg_1 = (1).xx; float2 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.glsl index da03c14d88..d024ddac59 100644 --- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void ldexp_abd718() { - vec2 arg_0 = vec2(0.0f); - ivec2 arg_1 = ivec2(0); + vec2 arg_0 = vec2(1.0f); + ivec2 arg_1 = ivec2(1); vec2 res = ldexp(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void ldexp_abd718() { - vec2 arg_0 = vec2(0.0f); - ivec2 arg_1 = ivec2(0); + vec2 arg_0 = vec2(1.0f); + ivec2 arg_1 = ivec2(1); vec2 res = ldexp(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void ldexp_abd718() { - vec2 arg_0 = vec2(0.0f); - ivec2 arg_1 = ivec2(0); + vec2 arg_0 = vec2(1.0f); + ivec2 arg_1 = ivec2(1); vec2 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.msl index b924eeb31b..7cfe631d9d 100644 --- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void ldexp_abd718() { - float2 arg_0 = float2(0.0f); - int2 arg_1 = int2(0); + float2 arg_0 = float2(1.0f); + int2 arg_1 = int2(1); float2 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.spvasm index 168ae695b1..1bd52811d1 100644 --- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader - %23 = OpExtInstImport "GLSL.std.450" + %27 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,46 +34,49 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %27 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %v2int + %31 = OpTypeFunction %v4float %ldexp_abd718 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %19 - %24 = OpLoad %v2float %arg_0 - %25 = OpLoad %v2int %arg_1 - %22 = OpExtInst %v2float %23 Ldexp %24 %25 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %25 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %22 + %28 = OpLoad %v2float %arg_0 + %29 = OpLoad %v2int %arg_1 + %26 = OpExtInst %v2float %27 Ldexp %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %ldexp_abd718 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %ldexp_abd718 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %ldexp_abd718 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %39 = OpLabel %40 = OpFunctionCall %void %ldexp_abd718 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %42 = OpLabel + %43 = OpFunctionCall %void %ldexp_abd718 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.wgsl index c42b1e9ccf..92b66d8c49 100644 --- a/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/abd718.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn ldexp_abd718() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1); var res : vec2 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl index 9ab6203493..603b93b833 100644 --- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl +++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl @@ -25,8 +25,8 @@ // fn ldexp(vec<4, f32>, vec<4, i32>) -> vec<4, f32> fn ldexp_cc9cde() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1); var res: vec4 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.dxc.hlsl index f92216397d..d1ee9bf7c4 100644 --- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void ldexp_cc9cde() { - float4 arg_0 = (0.0f).xxxx; - int4 arg_1 = (0).xxxx; + float4 arg_0 = (1.0f).xxxx; + int4 arg_1 = (1).xxxx; float4 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.fxc.hlsl index f92216397d..d1ee9bf7c4 100644 --- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void ldexp_cc9cde() { - float4 arg_0 = (0.0f).xxxx; - int4 arg_1 = (0).xxxx; + float4 arg_0 = (1.0f).xxxx; + int4 arg_1 = (1).xxxx; float4 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.glsl b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.glsl index c31b73b860..fdb98cd0e2 100644 --- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void ldexp_cc9cde() { - vec4 arg_0 = vec4(0.0f); - ivec4 arg_1 = ivec4(0); + vec4 arg_0 = vec4(1.0f); + ivec4 arg_1 = ivec4(1); vec4 res = ldexp(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void ldexp_cc9cde() { - vec4 arg_0 = vec4(0.0f); - ivec4 arg_1 = ivec4(0); + vec4 arg_0 = vec4(1.0f); + ivec4 arg_1 = ivec4(1); vec4 res = ldexp(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void ldexp_cc9cde() { - vec4 arg_0 = vec4(0.0f); - ivec4 arg_1 = ivec4(0); + vec4 arg_0 = vec4(1.0f); + ivec4 arg_1 = ivec4(1); vec4 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.msl b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.msl index 93c2d23e89..2b70f29c63 100644 --- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void ldexp_cc9cde() { - float4 arg_0 = float4(0.0f); - int4 arg_1 = int4(0); + float4 arg_0 = float4(1.0f); + int4 arg_1 = int4(1); float4 res = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.spvasm index 3d6fe28ca6..7dfbd0e979 100644 --- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader - %21 = OpExtInstImport "GLSL.std.450" + %25 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,45 +33,48 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %17 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %25 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %23 = OpConstantNull %v4int + %29 = OpTypeFunction %v4float %ldexp_cc9cde = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 - %arg_1 = OpVariable %_ptr_Function_v4int Function %17 + %arg_1 = OpVariable %_ptr_Function_v4int Function %23 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %17 - %22 = OpLoad %v4float %arg_0 - %23 = OpLoad %v4int %arg_1 - %20 = OpExtInst %v4float %21 Ldexp %22 %23 - OpStore %res %20 + OpStore %arg_0 %14 + OpStore %arg_1 %20 + %26 = OpLoad %v4float %arg_0 + %27 = OpLoad %v4int %arg_1 + %24 = OpExtInst %v4float %25 Ldexp %26 %27 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %ldexp_cc9cde +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %ldexp_cc9cde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %ldexp_cc9cde - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %37 = OpLabel %38 = OpFunctionCall %void %ldexp_cc9cde OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %40 = OpLabel + %41 = OpFunctionCall %void %ldexp_cc9cde + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.wgsl index 29249e6435..ac164c7655 100644 --- a/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/cc9cde.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn ldexp_cc9cde() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1); var res : vec4 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/db8b49.wgsl b/test/tint/builtins/gen/var/ldexp/db8b49.wgsl index 96ff02ffaf..afd695d0ba 100644 --- a/test/tint/builtins/gen/var/ldexp/db8b49.wgsl +++ b/test/tint/builtins/gen/var/ldexp/db8b49.wgsl @@ -25,7 +25,7 @@ // fn ldexp(f32, i32) -> f32 fn ldexp_db8b49() { - var arg_0 = 1.0; + var arg_0 = 1.f; var arg_1 = 1; var res: f32 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.wgsl b/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.wgsl index 79e75152e9..b20b79c7d3 100644 --- a/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/ldexp/db8b49.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn ldexp_db8b49() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var arg_1 = 1; var res : f32 = ldexp(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/length/056071.wgsl b/test/tint/builtins/gen/var/length/056071.wgsl index b89744f734..7599545f07 100644 --- a/test/tint/builtins/gen/var/length/056071.wgsl +++ b/test/tint/builtins/gen/var/length/056071.wgsl @@ -25,7 +25,7 @@ // fn length(vec<3, f32>) -> f32 fn length_056071() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/056071.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/056071.wgsl.expected.dxc.hlsl index bd540fbe8b..563246cfa3 100644 --- a/test/tint/builtins/gen/var/length/056071.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/length/056071.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_056071() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/056071.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/056071.wgsl.expected.fxc.hlsl index bd540fbe8b..563246cfa3 100644 --- a/test/tint/builtins/gen/var/length/056071.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/length/056071.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void length_056071() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/056071.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/056071.wgsl.expected.glsl index f4f3920de8..c7442a6bd7 100644 --- a/test/tint/builtins/gen/var/length/056071.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/length/056071.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void length_056071() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); float res = length(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void length_056071() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); float res = length(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void length_056071() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/056071.wgsl.expected.msl b/test/tint/builtins/gen/var/length/056071.wgsl.expected.msl index 1727b62ba1..f2ba3c3ed3 100644 --- a/test/tint/builtins/gen/var/length/056071.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/length/056071.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_056071() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/056071.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/056071.wgsl.expected.spvasm index fb485c717e..45c6997238 100644 --- a/test/tint/builtins/gen/var/length/056071.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/length/056071.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,40 +33,41 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float -%_ptr_Function_float = OpTypePointer Function %float - %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float +%_ptr_Function_float = OpTypePointer Function %float + %24 = OpTypeFunction %v4float %length_056071 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %float %18 Length %19 - OpStore %res %17 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %float %20 Length %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %length_056071 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %length_056071 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %length_056071 + %32 = OpLabel + %33 = OpFunctionCall %void %length_056071 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %length_056071 + %35 = OpLabel + %36 = OpFunctionCall %void %length_056071 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/length/056071.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/056071.wgsl.expected.wgsl index 436d3d7791..b5ddeb0079 100644 --- a/test/tint/builtins/gen/var/length/056071.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/056071.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_056071() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/602a17.wgsl b/test/tint/builtins/gen/var/length/602a17.wgsl index 56b2c90b1d..22643c95a8 100644 --- a/test/tint/builtins/gen/var/length/602a17.wgsl +++ b/test/tint/builtins/gen/var/length/602a17.wgsl @@ -25,7 +25,7 @@ // fn length(f32) -> f32 fn length_602a17() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/602a17.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/602a17.wgsl.expected.wgsl index c8c1ffe731..7d1a3db6b7 100644 --- a/test/tint/builtins/gen/var/length/602a17.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/602a17.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_602a17() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/afde8b.wgsl b/test/tint/builtins/gen/var/length/afde8b.wgsl index bb299fa851..07485a054b 100644 --- a/test/tint/builtins/gen/var/length/afde8b.wgsl +++ b/test/tint/builtins/gen/var/length/afde8b.wgsl @@ -25,7 +25,7 @@ // fn length(vec<2, f32>) -> f32 fn length_afde8b() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.dxc.hlsl index f1ca92a377..36522765e6 100644 --- a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_afde8b() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.fxc.hlsl index f1ca92a377..36522765e6 100644 --- a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void length_afde8b() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.glsl index bee88075b8..95b2f856a8 100644 --- a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void length_afde8b() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); float res = length(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void length_afde8b() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); float res = length(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void length_afde8b() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.msl b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.msl index ebda0cbf81..b283afea9e 100644 --- a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_afde8b() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.spvasm index 975439ced2..603a9b03fc 100644 --- a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,40 +33,41 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float -%_ptr_Function_float = OpTypePointer Function %float - %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float +%_ptr_Function_float = OpTypePointer Function %float + %24 = OpTypeFunction %v4float %length_afde8b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %float %18 Length %19 - OpStore %res %17 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %float %20 Length %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %length_afde8b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %length_afde8b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %length_afde8b + %32 = OpLabel + %33 = OpFunctionCall %void %length_afde8b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %length_afde8b + %35 = OpLabel + %36 = OpFunctionCall %void %length_afde8b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.wgsl index 602f3c9f2a..17ad733058 100644 --- a/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/afde8b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_afde8b() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/becebf.wgsl b/test/tint/builtins/gen/var/length/becebf.wgsl index 701ba491a7..334b171273 100644 --- a/test/tint/builtins/gen/var/length/becebf.wgsl +++ b/test/tint/builtins/gen/var/length/becebf.wgsl @@ -25,7 +25,7 @@ // fn length(vec<4, f32>) -> f32 fn length_becebf() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.dxc.hlsl index e7760dd8e9..12594bc3cf 100644 --- a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void length_becebf() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.fxc.hlsl index e7760dd8e9..12594bc3cf 100644 --- a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void length_becebf() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.glsl b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.glsl index a87cbf7abb..abe433f234 100644 --- a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void length_becebf() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); float res = length(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void length_becebf() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); float res = length(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void length_becebf() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.msl b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.msl index 6909b069f9..27c3e89215 100644 --- a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void length_becebf() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float res = length(arg_0); } diff --git a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.spvasm index 4162c69dda..7b2a58afa8 100644 --- a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,39 +32,40 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_float = OpTypePointer Function %float - %20 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %22 = OpTypeFunction %v4float %length_becebf = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %float %16 Length %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %float %18 Length %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %length_becebf +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %length_becebf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %length_becebf + %30 = OpLabel + %31 = OpFunctionCall %void %length_becebf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %length_becebf + %33 = OpLabel + %34 = OpFunctionCall %void %length_becebf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.wgsl index d2a125896b..9f7791a06d 100644 --- a/test/tint/builtins/gen/var/length/becebf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/length/becebf.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn length_becebf() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : f32 = length(arg_0); } diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl b/test/tint/builtins/gen/var/log/3da25a.wgsl index 4aea68ec36..262f5d9731 100644 --- a/test/tint/builtins/gen/var/log/3da25a.wgsl +++ b/test/tint/builtins/gen/var/log/3da25a.wgsl @@ -25,7 +25,7 @@ // fn log(vec<4, f32>) -> vec<4, f32> fn log_3da25a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.dxc.hlsl index 59f09490ce..48ea81d96c 100644 --- a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_3da25a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.fxc.hlsl index 59f09490ce..48ea81d96c 100644 --- a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log_3da25a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.glsl index 8588b4e837..a4e53d1aeb 100644 --- a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log_3da25a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = log(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void log_3da25a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = log(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void log_3da25a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.msl b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.msl index f075d853a3..6524679916 100644 --- a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_3da25a() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.spvasm index 083d12a5d2..196896f1a0 100644 --- a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %log_3da25a = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Log %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Log %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log_3da25a +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %log_3da25a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log_3da25a + %29 = OpLabel + %30 = OpFunctionCall %void %log_3da25a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log_3da25a + %32 = OpLabel + %33 = OpFunctionCall %void %log_3da25a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.wgsl index e20a6535c7..f66d4f5f55 100644 --- a/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/3da25a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_3da25a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/7114a6.wgsl b/test/tint/builtins/gen/var/log/7114a6.wgsl index 2395adaf96..f719c0cbe1 100644 --- a/test/tint/builtins/gen/var/log/7114a6.wgsl +++ b/test/tint/builtins/gen/var/log/7114a6.wgsl @@ -25,7 +25,7 @@ // fn log(f32) -> f32 fn log_7114a6() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.wgsl index 7ec2232f92..952ac3cfda 100644 --- a/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/7114a6.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_7114a6() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl b/test/tint/builtins/gen/var/log/b2ce28.wgsl index b3f7e86397..f4f3f8c089 100644 --- a/test/tint/builtins/gen/var/log/b2ce28.wgsl +++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl @@ -25,7 +25,7 @@ // fn log(vec<2, f32>) -> vec<2, f32> fn log_b2ce28() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.dxc.hlsl index 26a04acde1..60c82a616d 100644 --- a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_b2ce28() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.fxc.hlsl index 26a04acde1..60c82a616d 100644 --- a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log_b2ce28() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.glsl index b8a85ea7b8..ce6c62b33b 100644 --- a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log_b2ce28() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = log(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void log_b2ce28() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = log(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void log_b2ce28() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.msl b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.msl index 919026debd..fe0c6d661c 100644 --- a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_b2ce28() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.spvasm index 3589004d29..5fc25bffb9 100644 --- a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %log_b2ce28 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Log %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Log %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %log_b2ce28 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %log_b2ce28 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %log_b2ce28 + %31 = OpLabel + %32 = OpFunctionCall %void %log_b2ce28 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %log_b2ce28 + %34 = OpLabel + %35 = OpFunctionCall %void %log_b2ce28 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.wgsl index 503c090bac..3b5a9526e5 100644 --- a/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/b2ce28.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_b2ce28() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl b/test/tint/builtins/gen/var/log/f4c570.wgsl index 137aadb809..cd791258b5 100644 --- a/test/tint/builtins/gen/var/log/f4c570.wgsl +++ b/test/tint/builtins/gen/var/log/f4c570.wgsl @@ -25,7 +25,7 @@ // fn log(vec<3, f32>) -> vec<3, f32> fn log_f4c570() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.dxc.hlsl index 27514fe9fa..b1ba5c35b6 100644 --- a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log_f4c570() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.fxc.hlsl index 27514fe9fa..b1ba5c35b6 100644 --- a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log_f4c570() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.glsl b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.glsl index e6be403ce7..945a3d97ce 100644 --- a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log_f4c570() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = log(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void log_f4c570() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = log(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void log_f4c570() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.msl b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.msl index 8afbab093d..7cf7fb27c6 100644 --- a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log_f4c570() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.spvasm index 3b43543dca..7dbf8f93a0 100644 --- a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %log_f4c570 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Log %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Log %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %log_f4c570 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %log_f4c570 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %log_f4c570 + %31 = OpLabel + %32 = OpFunctionCall %void %log_f4c570 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %log_f4c570 + %34 = OpLabel + %35 = OpFunctionCall %void %log_f4c570 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.wgsl index cec470673f..4fa597057f 100644 --- a/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log/f4c570.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log_f4c570() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = log(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/4036ed.wgsl b/test/tint/builtins/gen/var/log2/4036ed.wgsl index de719737f6..2a6a441a6e 100644 --- a/test/tint/builtins/gen/var/log2/4036ed.wgsl +++ b/test/tint/builtins/gen/var/log2/4036ed.wgsl @@ -25,7 +25,7 @@ // fn log2(f32) -> f32 fn log2_4036ed() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.wgsl index d194b093c3..ec4ffa1b7a 100644 --- a/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/4036ed.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_4036ed() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl b/test/tint/builtins/gen/var/log2/902988.wgsl index 791b79308b..c620fcee2b 100644 --- a/test/tint/builtins/gen/var/log2/902988.wgsl +++ b/test/tint/builtins/gen/var/log2/902988.wgsl @@ -25,7 +25,7 @@ // fn log2(vec<4, f32>) -> vec<4, f32> fn log2_902988() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.dxc.hlsl index f4564a3262..d2a41fd1c1 100644 --- a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_902988() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.fxc.hlsl index f4564a3262..d2a41fd1c1 100644 --- a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log2_902988() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.glsl index 32ef3ecc1f..1ab598ee10 100644 --- a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log2_902988() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = log2(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void log2_902988() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = log2(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void log2_902988() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.msl index b24d5d012c..b1afdbd264 100644 --- a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_902988() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.spvasm index 6cc4c9baa5..3ea274a323 100644 --- a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %log2_902988 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Log2 %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Log2 %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %log2_902988 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %log2_902988 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %log2_902988 + %29 = OpLabel + %30 = OpFunctionCall %void %log2_902988 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %log2_902988 + %32 = OpLabel + %33 = OpFunctionCall %void %log2_902988 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.wgsl index ea2f1c52be..9bfd632d49 100644 --- a/test/tint/builtins/gen/var/log2/902988.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/902988.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_902988() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl b/test/tint/builtins/gen/var/log2/adb233.wgsl index 7f2cf69015..3baf5b0f20 100644 --- a/test/tint/builtins/gen/var/log2/adb233.wgsl +++ b/test/tint/builtins/gen/var/log2/adb233.wgsl @@ -25,7 +25,7 @@ // fn log2(vec<3, f32>) -> vec<3, f32> fn log2_adb233() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.dxc.hlsl index 16c4b43836..edd19e1fdd 100644 --- a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_adb233() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.fxc.hlsl index 16c4b43836..edd19e1fdd 100644 --- a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log2_adb233() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.glsl index e418bf1663..08551f479d 100644 --- a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log2_adb233() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = log2(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void log2_adb233() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = log2(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void log2_adb233() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.msl index f6e89e1937..11436458cf 100644 --- a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_adb233() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.spvasm index 7ddd436cbd..fd25695f0e 100644 --- a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %log2_adb233 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Log2 %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Log2 %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %log2_adb233 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %log2_adb233 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %log2_adb233 + %31 = OpLabel + %32 = OpFunctionCall %void %log2_adb233 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %log2_adb233 + %34 = OpLabel + %35 = OpFunctionCall %void %log2_adb233 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.wgsl index 7ff8f04504..252dd99e04 100644 --- a/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/adb233.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_adb233() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl b/test/tint/builtins/gen/var/log2/aea659.wgsl index 79b4b65799..5867ab264e 100644 --- a/test/tint/builtins/gen/var/log2/aea659.wgsl +++ b/test/tint/builtins/gen/var/log2/aea659.wgsl @@ -25,7 +25,7 @@ // fn log2(vec<2, f32>) -> vec<2, f32> fn log2_aea659() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.dxc.hlsl index e24f82a0e1..0a7192df1b 100644 --- a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void log2_aea659() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.fxc.hlsl index e24f82a0e1..0a7192df1b 100644 --- a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void log2_aea659() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.glsl b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.glsl index ec15096fca..c2b459e9ea 100644 --- a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void log2_aea659() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = log2(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void log2_aea659() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = log2(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void log2_aea659() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.msl b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.msl index 600c740d3c..f7095c8084 100644 --- a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void log2_aea659() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.spvasm b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.spvasm index 5ea2f4bde3..2b5391637d 100644 --- a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %log2_aea659 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Log2 %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Log2 %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %log2_aea659 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %log2_aea659 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %log2_aea659 + %31 = OpLabel + %32 = OpFunctionCall %void %log2_aea659 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %log2_aea659 + %34 = OpLabel + %35 = OpFunctionCall %void %log2_aea659 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.wgsl b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.wgsl index c6d64d28c6..86accf151d 100644 --- a/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/log2/aea659.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn log2_aea659() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = log2(arg_0); } diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl b/test/tint/builtins/gen/var/max/25eafe.wgsl index e43839449d..acbdd05f30 100644 --- a/test/tint/builtins/gen/var/max/25eafe.wgsl +++ b/test/tint/builtins/gen/var/max/25eafe.wgsl @@ -25,8 +25,8 @@ // fn max(vec<3, i32>, vec<3, i32>) -> vec<3, i32> fn max_25eafe() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var res: vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.dxc.hlsl index 77cc993b1f..1e23c54bcb 100644 --- a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_25eafe() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; int3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.fxc.hlsl index 77cc993b1f..1e23c54bcb 100644 --- a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_25eafe() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; int3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.glsl index ea6e7fd8ad..1f8e21d7be 100644 --- a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_25eafe() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); ivec3 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_25eafe() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); ivec3 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_25eafe() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); ivec3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.msl b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.msl index 732cc4740d..1b4a2f248e 100644 --- a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_25eafe() { - int3 arg_0 = int3(0); - int3 arg_1 = int3(0); + int3 arg_0 = int3(1); + int3 arg_1 = int3(1); int3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.spvasm index 9a15372d39..7d84e7cb1b 100644 --- a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3int + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_25eafe = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %arg_1 = OpVariable %_ptr_Function_v3int Function %15 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3int %arg_0 - %22 = OpLoad %v3int %arg_1 - %19 = OpExtInst %v3int %20 SMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3int %arg_0 + %24 = OpLoad %v3int %arg_1 + %21 = OpExtInst %v3int %22 SMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_25eafe +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_25eafe OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_25eafe + %35 = OpLabel + %36 = OpFunctionCall %void %max_25eafe OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_25eafe + %38 = OpLabel + %39 = OpFunctionCall %void %max_25eafe OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.wgsl index df36b3b2d0..0c6eb03b3a 100644 --- a/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/25eafe.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_25eafe() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var res : vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/320815.wgsl b/test/tint/builtins/gen/var/max/320815.wgsl index a678a562b5..8270c65e5a 100644 --- a/test/tint/builtins/gen/var/max/320815.wgsl +++ b/test/tint/builtins/gen/var/max/320815.wgsl @@ -25,8 +25,8 @@ // fn max(vec<2, u32>, vec<2, u32>) -> vec<2, u32> fn max_320815() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var res: vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/320815.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/320815.wgsl.expected.dxc.hlsl index c863bd2fc2..db6bae6124 100644 --- a/test/tint/builtins/gen/var/max/320815.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/320815.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_320815() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/320815.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/320815.wgsl.expected.fxc.hlsl index c863bd2fc2..db6bae6124 100644 --- a/test/tint/builtins/gen/var/max/320815.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/320815.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_320815() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/320815.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/320815.wgsl.expected.glsl index dd24fb4468..7eb797c46c 100644 --- a/test/tint/builtins/gen/var/max/320815.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/320815.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_320815() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uvec2 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_320815() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uvec2 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_320815() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uvec2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/320815.wgsl.expected.msl b/test/tint/builtins/gen/var/max/320815.wgsl.expected.msl index 2022314ace..afba782190 100644 --- a/test/tint/builtins/gen/var/max/320815.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/320815.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_320815() { - uint2 arg_0 = uint2(0u); - uint2 arg_1 = uint2(0u); + uint2 arg_0 = uint2(1u); + uint2 arg_1 = uint2(1u); uint2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/320815.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/320815.wgsl.expected.spvasm index 40356655ba..fcac466e68 100644 --- a/test/tint/builtins/gen/var/max/320815.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/320815.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2uint + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_320815 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v2uint Function %15 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2uint %arg_0 - %22 = OpLoad %v2uint %arg_1 - %19 = OpExtInst %v2uint %20 UMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2uint %arg_0 + %24 = OpLoad %v2uint %arg_1 + %21 = OpExtInst %v2uint %22 UMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_320815 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_320815 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_320815 + %35 = OpLabel + %36 = OpFunctionCall %void %max_320815 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_320815 + %38 = OpLabel + %39 = OpFunctionCall %void %max_320815 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/320815.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/320815.wgsl.expected.wgsl index 1f5cf86205..cb862a6402 100644 --- a/test/tint/builtins/gen/var/max/320815.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/320815.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_320815() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var res : vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/44a39d.wgsl b/test/tint/builtins/gen/var/max/44a39d.wgsl index 244f400d71..9f96490e7b 100644 --- a/test/tint/builtins/gen/var/max/44a39d.wgsl +++ b/test/tint/builtins/gen/var/max/44a39d.wgsl @@ -25,8 +25,8 @@ // fn max(f32, f32) -> f32 fn max_44a39d() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; var res: f32 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.wgsl index b7e910991f..f0ff168885 100644 --- a/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/44a39d.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_44a39d() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; var res : f32 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl b/test/tint/builtins/gen/var/max/453e04.wgsl index 0afa68b0f0..94add9d213 100644 --- a/test/tint/builtins/gen/var/max/453e04.wgsl +++ b/test/tint/builtins/gen/var/max/453e04.wgsl @@ -25,8 +25,8 @@ // fn max(vec<4, u32>, vec<4, u32>) -> vec<4, u32> fn max_453e04() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var res: vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.dxc.hlsl index d8122882e4..70b7cb462e 100644 --- a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_453e04() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.fxc.hlsl index d8122882e4..70b7cb462e 100644 --- a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_453e04() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.glsl index d525546c7b..8345f5c1cf 100644 --- a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_453e04() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uvec4 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_453e04() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uvec4 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_453e04() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uvec4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.msl b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.msl index a8510d7732..bd9f1ce89e 100644 --- a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_453e04() { - uint4 arg_0 = uint4(0u); - uint4 arg_1 = uint4(0u); + uint4 arg_0 = uint4(1u); + uint4 arg_1 = uint4(1u); uint4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.spvasm index caf8737059..6a27d3012a 100644 --- a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4uint + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_453e04 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v4uint Function %15 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4uint %arg_0 - %22 = OpLoad %v4uint %arg_1 - %19 = OpExtInst %v4uint %20 UMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v4uint Function %19 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4uint %arg_0 + %24 = OpLoad %v4uint %arg_1 + %21 = OpExtInst %v4uint %22 UMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_453e04 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_453e04 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_453e04 + %35 = OpLabel + %36 = OpFunctionCall %void %max_453e04 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_453e04 + %38 = OpLabel + %39 = OpFunctionCall %void %max_453e04 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.wgsl index a47fca6ccd..ce4a47cc69 100644 --- a/test/tint/builtins/gen/var/max/453e04.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/453e04.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_453e04() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var res : vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/462050.wgsl b/test/tint/builtins/gen/var/max/462050.wgsl index 53ca66ec06..e0a772b2d2 100644 --- a/test/tint/builtins/gen/var/max/462050.wgsl +++ b/test/tint/builtins/gen/var/max/462050.wgsl @@ -25,8 +25,8 @@ // fn max(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn max_462050() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/462050.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/462050.wgsl.expected.dxc.hlsl index 132a4b2ce4..74aa9e81af 100644 --- a/test/tint/builtins/gen/var/max/462050.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/462050.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_462050() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/462050.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/462050.wgsl.expected.fxc.hlsl index 132a4b2ce4..74aa9e81af 100644 --- a/test/tint/builtins/gen/var/max/462050.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/462050.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_462050() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/462050.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/462050.wgsl.expected.glsl index 48d1a33aed..627f0c95dc 100644 --- a/test/tint/builtins/gen/var/max/462050.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/462050.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_462050() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_462050() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_462050() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/462050.wgsl.expected.msl b/test/tint/builtins/gen/var/max/462050.wgsl.expected.msl index 8aadf35461..77fd1ac508 100644 --- a/test/tint/builtins/gen/var/max/462050.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/462050.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_462050() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float2 res = fmax(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/462050.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/462050.wgsl.expected.spvasm index 3b0facf6ba..7a9ff564d6 100644 --- a/test/tint/builtins/gen/var/max/462050.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/462050.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %25 = OpTypeFunction %v4float %max_462050 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v2float %arg_0 - %21 = OpLoad %v2float %arg_1 - %18 = OpExtInst %v2float %19 NMax %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v2float %arg_0 + %23 = OpLoad %v2float %arg_1 + %20 = OpExtInst %v2float %21 NMax %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %max_462050 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %max_462050 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_462050 + %33 = OpLabel + %34 = OpFunctionCall %void %max_462050 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %max_462050 + %36 = OpLabel + %37 = OpFunctionCall %void %max_462050 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/462050.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/462050.wgsl.expected.wgsl index ac7bb6047b..28b3e0d20c 100644 --- a/test/tint/builtins/gen/var/max/462050.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/462050.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_462050() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl b/test/tint/builtins/gen/var/max/4883ac.wgsl index 8add3f48b7..ad42412db4 100644 --- a/test/tint/builtins/gen/var/max/4883ac.wgsl +++ b/test/tint/builtins/gen/var/max/4883ac.wgsl @@ -25,8 +25,8 @@ // fn max(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn max_4883ac() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.dxc.hlsl index 8c577a935e..ee0df6b18a 100644 --- a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_4883ac() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.fxc.hlsl index 8c577a935e..ee0df6b18a 100644 --- a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_4883ac() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.glsl index 79b7607da4..0821605151 100644 --- a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_4883ac() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_4883ac() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_4883ac() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.msl b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.msl index 49ccb2a152..28df7d6ad5 100644 --- a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_4883ac() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float3 res = fmax(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.spvasm index 4767d182b5..3c32bd9a31 100644 --- a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %max_4883ac = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %v3float %19 NMax %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %v3float %21 NMax %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %max_4883ac +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %max_4883ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %max_4883ac + %33 = OpLabel + %34 = OpFunctionCall %void %max_4883ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %max_4883ac + %36 = OpLabel + %37 = OpFunctionCall %void %max_4883ac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.wgsl index d0216f5244..4da24d3f62 100644 --- a/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/4883ac.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_4883ac() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl b/test/tint/builtins/gen/var/max/85e6bc.wgsl index d46960fbfc..330ee33bad 100644 --- a/test/tint/builtins/gen/var/max/85e6bc.wgsl +++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl @@ -25,8 +25,8 @@ // fn max(vec<4, i32>, vec<4, i32>) -> vec<4, i32> fn max_85e6bc() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var res: vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.dxc.hlsl index 403878646e..51e9ac41ba 100644 --- a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_85e6bc() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; int4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.fxc.hlsl index 403878646e..51e9ac41ba 100644 --- a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_85e6bc() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; int4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.glsl index e447eab73e..cf4d0afd4b 100644 --- a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_85e6bc() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); ivec4 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_85e6bc() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); ivec4 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_85e6bc() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); ivec4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.msl b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.msl index 3b73bf7935..77d28f2a4f 100644 --- a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_85e6bc() { - int4 arg_0 = int4(0); - int4 arg_1 = int4(0); + int4 arg_0 = int4(1); + int4 arg_1 = int4(1); int4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.spvasm index 8c468ce29a..09be5c69e3 100644 --- a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4int + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_85e6bc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %arg_1 = OpVariable %_ptr_Function_v4int Function %15 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4int %arg_0 - %22 = OpLoad %v4int %arg_1 - %19 = OpExtInst %v4int %20 SMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %arg_1 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4int %arg_0 + %24 = OpLoad %v4int %arg_1 + %21 = OpExtInst %v4int %22 SMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_85e6bc +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_85e6bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_85e6bc + %35 = OpLabel + %36 = OpFunctionCall %void %max_85e6bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_85e6bc + %38 = OpLabel + %39 = OpFunctionCall %void %max_85e6bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.wgsl index 33565fdd06..64f813bb6c 100644 --- a/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/85e6bc.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_85e6bc() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var res : vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl b/test/tint/builtins/gen/var/max/a93419.wgsl index c4ca54f3d8..d6dce8958a 100644 --- a/test/tint/builtins/gen/var/max/a93419.wgsl +++ b/test/tint/builtins/gen/var/max/a93419.wgsl @@ -25,8 +25,8 @@ // fn max(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn max_a93419() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.dxc.hlsl index 6997426f1c..69e83f617e 100644 --- a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_a93419() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.fxc.hlsl index 6997426f1c..69e83f617e 100644 --- a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_a93419() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.glsl index 61bfbbfca0..3f2450c619 100644 --- a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_a93419() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_a93419() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_a93419() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.msl b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.msl index 71b826d754..6a04eaf181 100644 --- a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_a93419() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float4 res = fmax(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.spvasm index 0258486a4d..f70b7bdf18 100644 --- a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,41 +33,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %23 = OpTypeFunction %v4float %max_a93419 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %18 = OpLoad %v4float %arg_0 - %19 = OpLoad %v4float %arg_1 - %16 = OpExtInst %v4float %17 NMax %18 %19 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %20 = OpLoad %v4float %arg_0 + %21 = OpLoad %v4float %arg_1 + %18 = OpExtInst %v4float %19 NMax %20 %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %max_a93419 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %max_a93419 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %max_a93419 + %31 = OpLabel + %32 = OpFunctionCall %void %max_a93419 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_a93419 + %34 = OpLabel + %35 = OpFunctionCall %void %max_a93419 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.wgsl index 22d8ba86ae..7ae8a6df98 100644 --- a/test/tint/builtins/gen/var/max/a93419.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/a93419.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_a93419() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : vec4 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl b/test/tint/builtins/gen/var/max/b1b73a.wgsl index f4e625b226..5a9eede118 100644 --- a/test/tint/builtins/gen/var/max/b1b73a.wgsl +++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl @@ -25,8 +25,8 @@ // fn max(vec<3, u32>, vec<3, u32>) -> vec<3, u32> fn max_b1b73a() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var res: vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.dxc.hlsl index 58925abcbc..1469748076 100644 --- a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_b1b73a() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.fxc.hlsl index 58925abcbc..1469748076 100644 --- a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_b1b73a() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.glsl index e472bceda1..2e42313311 100644 --- a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_b1b73a() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uvec3 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_b1b73a() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uvec3 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_b1b73a() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uvec3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.msl b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.msl index d115f99813..d26d86edbe 100644 --- a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_b1b73a() { - uint3 arg_0 = uint3(0u); - uint3 arg_1 = uint3(0u); + uint3 arg_0 = uint3(1u); + uint3 arg_1 = uint3(1u); uint3 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.spvasm index 3d94408e07..9c16755bf3 100644 --- a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3uint + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_b1b73a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v3uint Function %15 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3uint %arg_0 - %22 = OpLoad %v3uint %arg_1 - %19 = OpExtInst %v3uint %20 UMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3uint %arg_0 + %24 = OpLoad %v3uint %arg_1 + %21 = OpExtInst %v3uint %22 UMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_b1b73a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_b1b73a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_b1b73a + %35 = OpLabel + %36 = OpFunctionCall %void %max_b1b73a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_b1b73a + %38 = OpLabel + %39 = OpFunctionCall %void %max_b1b73a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.wgsl index f47436c232..8585dbeb10 100644 --- a/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/b1b73a.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_b1b73a() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var res : vec3 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl b/test/tint/builtins/gen/var/max/e8192f.wgsl index f090e940a5..a745475749 100644 --- a/test/tint/builtins/gen/var/max/e8192f.wgsl +++ b/test/tint/builtins/gen/var/max/e8192f.wgsl @@ -25,8 +25,8 @@ // fn max(vec<2, i32>, vec<2, i32>) -> vec<2, i32> fn max_e8192f() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var res: vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.dxc.hlsl index aced4a2944..e773f17870 100644 --- a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void max_e8192f() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; int2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.fxc.hlsl index aced4a2944..e773f17870 100644 --- a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void max_e8192f() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; int2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.glsl b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.glsl index dd429a3c8e..a25ec00f75 100644 --- a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void max_e8192f() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); ivec2 res = max(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void max_e8192f() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); ivec2 res = max(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void max_e8192f() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); ivec2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.msl b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.msl index 19f2872751..91e431b7a6 100644 --- a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void max_e8192f() { - int2 arg_0 = int2(0); - int2 arg_1 = int2(0); + int2 arg_0 = int2(1); + int2 arg_1 = int2(1); int2 res = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.spvasm index 4e09cf0978..de054b1bd3 100644 --- a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2int + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %max_e8192f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %arg_1 = OpVariable %_ptr_Function_v2int Function %15 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2int %arg_0 - %22 = OpLoad %v2int %arg_1 - %19 = OpExtInst %v2int %20 SMax %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2int %arg_0 + %24 = OpLoad %v2int %arg_1 + %21 = OpExtInst %v2int %22 SMax %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %max_e8192f +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %max_e8192f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %max_e8192f + %35 = OpLabel + %36 = OpFunctionCall %void %max_e8192f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %max_e8192f + %38 = OpLabel + %39 = OpFunctionCall %void %max_e8192f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.wgsl index d3b546bd1b..e102472da8 100644 --- a/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/max/e8192f.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn max_e8192f() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var res : vec2 = max(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl b/test/tint/builtins/gen/var/min/03c7e3.wgsl index 82feb882aa..7acead5981 100644 --- a/test/tint/builtins/gen/var/min/03c7e3.wgsl +++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl @@ -25,8 +25,8 @@ // fn min(vec<2, i32>, vec<2, i32>) -> vec<2, i32> fn min_03c7e3() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var res: vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.dxc.hlsl index af0f2479a8..3e1a788bba 100644 --- a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_03c7e3() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; int2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.fxc.hlsl index af0f2479a8..3e1a788bba 100644 --- a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_03c7e3() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; int2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.glsl index f4069454b9..89c44192da 100644 --- a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_03c7e3() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); ivec2 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_03c7e3() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); ivec2 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_03c7e3() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); ivec2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.msl b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.msl index b86dc3e611..f5fd9d78d2 100644 --- a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_03c7e3() { - int2 arg_0 = int2(0); - int2 arg_1 = int2(0); + int2 arg_0 = int2(1); + int2 arg_1 = int2(1); int2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.spvasm index ff14eae7b7..c78e2bab43 100644 --- a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2int + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_03c7e3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %arg_1 = OpVariable %_ptr_Function_v2int Function %15 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2int %arg_0 - %22 = OpLoad %v2int %arg_1 - %19 = OpExtInst %v2int %20 SMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2int %arg_0 + %24 = OpLoad %v2int %arg_1 + %21 = OpExtInst %v2int %22 SMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_03c7e3 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_03c7e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_03c7e3 + %35 = OpLabel + %36 = OpFunctionCall %void %min_03c7e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_03c7e3 + %38 = OpLabel + %39 = OpFunctionCall %void %min_03c7e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.wgsl index 9f91712f03..17f1a72d9b 100644 --- a/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/03c7e3.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_03c7e3() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); var res : vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl b/test/tint/builtins/gen/var/min/0dc614.wgsl index f2ed84a596..fe0d460042 100644 --- a/test/tint/builtins/gen/var/min/0dc614.wgsl +++ b/test/tint/builtins/gen/var/min/0dc614.wgsl @@ -25,8 +25,8 @@ // fn min(vec<4, u32>, vec<4, u32>) -> vec<4, u32> fn min_0dc614() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var res: vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.dxc.hlsl index 57486febcd..4c2b0bc40e 100644 --- a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_0dc614() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.fxc.hlsl index 57486febcd..4c2b0bc40e 100644 --- a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_0dc614() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; uint4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.glsl index e865f038ff..d866fed95b 100644 --- a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_0dc614() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uvec4 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_0dc614() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uvec4 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_0dc614() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); uvec4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.msl b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.msl index 2e45112373..9bd62b159c 100644 --- a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_0dc614() { - uint4 arg_0 = uint4(0u); - uint4 arg_1 = uint4(0u); + uint4 arg_0 = uint4(1u); + uint4 arg_1 = uint4(1u); uint4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.spvasm index 3b569aa315..1d33b5d199 100644 --- a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4uint + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_0dc614 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v4uint Function %15 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4uint %arg_0 - %22 = OpLoad %v4uint %arg_1 - %19 = OpExtInst %v4uint %20 UMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v4uint Function %19 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4uint %arg_0 + %24 = OpLoad %v4uint %arg_1 + %21 = OpExtInst %v4uint %22 UMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_0dc614 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_0dc614 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_0dc614 + %35 = OpLabel + %36 = OpFunctionCall %void %min_0dc614 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_0dc614 + %38 = OpLabel + %39 = OpFunctionCall %void %min_0dc614 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.wgsl index 139b0534ed..77091778df 100644 --- a/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/0dc614.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_0dc614() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); var res : vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl b/test/tint/builtins/gen/var/min/3941e1.wgsl index f3da3eabea..5261ce0f4c 100644 --- a/test/tint/builtins/gen/var/min/3941e1.wgsl +++ b/test/tint/builtins/gen/var/min/3941e1.wgsl @@ -25,8 +25,8 @@ // fn min(vec<4, i32>, vec<4, i32>) -> vec<4, i32> fn min_3941e1() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var res: vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.dxc.hlsl index d071ce7601..3b6cb18e00 100644 --- a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_3941e1() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; int4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.fxc.hlsl index d071ce7601..3b6cb18e00 100644 --- a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_3941e1() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; int4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.glsl index 9bc41431fb..0e2fa7b393 100644 --- a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_3941e1() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); ivec4 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_3941e1() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); ivec4 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_3941e1() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); ivec4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.msl b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.msl index 5bb0be9591..3bf044dc79 100644 --- a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_3941e1() { - int4 arg_0 = int4(0); - int4 arg_1 = int4(0); + int4 arg_0 = int4(1); + int4 arg_1 = int4(1); int4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.spvasm index aa77352411..3cea99c411 100644 --- a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v4int + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_3941e1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %arg_1 = OpVariable %_ptr_Function_v4int Function %15 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v4int %arg_0 - %22 = OpLoad %v4int %arg_1 - %19 = OpExtInst %v4int %20 SMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %arg_1 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v4int %arg_0 + %24 = OpLoad %v4int %arg_1 + %21 = OpExtInst %v4int %22 SMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_3941e1 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_3941e1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_3941e1 + %35 = OpLabel + %36 = OpFunctionCall %void %min_3941e1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_3941e1 + %38 = OpLabel + %39 = OpFunctionCall %void %min_3941e1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.wgsl index 9836662a18..f2683dbe67 100644 --- a/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/3941e1.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_3941e1() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); var res : vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl b/test/tint/builtins/gen/var/min/82b28f.wgsl index aa5e1b8fb3..b5d8efa982 100644 --- a/test/tint/builtins/gen/var/min/82b28f.wgsl +++ b/test/tint/builtins/gen/var/min/82b28f.wgsl @@ -25,8 +25,8 @@ // fn min(vec<2, u32>, vec<2, u32>) -> vec<2, u32> fn min_82b28f() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var res: vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.dxc.hlsl index b1f5804465..8d028e3ea5 100644 --- a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_82b28f() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.fxc.hlsl index b1f5804465..8d028e3ea5 100644 --- a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_82b28f() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; uint2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.glsl index 2ba2c0efb1..49661cf6c2 100644 --- a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_82b28f() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uvec2 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_82b28f() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uvec2 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_82b28f() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); uvec2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.msl b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.msl index ff78060a1b..840a24efab 100644 --- a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_82b28f() { - uint2 arg_0 = uint2(0u); - uint2 arg_1 = uint2(0u); + uint2 arg_0 = uint2(1u); + uint2 arg_1 = uint2(1u); uint2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.spvasm index ced5331677..1515f3a56e 100644 --- a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v2uint + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_82b28f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v2uint Function %15 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v2uint %arg_0 - %22 = OpLoad %v2uint %arg_1 - %19 = OpExtInst %v2uint %20 UMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v2uint %arg_0 + %24 = OpLoad %v2uint %arg_1 + %21 = OpExtInst %v2uint %22 UMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_82b28f +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_82b28f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_82b28f + %35 = OpLabel + %36 = OpFunctionCall %void %min_82b28f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_82b28f + %38 = OpLabel + %39 = OpFunctionCall %void %min_82b28f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.wgsl index 3d04b298da..f97e16bebd 100644 --- a/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/82b28f.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_82b28f() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); var res : vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl b/test/tint/builtins/gen/var/min/93cfc4.wgsl index d56b8f0dfd..77fdd17274 100644 --- a/test/tint/builtins/gen/var/min/93cfc4.wgsl +++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl @@ -25,8 +25,8 @@ // fn min(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn min_93cfc4() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.dxc.hlsl index 12c56fa61e..a4c9d49291 100644 --- a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_93cfc4() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.fxc.hlsl index 12c56fa61e..a4c9d49291 100644 --- a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_93cfc4() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.glsl index 1e455067fa..93215e8aab 100644 --- a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_93cfc4() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_93cfc4() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_93cfc4() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.msl b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.msl index 4e7ad8d4ec..2504c4b5e1 100644 --- a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_93cfc4() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float3 res = fmin(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.spvasm index 01dc20f752..da67bad90b 100644 --- a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %min_93cfc4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %v3float %19 NMin %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %v3float %21 NMin %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %min_93cfc4 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %min_93cfc4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_93cfc4 + %33 = OpLabel + %34 = OpFunctionCall %void %min_93cfc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %min_93cfc4 + %36 = OpLabel + %37 = OpFunctionCall %void %min_93cfc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.wgsl index 54a69879a7..b71c5382d6 100644 --- a/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/93cfc4.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_93cfc4() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl b/test/tint/builtins/gen/var/min/a45171.wgsl index c98426edbb..7ac04d0782 100644 --- a/test/tint/builtins/gen/var/min/a45171.wgsl +++ b/test/tint/builtins/gen/var/min/a45171.wgsl @@ -25,8 +25,8 @@ // fn min(vec<3, i32>, vec<3, i32>) -> vec<3, i32> fn min_a45171() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var res: vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.dxc.hlsl index 4e2b89ba2c..ceca0114c9 100644 --- a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_a45171() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; int3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.fxc.hlsl index 4e2b89ba2c..ceca0114c9 100644 --- a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_a45171() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; int3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.glsl index 9045bae4e0..341b229a32 100644 --- a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_a45171() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); ivec3 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_a45171() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); ivec3 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_a45171() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); ivec3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.msl b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.msl index 6bcbd9b36e..4a44fabf0e 100644 --- a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_a45171() { - int3 arg_0 = int3(0); - int3 arg_1 = int3(0); + int3 arg_0 = int3(1); + int3 arg_1 = int3(1); int3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.spvasm index 7f6aa2e1d2..c21caef497 100644 --- a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3int + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_a45171 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %arg_1 = OpVariable %_ptr_Function_v3int Function %15 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3int %arg_0 - %22 = OpLoad %v3int %arg_1 - %19 = OpExtInst %v3int %20 SMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3int %arg_0 + %24 = OpLoad %v3int %arg_1 + %21 = OpExtInst %v3int %22 SMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_a45171 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_a45171 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_a45171 + %35 = OpLabel + %36 = OpFunctionCall %void %min_a45171 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_a45171 + %38 = OpLabel + %39 = OpFunctionCall %void %min_a45171 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.wgsl index 25c07acc29..a5ea2e4e70 100644 --- a/test/tint/builtins/gen/var/min/a45171.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/a45171.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_a45171() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); var res : vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl b/test/tint/builtins/gen/var/min/aa28ad.wgsl index 7eadaf1a0e..1d22ef58e9 100644 --- a/test/tint/builtins/gen/var/min/aa28ad.wgsl +++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl @@ -25,8 +25,8 @@ // fn min(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn min_aa28ad() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.dxc.hlsl index 1284c64fee..44fe479090 100644 --- a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_aa28ad() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.fxc.hlsl index 1284c64fee..44fe479090 100644 --- a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_aa28ad() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.glsl index a266b483e2..03446d0de0 100644 --- a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_aa28ad() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_aa28ad() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_aa28ad() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.msl b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.msl index a0bade43e2..aed687ecc1 100644 --- a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_aa28ad() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float2 res = fmin(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.spvasm index 6cdb88c309..7fc4843770 100644 --- a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %25 = OpTypeFunction %v4float %min_aa28ad = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v2float %arg_0 - %21 = OpLoad %v2float %arg_1 - %18 = OpExtInst %v2float %19 NMin %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v2float %arg_0 + %23 = OpLoad %v2float %arg_1 + %20 = OpExtInst %v2float %21 NMin %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %min_aa28ad +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %min_aa28ad OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %min_aa28ad + %33 = OpLabel + %34 = OpFunctionCall %void %min_aa28ad OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %min_aa28ad + %36 = OpLabel + %37 = OpFunctionCall %void %min_aa28ad OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.wgsl index 4118b9c699..92baedc239 100644 --- a/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/aa28ad.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_aa28ad() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : vec2 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/af326d.wgsl b/test/tint/builtins/gen/var/min/af326d.wgsl index cb64bc117c..38cd018b09 100644 --- a/test/tint/builtins/gen/var/min/af326d.wgsl +++ b/test/tint/builtins/gen/var/min/af326d.wgsl @@ -25,8 +25,8 @@ // fn min(f32, f32) -> f32 fn min_af326d() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; var res: f32 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/af326d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/af326d.wgsl.expected.wgsl index cad0ec0429..02bc142826 100644 --- a/test/tint/builtins/gen/var/min/af326d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/af326d.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_af326d() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; var res : f32 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl b/test/tint/builtins/gen/var/min/c70bb7.wgsl index 1582ed0468..e7e4936465 100644 --- a/test/tint/builtins/gen/var/min/c70bb7.wgsl +++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl @@ -25,8 +25,8 @@ // fn min(vec<3, u32>, vec<3, u32>) -> vec<3, u32> fn min_c70bb7() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var res: vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.dxc.hlsl index b5e461e9ad..d0518f5fc2 100644 --- a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_c70bb7() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.fxc.hlsl index b5e461e9ad..d0518f5fc2 100644 --- a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_c70bb7() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; uint3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.glsl index b8c99f5217..356455e077 100644 --- a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_c70bb7() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uvec3 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_c70bb7() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uvec3 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_c70bb7() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); uvec3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.msl b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.msl index 3f131b44fd..174463a743 100644 --- a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_c70bb7() { - uint3 arg_0 = uint3(0u); - uint3 arg_1 = uint3(0u); + uint3 arg_0 = uint3(1u); + uint3 arg_1 = uint3(1u); uint3 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.spvasm index 5a8530ad73..f0e6690c4c 100644 --- a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,42 +35,44 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %24 = OpTypeFunction %v4float + %19 = OpConstantNull %v3uint + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %min_c70bb7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v3uint Function %15 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - %21 = OpLoad %v3uint %arg_0 - %22 = OpLoad %v3uint %arg_1 - %19 = OpExtInst %v3uint %20 UMin %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + %23 = OpLoad %v3uint %arg_0 + %24 = OpLoad %v3uint %arg_1 + %21 = OpExtInst %v3uint %22 UMin %23 %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %min_c70bb7 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %min_c70bb7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_c70bb7 + %35 = OpLabel + %36 = OpFunctionCall %void %min_c70bb7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %min_c70bb7 + %38 = OpLabel + %39 = OpFunctionCall %void %min_c70bb7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.wgsl index 8ac77f7564..86e9d1ffb0 100644 --- a/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/c70bb7.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_c70bb7() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); var res : vec3 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl b/test/tint/builtins/gen/var/min/c76fa6.wgsl index 433b1331d5..93bc8473b4 100644 --- a/test/tint/builtins/gen/var/min/c76fa6.wgsl +++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl @@ -25,8 +25,8 @@ // fn min(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn min_c76fa6() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.dxc.hlsl index c29c09d1ee..bd0c327285 100644 --- a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void min_c76fa6() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.fxc.hlsl index c29c09d1ee..bd0c327285 100644 --- a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void min_c76fa6() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.glsl b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.glsl index c8f3d5a69e..88ac3d3e00 100644 --- a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void min_c76fa6() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = min(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void min_c76fa6() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = min(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void min_c76fa6() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.msl b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.msl index 698234e7c7..313f56cdfa 100644 --- a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void min_c76fa6() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float4 res = fmin(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.spvasm index a818f80302..1512cf1d14 100644 --- a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,41 +33,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %23 = OpTypeFunction %v4float %min_c76fa6 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %18 = OpLoad %v4float %arg_0 - %19 = OpLoad %v4float %arg_1 - %16 = OpExtInst %v4float %17 NMin %18 %19 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %20 = OpLoad %v4float %arg_0 + %21 = OpLoad %v4float %arg_1 + %18 = OpExtInst %v4float %19 NMin %20 %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %min_c76fa6 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %min_c76fa6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %min_c76fa6 + %31 = OpLabel + %32 = OpFunctionCall %void %min_c76fa6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %min_c76fa6 + %34 = OpLabel + %35 = OpFunctionCall %void %min_c76fa6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.wgsl index 0de54deb36..c624b7e38f 100644 --- a/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/min/c76fa6.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn min_c76fa6() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : vec4 = min(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl b/test/tint/builtins/gen/var/mix/0c8c33.wgsl index debeaf2c82..ede228c4ca 100644 --- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl +++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl @@ -25,9 +25,9 @@ // fn mix(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn mix_0c8c33() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = vec3(1.f); var res: vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.dxc.hlsl index ff0238b6a6..575d95d3cc 100644 --- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_0c8c33() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.fxc.hlsl index ff0238b6a6..575d95d3cc 100644 --- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void mix_0c8c33() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.glsl index 46331a8e2b..b6a83cf52c 100644 --- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void mix_0c8c33() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void mix_0c8c33() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void mix_0c8c33() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.msl index 0fe7746dec..fb8ce73366 100644 --- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_0c8c33() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); - float3 arg_2 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); + float3 arg_2 = float3(1.0f); float3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.spvasm index d741ebda8b..945a11f392 100644 --- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %27 = OpTypeFunction %v4float %mix_0c8c33 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %arg_2 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v3float %arg_0 - %22 = OpLoad %v3float %arg_1 - %23 = OpLoad %v3float %arg_2 - %19 = OpExtInst %v3float %20 FMix %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %arg_2 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v3float %arg_0 + %24 = OpLoad %v3float %arg_1 + %25 = OpLoad %v3float %arg_2 + %21 = OpExtInst %v3float %22 FMix %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %mix_0c8c33 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %mix_0c8c33 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %mix_0c8c33 + %35 = OpLabel + %36 = OpFunctionCall %void %mix_0c8c33 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %mix_0c8c33 + %38 = OpLabel + %39 = OpFunctionCall %void %mix_0c8c33 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.wgsl index 09f0497b4f..5cac533bd8 100644 --- a/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/0c8c33.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn mix_0c8c33() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = vec3(1.0f); var res : vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl b/test/tint/builtins/gen/var/mix/1faeb1.wgsl index 111a5717a8..d86d25ab7f 100644 --- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl +++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl @@ -25,9 +25,9 @@ // fn mix(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32> fn mix_1faeb1() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = 1.0; + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = 1.f; var res: vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.dxc.hlsl index 8be22c588e..849c498a22 100644 --- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void mix_1faeb1() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float arg_2 = 1.0f; float4 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.fxc.hlsl index 8be22c588e..849c498a22 100644 --- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void mix_1faeb1() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float arg_2 = 1.0f; float4 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.glsl index 1d79c6adfa..7fbecbbe08 100644 --- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void mix_1faeb1() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float arg_2 = 1.0f; vec4 res = mix(arg_0, arg_1, arg_2); } @@ -24,8 +24,8 @@ void main() { precision mediump float; void mix_1faeb1() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float arg_2 = 1.0f; vec4 res = mix(arg_0, arg_1, arg_2); } @@ -41,8 +41,8 @@ void main() { #version 310 es void mix_1faeb1() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float arg_2 = 1.0f; vec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.msl index a2eb9bad40..1707059509 100644 --- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void mix_1faeb1() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float arg_2 = 1.0f; float4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.spvasm index 5cfd296a2d..787c9a82eb 100644 --- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,47 +34,48 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_float = OpTypePointer Function %float - %27 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %mix_1faeb1 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %arg_2 = OpVariable %_ptr_Function_float Function %8 - %24 = OpVariable %_ptr_Function_v4float Function %5 + %25 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 + OpStore %arg_0 %14 + OpStore %arg_1 %14 OpStore %arg_2 %float_1 - %21 = OpLoad %v4float %arg_0 - %22 = OpLoad %v4float %arg_1 - %23 = OpLoad %float %arg_2 - %25 = OpCompositeConstruct %v4float %23 %23 %23 %23 - %19 = OpExtInst %v4float %20 FMix %21 %22 %25 - OpStore %res %19 + %22 = OpLoad %v4float %arg_0 + %23 = OpLoad %v4float %arg_1 + %24 = OpLoad %float %arg_2 + %26 = OpCompositeConstruct %v4float %24 %24 %24 %24 + %20 = OpExtInst %v4float %21 FMix %22 %23 %26 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %mix_1faeb1 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %mix_1faeb1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_1faeb1 + %36 = OpLabel + %37 = OpFunctionCall %void %mix_1faeb1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %mix_1faeb1 + %39 = OpLabel + %40 = OpFunctionCall %void %mix_1faeb1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.wgsl index 4253d4ac70..0bd8c68f00 100644 --- a/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/1faeb1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn mix_1faeb1() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = 1.0; + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = 1.0f; var res : vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl b/test/tint/builtins/gen/var/mix/2fadab.wgsl index e8c3593b69..d36e793635 100644 --- a/test/tint/builtins/gen/var/mix/2fadab.wgsl +++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl @@ -25,9 +25,9 @@ // fn mix(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32> fn mix_2fadab() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = 1.0; + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = 1.f; var res: vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.dxc.hlsl index ae442e03a5..f46a543a7a 100644 --- a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void mix_2fadab() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float arg_2 = 1.0f; float2 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.fxc.hlsl index ae442e03a5..f46a543a7a 100644 --- a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void mix_2fadab() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float arg_2 = 1.0f; float2 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.glsl index 7e580edff7..cb94e51add 100644 --- a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void mix_2fadab() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float arg_2 = 1.0f; vec2 res = mix(arg_0, arg_1, arg_2); } @@ -24,8 +24,8 @@ void main() { precision mediump float; void mix_2fadab() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float arg_2 = 1.0f; vec2 res = mix(arg_0, arg_1, arg_2); } @@ -41,8 +41,8 @@ void main() { #version 310 es void mix_2fadab() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float arg_2 = 1.0f; vec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.msl index 8f55a01e15..ad998d733c 100644 --- a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void mix_2fadab() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float arg_2 = 1.0f; float2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.spvasm index f5cb0c6e7d..4e77aa1c28 100644 --- a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 43 ; Schema: 0 OpCapability Shader - %22 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,48 +35,49 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeFunction %v4float + %30 = OpTypeFunction %v4float %mix_2fadab = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 %arg_2 = OpVariable %_ptr_Function_float Function %8 - %26 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 + %27 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 OpStore %arg_2 %float_1 - %23 = OpLoad %v2float %arg_0 - %24 = OpLoad %v2float %arg_1 - %25 = OpLoad %float %arg_2 - %27 = OpCompositeConstruct %v2float %25 %25 - %21 = OpExtInst %v2float %22 FMix %23 %24 %27 - OpStore %res %21 + %24 = OpLoad %v2float %arg_0 + %25 = OpLoad %v2float %arg_1 + %26 = OpLoad %float %arg_2 + %28 = OpCompositeConstruct %v2float %26 %26 + %22 = OpExtInst %v2float %23 FMix %24 %25 %28 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %mix_2fadab +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %mix_2fadab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %mix_2fadab + %38 = OpLabel + %39 = OpFunctionCall %void %mix_2fadab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %mix_2fadab + %41 = OpLabel + %42 = OpFunctionCall %void %mix_2fadab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.wgsl index 615c3ebde5..82845ab7b9 100644 --- a/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/2fadab.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn mix_2fadab() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = 1.0; + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = 1.0f; var res : vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl b/test/tint/builtins/gen/var/mix/315264.wgsl index 90865bb6df..17604fc810 100644 --- a/test/tint/builtins/gen/var/mix/315264.wgsl +++ b/test/tint/builtins/gen/var/mix/315264.wgsl @@ -25,9 +25,9 @@ // fn mix(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32> fn mix_315264() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = 1.0; + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = 1.f; var res: vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.dxc.hlsl index d9674f4a1e..64aa63f195 100644 --- a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void mix_315264() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float arg_2 = 1.0f; float3 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.fxc.hlsl index d9674f4a1e..64aa63f195 100644 --- a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void mix_315264() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float arg_2 = 1.0f; float3 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.glsl index 5e3fea1309..ee1b5a76ce 100644 --- a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void mix_315264() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float arg_2 = 1.0f; vec3 res = mix(arg_0, arg_1, arg_2); } @@ -24,8 +24,8 @@ void main() { precision mediump float; void mix_315264() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float arg_2 = 1.0f; vec3 res = mix(arg_0, arg_1, arg_2); } @@ -41,8 +41,8 @@ void main() { #version 310 es void mix_315264() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float arg_2 = 1.0f; vec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.msl index 59819cc216..0b75b9212f 100644 --- a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void mix_315264() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float arg_2 = 1.0f; float3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.spvasm index d5f96cec4f..c3dcf6299f 100644 --- a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 43 ; Schema: 0 OpCapability Shader - %22 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,48 +35,49 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeFunction %v4float + %30 = OpTypeFunction %v4float %mix_315264 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 %arg_2 = OpVariable %_ptr_Function_float Function %8 - %26 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 + %27 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 OpStore %arg_2 %float_1 - %23 = OpLoad %v3float %arg_0 - %24 = OpLoad %v3float %arg_1 - %25 = OpLoad %float %arg_2 - %27 = OpCompositeConstruct %v3float %25 %25 %25 - %21 = OpExtInst %v3float %22 FMix %23 %24 %27 - OpStore %res %21 + %24 = OpLoad %v3float %arg_0 + %25 = OpLoad %v3float %arg_1 + %26 = OpLoad %float %arg_2 + %28 = OpCompositeConstruct %v3float %26 %26 %26 + %22 = OpExtInst %v3float %23 FMix %24 %25 %28 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %mix_315264 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %mix_315264 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %mix_315264 + %38 = OpLabel + %39 = OpFunctionCall %void %mix_315264 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %mix_315264 + %41 = OpLabel + %42 = OpFunctionCall %void %mix_315264 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.wgsl index ee53b30dd8..209ecade6a 100644 --- a/test/tint/builtins/gen/var/mix/315264.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/315264.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn mix_315264() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = 1.0; + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = 1.0f; var res : vec3 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/4f0b5e.wgsl b/test/tint/builtins/gen/var/mix/4f0b5e.wgsl index f3088928cb..cb858b7307 100644 --- a/test/tint/builtins/gen/var/mix/4f0b5e.wgsl +++ b/test/tint/builtins/gen/var/mix/4f0b5e.wgsl @@ -25,9 +25,9 @@ // fn mix(f32, f32, f32) -> f32 fn mix_4f0b5e() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; + var arg_2 = 1.f; var res: f32 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.wgsl index e597146a77..3543079c05 100644 --- a/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/4f0b5e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn mix_4f0b5e() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; + var arg_2 = 1.0f; var res : f32 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl b/test/tint/builtins/gen/var/mix/6f8adc.wgsl index c1efe6ba4b..c83a5c76f0 100644 --- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl +++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl @@ -25,9 +25,9 @@ // fn mix(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn mix_6f8adc() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = vec2(1.f); var res: vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.dxc.hlsl index cdfac7bc76..78b6a371c2 100644 --- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_6f8adc() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.fxc.hlsl index cdfac7bc76..78b6a371c2 100644 --- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void mix_6f8adc() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.glsl index a9e601d162..d1d9e5a37c 100644 --- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void mix_6f8adc() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void mix_6f8adc() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void mix_6f8adc() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.msl index 8f3cf6ff52..d81240b448 100644 --- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_6f8adc() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); - float2 arg_2 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); + float2 arg_2 = float2(1.0f); float2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.spvasm index 2d989aa6a3..d2018979b4 100644 --- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %27 = OpTypeFunction %v4float %mix_6f8adc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %arg_2 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v2float %arg_0 - %22 = OpLoad %v2float %arg_1 - %23 = OpLoad %v2float %arg_2 - %19 = OpExtInst %v2float %20 FMix %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %arg_2 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v2float %arg_0 + %24 = OpLoad %v2float %arg_1 + %25 = OpLoad %v2float %arg_2 + %21 = OpExtInst %v2float %22 FMix %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %mix_6f8adc +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %mix_6f8adc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %mix_6f8adc + %35 = OpLabel + %36 = OpFunctionCall %void %mix_6f8adc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %mix_6f8adc + %38 = OpLabel + %39 = OpFunctionCall %void %mix_6f8adc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.wgsl index fad88d5fb7..5d5ab3c279 100644 --- a/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/6f8adc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn mix_6f8adc() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = vec2(1.0f); var res : vec2 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl b/test/tint/builtins/gen/var/mix/c37ede.wgsl index 3463524445..593ac774e3 100644 --- a/test/tint/builtins/gen/var/mix/c37ede.wgsl +++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl @@ -25,9 +25,9 @@ // fn mix(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn mix_c37ede() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = vec4(1.f); var res: vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.dxc.hlsl index 2ec722c26e..202b6a5bc7 100644 --- a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void mix_c37ede() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.fxc.hlsl index 2ec722c26e..202b6a5bc7 100644 --- a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void mix_c37ede() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = lerp(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.glsl b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.glsl index eee9b05658..2642b1ce86 100644 --- a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void mix_c37ede() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void mix_c37ede() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void mix_c37ede() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.msl b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.msl index 6ee771e0f7..58c02b51b3 100644 --- a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void mix_c37ede() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); - float4 arg_2 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); + float4 arg_2 = float4(1.0f); float4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.spvasm b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.spvasm index cca18b4dde..548ba53ad8 100644 --- a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,44 +34,45 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %25 = OpTypeFunction %v4float %mix_c37ede = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - OpStore %arg_2 %5 - %19 = OpLoad %v4float %arg_0 - %20 = OpLoad %v4float %arg_1 - %21 = OpLoad %v4float %arg_2 - %17 = OpExtInst %v4float %18 FMix %19 %20 %21 - OpStore %res %17 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + OpStore %arg_2 %14 + %21 = OpLoad %v4float %arg_0 + %22 = OpLoad %v4float %arg_1 + %23 = OpLoad %v4float %arg_2 + %19 = OpExtInst %v4float %20 FMix %21 %22 %23 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %mix_c37ede +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %mix_c37ede OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %mix_c37ede + %33 = OpLabel + %34 = OpFunctionCall %void %mix_c37ede OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %mix_c37ede + %36 = OpLabel + %37 = OpFunctionCall %void %mix_c37ede OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.wgsl b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.wgsl index 7a073a3da5..6fb66e2eb9 100644 --- a/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/mix/c37ede.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn mix_c37ede() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = vec4(1.0f); var res : vec4 = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/modf/180fed.wgsl b/test/tint/builtins/gen/var/modf/180fed.wgsl index 225f1ab6c2..86941641f7 100644 --- a/test/tint/builtins/gen/var/modf/180fed.wgsl +++ b/test/tint/builtins/gen/var/modf/180fed.wgsl @@ -25,7 +25,7 @@ // fn modf(f32) -> __modf_result fn modf_180fed() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/180fed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/180fed.wgsl.expected.wgsl index b9189cb9c8..9b9d885b39 100644 --- a/test/tint/builtins/gen/var/modf/180fed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/180fed.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_180fed() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/9b75f7.wgsl b/test/tint/builtins/gen/var/modf/9b75f7.wgsl index 8f45d4384f..e310ad3960 100644 --- a/test/tint/builtins/gen/var/modf/9b75f7.wgsl +++ b/test/tint/builtins/gen/var/modf/9b75f7.wgsl @@ -25,7 +25,7 @@ // fn modf(vec<3, f32>) -> __modf_result_vec<3> fn modf_9b75f7() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.dxc.hlsl index 4eacd2ce9e..3ced5276a0 100644 --- a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec3 tint_modf(float3 param_0) { } void modf_9b75f7() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; modf_result_vec3 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.fxc.hlsl index 4eacd2ce9e..3ced5276a0 100644 --- a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec3 tint_modf(float3 param_0) { } void modf_9b75f7() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; modf_result_vec3 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.glsl index 3ad1da37b8..857d89ea23 100644 --- a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.glsl @@ -13,7 +13,7 @@ modf_result_vec3 tint_modf(vec3 param_0) { void modf_9b75f7() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); modf_result_vec3 res = tint_modf(arg_0); } @@ -46,7 +46,7 @@ modf_result_vec3 tint_modf(vec3 param_0) { void modf_9b75f7() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); modf_result_vec3 res = tint_modf(arg_0); } @@ -73,7 +73,7 @@ modf_result_vec3 tint_modf(vec3 param_0) { void modf_9b75f7() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); modf_result_vec3 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.msl index 704fdd5ee9..465974d68b 100644 --- a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec3 tint_modf(float3 param_0) { } void modf_9b75f7() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); modf_result_vec3 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.spvasm index 23f76f32bf..247b3bbd9b 100644 --- a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float %__modf_result_vec3 = OpTypeStruct %v3float %v3float %_ptr_Function___modf_result_vec3 = OpTypePointer Function %__modf_result_vec3 - %23 = OpConstantNull %__modf_result_vec3 - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %__modf_result_vec3 + %26 = OpTypeFunction %v4float %modf_9b75f7 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function___modf_result_vec3 Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %v3float %arg_0 - %17 = OpExtInst %__modf_result_vec3 %19 ModfStruct %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function___modf_result_vec3 Function %25 + OpStore %arg_0 %15 + %22 = OpLoad %v3float %arg_0 + %19 = OpExtInst %__modf_result_vec3 %21 ModfStruct %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %modf_9b75f7 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %modf_9b75f7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %modf_9b75f7 + %34 = OpLabel + %35 = OpFunctionCall %void %modf_9b75f7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %modf_9b75f7 + %37 = OpLabel + %38 = OpFunctionCall %void %modf_9b75f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.wgsl index 57c7dd3de3..04423342fb 100644 --- a/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/9b75f7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_9b75f7() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl index f677d91377..3d70761e7e 100644 --- a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl +++ b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl @@ -25,7 +25,7 @@ // fn modf(vec<4, f32>) -> __modf_result_vec<4> fn modf_ec2dbc() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.dxc.hlsl index fa4c2033cc..171368d515 100644 --- a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec4 tint_modf(float4 param_0) { } void modf_ec2dbc() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; modf_result_vec4 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.fxc.hlsl index fa4c2033cc..171368d515 100644 --- a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec4 tint_modf(float4 param_0) { } void modf_ec2dbc() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; modf_result_vec4 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.glsl index 70f8ad6f77..891485b2a0 100644 --- a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.glsl @@ -13,7 +13,7 @@ modf_result_vec4 tint_modf(vec4 param_0) { void modf_ec2dbc() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); modf_result_vec4 res = tint_modf(arg_0); } @@ -46,7 +46,7 @@ modf_result_vec4 tint_modf(vec4 param_0) { void modf_ec2dbc() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); modf_result_vec4 res = tint_modf(arg_0); } @@ -73,7 +73,7 @@ modf_result_vec4 tint_modf(vec4 param_0) { void modf_ec2dbc() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); modf_result_vec4 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.msl index ee835c7e16..58350e3675 100644 --- a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec4 tint_modf(float4 param_0) { } void modf_ec2dbc() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); modf_result_vec4 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.spvasm index e29d1764ef..3b90f6d0de 100644 --- a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -37,41 +37,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %__modf_result_vec4 = OpTypeStruct %v4float %v4float %_ptr_Function___modf_result_vec4 = OpTypePointer Function %__modf_result_vec4 - %21 = OpConstantNull %__modf_result_vec4 - %22 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %23 = OpConstantNull %__modf_result_vec4 + %24 = OpTypeFunction %v4float %modf_ec2dbc = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 - %res = OpVariable %_ptr_Function___modf_result_vec4 Function %21 - OpStore %arg_0 %5 - %18 = OpLoad %v4float %arg_0 - %15 = OpExtInst %__modf_result_vec4 %17 ModfStruct %18 - OpStore %res %15 + %res = OpVariable %_ptr_Function___modf_result_vec4 Function %23 + OpStore %arg_0 %14 + %20 = OpLoad %v4float %arg_0 + %17 = OpExtInst %__modf_result_vec4 %19 ModfStruct %20 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %modf_ec2dbc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %modf_ec2dbc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %modf_ec2dbc + %32 = OpLabel + %33 = OpFunctionCall %void %modf_ec2dbc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %modf_ec2dbc + %35 = OpLabel + %36 = OpFunctionCall %void %modf_ec2dbc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.wgsl index 3e6ab82707..5e010e0608 100644 --- a/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/ec2dbc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_ec2dbc() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/f5f20d.wgsl b/test/tint/builtins/gen/var/modf/f5f20d.wgsl index 2890b35f92..d2b1eb4787 100644 --- a/test/tint/builtins/gen/var/modf/f5f20d.wgsl +++ b/test/tint/builtins/gen/var/modf/f5f20d.wgsl @@ -25,7 +25,7 @@ // fn modf(vec<2, f32>) -> __modf_result_vec<2> fn modf_f5f20d() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.dxc.hlsl index 0827e24ed2..85b34aaf4e 100644 --- a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.dxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec2 tint_modf(float2 param_0) { } void modf_f5f20d() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; modf_result_vec2 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.fxc.hlsl index 0827e24ed2..85b34aaf4e 100644 --- a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.fxc.hlsl @@ -10,7 +10,7 @@ modf_result_vec2 tint_modf(float2 param_0) { } void modf_f5f20d() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; modf_result_vec2 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.glsl b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.glsl index 9cff88042b..9e92000352 100644 --- a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.glsl @@ -13,7 +13,7 @@ modf_result_vec2 tint_modf(vec2 param_0) { void modf_f5f20d() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); modf_result_vec2 res = tint_modf(arg_0); } @@ -46,7 +46,7 @@ modf_result_vec2 tint_modf(vec2 param_0) { void modf_f5f20d() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); modf_result_vec2 res = tint_modf(arg_0); } @@ -73,7 +73,7 @@ modf_result_vec2 tint_modf(vec2 param_0) { void modf_f5f20d() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); modf_result_vec2 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.msl b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.msl index 104caf85c7..14d0f6f49a 100644 --- a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.msl @@ -13,7 +13,7 @@ modf_result_vec2 tint_modf(float2 param_0) { } void modf_f5f20d() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); modf_result_vec2 res = tint_modf(arg_0); } diff --git a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.spvasm index 474fcedd67..0b24482ec3 100644 --- a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -38,42 +38,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %__modf_result_vec2 = OpTypeStruct %v2float %v2float %_ptr_Function___modf_result_vec2 = OpTypePointer Function %__modf_result_vec2 - %23 = OpConstantNull %__modf_result_vec2 - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %__modf_result_vec2 + %26 = OpTypeFunction %v4float %modf_f5f20d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function___modf_result_vec2 Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %v2float %arg_0 - %17 = OpExtInst %__modf_result_vec2 %19 ModfStruct %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function___modf_result_vec2 Function %25 + OpStore %arg_0 %15 + %22 = OpLoad %v2float %arg_0 + %19 = OpExtInst %__modf_result_vec2 %21 ModfStruct %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %modf_f5f20d +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %modf_f5f20d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %modf_f5f20d + %34 = OpLabel + %35 = OpFunctionCall %void %modf_f5f20d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %modf_f5f20d + %37 = OpLabel + %38 = OpFunctionCall %void %modf_f5f20d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.wgsl index 9866f5bcff..0e23a250a2 100644 --- a/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/modf/f5f20d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn modf_f5f20d() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res = modf(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl index c550bdedbb..8c28e5125c 100644 --- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl +++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl @@ -25,7 +25,7 @@ // fn normalize(vec<3, f32>) -> vec<3, f32> fn normalize_64d8c0() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.dxc.hlsl index 973bdd54a3..1d5044b9d3 100644 --- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_64d8c0() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.fxc.hlsl index 973bdd54a3..1d5044b9d3 100644 --- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void normalize_64d8c0() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.glsl index 3ec8eacaef..21405459d9 100644 --- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void normalize_64d8c0() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = normalize(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void normalize_64d8c0() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = normalize(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void normalize_64d8c0() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.msl index c29bdaacdc..a1177031ba 100644 --- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_64d8c0() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.spvasm index 5f6e51d2b4..d031f1e984 100644 --- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %normalize_64d8c0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Normalize %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Normalize %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %normalize_64d8c0 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %normalize_64d8c0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %normalize_64d8c0 + %31 = OpLabel + %32 = OpFunctionCall %void %normalize_64d8c0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %normalize_64d8c0 + %34 = OpLabel + %35 = OpFunctionCall %void %normalize_64d8c0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.wgsl index c5241b5d2f..a014236bbb 100644 --- a/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/normalize/64d8c0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn normalize_64d8c0() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl index 5ded0d4186..c626fe7230 100644 --- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl +++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl @@ -25,7 +25,7 @@ // fn normalize(vec<4, f32>) -> vec<4, f32> fn normalize_9a0aab() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.dxc.hlsl index 080baf1fbb..f5898efe1f 100644 --- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_9a0aab() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.fxc.hlsl index 080baf1fbb..f5898efe1f 100644 --- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void normalize_9a0aab() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.glsl index 1fd1f91222..7ed5366702 100644 --- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void normalize_9a0aab() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = normalize(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void normalize_9a0aab() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = normalize(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void normalize_9a0aab() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.msl index 7a42fc081e..e808882638 100644 --- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_9a0aab() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.spvasm index 1711dc4c6d..1e8195c468 100644 --- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %normalize_9a0aab = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Normalize %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Normalize %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %normalize_9a0aab +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %normalize_9a0aab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %normalize_9a0aab + %29 = OpLabel + %30 = OpFunctionCall %void %normalize_9a0aab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %normalize_9a0aab + %32 = OpLabel + %33 = OpFunctionCall %void %normalize_9a0aab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.wgsl index ad629d05c9..2ac1d49c1f 100644 --- a/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/normalize/9a0aab.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn normalize_9a0aab() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl index 91c311b04c..974b3d3f90 100644 --- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl +++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl @@ -25,7 +25,7 @@ // fn normalize(vec<2, f32>) -> vec<2, f32> fn normalize_fc2ef1() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.dxc.hlsl index 6ec72e1818..9d24fee03b 100644 --- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void normalize_fc2ef1() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.fxc.hlsl index 6ec72e1818..9d24fee03b 100644 --- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void normalize_fc2ef1() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.glsl b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.glsl index a4726ccf02..c9ff24a79a 100644 --- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void normalize_fc2ef1() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = normalize(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void normalize_fc2ef1() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = normalize(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void normalize_fc2ef1() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.msl b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.msl index 88ebab80a2..6350353dda 100644 --- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void normalize_fc2ef1() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.spvasm index bed8056ca9..3294d0268d 100644 --- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %normalize_fc2ef1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Normalize %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Normalize %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %normalize_fc2ef1 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %normalize_fc2ef1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %normalize_fc2ef1 + %31 = OpLabel + %32 = OpFunctionCall %void %normalize_fc2ef1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %normalize_fc2ef1 + %34 = OpLabel + %35 = OpFunctionCall %void %normalize_fc2ef1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.wgsl index badf34dc40..9d670b7629 100644 --- a/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/normalize/fc2ef1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn normalize_fc2ef1() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = normalize(arg_0); } diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl b/test/tint/builtins/gen/var/pow/04a908.wgsl index 11ed4262eb..c037dd533d 100644 --- a/test/tint/builtins/gen/var/pow/04a908.wgsl +++ b/test/tint/builtins/gen/var/pow/04a908.wgsl @@ -25,8 +25,8 @@ // fn pow(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn pow_04a908() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: vec4 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.dxc.hlsl index 1b851b8caa..1627d183a6 100644 --- a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void pow_04a908() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.fxc.hlsl index 1b851b8caa..1627d183a6 100644 --- a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void pow_04a908() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.glsl index 2784abebe3..73fb0f1c84 100644 --- a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void pow_04a908() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = pow(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void pow_04a908() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = pow(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void pow_04a908() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.msl index 4a9226d910..efc8eebe0d 100644 --- a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void pow_04a908() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float4 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.spvasm index 065f1f2449..1f127be14e 100644 --- a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,41 +33,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %23 = OpTypeFunction %v4float %pow_04a908 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %18 = OpLoad %v4float %arg_0 - %19 = OpLoad %v4float %arg_1 - %16 = OpExtInst %v4float %17 Pow %18 %19 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %20 = OpLoad %v4float %arg_0 + %21 = OpLoad %v4float %arg_1 + %18 = OpExtInst %v4float %19 Pow %20 %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %pow_04a908 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %pow_04a908 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %pow_04a908 + %31 = OpLabel + %32 = OpFunctionCall %void %pow_04a908 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %pow_04a908 + %34 = OpLabel + %35 = OpFunctionCall %void %pow_04a908 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.wgsl index 77389a39a0..4140a311ba 100644 --- a/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/04a908.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn pow_04a908() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : vec4 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/46e029.wgsl b/test/tint/builtins/gen/var/pow/46e029.wgsl index 6f67b51400..8ca320b206 100644 --- a/test/tint/builtins/gen/var/pow/46e029.wgsl +++ b/test/tint/builtins/gen/var/pow/46e029.wgsl @@ -25,8 +25,8 @@ // fn pow(f32, f32) -> f32 fn pow_46e029() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; var res: f32 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.wgsl index 1a23381dd9..78398b877a 100644 --- a/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/46e029.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn pow_46e029() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; var res : f32 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl b/test/tint/builtins/gen/var/pow/4a46c9.wgsl index 077b87e964..a15991f059 100644 --- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl +++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl @@ -25,8 +25,8 @@ // fn pow(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn pow_4a46c9() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: vec3 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.dxc.hlsl index 627b2e00fe..bcc8f22ea8 100644 --- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void pow_4a46c9() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.fxc.hlsl index 627b2e00fe..bcc8f22ea8 100644 --- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void pow_4a46c9() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.glsl index 355dd52e23..b01d4b07c7 100644 --- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void pow_4a46c9() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = pow(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void pow_4a46c9() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = pow(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void pow_4a46c9() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.msl index fe98d46f79..91d2b2d806 100644 --- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void pow_4a46c9() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float3 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.spvasm index aff9061001..d5f5ebf0e4 100644 --- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %pow_4a46c9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %v3float %19 Pow %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %v3float %21 Pow %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %pow_4a46c9 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %pow_4a46c9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %pow_4a46c9 + %33 = OpLabel + %34 = OpFunctionCall %void %pow_4a46c9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %pow_4a46c9 + %36 = OpLabel + %37 = OpFunctionCall %void %pow_4a46c9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.wgsl index 8e2b88c568..a4ec757756 100644 --- a/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/4a46c9.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn pow_4a46c9() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : vec3 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl b/test/tint/builtins/gen/var/pow/e60ea5.wgsl index 6cf11daa99..0f90946e90 100644 --- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl +++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl @@ -25,8 +25,8 @@ // fn pow(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn pow_e60ea5() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: vec2 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.dxc.hlsl index 696617b479..3b7f18fe3c 100644 --- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void pow_e60ea5() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.fxc.hlsl index 696617b479..3b7f18fe3c 100644 --- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void pow_e60ea5() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.glsl b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.glsl index b1537ac83c..0ad8d4e513 100644 --- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void pow_e60ea5() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = pow(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void pow_e60ea5() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = pow(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void pow_e60ea5() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.msl b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.msl index a0a2d50c62..24f95d3011 100644 --- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void pow_e60ea5() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float2 res = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.spvasm index 0d1a493c46..a31e014a53 100644 --- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %25 = OpTypeFunction %v4float %pow_e60ea5 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v2float %arg_0 - %21 = OpLoad %v2float %arg_1 - %18 = OpExtInst %v2float %19 Pow %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v2float %arg_0 + %23 = OpLoad %v2float %arg_1 + %20 = OpExtInst %v2float %21 Pow %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %pow_e60ea5 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %pow_e60ea5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %pow_e60ea5 + %33 = OpLabel + %34 = OpFunctionCall %void %pow_e60ea5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %pow_e60ea5 + %36 = OpLabel + %37 = OpFunctionCall %void %pow_e60ea5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.wgsl index c04fdb6a5d..0c7df27b58 100644 --- a/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pow/e60ea5.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn pow_e60ea5() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : vec2 = pow(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/radians/09b7fc.wgsl b/test/tint/builtins/gen/var/radians/09b7fc.wgsl index dab48202ca..59c6cc3a9d 100644 --- a/test/tint/builtins/gen/var/radians/09b7fc.wgsl +++ b/test/tint/builtins/gen/var/radians/09b7fc.wgsl @@ -25,7 +25,7 @@ // fn radians(vec<4, f32>) -> vec<4, f32> fn radians_09b7fc() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.dxc.hlsl index 4f9b37da10..53dad5bdcb 100644 --- a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float4 tint_radians(float4 param_0) { } void radians_09b7fc() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.fxc.hlsl index 4f9b37da10..53dad5bdcb 100644 --- a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float4 tint_radians(float4 param_0) { } void radians_09b7fc() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.glsl index d0f2979bad..093e1646de 100644 --- a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec4 tint_radians(vec4 param_0) { void radians_09b7fc() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_radians(arg_0); } @@ -32,7 +32,7 @@ vec4 tint_radians(vec4 param_0) { void radians_09b7fc() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_radians(arg_0); } @@ -52,7 +52,7 @@ vec4 tint_radians(vec4 param_0) { void radians_09b7fc() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.msl index 69bafde5b3..eabe094976 100644 --- a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.msl @@ -7,7 +7,7 @@ float4 tint_radians(float4 param_0) { } void radians_09b7fc() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.spvasm index 08873d0732..0d4dee7895 100644 --- a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %radians_09b7fc = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Radians %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Radians %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %radians_09b7fc +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %radians_09b7fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %radians_09b7fc + %29 = OpLabel + %30 = OpFunctionCall %void %radians_09b7fc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %radians_09b7fc + %32 = OpLabel + %33 = OpFunctionCall %void %radians_09b7fc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.wgsl index d07f72cb6d..7fc38b5b1c 100644 --- a/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/09b7fc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_09b7fc() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/61687a.wgsl b/test/tint/builtins/gen/var/radians/61687a.wgsl index 27093cb7eb..12e74a167d 100644 --- a/test/tint/builtins/gen/var/radians/61687a.wgsl +++ b/test/tint/builtins/gen/var/radians/61687a.wgsl @@ -25,7 +25,7 @@ // fn radians(vec<2, f32>) -> vec<2, f32> fn radians_61687a() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.dxc.hlsl index 6c128af580..690db4dc32 100644 --- a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float2 tint_radians(float2 param_0) { } void radians_61687a() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.fxc.hlsl index 6c128af580..690db4dc32 100644 --- a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float2 tint_radians(float2 param_0) { } void radians_61687a() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.glsl index 4e6f019afd..a6d0e9ab9c 100644 --- a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec2 tint_radians(vec2 param_0) { void radians_61687a() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_radians(arg_0); } @@ -32,7 +32,7 @@ vec2 tint_radians(vec2 param_0) { void radians_61687a() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_radians(arg_0); } @@ -52,7 +52,7 @@ vec2 tint_radians(vec2 param_0) { void radians_61687a() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.msl index 8f58a4bf6e..995b3cf209 100644 --- a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.msl @@ -7,7 +7,7 @@ float2 tint_radians(float2 param_0) { } void radians_61687a() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.spvasm index 2d21f8f76f..637f457f6a 100644 --- a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %radians_61687a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Radians %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Radians %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %radians_61687a +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %radians_61687a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %radians_61687a + %31 = OpLabel + %32 = OpFunctionCall %void %radians_61687a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %radians_61687a + %34 = OpLabel + %35 = OpFunctionCall %void %radians_61687a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.wgsl index 8b8146ec22..9719b4e261 100644 --- a/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/61687a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_61687a() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/6b0ff2.wgsl b/test/tint/builtins/gen/var/radians/6b0ff2.wgsl index 23cd90372d..386da894a2 100644 --- a/test/tint/builtins/gen/var/radians/6b0ff2.wgsl +++ b/test/tint/builtins/gen/var/radians/6b0ff2.wgsl @@ -25,7 +25,7 @@ // fn radians(f32) -> f32 fn radians_6b0ff2() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/6b0ff2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/6b0ff2.wgsl.expected.wgsl index e1de333956..a5d9253ae1 100644 --- a/test/tint/builtins/gen/var/radians/6b0ff2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/6b0ff2.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_6b0ff2() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/f96258.wgsl b/test/tint/builtins/gen/var/radians/f96258.wgsl index 6da511057c..6a090e9d58 100644 --- a/test/tint/builtins/gen/var/radians/f96258.wgsl +++ b/test/tint/builtins/gen/var/radians/f96258.wgsl @@ -25,7 +25,7 @@ // fn radians(vec<3, f32>) -> vec<3, f32> fn radians_f96258() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.dxc.hlsl index 352a0b1669..d67bb7d9e8 100644 --- a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.dxc.hlsl @@ -3,7 +3,7 @@ float3 tint_radians(float3 param_0) { } void radians_f96258() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.fxc.hlsl index 352a0b1669..d67bb7d9e8 100644 --- a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.fxc.hlsl @@ -3,7 +3,7 @@ float3 tint_radians(float3 param_0) { } void radians_f96258() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.glsl b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.glsl index e0d0b287f6..6ebac652cb 100644 --- a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.glsl @@ -6,7 +6,7 @@ vec3 tint_radians(vec3 param_0) { void radians_f96258() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_radians(arg_0); } @@ -32,7 +32,7 @@ vec3 tint_radians(vec3 param_0) { void radians_f96258() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_radians(arg_0); } @@ -52,7 +52,7 @@ vec3 tint_radians(vec3 param_0) { void radians_f96258() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.msl b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.msl index eb9013e51e..1eabde2976 100644 --- a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.msl @@ -7,7 +7,7 @@ float3 tint_radians(float3 param_0) { } void radians_f96258() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = tint_radians(arg_0); } diff --git a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.spvasm b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.spvasm index 3c05455bf2..b0f5711f9f 100644 --- a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %radians_f96258 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Radians %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Radians %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %radians_f96258 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %radians_f96258 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %radians_f96258 + %31 = OpLabel + %32 = OpFunctionCall %void %radians_f96258 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %radians_f96258 + %34 = OpLabel + %35 = OpFunctionCall %void %radians_f96258 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.wgsl b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.wgsl index 962df3e692..5a92c60683 100644 --- a/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/radians/f96258.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn radians_f96258() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = radians(arg_0); } diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl b/test/tint/builtins/gen/var/reflect/05357e.wgsl index 1dbb9ec13b..2bcba9d326 100644 --- a/test/tint/builtins/gen/var/reflect/05357e.wgsl +++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl @@ -25,8 +25,8 @@ // fn reflect(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn reflect_05357e() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: vec4 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.dxc.hlsl index 28d8c4e322..0cda7e5d85 100644 --- a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void reflect_05357e() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.fxc.hlsl index 28d8c4e322..0cda7e5d85 100644 --- a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void reflect_05357e() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.glsl index 2b9cec1995..adf9b8f1b6 100644 --- a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void reflect_05357e() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = reflect(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void reflect_05357e() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = reflect(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void reflect_05357e() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.msl index a0c716ba47..9742733591 100644 --- a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void reflect_05357e() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float4 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.spvasm index b3c6c7de6e..06d192d2ec 100644 --- a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,41 +33,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %23 = OpTypeFunction %v4float %reflect_05357e = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %18 = OpLoad %v4float %arg_0 - %19 = OpLoad %v4float %arg_1 - %16 = OpExtInst %v4float %17 Reflect %18 %19 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %20 = OpLoad %v4float %arg_0 + %21 = OpLoad %v4float %arg_1 + %18 = OpExtInst %v4float %19 Reflect %20 %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %reflect_05357e +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %reflect_05357e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %reflect_05357e + %31 = OpLabel + %32 = OpFunctionCall %void %reflect_05357e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reflect_05357e + %34 = OpLabel + %35 = OpFunctionCall %void %reflect_05357e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.wgsl index 8ce561c05d..c453132fd5 100644 --- a/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reflect/05357e.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn reflect_05357e() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : vec4 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl b/test/tint/builtins/gen/var/reflect/b61e10.wgsl index 0bf21285da..118ac270bc 100644 --- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl +++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl @@ -25,8 +25,8 @@ // fn reflect(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn reflect_b61e10() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: vec2 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.dxc.hlsl index c653e766a0..66924208b5 100644 --- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void reflect_b61e10() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.fxc.hlsl index c653e766a0..66924208b5 100644 --- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void reflect_b61e10() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.glsl index 716303eb5a..fe7a35a41b 100644 --- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void reflect_b61e10() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = reflect(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void reflect_b61e10() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = reflect(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void reflect_b61e10() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.msl index c2fe687af2..c565be7f93 100644 --- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void reflect_b61e10() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float2 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.spvasm index 268d6494f7..998b514c4a 100644 --- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %25 = OpTypeFunction %v4float %reflect_b61e10 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v2float %arg_0 - %21 = OpLoad %v2float %arg_1 - %18 = OpExtInst %v2float %19 Reflect %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v2float %arg_0 + %23 = OpLoad %v2float %arg_1 + %20 = OpExtInst %v2float %21 Reflect %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %reflect_b61e10 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %reflect_b61e10 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %reflect_b61e10 + %33 = OpLabel + %34 = OpFunctionCall %void %reflect_b61e10 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %reflect_b61e10 + %36 = OpLabel + %37 = OpFunctionCall %void %reflect_b61e10 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.wgsl index ec8317cec9..0a94288e77 100644 --- a/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reflect/b61e10.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn reflect_b61e10() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : vec2 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl index 5aabef0ef1..d033cca080 100644 --- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl +++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl @@ -25,8 +25,8 @@ // fn reflect(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn reflect_f47fdb() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: vec3 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.dxc.hlsl index bf902cd453..454cc0f47e 100644 --- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void reflect_f47fdb() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.fxc.hlsl index bf902cd453..454cc0f47e 100644 --- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void reflect_f47fdb() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.glsl b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.glsl index 1cb8b9bfb1..f2dd2c49d2 100644 --- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void reflect_f47fdb() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = reflect(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void reflect_f47fdb() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = reflect(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void reflect_f47fdb() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.msl b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.msl index abb89d33b5..6a48267772 100644 --- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void reflect_f47fdb() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float3 res = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.spvasm index db5cf48063..256904a9a2 100644 --- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %reflect_f47fdb = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %v3float %19 Reflect %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %v3float %21 Reflect %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %reflect_f47fdb +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %reflect_f47fdb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %reflect_f47fdb + %33 = OpLabel + %34 = OpFunctionCall %void %reflect_f47fdb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %reflect_f47fdb + %36 = OpLabel + %37 = OpFunctionCall %void %reflect_f47fdb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.wgsl index e1ae8d16c9..f0e8a241f9 100644 --- a/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reflect/f47fdb.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn reflect_f47fdb() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : vec3 = reflect(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl b/test/tint/builtins/gen/var/refract/7e02e6.wgsl index 9a440848f4..eabd9ef8ee 100644 --- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl +++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl @@ -25,9 +25,9 @@ // fn refract(vec<4, f32>, vec<4, f32>, f32) -> vec<4, f32> fn refract_7e02e6() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = 1.0; + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = 1.f; var res: vec4 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.dxc.hlsl index 87895aece3..420f537f9a 100644 --- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void refract_7e02e6() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float arg_2 = 1.0f; float4 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.fxc.hlsl index 87895aece3..420f537f9a 100644 --- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void refract_7e02e6() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float arg_2 = 1.0f; float4 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.glsl index 72c750d4b6..0f3be378df 100644 --- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void refract_7e02e6() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float arg_2 = 1.0f; vec4 res = refract(arg_0, arg_1, arg_2); } @@ -24,8 +24,8 @@ void main() { precision mediump float; void refract_7e02e6() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float arg_2 = 1.0f; vec4 res = refract(arg_0, arg_1, arg_2); } @@ -41,8 +41,8 @@ void main() { #version 310 es void refract_7e02e6() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); float arg_2 = 1.0f; vec4 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.msl index c0304bb5e0..e3336a1a8e 100644 --- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void refract_7e02e6() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float arg_2 = 1.0f; float4 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.spvasm index d40bbec0f9..d968b0b2e1 100644 --- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,45 +34,46 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_float = OpTypePointer Function %float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %refract_7e02e6 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %arg_2 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 + OpStore %arg_0 %14 + OpStore %arg_1 %14 OpStore %arg_2 %float_1 - %21 = OpLoad %v4float %arg_0 - %22 = OpLoad %v4float %arg_1 - %23 = OpLoad %float %arg_2 - %19 = OpExtInst %v4float %20 Refract %21 %22 %23 - OpStore %res %19 + %22 = OpLoad %v4float %arg_0 + %23 = OpLoad %v4float %arg_1 + %24 = OpLoad %float %arg_2 + %20 = OpExtInst %v4float %21 Refract %22 %23 %24 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %refract_7e02e6 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %refract_7e02e6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %refract_7e02e6 + %34 = OpLabel + %35 = OpFunctionCall %void %refract_7e02e6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %refract_7e02e6 + %37 = OpLabel + %38 = OpFunctionCall %void %refract_7e02e6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.wgsl index 178acc7654..1b09ad8ad6 100644 --- a/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/refract/7e02e6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn refract_7e02e6() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = 1.0; + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = 1.0f; var res : vec4 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl index e21cde5b93..deac9d542a 100644 --- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl +++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl @@ -25,9 +25,9 @@ // fn refract(vec<3, f32>, vec<3, f32>, f32) -> vec<3, f32> fn refract_cbc1d2() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = 1.0; + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = 1.f; var res: vec3 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.dxc.hlsl index bf241e068d..67f5603be5 100644 --- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void refract_cbc1d2() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float arg_2 = 1.0f; float3 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.fxc.hlsl index bf241e068d..67f5603be5 100644 --- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void refract_cbc1d2() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float arg_2 = 1.0f; float3 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.glsl index 248a460c5c..70113c87db 100644 --- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void refract_cbc1d2() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float arg_2 = 1.0f; vec3 res = refract(arg_0, arg_1, arg_2); } @@ -24,8 +24,8 @@ void main() { precision mediump float; void refract_cbc1d2() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float arg_2 = 1.0f; vec3 res = refract(arg_0, arg_1, arg_2); } @@ -41,8 +41,8 @@ void main() { #version 310 es void refract_cbc1d2() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); float arg_2 = 1.0f; vec3 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.msl index e9d61c08c8..7313ac6ac1 100644 --- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void refract_cbc1d2() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float arg_2 = 1.0f; float3 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.spvasm index d0498ff0da..e11f35dbc0 100644 --- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader - %22 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,46 +35,47 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %27 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %refract_cbc1d2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 %arg_2 = OpVariable %_ptr_Function_float Function %8 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 OpStore %arg_2 %float_1 - %23 = OpLoad %v3float %arg_0 - %24 = OpLoad %v3float %arg_1 - %25 = OpLoad %float %arg_2 - %21 = OpExtInst %v3float %22 Refract %23 %24 %25 - OpStore %res %21 + %24 = OpLoad %v3float %arg_0 + %25 = OpLoad %v3float %arg_1 + %26 = OpLoad %float %arg_2 + %22 = OpExtInst %v3float %23 Refract %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %refract_cbc1d2 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %refract_cbc1d2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %refract_cbc1d2 + %36 = OpLabel + %37 = OpFunctionCall %void %refract_cbc1d2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %refract_cbc1d2 + %39 = OpLabel + %40 = OpFunctionCall %void %refract_cbc1d2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.wgsl index 00ad761342..807c0eec13 100644 --- a/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/refract/cbc1d2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn refract_cbc1d2() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = 1.0; + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = 1.0f; var res : vec3 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl b/test/tint/builtins/gen/var/refract/cd905f.wgsl index a70ed45e27..402f08b671 100644 --- a/test/tint/builtins/gen/var/refract/cd905f.wgsl +++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl @@ -25,9 +25,9 @@ // fn refract(vec<2, f32>, vec<2, f32>, f32) -> vec<2, f32> fn refract_cd905f() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = 1.0; + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = 1.f; var res: vec2 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.dxc.hlsl index 6c5ef8a7aa..2fe95fd42c 100644 --- a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void refract_cd905f() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float arg_2 = 1.0f; float2 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.fxc.hlsl index 6c5ef8a7aa..2fe95fd42c 100644 --- a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void refract_cd905f() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float arg_2 = 1.0f; float2 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.glsl b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.glsl index 906e9f6305..530fad67eb 100644 --- a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void refract_cd905f() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float arg_2 = 1.0f; vec2 res = refract(arg_0, arg_1, arg_2); } @@ -24,8 +24,8 @@ void main() { precision mediump float; void refract_cd905f() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float arg_2 = 1.0f; vec2 res = refract(arg_0, arg_1, arg_2); } @@ -41,8 +41,8 @@ void main() { #version 310 es void refract_cd905f() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); float arg_2 = 1.0f; vec2 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.msl b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.msl index 8f9e3f1a2a..b9986c44f5 100644 --- a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void refract_cd905f() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float arg_2 = 1.0f; float2 res = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.spvasm index c062222ce1..4b74ab2de9 100644 --- a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader - %22 = OpExtInstImport "GLSL.std.450" + %23 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,46 +35,47 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %27 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %refract_cd905f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 %arg_2 = OpVariable %_ptr_Function_float Function %8 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 OpStore %arg_2 %float_1 - %23 = OpLoad %v2float %arg_0 - %24 = OpLoad %v2float %arg_1 - %25 = OpLoad %float %arg_2 - %21 = OpExtInst %v2float %22 Refract %23 %24 %25 - OpStore %res %21 + %24 = OpLoad %v2float %arg_0 + %25 = OpLoad %v2float %arg_1 + %26 = OpLoad %float %arg_2 + %22 = OpExtInst %v2float %23 Refract %24 %25 %26 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %refract_cd905f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %refract_cd905f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %refract_cd905f + %36 = OpLabel + %37 = OpFunctionCall %void %refract_cd905f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %refract_cd905f + %39 = OpLabel + %40 = OpFunctionCall %void %refract_cd905f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.wgsl index 3bd2166e5f..832641fdc0 100644 --- a/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/refract/cd905f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn refract_cd905f() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = 1.0; + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = 1.0f; var res : vec2 = refract(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl b/test/tint/builtins/gen/var/reverseBits/222177.wgsl index c0614a5e3a..1c7832ab97 100644 --- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<2, i32>) -> vec<2, i32> fn reverseBits_222177() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res: vec2 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.dxc.hlsl index 0e6556ff63..2f576da614 100644 --- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_222177() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = asint(reversebits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.fxc.hlsl index 0e6556ff63..2f576da614 100644 --- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_222177() { - int2 arg_0 = (0).xx; + int2 arg_0 = (1).xx; int2 res = asint(reversebits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.glsl b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.glsl index fe39948967..e3f8da2206 100644 --- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_222177() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = bitfieldReverse(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void reverseBits_222177() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = bitfieldReverse(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void reverseBits_222177() { - ivec2 arg_0 = ivec2(0); + ivec2 arg_0 = ivec2(1); ivec2 res = bitfieldReverse(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.msl b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.msl index f1c5c14959..c717678960 100644 --- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_222177() { - int2 arg_0 = int2(0); + int2 arg_0 = int2(1); int2 res = reverse_bits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.spvasm index 68e48e24dd..17502f6ecf 100644 --- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v2int + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_222177 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v2int %arg_0 - %18 = OpBitReverse %v2int %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v2int %arg_0 + %20 = OpBitReverse %v2int %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %reverseBits_222177 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %reverseBits_222177 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %reverseBits_222177 + %32 = OpLabel + %33 = OpFunctionCall %void %reverseBits_222177 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reverseBits_222177 + %35 = OpLabel + %36 = OpFunctionCall %void %reverseBits_222177 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.wgsl index b48e837304..52fc3b9df1 100644 --- a/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/222177.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_222177() { - var arg_0 = vec2(); + var arg_0 = vec2(1); var res : vec2 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl index 52f0ecd36c..ddc2986900 100644 --- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<4, u32>) -> vec<4, u32> fn reverseBits_35fea9() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res: vec4 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.dxc.hlsl index cfe947703f..cd247beed0 100644 --- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_35fea9() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = reversebits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.fxc.hlsl index cfe947703f..cd247beed0 100644 --- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_35fea9() { - uint4 arg_0 = (0u).xxxx; + uint4 arg_0 = (1u).xxxx; uint4 res = reversebits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.glsl b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.glsl index 095e3c29ab..d1dcef5303 100644 --- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_35fea9() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = bitfieldReverse(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void reverseBits_35fea9() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = bitfieldReverse(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void reverseBits_35fea9() { - uvec4 arg_0 = uvec4(0u); + uvec4 arg_0 = uvec4(1u); uvec4 res = bitfieldReverse(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.msl b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.msl index 796e6730d0..4844c1ec6e 100644 --- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_35fea9() { - uint4 arg_0 = uint4(0u); + uint4 arg_0 = uint4(1u); uint4 res = reverse_bits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.spvasm index ca1745563d..9348ffa8f3 100644 --- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v4uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_35fea9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v4uint %arg_0 - %18 = OpBitReverse %v4uint %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v4uint %arg_0 + %20 = OpBitReverse %v4uint %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %reverseBits_35fea9 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %reverseBits_35fea9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %reverseBits_35fea9 + %32 = OpLabel + %33 = OpFunctionCall %void %reverseBits_35fea9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reverseBits_35fea9 + %35 = OpLabel + %36 = OpFunctionCall %void %reverseBits_35fea9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.wgsl index 001c341212..72c7a8040f 100644 --- a/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/35fea9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_35fea9() { - var arg_0 = vec4(); + var arg_0 = vec4(1u); var res : vec4 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl index 180c3cbe4f..613e0de768 100644 --- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<4, i32>) -> vec<4, i32> fn reverseBits_4dbd6f() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res: vec4 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl index e89294502d..ae134e788c 100644 --- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_4dbd6f() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = asint(reversebits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl index e89294502d..ae134e788c 100644 --- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_4dbd6f() { - int4 arg_0 = (0).xxxx; + int4 arg_0 = (1).xxxx; int4 res = asint(reversebits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.glsl b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.glsl index fe23a67398..cf503b58f1 100644 --- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_4dbd6f() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = bitfieldReverse(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void reverseBits_4dbd6f() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = bitfieldReverse(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void reverseBits_4dbd6f() { - ivec4 arg_0 = ivec4(0); + ivec4 arg_0 = ivec4(1); ivec4 res = bitfieldReverse(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.msl b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.msl index 04ecef0b30..bbf569e5f8 100644 --- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_4dbd6f() { - int4 arg_0 = int4(0); + int4 arg_0 = int4(1); int4 res = reverse_bits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.spvasm index c2d1c94c2e..5d0079ccf3 100644 --- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v4int + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_4dbd6f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v4int %arg_0 - %18 = OpBitReverse %v4int %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v4int %arg_0 + %20 = OpBitReverse %v4int %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %reverseBits_4dbd6f +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %reverseBits_4dbd6f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %reverseBits_4dbd6f + %32 = OpLabel + %33 = OpFunctionCall %void %reverseBits_4dbd6f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reverseBits_4dbd6f + %35 = OpLabel + %36 = OpFunctionCall %void %reverseBits_4dbd6f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.wgsl index 3c0f6d8383..03df4481cd 100644 --- a/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/4dbd6f.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_4dbd6f() { - var arg_0 = vec4(); + var arg_0 = vec4(1); var res : vec4 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl index 6f3d2cbd85..00e1b9d574 100644 --- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<3, u32>) -> vec<3, u32> fn reverseBits_a6ccd4() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res: vec3 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl index 7592e9c39b..c2a6155a75 100644 --- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_a6ccd4() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = reversebits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl index 7592e9c39b..c2a6155a75 100644 --- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_a6ccd4() { - uint3 arg_0 = (0u).xxx; + uint3 arg_0 = (1u).xxx; uint3 res = reversebits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.glsl index cd9271ed8e..56b2a392fd 100644 --- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_a6ccd4() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = bitfieldReverse(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void reverseBits_a6ccd4() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = bitfieldReverse(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void reverseBits_a6ccd4() { - uvec3 arg_0 = uvec3(0u); + uvec3 arg_0 = uvec3(1u); uvec3 res = bitfieldReverse(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.msl b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.msl index d2d54c3eec..6f9406d255 100644 --- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_a6ccd4() { - uint3 arg_0 = uint3(0u); + uint3 arg_0 = uint3(1u); uint3 res = reverse_bits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.spvasm index db3b1535e6..c9ba300473 100644 --- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v3uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_a6ccd4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v3uint %arg_0 - %18 = OpBitReverse %v3uint %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v3uint %arg_0 + %20 = OpBitReverse %v3uint %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %reverseBits_a6ccd4 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %reverseBits_a6ccd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %reverseBits_a6ccd4 + %32 = OpLabel + %33 = OpFunctionCall %void %reverseBits_a6ccd4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reverseBits_a6ccd4 + %35 = OpLabel + %36 = OpFunctionCall %void %reverseBits_a6ccd4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.wgsl index 9dc94d0e80..3ec855fad4 100644 --- a/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/a6ccd4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_a6ccd4() { - var arg_0 = vec3(); + var arg_0 = vec3(1u); var res : vec3 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl index 13569e63f8..54ae3d5635 100644 --- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<3, i32>) -> vec<3, i32> fn reverseBits_c21bc1() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res: vec3 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.dxc.hlsl index 1676f541f5..30e09176dd 100644 --- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_c21bc1() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = asint(reversebits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.fxc.hlsl index 1676f541f5..30e09176dd 100644 --- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_c21bc1() { - int3 arg_0 = (0).xxx; + int3 arg_0 = (1).xxx; int3 res = asint(reversebits(asuint(arg_0))); } diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.glsl b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.glsl index 7ed60de577..e880e50f66 100644 --- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_c21bc1() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = bitfieldReverse(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void reverseBits_c21bc1() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = bitfieldReverse(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void reverseBits_c21bc1() { - ivec3 arg_0 = ivec3(0); + ivec3 arg_0 = ivec3(1); ivec3 res = bitfieldReverse(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.msl b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.msl index 3d23b80920..8c295160df 100644 --- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_c21bc1() { - int3 arg_0 = int3(0); + int3 arg_0 = int3(1); int3 res = reverse_bits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.spvasm index 71ecb17d90..147d95e440 100644 --- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v3int + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_c21bc1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v3int %arg_0 - %18 = OpBitReverse %v3int %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v3int %arg_0 + %20 = OpBitReverse %v3int %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %reverseBits_c21bc1 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %reverseBits_c21bc1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %reverseBits_c21bc1 + %32 = OpLabel + %33 = OpFunctionCall %void %reverseBits_c21bc1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reverseBits_c21bc1 + %35 = OpLabel + %36 = OpFunctionCall %void %reverseBits_c21bc1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.wgsl index 7f102d63f7..798bd2dc48 100644 --- a/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/c21bc1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_c21bc1() { - var arg_0 = vec3(); + var arg_0 = vec3(1); var res : vec3 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl index 52ad2b8422..86d766023e 100644 --- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl @@ -25,7 +25,7 @@ // fn reverseBits(vec<2, u32>) -> vec<2, u32> fn reverseBits_e1f4c1() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res: vec2 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl index 6d4ce3f279..106f38f2bb 100644 --- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_e1f4c1() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = reversebits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl index 6d4ce3f279..106f38f2bb 100644 --- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void reverseBits_e1f4c1() { - uint2 arg_0 = (0u).xx; + uint2 arg_0 = (1u).xx; uint2 res = reversebits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.glsl b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.glsl index d59036c601..88033b61af 100644 --- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void reverseBits_e1f4c1() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = bitfieldReverse(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void reverseBits_e1f4c1() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = bitfieldReverse(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void reverseBits_e1f4c1() { - uvec2 arg_0 = uvec2(0u); + uvec2 arg_0 = uvec2(1u); uvec2 res = bitfieldReverse(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.msl b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.msl index c8f6c6c246..c481bb88ee 100644 --- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void reverseBits_e1f4c1() { - uint2 arg_0 = uint2(0u); + uint2 arg_0 = uint2(1u); uint2 res = reverse_bits(arg_0); } diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.spvasm index d9a5b777b3..512c925a50 100644 --- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint - %21 = OpTypeFunction %v4float + %19 = OpConstantNull %v2uint + %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %reverseBits_e1f4c1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %v2uint %arg_0 - %18 = OpBitReverse %v2uint %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %v2uint %arg_0 + %20 = OpBitReverse %v2uint %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %reverseBits_e1f4c1 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %reverseBits_e1f4c1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %reverseBits_e1f4c1 + %32 = OpLabel + %33 = OpFunctionCall %void %reverseBits_e1f4c1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %reverseBits_e1f4c1 + %35 = OpLabel + %36 = OpFunctionCall %void %reverseBits_e1f4c1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.wgsl index e0e0fc2403..5b76ac2d5c 100644 --- a/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/reverseBits/e1f4c1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn reverseBits_e1f4c1() { - var arg_0 = vec2(); + var arg_0 = vec2(1u); var res : vec2 = reverseBits(arg_0); } diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl b/test/tint/builtins/gen/var/round/106c0b.wgsl index cbc3c57d93..b662385de0 100644 --- a/test/tint/builtins/gen/var/round/106c0b.wgsl +++ b/test/tint/builtins/gen/var/round/106c0b.wgsl @@ -25,7 +25,7 @@ // fn round(vec<4, f32>) -> vec<4, f32> fn round_106c0b() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.dxc.hlsl index 01f6555b8a..a784c58d8f 100644 --- a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_106c0b() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.fxc.hlsl index 01f6555b8a..a784c58d8f 100644 --- a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void round_106c0b() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.glsl index f429459cdf..e36ec984e1 100644 --- a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void round_106c0b() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = round(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void round_106c0b() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = round(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void round_106c0b() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.msl b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.msl index ad1867fbb0..b1254e678e 100644 --- a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_106c0b() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = rint(arg_0); } diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.spvasm index 90e9744413..f8cf66d95d 100644 --- a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %round_106c0b = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 RoundEven %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 RoundEven %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %round_106c0b +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %round_106c0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %round_106c0b + %29 = OpLabel + %30 = OpFunctionCall %void %round_106c0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %round_106c0b + %32 = OpLabel + %33 = OpFunctionCall %void %round_106c0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.wgsl index 8aa4fc6910..9faa312bb7 100644 --- a/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/106c0b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_106c0b() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl b/test/tint/builtins/gen/var/round/1c7897.wgsl index 1edba984b3..1a10c6a982 100644 --- a/test/tint/builtins/gen/var/round/1c7897.wgsl +++ b/test/tint/builtins/gen/var/round/1c7897.wgsl @@ -25,7 +25,7 @@ // fn round(vec<3, f32>) -> vec<3, f32> fn round_1c7897() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.dxc.hlsl index bcc74fd261..199e2eacf5 100644 --- a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_1c7897() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.fxc.hlsl index bcc74fd261..199e2eacf5 100644 --- a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void round_1c7897() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.glsl index 61d0b0c90d..6c96538a66 100644 --- a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void round_1c7897() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = round(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void round_1c7897() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = round(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void round_1c7897() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.msl b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.msl index c528ea95c7..8317df6d4c 100644 --- a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_1c7897() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = rint(arg_0); } diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.spvasm index 3c068e768d..cd19198984 100644 --- a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %round_1c7897 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 RoundEven %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 RoundEven %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %round_1c7897 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %round_1c7897 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %round_1c7897 + %31 = OpLabel + %32 = OpFunctionCall %void %round_1c7897 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %round_1c7897 + %34 = OpLabel + %35 = OpFunctionCall %void %round_1c7897 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.wgsl index 154e42cf23..1cd9dcd177 100644 --- a/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/1c7897.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_1c7897() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl b/test/tint/builtins/gen/var/round/52c84d.wgsl index e71edecbe0..816a6257d6 100644 --- a/test/tint/builtins/gen/var/round/52c84d.wgsl +++ b/test/tint/builtins/gen/var/round/52c84d.wgsl @@ -25,7 +25,7 @@ // fn round(vec<2, f32>) -> vec<2, f32> fn round_52c84d() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.dxc.hlsl index 48b5930c0f..f8016ba094 100644 --- a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void round_52c84d() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.fxc.hlsl index 48b5930c0f..f8016ba094 100644 --- a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void round_52c84d() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.glsl b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.glsl index 9e6c847735..07b1603fbe 100644 --- a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void round_52c84d() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = round(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void round_52c84d() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = round(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void round_52c84d() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.msl b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.msl index 3ebec21331..03cb3ee1f0 100644 --- a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void round_52c84d() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = rint(arg_0); } diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.spvasm index d59eb68ae0..620c31264b 100644 --- a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %round_52c84d = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 RoundEven %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 RoundEven %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %round_52c84d +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %round_52c84d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %round_52c84d + %31 = OpLabel + %32 = OpFunctionCall %void %round_52c84d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %round_52c84d + %34 = OpLabel + %35 = OpFunctionCall %void %round_52c84d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.wgsl index ce72ed6fa3..a6cb0527cf 100644 --- a/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/52c84d.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_52c84d() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/9edc38.wgsl b/test/tint/builtins/gen/var/round/9edc38.wgsl index ac5e283c66..b15b6faeab 100644 --- a/test/tint/builtins/gen/var/round/9edc38.wgsl +++ b/test/tint/builtins/gen/var/round/9edc38.wgsl @@ -25,7 +25,7 @@ // fn round(f32) -> f32 fn round_9edc38() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.wgsl b/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.wgsl index a34918b8a2..f41cc78447 100644 --- a/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/round/9edc38.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn round_9edc38() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = round(arg_0); } diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl b/test/tint/builtins/gen/var/select/00b848.wgsl index 3343d2dd2e..516c083016 100644 --- a/test/tint/builtins/gen/var/select/00b848.wgsl +++ b/test/tint/builtins/gen/var/select/00b848.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, i32>, vec<2, i32>, vec<2, bool>) -> vec<2, i32> fn select_00b848() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); + var arg_2 = vec2(true); var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.dxc.hlsl index c2142a74f2..c132cca0eb 100644 --- a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_00b848() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; - bool2 arg_2 = (false).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; + bool2 arg_2 = (true).xx; int2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.fxc.hlsl index c2142a74f2..c132cca0eb 100644 --- a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_00b848() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; - bool2 arg_2 = (false).xx; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; + bool2 arg_2 = (true).xx; int2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.glsl index 74a8fcb5d9..2663ba37ca 100644 --- a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_00b848() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - bvec2 arg_2 = bvec2(false); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + bvec2 arg_2 = bvec2(true); ivec2 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_00b848() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - bvec2 arg_2 = bvec2(false); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + bvec2 arg_2 = bvec2(true); ivec2 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_00b848() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - bvec2 arg_2 = bvec2(false); + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + bvec2 arg_2 = bvec2(true); ivec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.msl b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.msl index a25887643e..b62d66f203 100644 --- a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_00b848() { - int2 arg_0 = int2(0); - int2 arg_1 = int2(0); - bool2 arg_2 = bool2(false); + int2 arg_0 = int2(1); + int2 arg_1 = int2(1); + bool2 arg_2 = bool2(true); int2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.spvasm index 3b0f2eac08..355f6889ea 100644 --- a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,53 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %19 = OpConstantNull %v2int %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %21 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %24 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v2bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_00b848 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %arg_1 = OpVariable %_ptr_Function_v2int Function %15 - %arg_2 = OpVariable %_ptr_Function_v2bool Function %21 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %21 - %25 = OpLoad %v2bool %arg_2 - %26 = OpLoad %v2int %arg_1 - %27 = OpLoad %v2int %arg_0 - %24 = OpSelect %v2int %25 %26 %27 - OpStore %res %24 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %19 + %arg_2 = OpVariable %_ptr_Function_v2bool Function %27 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v2bool %arg_2 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %v2int %arg_0 + %28 = OpSelect %v2int %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_00b848 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_00b848 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_00b848 + %42 = OpLabel + %43 = OpFunctionCall %void %select_00b848 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_00b848 + %45 = OpLabel + %46 = OpFunctionCall %void %select_00b848 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.wgsl index b2996a32b1..f386dd5ab5 100644 --- a/test/tint/builtins/gen/var/select/00b848.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/00b848.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_00b848() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); + var arg_2 = vec2(true); var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl b/test/tint/builtins/gen/var/select/01e2cd.wgsl index 1a63dcf9ab..6febaa5b59 100644 --- a/test/tint/builtins/gen/var/select/01e2cd.wgsl +++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, i32>, vec<3, i32>, vec<3, bool>) -> vec<3, i32> fn select_01e2cd() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); + var arg_2 = vec3(true); var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.dxc.hlsl index 633a71105c..e3d6bc818f 100644 --- a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_01e2cd() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; - bool3 arg_2 = (false).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; + bool3 arg_2 = (true).xxx; int3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.fxc.hlsl index 633a71105c..e3d6bc818f 100644 --- a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_01e2cd() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; - bool3 arg_2 = (false).xxx; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; + bool3 arg_2 = (true).xxx; int3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.glsl index 66f69a457c..644cc43ef5 100644 --- a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_01e2cd() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - bvec3 arg_2 = bvec3(false); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + bvec3 arg_2 = bvec3(true); ivec3 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_01e2cd() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - bvec3 arg_2 = bvec3(false); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + bvec3 arg_2 = bvec3(true); ivec3 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_01e2cd() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - bvec3 arg_2 = bvec3(false); + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + bvec3 arg_2 = bvec3(true); ivec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.msl b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.msl index baa5aaeb72..5f68736e50 100644 --- a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_01e2cd() { - int3 arg_0 = int3(0); - int3 arg_1 = int3(0); - bool3 arg_2 = bool3(false); + int3 arg_0 = int3(1); + int3 arg_1 = int3(1); + bool3 arg_2 = bool3(true); int3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.spvasm index 1025685aed..b4bc496c82 100644 --- a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,53 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %19 = OpConstantNull %v3int %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %21 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %24 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v3bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_01e2cd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %arg_1 = OpVariable %_ptr_Function_v3int Function %15 - %arg_2 = OpVariable %_ptr_Function_v3bool Function %21 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %21 - %25 = OpLoad %v3bool %arg_2 - %26 = OpLoad %v3int %arg_1 - %27 = OpLoad %v3int %arg_0 - %24 = OpSelect %v3int %25 %26 %27 - OpStore %res %24 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %19 + %arg_2 = OpVariable %_ptr_Function_v3bool Function %27 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v3bool %arg_2 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %v3int %arg_0 + %28 = OpSelect %v3int %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_01e2cd +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_01e2cd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_01e2cd + %42 = OpLabel + %43 = OpFunctionCall %void %select_01e2cd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_01e2cd + %45 = OpLabel + %46 = OpFunctionCall %void %select_01e2cd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.wgsl index b12ad1b970..b12547295d 100644 --- a/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/01e2cd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_01e2cd() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); + var arg_2 = vec3(true); var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl b/test/tint/builtins/gen/var/select/087ea4.wgsl index 77ce636a70..df9a0570ac 100644 --- a/test/tint/builtins/gen/var/select/087ea4.wgsl +++ b/test/tint/builtins/gen/var/select/087ea4.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, u32>, vec<4, u32>, bool) -> vec<4, u32> fn select_087ea4() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); + var arg_2 = true; var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.dxc.hlsl index d7f59159c3..455752cd34 100644 --- a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_087ea4() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; - bool arg_2 = false; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; + bool arg_2 = true; uint4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.fxc.hlsl index d7f59159c3..455752cd34 100644 --- a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_087ea4() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; - bool arg_2 = false; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; + bool arg_2 = true; uint4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.glsl index cd692d5fe1..1c9cbfb313 100644 --- a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_087ea4() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - bool arg_2 = false; + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + bool arg_2 = true; uvec4 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_087ea4() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - bool arg_2 = false; + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + bool arg_2 = true; uvec4 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_087ea4() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - bool arg_2 = false; + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + bool arg_2 = true; uvec4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.msl b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.msl index c42d1e5159..7888548398 100644 --- a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_087ea4() { - uint4 arg_0 = uint4(0u); - uint4 arg_1 = uint4(0u); - bool arg_2 = false; + uint4 arg_0 = uint4(1u); + uint4 arg_1 = uint4(1u); + bool arg_2 = true; uint4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.spvasm index 34e1100730..db71937bd2 100644 --- a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,53 +35,56 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %19 = OpConstantNull %v4uint %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %25 = OpConstantNull %bool %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %30 = OpConstantNull %v4bool - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_087ea4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 - %28 = OpVariable %_ptr_Function_v4bool Function %30 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %v4uint %arg_1 - %26 = OpLoad %v4uint %arg_0 - %31 = OpCompositeConstruct %v4bool %24 %24 %24 %24 - %23 = OpSelect %v4uint %31 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v4bool Function %33 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v4uint %arg_1 + %29 = OpLoad %v4uint %arg_0 + %34 = OpCompositeConstruct %v4bool %27 %27 %27 %27 + %26 = OpSelect %v4uint %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %select_087ea4 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_087ea4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %select_087ea4 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %45 = OpLabel %46 = OpFunctionCall %void %select_087ea4 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %48 = OpLabel + %49 = OpFunctionCall %void %select_087ea4 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.wgsl index 6ebe328a16..3e20ae7b33 100644 --- a/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/087ea4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_087ea4() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); + var arg_2 = true; var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl b/test/tint/builtins/gen/var/select/1e960b.wgsl index d03d66b59a..4b8041b36f 100644 --- a/test/tint/builtins/gen/var/select/1e960b.wgsl +++ b/test/tint/builtins/gen/var/select/1e960b.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, u32>, vec<2, u32>, vec<2, bool>) -> vec<2, u32> fn select_1e960b() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); + var arg_2 = vec2(true); var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.dxc.hlsl index 96128cc432..9ff45c6ac4 100644 --- a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_1e960b() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; - bool2 arg_2 = (false).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; + bool2 arg_2 = (true).xx; uint2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.fxc.hlsl index 96128cc432..9ff45c6ac4 100644 --- a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_1e960b() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; - bool2 arg_2 = (false).xx; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; + bool2 arg_2 = (true).xx; uint2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.glsl index 535a865afa..8033d8de58 100644 --- a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_1e960b() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - bvec2 arg_2 = bvec2(false); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + bvec2 arg_2 = bvec2(true); uvec2 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_1e960b() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - bvec2 arg_2 = bvec2(false); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + bvec2 arg_2 = bvec2(true); uvec2 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_1e960b() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - bvec2 arg_2 = bvec2(false); + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + bvec2 arg_2 = bvec2(true); uvec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.msl b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.msl index 9f44a9492b..6d78b32234 100644 --- a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_1e960b() { - uint2 arg_0 = uint2(0u); - uint2 arg_1 = uint2(0u); - bool2 arg_2 = bool2(false); + uint2 arg_0 = uint2(1u); + uint2 arg_1 = uint2(1u); + bool2 arg_2 = bool2(true); uint2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.spvasm index 70bc86aac1..87cd7dd4cd 100644 --- a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,53 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %19 = OpConstantNull %v2uint %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %21 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %24 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v2bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_1e960b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_2 = OpVariable %_ptr_Function_v2bool Function %21 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %21 - %25 = OpLoad %v2bool %arg_2 - %26 = OpLoad %v2uint %arg_1 - %27 = OpLoad %v2uint %arg_0 - %24 = OpSelect %v2uint %25 %26 %27 - OpStore %res %24 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_2 = OpVariable %_ptr_Function_v2bool Function %27 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v2bool %arg_2 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %v2uint %arg_0 + %28 = OpSelect %v2uint %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_1e960b +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_1e960b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_1e960b + %42 = OpLabel + %43 = OpFunctionCall %void %select_1e960b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_1e960b + %45 = OpLabel + %46 = OpFunctionCall %void %select_1e960b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.wgsl index 965431e39b..4fd5fc1169 100644 --- a/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/1e960b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_1e960b() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); + var arg_2 = vec2(true); var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl b/test/tint/builtins/gen/var/select/266aff.wgsl index 586e332ced..a938af1027 100644 --- a/test/tint/builtins/gen/var/select/266aff.wgsl +++ b/test/tint/builtins/gen/var/select/266aff.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, f32>, vec<2, f32>, vec<2, bool>) -> vec<2, f32> fn select_266aff() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = vec2(true); var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.dxc.hlsl index 1615eb0b40..6501b1958f 100644 --- a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_266aff() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - bool2 arg_2 = (false).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + bool2 arg_2 = (true).xx; float2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.fxc.hlsl index 1615eb0b40..6501b1958f 100644 --- a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_266aff() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - bool2 arg_2 = (false).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + bool2 arg_2 = (true).xx; float2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.glsl index 0bc653dd5c..1b530519d6 100644 --- a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_266aff() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - bvec2 arg_2 = bvec2(false); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + bvec2 arg_2 = bvec2(true); vec2 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_266aff() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - bvec2 arg_2 = bvec2(false); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + bvec2 arg_2 = bvec2(true); vec2 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_266aff() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - bvec2 arg_2 = bvec2(false); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + bvec2 arg_2 = bvec2(true); vec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.msl b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.msl index ed3eacc398..40ec58d2a9 100644 --- a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_266aff() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); - bool2 arg_2 = bool2(false); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); + bool2 arg_2 = bool2(true); float2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.spvasm index b4542d6429..c575bbbd49 100644 --- a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,49 +34,52 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %20 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %23 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %28 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %v2bool + %32 = OpTypeFunction %v4float %select_266aff = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %arg_2 = OpVariable %_ptr_Function_v2bool Function %20 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %20 - %24 = OpLoad %v2bool %arg_2 - %25 = OpLoad %v2float %arg_1 - %26 = OpLoad %v2float %arg_0 - %23 = OpSelect %v2float %24 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %arg_2 = OpVariable %_ptr_Function_v2bool Function %26 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %23 + %28 = OpLoad %v2bool %arg_2 + %29 = OpLoad %v2float %arg_1 + %30 = OpLoad %v2float %arg_0 + %27 = OpSelect %v2float %28 %29 %30 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %select_266aff +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %select_266aff OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_266aff - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %40 = OpLabel %41 = OpFunctionCall %void %select_266aff OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %43 = OpLabel + %44 = OpFunctionCall %void %select_266aff + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.wgsl index 41aedd4688..d9669014de 100644 --- a/test/tint/builtins/gen/var/select/266aff.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/266aff.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_266aff() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = vec2(true); var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl b/test/tint/builtins/gen/var/select/28a27e.wgsl index 96d116d28c..c35c637a54 100644 --- a/test/tint/builtins/gen/var/select/28a27e.wgsl +++ b/test/tint/builtins/gen/var/select/28a27e.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, u32>, vec<3, u32>, vec<3, bool>) -> vec<3, u32> fn select_28a27e() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); + var arg_2 = vec3(true); var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.dxc.hlsl index 9528d884fb..de3886c81b 100644 --- a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_28a27e() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; - bool3 arg_2 = (false).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; + bool3 arg_2 = (true).xxx; uint3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.fxc.hlsl index 9528d884fb..de3886c81b 100644 --- a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_28a27e() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; - bool3 arg_2 = (false).xxx; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; + bool3 arg_2 = (true).xxx; uint3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.glsl index fb511ee385..33d750b01a 100644 --- a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_28a27e() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - bvec3 arg_2 = bvec3(false); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + bvec3 arg_2 = bvec3(true); uvec3 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_28a27e() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - bvec3 arg_2 = bvec3(false); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + bvec3 arg_2 = bvec3(true); uvec3 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_28a27e() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - bvec3 arg_2 = bvec3(false); + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + bvec3 arg_2 = bvec3(true); uvec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.msl b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.msl index 2ad0a434a2..35ea1d8937 100644 --- a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_28a27e() { - uint3 arg_0 = uint3(0u); - uint3 arg_1 = uint3(0u); - bool3 arg_2 = bool3(false); + uint3 arg_0 = uint3(1u); + uint3 arg_1 = uint3(1u); + bool3 arg_2 = bool3(true); uint3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.spvasm index 7bf5f53ab7..991b27146e 100644 --- a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,53 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %19 = OpConstantNull %v3uint %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %21 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %24 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v3bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_28a27e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_2 = OpVariable %_ptr_Function_v3bool Function %21 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %21 - %25 = OpLoad %v3bool %arg_2 - %26 = OpLoad %v3uint %arg_1 - %27 = OpLoad %v3uint %arg_0 - %24 = OpSelect %v3uint %25 %26 %27 - OpStore %res %24 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_2 = OpVariable %_ptr_Function_v3bool Function %27 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v3bool %arg_2 + %30 = OpLoad %v3uint %arg_1 + %31 = OpLoad %v3uint %arg_0 + %28 = OpSelect %v3uint %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_28a27e +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_28a27e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_28a27e + %42 = OpLabel + %43 = OpFunctionCall %void %select_28a27e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_28a27e + %45 = OpLabel + %46 = OpFunctionCall %void %select_28a27e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.wgsl index be10bf87b2..257d5e3c59 100644 --- a/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/28a27e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_28a27e() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); + var arg_2 = vec3(true); var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl b/test/tint/builtins/gen/var/select/3c25ce.wgsl index dba9560a3c..80a56d9ad5 100644 --- a/test/tint/builtins/gen/var/select/3c25ce.wgsl +++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, bool>, vec<3, bool>, bool) -> vec<3, bool> fn select_3c25ce() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(true); + var arg_1 = vec3(true); + var arg_2 = true; var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.dxc.hlsl index 60e232d3d0..54ab3e6c6c 100644 --- a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_3c25ce() { - bool3 arg_0 = (false).xxx; - bool3 arg_1 = (false).xxx; - bool arg_2 = false; + bool3 arg_0 = (true).xxx; + bool3 arg_1 = (true).xxx; + bool arg_2 = true; bool3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.fxc.hlsl index 60e232d3d0..54ab3e6c6c 100644 --- a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_3c25ce() { - bool3 arg_0 = (false).xxx; - bool3 arg_1 = (false).xxx; - bool arg_2 = false; + bool3 arg_0 = (true).xxx; + bool3 arg_1 = (true).xxx; + bool arg_2 = true; bool3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.glsl index d05d533df2..d1c2ced765 100644 --- a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_3c25ce() { - bvec3 arg_0 = bvec3(false); - bvec3 arg_1 = bvec3(false); - bool arg_2 = false; + bvec3 arg_0 = bvec3(true); + bvec3 arg_1 = bvec3(true); + bool arg_2 = true; bvec3 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_3c25ce() { - bvec3 arg_0 = bvec3(false); - bvec3 arg_1 = bvec3(false); - bool arg_2 = false; + bvec3 arg_0 = bvec3(true); + bvec3 arg_1 = bvec3(true); + bool arg_2 = true; bvec3 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_3c25ce() { - bvec3 arg_0 = bvec3(false); - bvec3 arg_1 = bvec3(false); - bool arg_2 = false; + bvec3 arg_0 = bvec3(true); + bvec3 arg_1 = bvec3(true); + bool arg_2 = true; bvec3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.msl b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.msl index 9a106b7ed7..b81bb64070 100644 --- a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_3c25ce() { - bool3 arg_0 = bool3(false); - bool3 arg_1 = bool3(false); - bool arg_2 = false; + bool3 arg_0 = bool3(true); + bool3 arg_1 = bool3(true); + bool arg_2 = true; bool3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.spvasm index 189d6322ff..c92d3eeac4 100644 --- a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,51 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %15 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %19 = OpConstantNull %bool + %19 = OpConstantNull %v3bool %_ptr_Function_bool = OpTypePointer Function %bool - %29 = OpTypeFunction %v4float + %23 = OpConstantNull %bool + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_3c25ce = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3bool Function %15 - %arg_1 = OpVariable %_ptr_Function_v3bool Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %19 - %26 = OpVariable %_ptr_Function_v3bool Function %15 - %res = OpVariable %_ptr_Function_v3bool Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %23 = OpLoad %bool %arg_2 - %24 = OpLoad %v3bool %arg_1 - %25 = OpLoad %v3bool %arg_0 - %27 = OpCompositeConstruct %v3bool %23 %23 %23 - %22 = OpSelect %v3bool %27 %24 %25 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v3bool Function %19 + %arg_1 = OpVariable %_ptr_Function_v3bool Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %23 + %28 = OpVariable %_ptr_Function_v3bool Function %19 + %res = OpVariable %_ptr_Function_v3bool Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %25 = OpLoad %bool %arg_2 + %26 = OpLoad %v3bool %arg_1 + %27 = OpLoad %v3bool %arg_0 + %29 = OpCompositeConstruct %v3bool %25 %25 %25 + %24 = OpSelect %v3bool %29 %26 %27 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_3c25ce +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %select_3c25ce OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_3c25ce + %40 = OpLabel + %41 = OpFunctionCall %void %select_3c25ce OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_3c25ce + %43 = OpLabel + %44 = OpFunctionCall %void %select_3c25ce OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.wgsl index 826c33c559..89f2280359 100644 --- a/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/3c25ce.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_3c25ce() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(true); + var arg_1 = vec3(true); + var arg_2 = true; var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl b/test/tint/builtins/gen/var/select/416e14.wgsl index 8c31750d83..b73d47cdeb 100644 --- a/test/tint/builtins/gen/var/select/416e14.wgsl +++ b/test/tint/builtins/gen/var/select/416e14.wgsl @@ -25,9 +25,9 @@ // fn select(f32, f32, bool) -> f32 fn select_416e14() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = bool(); + var arg_0 = 1.f; + var arg_1 = 1.f; + var arg_2 = true; var res: f32 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.dxc.hlsl index a55bde8425..b3d12d4161 100644 --- a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_416e14() { float arg_0 = 1.0f; float arg_1 = 1.0f; - bool arg_2 = false; + bool arg_2 = true; float res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.fxc.hlsl index a55bde8425..b3d12d4161 100644 --- a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_416e14() { float arg_0 = 1.0f; float arg_1 = 1.0f; - bool arg_2 = false; + bool arg_2 = true; float res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.glsl index a6b35b665c..fb88928b79 100644 --- a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.glsl @@ -3,7 +3,7 @@ void select_416e14() { float arg_0 = 1.0f; float arg_1 = 1.0f; - bool arg_2 = false; + bool arg_2 = true; float res = (arg_2 ? arg_1 : arg_0); } @@ -26,7 +26,7 @@ precision mediump float; void select_416e14() { float arg_0 = 1.0f; float arg_1 = 1.0f; - bool arg_2 = false; + bool arg_2 = true; float res = (arg_2 ? arg_1 : arg_0); } @@ -43,7 +43,7 @@ void main() { void select_416e14() { float arg_0 = 1.0f; float arg_1 = 1.0f; - bool arg_2 = false; + bool arg_2 = true; float res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.msl b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.msl index a11fa7bb10..1829479d96 100644 --- a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; void select_416e14() { float arg_0 = 1.0f; float arg_1 = 1.0f; - bool arg_2 = false; + bool arg_2 = true; float res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.spvasm index b37cdb4d59..c541b5a43c 100644 --- a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -36,44 +36,45 @@ %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float %bool = OpTypeBool - %18 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %26 = OpTypeFunction %v4float + %21 = OpConstantNull %bool + %27 = OpTypeFunction %v4float %select_416e14 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_float Function %8 %arg_1 = OpVariable %_ptr_Function_float Function %8 - %arg_2 = OpVariable %_ptr_Function_bool Function %18 + %arg_2 = OpVariable %_ptr_Function_bool Function %21 %res = OpVariable %_ptr_Function_float Function %8 OpStore %arg_0 %float_1 OpStore %arg_1 %float_1 - OpStore %arg_2 %18 - %22 = OpLoad %bool %arg_2 - %23 = OpLoad %float %arg_1 - %24 = OpLoad %float %arg_0 - %21 = OpSelect %float %22 %23 %24 - OpStore %res %21 + OpStore %arg_2 %true + %23 = OpLoad %bool %arg_2 + %24 = OpLoad %float %arg_1 + %25 = OpLoad %float %arg_0 + %22 = OpSelect %float %23 %24 %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_416e14 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %select_416e14 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_416e14 + %35 = OpLabel + %36 = OpFunctionCall %void %select_416e14 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_416e14 + %38 = OpLabel + %39 = OpFunctionCall %void %select_416e14 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.wgsl index 52fda76d80..94af34a933 100644 --- a/test/tint/builtins/gen/var/select/416e14.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/416e14.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_416e14() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = bool(); + var arg_0 = 1.0f; + var arg_1 = 1.0f; + var arg_2 = true; var res : f32 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl b/test/tint/builtins/gen/var/select/51b047.wgsl index f04a2518d6..3625751edc 100644 --- a/test/tint/builtins/gen/var/select/51b047.wgsl +++ b/test/tint/builtins/gen/var/select/51b047.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, u32>, vec<2, u32>, bool) -> vec<2, u32> fn select_51b047() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); + var arg_2 = true; var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.dxc.hlsl index 09f6e9eb33..40aa3f44c7 100644 --- a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_51b047() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; - bool arg_2 = false; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; + bool arg_2 = true; uint2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.fxc.hlsl index 09f6e9eb33..40aa3f44c7 100644 --- a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_51b047() { - uint2 arg_0 = (0u).xx; - uint2 arg_1 = (0u).xx; - bool arg_2 = false; + uint2 arg_0 = (1u).xx; + uint2 arg_1 = (1u).xx; + bool arg_2 = true; uint2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.glsl index 85302fe2e2..06473db3cb 100644 --- a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_51b047() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - bool arg_2 = false; + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + bool arg_2 = true; uvec2 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_51b047() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - bool arg_2 = false; + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + bool arg_2 = true; uvec2 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_51b047() { - uvec2 arg_0 = uvec2(0u); - uvec2 arg_1 = uvec2(0u); - bool arg_2 = false; + uvec2 arg_0 = uvec2(1u); + uvec2 arg_1 = uvec2(1u); + bool arg_2 = true; uvec2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.msl b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.msl index 9eb0a1d631..fc7391bf40 100644 --- a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_51b047() { - uint2 arg_0 = uint2(0u); - uint2 arg_1 = uint2(0u); - bool arg_2 = false; + uint2 arg_0 = uint2(1u); + uint2 arg_1 = uint2(1u); + bool arg_2 = true; uint2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.spvasm index fd5e791bf4..0b88ea799b 100644 --- a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,53 +35,56 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %15 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %19 = OpConstantNull %v2uint %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %25 = OpConstantNull %bool %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %30 = OpConstantNull %v2bool - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v2bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_51b047 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v2uint Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 - %28 = OpVariable %_ptr_Function_v2bool Function %30 - %res = OpVariable %_ptr_Function_v2uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %v2uint %arg_1 - %26 = OpLoad %v2uint %arg_0 - %31 = OpCompositeConstruct %v2bool %24 %24 - %23 = OpSelect %v2uint %31 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v2bool Function %33 + %res = OpVariable %_ptr_Function_v2uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v2uint %arg_1 + %29 = OpLoad %v2uint %arg_0 + %34 = OpCompositeConstruct %v2bool %27 %27 + %26 = OpSelect %v2uint %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %select_51b047 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_51b047 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %select_51b047 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %45 = OpLabel %46 = OpFunctionCall %void %select_51b047 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %48 = OpLabel + %49 = OpFunctionCall %void %select_51b047 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.wgsl index 54400b4382..a5412ed860 100644 --- a/test/tint/builtins/gen/var/select/51b047.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/51b047.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_51b047() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(1u); + var arg_1 = vec2(1u); + var arg_2 = true; var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/713567.wgsl b/test/tint/builtins/gen/var/select/713567.wgsl index 4f8d50fcb4..a8f0fba48a 100644 --- a/test/tint/builtins/gen/var/select/713567.wgsl +++ b/test/tint/builtins/gen/var/select/713567.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, f32>, vec<4, f32>, bool) -> vec<4, f32> fn select_713567() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = true; var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/713567.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/713567.wgsl.expected.dxc.hlsl index 52e530540b..9d70108f81 100644 --- a/test/tint/builtins/gen/var/select/713567.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/713567.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_713567() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - bool arg_2 = false; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + bool arg_2 = true; float4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/713567.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/713567.wgsl.expected.fxc.hlsl index 52e530540b..9d70108f81 100644 --- a/test/tint/builtins/gen/var/select/713567.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/713567.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_713567() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - bool arg_2 = false; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + bool arg_2 = true; float4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/713567.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/713567.wgsl.expected.glsl index b4cb4871b7..e5090f0ba0 100644 --- a/test/tint/builtins/gen/var/select/713567.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/713567.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_713567() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - bool arg_2 = false; + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + bool arg_2 = true; vec4 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_713567() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - bool arg_2 = false; + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + bool arg_2 = true; vec4 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_713567() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - bool arg_2 = false; + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + bool arg_2 = true; vec4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/713567.wgsl.expected.msl b/test/tint/builtins/gen/var/select/713567.wgsl.expected.msl index 6aa0057b05..fe42ab07ad 100644 --- a/test/tint/builtins/gen/var/select/713567.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/713567.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_713567() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); - bool arg_2 = false; + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); + bool arg_2 = true; float4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/713567.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/713567.wgsl.expected.spvasm index a6ed5fa614..b8bd58655a 100644 --- a/test/tint/builtins/gen/var/select/713567.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/713567.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,52 +33,54 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %bool = OpTypeBool - %17 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %22 = OpConstantNull %bool %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %27 = OpConstantNull %v4bool - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %30 = OpConstantNull %v4bool + %33 = OpTypeFunction %v4float %select_713567 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 - %arg_2 = OpVariable %_ptr_Function_bool Function %17 - %25 = OpVariable %_ptr_Function_v4bool Function %27 + %arg_2 = OpVariable %_ptr_Function_bool Function %22 + %28 = OpVariable %_ptr_Function_v4bool Function %30 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - OpStore %arg_2 %17 - %21 = OpLoad %bool %arg_2 - %22 = OpLoad %v4float %arg_1 - %23 = OpLoad %v4float %arg_0 - %28 = OpCompositeConstruct %v4bool %21 %21 %21 %21 - %20 = OpSelect %v4float %28 %22 %23 - OpStore %res %20 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + OpStore %arg_2 %true + %24 = OpLoad %bool %arg_2 + %25 = OpLoad %v4float %arg_1 + %26 = OpLoad %v4float %arg_0 + %31 = OpCompositeConstruct %v4bool %24 %24 %24 %24 + %23 = OpSelect %v4float %31 %25 %26 + OpStore %res %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %select_713567 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_713567 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %39 = OpLabel - %40 = OpFunctionCall %void %select_713567 + %41 = OpLabel + %42 = OpFunctionCall %void %select_713567 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %select_713567 + %44 = OpLabel + %45 = OpFunctionCall %void %select_713567 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/713567.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/713567.wgsl.expected.wgsl index e201d4cfa3..62cfc1ab4f 100644 --- a/test/tint/builtins/gen/var/select/713567.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/713567.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_713567() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = true; var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl b/test/tint/builtins/gen/var/select/78be5f.wgsl index a45c8dd010..ecc1933fc7 100644 --- a/test/tint/builtins/gen/var/select/78be5f.wgsl +++ b/test/tint/builtins/gen/var/select/78be5f.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, f32>, vec<3, f32>, bool) -> vec<3, f32> fn select_78be5f() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = true; var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.dxc.hlsl index e3bf8eb476..997acbeee8 100644 --- a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_78be5f() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - bool arg_2 = false; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + bool arg_2 = true; float3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.fxc.hlsl index e3bf8eb476..997acbeee8 100644 --- a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_78be5f() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - bool arg_2 = false; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + bool arg_2 = true; float3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.glsl index 562791dc29..35920b722b 100644 --- a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_78be5f() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - bool arg_2 = false; + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + bool arg_2 = true; vec3 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_78be5f() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - bool arg_2 = false; + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + bool arg_2 = true; vec3 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_78be5f() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - bool arg_2 = false; + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + bool arg_2 = true; vec3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.msl b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.msl index fa69529c4c..251735f463 100644 --- a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_78be5f() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); - bool arg_2 = false; + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); + bool arg_2 = true; float3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.spvasm index 1581ba4c29..07585b808b 100644 --- a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,53 +34,55 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float %bool = OpTypeBool - %19 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %24 = OpConstantNull %bool %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %29 = OpConstantNull %v3bool - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v3bool + %35 = OpTypeFunction %v4float %select_78be5f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %arg_2 = OpVariable %_ptr_Function_bool Function %19 - %27 = OpVariable %_ptr_Function_v3bool Function %29 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %19 - %23 = OpLoad %bool %arg_2 - %24 = OpLoad %v3float %arg_1 - %25 = OpLoad %v3float %arg_0 - %30 = OpCompositeConstruct %v3bool %23 %23 %23 - %22 = OpSelect %v3float %30 %24 %25 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %arg_2 = OpVariable %_ptr_Function_bool Function %24 + %30 = OpVariable %_ptr_Function_v3bool Function %32 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %true + %26 = OpLoad %bool %arg_2 + %27 = OpLoad %v3float %arg_1 + %28 = OpLoad %v3float %arg_0 + %33 = OpCompositeConstruct %v3bool %26 %26 %26 + %25 = OpSelect %v3float %33 %27 %28 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %select_78be5f +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %select_78be5f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_78be5f + %43 = OpLabel + %44 = OpFunctionCall %void %select_78be5f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %44 = OpLabel - %45 = OpFunctionCall %void %select_78be5f + %46 = OpLabel + %47 = OpFunctionCall %void %select_78be5f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.wgsl index e7f0a3bece..ca853b9d2d 100644 --- a/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/78be5f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_78be5f() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = true; var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl b/test/tint/builtins/gen/var/select/80a9a9.wgsl index b2d1345e16..a51c1fa373 100644 --- a/test/tint/builtins/gen/var/select/80a9a9.wgsl +++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, bool>, vec<3, bool>, vec<3, bool>) -> vec<3, bool> fn select_80a9a9() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(true); + var arg_1 = vec3(true); + var arg_2 = vec3(true); var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.dxc.hlsl index b9c340cdd5..12841d9042 100644 --- a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_80a9a9() { - bool3 arg_0 = (false).xxx; - bool3 arg_1 = (false).xxx; - bool3 arg_2 = (false).xxx; + bool3 arg_0 = (true).xxx; + bool3 arg_1 = (true).xxx; + bool3 arg_2 = (true).xxx; bool3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.fxc.hlsl index b9c340cdd5..12841d9042 100644 --- a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_80a9a9() { - bool3 arg_0 = (false).xxx; - bool3 arg_1 = (false).xxx; - bool3 arg_2 = (false).xxx; + bool3 arg_0 = (true).xxx; + bool3 arg_1 = (true).xxx; + bool3 arg_2 = (true).xxx; bool3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.glsl index 47f6301f49..b2d3f5cf68 100644 --- a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_80a9a9() { - bvec3 arg_0 = bvec3(false); - bvec3 arg_1 = bvec3(false); - bvec3 arg_2 = bvec3(false); + bvec3 arg_0 = bvec3(true); + bvec3 arg_1 = bvec3(true); + bvec3 arg_2 = bvec3(true); bvec3 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_80a9a9() { - bvec3 arg_0 = bvec3(false); - bvec3 arg_1 = bvec3(false); - bvec3 arg_2 = bvec3(false); + bvec3 arg_0 = bvec3(true); + bvec3 arg_1 = bvec3(true); + bvec3 arg_2 = bvec3(true); bvec3 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_80a9a9() { - bvec3 arg_0 = bvec3(false); - bvec3 arg_1 = bvec3(false); - bvec3 arg_2 = bvec3(false); + bvec3 arg_0 = bvec3(true); + bvec3 arg_1 = bvec3(true); + bvec3 arg_2 = bvec3(true); bvec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.msl b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.msl index 3bc0c23917..74edbe1303 100644 --- a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_80a9a9() { - bool3 arg_0 = bool3(false); - bool3 arg_1 = bool3(false); - bool3 arg_2 = bool3(false); + bool3 arg_0 = bool3(true); + bool3 arg_1 = bool3(true); + bool3 arg_2 = bool3(true); bool3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.spvasm index 73f1cdb19a..9699fed57e 100644 --- a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,45 +35,47 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %15 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %25 = OpTypeFunction %v4float + %19 = OpConstantNull %v3bool + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_80a9a9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3bool Function %15 - %arg_1 = OpVariable %_ptr_Function_v3bool Function %15 - %arg_2 = OpVariable %_ptr_Function_v3bool Function %15 - %res = OpVariable %_ptr_Function_v3bool Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %21 = OpLoad %v3bool %arg_2 - %22 = OpLoad %v3bool %arg_1 - %23 = OpLoad %v3bool %arg_0 - %20 = OpSelect %v3bool %21 %22 %23 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v3bool Function %19 + %arg_1 = OpVariable %_ptr_Function_v3bool Function %19 + %arg_2 = OpVariable %_ptr_Function_v3bool Function %19 + %res = OpVariable %_ptr_Function_v3bool Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %23 = OpLoad %v3bool %arg_2 + %24 = OpLoad %v3bool %arg_1 + %25 = OpLoad %v3bool %arg_0 + %22 = OpSelect %v3bool %23 %24 %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %select_80a9a9 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %select_80a9a9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_80a9a9 + %36 = OpLabel + %37 = OpFunctionCall %void %select_80a9a9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_80a9a9 + %39 = OpLabel + %40 = OpFunctionCall %void %select_80a9a9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.wgsl index d11594c9ba..a016f65f97 100644 --- a/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/80a9a9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_80a9a9() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(true); + var arg_1 = vec3(true); + var arg_2 = vec3(true); var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl b/test/tint/builtins/gen/var/select/8fa62c.wgsl index 963d4227e1..6774aba9e3 100644 --- a/test/tint/builtins/gen/var/select/8fa62c.wgsl +++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, i32>, vec<3, i32>, bool) -> vec<3, i32> fn select_8fa62c() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); + var arg_2 = true; var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.dxc.hlsl index 2ea69af14b..8e5ca9483d 100644 --- a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_8fa62c() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; - bool arg_2 = false; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; + bool arg_2 = true; int3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.fxc.hlsl index 2ea69af14b..8e5ca9483d 100644 --- a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_8fa62c() { - int3 arg_0 = (0).xxx; - int3 arg_1 = (0).xxx; - bool arg_2 = false; + int3 arg_0 = (1).xxx; + int3 arg_1 = (1).xxx; + bool arg_2 = true; int3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.glsl index fd4e04ddd9..4f54fba99c 100644 --- a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_8fa62c() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - bool arg_2 = false; + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + bool arg_2 = true; ivec3 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_8fa62c() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - bool arg_2 = false; + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + bool arg_2 = true; ivec3 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_8fa62c() { - ivec3 arg_0 = ivec3(0); - ivec3 arg_1 = ivec3(0); - bool arg_2 = false; + ivec3 arg_0 = ivec3(1); + ivec3 arg_1 = ivec3(1); + bool arg_2 = true; ivec3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.msl b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.msl index 4cd6e75b2a..c5d92e8817 100644 --- a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_8fa62c() { - int3 arg_0 = int3(0); - int3 arg_1 = int3(0); - bool arg_2 = false; + int3 arg_0 = int3(1); + int3 arg_1 = int3(1); + bool arg_2 = true; int3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.spvasm index e3a3e5022a..d90c6ea6f7 100644 --- a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,53 +35,56 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %15 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %19 = OpConstantNull %v3int %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %25 = OpConstantNull %bool %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %30 = OpConstantNull %v3bool - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v3bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_8fa62c = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3int Function %15 - %arg_1 = OpVariable %_ptr_Function_v3int Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 - %28 = OpVariable %_ptr_Function_v3bool Function %30 - %res = OpVariable %_ptr_Function_v3int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %v3int %arg_1 - %26 = OpLoad %v3int %arg_0 - %31 = OpCompositeConstruct %v3bool %24 %24 %24 - %23 = OpSelect %v3int %31 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v3int Function %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v3bool Function %33 + %res = OpVariable %_ptr_Function_v3int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v3int %arg_1 + %29 = OpLoad %v3int %arg_0 + %34 = OpCompositeConstruct %v3bool %27 %27 %27 + %26 = OpSelect %v3int %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %select_8fa62c +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_8fa62c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %select_8fa62c - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %45 = OpLabel %46 = OpFunctionCall %void %select_8fa62c OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %48 = OpLabel + %49 = OpFunctionCall %void %select_8fa62c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.wgsl index fbd6f2e863..906f330388 100644 --- a/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/8fa62c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_8fa62c() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(1); + var arg_1 = vec3(1); + var arg_2 = true; var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl b/test/tint/builtins/gen/var/select/99f883.wgsl index a1f0a3831a..e406637e09 100644 --- a/test/tint/builtins/gen/var/select/99f883.wgsl +++ b/test/tint/builtins/gen/var/select/99f883.wgsl @@ -27,7 +27,7 @@ fn select_99f883() { var arg_0 = 1u; var arg_1 = 1u; - var arg_2 = bool(); + var arg_2 = true; var res: u32 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.dxc.hlsl index c6f25eb063..ece0b4ed3c 100644 --- a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_99f883() { uint arg_0 = 1u; uint arg_1 = 1u; - bool arg_2 = false; + bool arg_2 = true; uint res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.fxc.hlsl index c6f25eb063..ece0b4ed3c 100644 --- a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_99f883() { uint arg_0 = 1u; uint arg_1 = 1u; - bool arg_2 = false; + bool arg_2 = true; uint res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.glsl index 6075d9271d..1a92d98149 100644 --- a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.glsl @@ -3,7 +3,7 @@ void select_99f883() { uint arg_0 = 1u; uint arg_1 = 1u; - bool arg_2 = false; + bool arg_2 = true; uint res = (arg_2 ? arg_1 : arg_0); } @@ -26,7 +26,7 @@ precision mediump float; void select_99f883() { uint arg_0 = 1u; uint arg_1 = 1u; - bool arg_2 = false; + bool arg_2 = true; uint res = (arg_2 ? arg_1 : arg_0); } @@ -43,7 +43,7 @@ void main() { void select_99f883() { uint arg_0 = 1u; uint arg_1 = 1u; - bool arg_2 = false; + bool arg_2 = true; uint res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.msl b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.msl index 7e9341aff6..34011c8b0e 100644 --- a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; void select_99f883() { uint arg_0 = 1u; uint arg_1 = 1u; - bool arg_2 = false; + bool arg_2 = true; uint res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.spvasm index 1de620b015..9ba6aac26e 100644 --- a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,45 +38,46 @@ %_ptr_Function_uint = OpTypePointer Function %uint %17 = OpConstantNull %uint %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %28 = OpTypeFunction %v4float + %23 = OpConstantNull %bool + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_99f883 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_uint Function %17 %arg_1 = OpVariable %_ptr_Function_uint Function %17 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 + %arg_2 = OpVariable %_ptr_Function_bool Function %23 %res = OpVariable %_ptr_Function_uint Function %17 OpStore %arg_0 %uint_1 OpStore %arg_1 %uint_1 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %uint %arg_1 - %26 = OpLoad %uint %arg_0 - %23 = OpSelect %uint %24 %25 %26 - OpStore %res %23 + OpStore %arg_2 %true + %25 = OpLoad %bool %arg_2 + %26 = OpLoad %uint %arg_1 + %27 = OpLoad %uint %arg_0 + %24 = OpSelect %uint %25 %26 %27 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %select_99f883 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %select_99f883 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_99f883 + %38 = OpLabel + %39 = OpFunctionCall %void %select_99f883 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %select_99f883 + %41 = OpLabel + %42 = OpFunctionCall %void %select_99f883 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.wgsl index 4f6a8a161f..1f34678bc4 100644 --- a/test/tint/builtins/gen/var/select/99f883.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/99f883.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_99f883() { var arg_0 = 1u; var arg_1 = 1u; - var arg_2 = bool(); + var arg_2 = true; var res : u32 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl b/test/tint/builtins/gen/var/select/a2860e.wgsl index 525e7724e9..85dedf7a62 100644 --- a/test/tint/builtins/gen/var/select/a2860e.wgsl +++ b/test/tint/builtins/gen/var/select/a2860e.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, i32>, vec<4, i32>, vec<4, bool>) -> vec<4, i32> fn select_a2860e() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); + var arg_2 = vec4(true); var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.dxc.hlsl index bc3e47e6a2..9cfb0e58e1 100644 --- a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_a2860e() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; - bool4 arg_2 = (false).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; + bool4 arg_2 = (true).xxxx; int4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.fxc.hlsl index bc3e47e6a2..9cfb0e58e1 100644 --- a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_a2860e() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; - bool4 arg_2 = (false).xxxx; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; + bool4 arg_2 = (true).xxxx; int4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.glsl index 791a44ff3d..cccde14bae 100644 --- a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_a2860e() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - bvec4 arg_2 = bvec4(false); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + bvec4 arg_2 = bvec4(true); ivec4 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_a2860e() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - bvec4 arg_2 = bvec4(false); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + bvec4 arg_2 = bvec4(true); ivec4 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_a2860e() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - bvec4 arg_2 = bvec4(false); + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + bvec4 arg_2 = bvec4(true); ivec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.msl b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.msl index bbc42665d6..2b70f32e4c 100644 --- a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_a2860e() { - int4 arg_0 = int4(0); - int4 arg_1 = int4(0); - bool4 arg_2 = bool4(false); + int4 arg_0 = int4(1); + int4 arg_1 = int4(1); + bool4 arg_2 = bool4(true); int4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.spvasm index 30c8e3f857..ff3b0ac26f 100644 --- a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,53 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %19 = OpConstantNull %v4int %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %21 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %24 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_a2860e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %arg_1 = OpVariable %_ptr_Function_v4int Function %15 - %arg_2 = OpVariable %_ptr_Function_v4bool Function %21 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %21 - %25 = OpLoad %v4bool %arg_2 - %26 = OpLoad %v4int %arg_1 - %27 = OpLoad %v4int %arg_0 - %24 = OpSelect %v4int %25 %26 %27 - OpStore %res %24 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %arg_1 = OpVariable %_ptr_Function_v4int Function %19 + %arg_2 = OpVariable %_ptr_Function_v4bool Function %27 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v4bool %arg_2 + %30 = OpLoad %v4int %arg_1 + %31 = OpLoad %v4int %arg_0 + %28 = OpSelect %v4int %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_a2860e +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_a2860e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_a2860e + %42 = OpLabel + %43 = OpFunctionCall %void %select_a2860e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_a2860e + %45 = OpLabel + %46 = OpFunctionCall %void %select_a2860e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.wgsl index 45ee0c2dcb..e9b8e2993a 100644 --- a/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/a2860e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_a2860e() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); + var arg_2 = vec4(true); var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl b/test/tint/builtins/gen/var/select/ab069f.wgsl index 8749b672e3..665aa27ce7 100644 --- a/test/tint/builtins/gen/var/select/ab069f.wgsl +++ b/test/tint/builtins/gen/var/select/ab069f.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, i32>, vec<4, i32>, bool) -> vec<4, i32> fn select_ab069f() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); + var arg_2 = true; var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.dxc.hlsl index 0fb1845622..b1ef504913 100644 --- a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_ab069f() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; - bool arg_2 = false; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; + bool arg_2 = true; int4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.fxc.hlsl index 0fb1845622..b1ef504913 100644 --- a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_ab069f() { - int4 arg_0 = (0).xxxx; - int4 arg_1 = (0).xxxx; - bool arg_2 = false; + int4 arg_0 = (1).xxxx; + int4 arg_1 = (1).xxxx; + bool arg_2 = true; int4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.glsl index 837dc43dde..da8260c030 100644 --- a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_ab069f() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - bool arg_2 = false; + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + bool arg_2 = true; ivec4 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_ab069f() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - bool arg_2 = false; + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + bool arg_2 = true; ivec4 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_ab069f() { - ivec4 arg_0 = ivec4(0); - ivec4 arg_1 = ivec4(0); - bool arg_2 = false; + ivec4 arg_0 = ivec4(1); + ivec4 arg_1 = ivec4(1); + bool arg_2 = true; ivec4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.msl b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.msl index 415cb8ada9..df7f500ead 100644 --- a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_ab069f() { - int4 arg_0 = int4(0); - int4 arg_1 = int4(0); - bool arg_2 = false; + int4 arg_0 = int4(1); + int4 arg_1 = int4(1); + bool arg_2 = true; int4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.spvasm index 738b78877b..fc0ca025b9 100644 --- a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,53 +35,56 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v4int = OpTypeVector %int 4 - %15 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %19 = OpConstantNull %v4int %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %25 = OpConstantNull %bool %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %30 = OpConstantNull %v4bool - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_ab069f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4int Function %15 - %arg_1 = OpVariable %_ptr_Function_v4int Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 - %28 = OpVariable %_ptr_Function_v4bool Function %30 - %res = OpVariable %_ptr_Function_v4int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %v4int %arg_1 - %26 = OpLoad %v4int %arg_0 - %31 = OpCompositeConstruct %v4bool %24 %24 %24 %24 - %23 = OpSelect %v4int %31 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v4int Function %19 + %arg_1 = OpVariable %_ptr_Function_v4int Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v4bool Function %33 + %res = OpVariable %_ptr_Function_v4int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v4int %arg_1 + %29 = OpLoad %v4int %arg_0 + %34 = OpCompositeConstruct %v4bool %27 %27 %27 %27 + %26 = OpSelect %v4int %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %select_ab069f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_ab069f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %select_ab069f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %45 = OpLabel %46 = OpFunctionCall %void %select_ab069f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %48 = OpLabel + %49 = OpFunctionCall %void %select_ab069f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.wgsl index 39cc2ef710..609b9e0b97 100644 --- a/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/ab069f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_ab069f() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(1); + var arg_1 = vec4(1); + var arg_2 = true; var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl b/test/tint/builtins/gen/var/select/b04721.wgsl index 8acf598c3f..0b61c9fefc 100644 --- a/test/tint/builtins/gen/var/select/b04721.wgsl +++ b/test/tint/builtins/gen/var/select/b04721.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, u32>, vec<3, u32>, bool) -> vec<3, u32> fn select_b04721() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); + var arg_2 = true; var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.dxc.hlsl index c96cebe0db..286d31884b 100644 --- a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_b04721() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; - bool arg_2 = false; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; + bool arg_2 = true; uint3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.fxc.hlsl index c96cebe0db..286d31884b 100644 --- a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_b04721() { - uint3 arg_0 = (0u).xxx; - uint3 arg_1 = (0u).xxx; - bool arg_2 = false; + uint3 arg_0 = (1u).xxx; + uint3 arg_1 = (1u).xxx; + bool arg_2 = true; uint3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.glsl index 526024da26..9b37f7593a 100644 --- a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_b04721() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - bool arg_2 = false; + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + bool arg_2 = true; uvec3 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_b04721() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - bool arg_2 = false; + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + bool arg_2 = true; uvec3 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_b04721() { - uvec3 arg_0 = uvec3(0u); - uvec3 arg_1 = uvec3(0u); - bool arg_2 = false; + uvec3 arg_0 = uvec3(1u); + uvec3 arg_1 = uvec3(1u); + bool arg_2 = true; uvec3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.msl b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.msl index 594d892fd1..ec77e1ec35 100644 --- a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_b04721() { - uint3 arg_0 = uint3(0u); - uint3 arg_1 = uint3(0u); - bool arg_2 = false; + uint3 arg_0 = uint3(1u); + uint3 arg_1 = uint3(1u); + bool arg_2 = true; uint3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.spvasm index e22cbc3d55..a2d40b80ec 100644 --- a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,53 +35,56 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %15 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %19 = OpConstantNull %v3uint %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %25 = OpConstantNull %bool %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %30 = OpConstantNull %v3bool - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v3bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_b04721 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v3uint Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 - %28 = OpVariable %_ptr_Function_v3bool Function %30 - %res = OpVariable %_ptr_Function_v3uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %v3uint %arg_1 - %26 = OpLoad %v3uint %arg_0 - %31 = OpCompositeConstruct %v3bool %24 %24 %24 - %23 = OpSelect %v3uint %31 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v3bool Function %33 + %res = OpVariable %_ptr_Function_v3uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v3uint %arg_1 + %29 = OpLoad %v3uint %arg_0 + %34 = OpCompositeConstruct %v3bool %27 %27 %27 + %26 = OpSelect %v3uint %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %select_b04721 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_b04721 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %select_b04721 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %45 = OpLabel %46 = OpFunctionCall %void %select_b04721 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %48 = OpLabel + %49 = OpFunctionCall %void %select_b04721 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.wgsl index a7779ac447..3eec22a992 100644 --- a/test/tint/builtins/gen/var/select/b04721.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/b04721.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_b04721() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = bool(); + var arg_0 = vec3(1u); + var arg_1 = vec3(1u); + var arg_2 = true; var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl b/test/tint/builtins/gen/var/select/bb447f.wgsl index 5e36c81484..72e19c4e3a 100644 --- a/test/tint/builtins/gen/var/select/bb447f.wgsl +++ b/test/tint/builtins/gen/var/select/bb447f.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, i32>, vec<2, i32>, bool) -> vec<2, i32> fn select_bb447f() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); + var arg_2 = true; var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.dxc.hlsl index d4428816a5..54054a5257 100644 --- a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_bb447f() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; - bool arg_2 = false; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; + bool arg_2 = true; int2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.fxc.hlsl index d4428816a5..54054a5257 100644 --- a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_bb447f() { - int2 arg_0 = (0).xx; - int2 arg_1 = (0).xx; - bool arg_2 = false; + int2 arg_0 = (1).xx; + int2 arg_1 = (1).xx; + bool arg_2 = true; int2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.glsl index 481243d88c..2e1cd76790 100644 --- a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_bb447f() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - bool arg_2 = false; + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + bool arg_2 = true; ivec2 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_bb447f() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - bool arg_2 = false; + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + bool arg_2 = true; ivec2 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_bb447f() { - ivec2 arg_0 = ivec2(0); - ivec2 arg_1 = ivec2(0); - bool arg_2 = false; + ivec2 arg_0 = ivec2(1); + ivec2 arg_1 = ivec2(1); + bool arg_2 = true; ivec2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.msl b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.msl index 69d0161e88..6028b17bc7 100644 --- a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_bb447f() { - int2 arg_0 = int2(0); - int2 arg_1 = int2(0); - bool arg_2 = false; + int2 arg_0 = int2(1); + int2 arg_1 = int2(1); + bool arg_2 = true; int2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.spvasm index bf6642a0b4..ba42bca5f8 100644 --- a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,53 +35,56 @@ %9 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %15 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %16 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %19 = OpConstantNull %v2int %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %25 = OpConstantNull %bool %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %30 = OpConstantNull %v2bool - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v2bool + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_bb447f = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2int Function %15 - %arg_1 = OpVariable %_ptr_Function_v2int Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 - %28 = OpVariable %_ptr_Function_v2bool Function %30 - %res = OpVariable %_ptr_Function_v2int Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %v2int %arg_1 - %26 = OpLoad %v2int %arg_0 - %31 = OpCompositeConstruct %v2bool %24 %24 - %23 = OpSelect %v2int %31 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v2int Function %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %25 + %31 = OpVariable %_ptr_Function_v2bool Function %33 + %res = OpVariable %_ptr_Function_v2int Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %27 = OpLoad %bool %arg_2 + %28 = OpLoad %v2int %arg_1 + %29 = OpLoad %v2int %arg_0 + %34 = OpCompositeConstruct %v2bool %27 %27 + %26 = OpSelect %v2int %34 %28 %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %select_bb447f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %select_bb447f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %42 = OpLabel - %43 = OpFunctionCall %void %select_bb447f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %45 = OpLabel %46 = OpFunctionCall %void %select_bb447f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %48 = OpLabel + %49 = OpFunctionCall %void %select_bb447f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.wgsl index 4bb3be7eb9..2c7b78912d 100644 --- a/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/bb447f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_bb447f() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(1); + var arg_1 = vec2(1); + var arg_2 = true; var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl b/test/tint/builtins/gen/var/select/bb8aae.wgsl index c18509cba2..f314b8cdc9 100644 --- a/test/tint/builtins/gen/var/select/bb8aae.wgsl +++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, f32>, vec<4, f32>, vec<4, bool>) -> vec<4, f32> fn select_bb8aae() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = vec4(true); var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.dxc.hlsl index fd3ff6110e..5b54bb0711 100644 --- a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_bb8aae() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - bool4 arg_2 = (false).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + bool4 arg_2 = (true).xxxx; float4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.fxc.hlsl index fd3ff6110e..5b54bb0711 100644 --- a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_bb8aae() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - bool4 arg_2 = (false).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + bool4 arg_2 = (true).xxxx; float4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.glsl index 0db67503f5..11f1221bea 100644 --- a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_bb8aae() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - bvec4 arg_2 = bvec4(false); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + bvec4 arg_2 = bvec4(true); vec4 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_bb8aae() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - bvec4 arg_2 = bvec4(false); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + bvec4 arg_2 = bvec4(true); vec4 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_bb8aae() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - bvec4 arg_2 = bvec4(false); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + bvec4 arg_2 = bvec4(true); vec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.msl b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.msl index c12dc411c3..aa41986eb5 100644 --- a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_bb8aae() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); - bool4 arg_2 = bool4(false); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); + bool4 arg_2 = bool4(true); float4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.spvasm index 4edc18fd00..bf31dcf013 100644 --- a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,48 +33,51 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %18 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %21 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %26 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %24 = OpConstantNull %v4bool + %30 = OpTypeFunction %v4float %select_bb8aae = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 - %arg_2 = OpVariable %_ptr_Function_v4bool Function %18 + %arg_2 = OpVariable %_ptr_Function_v4bool Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - OpStore %arg_2 %18 - %22 = OpLoad %v4bool %arg_2 - %23 = OpLoad %v4float %arg_1 - %24 = OpLoad %v4float %arg_0 - %21 = OpSelect %v4float %22 %23 %24 - OpStore %res %21 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + OpStore %arg_2 %21 + %26 = OpLoad %v4bool %arg_2 + %27 = OpLoad %v4float %arg_1 + %28 = OpLoad %v4float %arg_0 + %25 = OpSelect %v4float %26 %27 %28 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %select_bb8aae +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %select_bb8aae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %select_bb8aae - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %38 = OpLabel %39 = OpFunctionCall %void %select_bb8aae OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %41 = OpLabel + %42 = OpFunctionCall %void %select_bb8aae + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.wgsl index 17d904daff..e0075a141e 100644 --- a/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/bb8aae.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_bb8aae() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = vec4(true); var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl b/test/tint/builtins/gen/var/select/bf3d29.wgsl index fd33a8e4bb..91c77cd865 100644 --- a/test/tint/builtins/gen/var/select/bf3d29.wgsl +++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, f32>, vec<2, f32>, bool) -> vec<2, f32> fn select_bf3d29() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = true; var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.dxc.hlsl index a4862745eb..639514de88 100644 --- a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_bf3d29() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - bool arg_2 = false; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + bool arg_2 = true; float2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.fxc.hlsl index a4862745eb..639514de88 100644 --- a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_bf3d29() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - bool arg_2 = false; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + bool arg_2 = true; float2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.glsl index e2e29fac41..f6e07067bc 100644 --- a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_bf3d29() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - bool arg_2 = false; + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + bool arg_2 = true; vec2 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_bf3d29() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - bool arg_2 = false; + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + bool arg_2 = true; vec2 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_bf3d29() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - bool arg_2 = false; + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + bool arg_2 = true; vec2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.msl b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.msl index 4e8700682a..174b98ec21 100644 --- a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_bf3d29() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); - bool arg_2 = false; + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); + bool arg_2 = true; float2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.spvasm index 3b9f6ecc15..89a1163a47 100644 --- a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,53 +34,55 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %bool = OpTypeBool - %19 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool + %24 = OpConstantNull %bool %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %29 = OpConstantNull %v2bool - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v2bool + %35 = OpTypeFunction %v4float %select_bf3d29 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %arg_2 = OpVariable %_ptr_Function_bool Function %19 - %27 = OpVariable %_ptr_Function_v2bool Function %29 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %19 - %23 = OpLoad %bool %arg_2 - %24 = OpLoad %v2float %arg_1 - %25 = OpLoad %v2float %arg_0 - %30 = OpCompositeConstruct %v2bool %23 %23 - %22 = OpSelect %v2float %30 %24 %25 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %arg_2 = OpVariable %_ptr_Function_bool Function %24 + %30 = OpVariable %_ptr_Function_v2bool Function %32 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %true + %26 = OpLoad %bool %arg_2 + %27 = OpLoad %v2float %arg_1 + %28 = OpLoad %v2float %arg_0 + %33 = OpCompositeConstruct %v2bool %26 %26 + %25 = OpSelect %v2float %33 %27 %28 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %select_bf3d29 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %select_bf3d29 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_bf3d29 + %43 = OpLabel + %44 = OpFunctionCall %void %select_bf3d29 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %44 = OpLabel - %45 = OpFunctionCall %void %select_bf3d29 + %46 = OpLabel + %47 = OpFunctionCall %void %select_bf3d29 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.wgsl index 5cbeae7d72..b05a10e8d9 100644 --- a/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/bf3d29.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_bf3d29() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = true; var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl b/test/tint/builtins/gen/var/select/c31f9e.wgsl index 999888ee4b..e691063187 100644 --- a/test/tint/builtins/gen/var/select/c31f9e.wgsl +++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl @@ -25,9 +25,9 @@ // fn select(bool, bool, bool) -> bool fn select_c31f9e() { - var arg_0 = bool(); - var arg_1 = bool(); - var arg_2 = bool(); + var arg_0 = true; + var arg_1 = true; + var arg_2 = true; var res: bool = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.dxc.hlsl index c47c75a787..3be461a506 100644 --- a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_c31f9e() { - bool arg_0 = false; - bool arg_1 = false; - bool arg_2 = false; + bool arg_0 = true; + bool arg_1 = true; + bool arg_2 = true; bool res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.fxc.hlsl index c47c75a787..3be461a506 100644 --- a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_c31f9e() { - bool arg_0 = false; - bool arg_1 = false; - bool arg_2 = false; + bool arg_0 = true; + bool arg_1 = true; + bool arg_2 = true; bool res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.glsl index 27b14d890e..0f2507eaf8 100644 --- a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_c31f9e() { - bool arg_0 = false; - bool arg_1 = false; - bool arg_2 = false; + bool arg_0 = true; + bool arg_1 = true; + bool arg_2 = true; bool res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_c31f9e() { - bool arg_0 = false; - bool arg_1 = false; - bool arg_2 = false; + bool arg_0 = true; + bool arg_1 = true; + bool arg_2 = true; bool res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_c31f9e() { - bool arg_0 = false; - bool arg_1 = false; - bool arg_2 = false; + bool arg_0 = true; + bool arg_1 = true; + bool arg_2 = true; bool res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.msl b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.msl index 8ff1e0bb3b..d3176b30ca 100644 --- a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_c31f9e() { - bool arg_0 = false; - bool arg_1 = false; - bool arg_2 = false; + bool arg_0 = true; + bool arg_1 = true; + bool arg_2 = true; bool res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.spvasm index 6c8a03d9c0..794f5668c5 100644 --- a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,45 +34,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %bool = OpTypeBool - %14 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %24 = OpTypeFunction %v4float + %17 = OpConstantNull %bool + %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_c31f9e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_bool Function %14 - %arg_1 = OpVariable %_ptr_Function_bool Function %14 - %arg_2 = OpVariable %_ptr_Function_bool Function %14 - %res = OpVariable %_ptr_Function_bool Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %20 = OpLoad %bool %arg_2 - %21 = OpLoad %bool %arg_1 - %22 = OpLoad %bool %arg_0 - %19 = OpSelect %bool %20 %21 %22 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_bool Function %17 + %arg_1 = OpVariable %_ptr_Function_bool Function %17 + %arg_2 = OpVariable %_ptr_Function_bool Function %17 + %res = OpVariable %_ptr_Function_bool Function %17 + OpStore %arg_0 %true + OpStore %arg_1 %true + OpStore %arg_2 %true + %21 = OpLoad %bool %arg_2 + %22 = OpLoad %bool %arg_1 + %23 = OpLoad %bool %arg_0 + %20 = OpSelect %bool %21 %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %select_c31f9e +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %select_c31f9e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %select_c31f9e + %34 = OpLabel + %35 = OpFunctionCall %void %select_c31f9e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %select_c31f9e + %37 = OpLabel + %38 = OpFunctionCall %void %select_c31f9e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.wgsl index 785cf8d129..1fa45007e7 100644 --- a/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/c31f9e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_c31f9e() { - var arg_0 = bool(); - var arg_1 = bool(); - var arg_2 = bool(); + var arg_0 = true; + var arg_1 = true; + var arg_2 = true; var res : bool = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl b/test/tint/builtins/gen/var/select/c41bd1.wgsl index 42550cb690..c2c4c75b1d 100644 --- a/test/tint/builtins/gen/var/select/c41bd1.wgsl +++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, bool>, vec<4, bool>, bool) -> vec<4, bool> fn select_c41bd1() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(true); + var arg_1 = vec4(true); + var arg_2 = true; var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.dxc.hlsl index 09571cb4c4..3dbc9b20bb 100644 --- a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_c41bd1() { - bool4 arg_0 = (false).xxxx; - bool4 arg_1 = (false).xxxx; - bool arg_2 = false; + bool4 arg_0 = (true).xxxx; + bool4 arg_1 = (true).xxxx; + bool arg_2 = true; bool4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.fxc.hlsl index 09571cb4c4..3dbc9b20bb 100644 --- a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_c41bd1() { - bool4 arg_0 = (false).xxxx; - bool4 arg_1 = (false).xxxx; - bool arg_2 = false; + bool4 arg_0 = (true).xxxx; + bool4 arg_1 = (true).xxxx; + bool arg_2 = true; bool4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.glsl index a24ce0615b..048a70d637 100644 --- a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_c41bd1() { - bvec4 arg_0 = bvec4(false); - bvec4 arg_1 = bvec4(false); - bool arg_2 = false; + bvec4 arg_0 = bvec4(true); + bvec4 arg_1 = bvec4(true); + bool arg_2 = true; bvec4 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_c41bd1() { - bvec4 arg_0 = bvec4(false); - bvec4 arg_1 = bvec4(false); - bool arg_2 = false; + bvec4 arg_0 = bvec4(true); + bvec4 arg_1 = bvec4(true); + bool arg_2 = true; bvec4 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_c41bd1() { - bvec4 arg_0 = bvec4(false); - bvec4 arg_1 = bvec4(false); - bool arg_2 = false; + bvec4 arg_0 = bvec4(true); + bvec4 arg_1 = bvec4(true); + bool arg_2 = true; bvec4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.msl b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.msl index b2e7ba2250..0f359814ce 100644 --- a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_c41bd1() { - bool4 arg_0 = bool4(false); - bool4 arg_1 = bool4(false); - bool arg_2 = false; + bool4 arg_0 = bool4(true); + bool4 arg_1 = bool4(true); + bool arg_2 = true; bool4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.spvasm index b1606411a5..c1c88b50fc 100644 --- a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,51 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %15 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %19 = OpConstantNull %bool + %19 = OpConstantNull %v4bool %_ptr_Function_bool = OpTypePointer Function %bool - %29 = OpTypeFunction %v4float + %23 = OpConstantNull %bool + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_c41bd1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4bool Function %15 - %arg_1 = OpVariable %_ptr_Function_v4bool Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %19 - %26 = OpVariable %_ptr_Function_v4bool Function %15 - %res = OpVariable %_ptr_Function_v4bool Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %23 = OpLoad %bool %arg_2 - %24 = OpLoad %v4bool %arg_1 - %25 = OpLoad %v4bool %arg_0 - %27 = OpCompositeConstruct %v4bool %23 %23 %23 %23 - %22 = OpSelect %v4bool %27 %24 %25 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v4bool Function %19 + %arg_1 = OpVariable %_ptr_Function_v4bool Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %23 + %28 = OpVariable %_ptr_Function_v4bool Function %19 + %res = OpVariable %_ptr_Function_v4bool Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %25 = OpLoad %bool %arg_2 + %26 = OpLoad %v4bool %arg_1 + %27 = OpLoad %v4bool %arg_0 + %29 = OpCompositeConstruct %v4bool %25 %25 %25 %25 + %24 = OpSelect %v4bool %29 %26 %27 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_c41bd1 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %select_c41bd1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_c41bd1 + %40 = OpLabel + %41 = OpFunctionCall %void %select_c41bd1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_c41bd1 + %43 = OpLabel + %44 = OpFunctionCall %void %select_c41bd1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.wgsl index bdf0644a40..aeeb85cd5a 100644 --- a/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/c41bd1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_c41bd1() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = bool(); + var arg_0 = vec4(true); + var arg_1 = vec4(true); + var arg_2 = true; var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl b/test/tint/builtins/gen/var/select/c4a4ef.wgsl index f21d6cae9a..b803e7218a 100644 --- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl +++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, u32>, vec<4, u32>, vec<4, bool>) -> vec<4, u32> fn select_c4a4ef() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); + var arg_2 = vec4(true); var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.dxc.hlsl index 640511b0db..2ef3ebdaea 100644 --- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_c4a4ef() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; - bool4 arg_2 = (false).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; + bool4 arg_2 = (true).xxxx; uint4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.fxc.hlsl index 640511b0db..2ef3ebdaea 100644 --- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_c4a4ef() { - uint4 arg_0 = (0u).xxxx; - uint4 arg_1 = (0u).xxxx; - bool4 arg_2 = (false).xxxx; + uint4 arg_0 = (1u).xxxx; + uint4 arg_1 = (1u).xxxx; + bool4 arg_2 = (true).xxxx; uint4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.glsl index d20e19f80a..d75fbb7fb2 100644 --- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_c4a4ef() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - bvec4 arg_2 = bvec4(false); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + bvec4 arg_2 = bvec4(true); uvec4 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_c4a4ef() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - bvec4 arg_2 = bvec4(false); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + bvec4 arg_2 = bvec4(true); uvec4 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_c4a4ef() { - uvec4 arg_0 = uvec4(0u); - uvec4 arg_1 = uvec4(0u); - bvec4 arg_2 = bvec4(false); + uvec4 arg_0 = uvec4(1u); + uvec4 arg_1 = uvec4(1u); + bvec4 arg_2 = bvec4(true); uvec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.msl b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.msl index 0c1ae54b40..7e6eb78453 100644 --- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_c4a4ef() { - uint4 arg_0 = uint4(0u); - uint4 arg_1 = uint4(0u); - bool4 arg_2 = bool4(false); + uint4 arg_0 = uint4(1u); + uint4 arg_1 = uint4(1u); + bool4 arg_2 = bool4(true); uint4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.spvasm index 43b65fb282..620f545594 100644 --- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,53 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v4uint = OpTypeVector %uint 4 - %15 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %19 = OpConstantNull %v4uint %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %21 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %24 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4bool + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_c4a4ef = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_1 = OpVariable %_ptr_Function_v4uint Function %15 - %arg_2 = OpVariable %_ptr_Function_v4bool Function %21 - %res = OpVariable %_ptr_Function_v4uint Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %21 - %25 = OpLoad %v4bool %arg_2 - %26 = OpLoad %v4uint %arg_1 - %27 = OpLoad %v4uint %arg_0 - %24 = OpSelect %v4uint %25 %26 %27 - OpStore %res %24 + %arg_0 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_1 = OpVariable %_ptr_Function_v4uint Function %19 + %arg_2 = OpVariable %_ptr_Function_v4bool Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %24 + %29 = OpLoad %v4bool %arg_2 + %30 = OpLoad %v4uint %arg_1 + %31 = OpLoad %v4uint %arg_0 + %28 = OpSelect %v4uint %29 %30 %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_c4a4ef +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %select_c4a4ef OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_c4a4ef + %42 = OpLabel + %43 = OpFunctionCall %void %select_c4a4ef OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_c4a4ef + %45 = OpLabel + %46 = OpFunctionCall %void %select_c4a4ef OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.wgsl index 73011bc9ad..a155e7653f 100644 --- a/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/c4a4ef.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_c4a4ef() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1u); + var arg_1 = vec4(1u); + var arg_2 = vec4(true); var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl b/test/tint/builtins/gen/var/select/cb9301.wgsl index c7bfb5433c..01ece94580 100644 --- a/test/tint/builtins/gen/var/select/cb9301.wgsl +++ b/test/tint/builtins/gen/var/select/cb9301.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, bool>, vec<2, bool>, vec<2, bool>) -> vec<2, bool> fn select_cb9301() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(true); + var arg_1 = vec2(true); + var arg_2 = vec2(true); var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.dxc.hlsl index 712794e7a1..76b1344abb 100644 --- a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_cb9301() { - bool2 arg_0 = (false).xx; - bool2 arg_1 = (false).xx; - bool2 arg_2 = (false).xx; + bool2 arg_0 = (true).xx; + bool2 arg_1 = (true).xx; + bool2 arg_2 = (true).xx; bool2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.fxc.hlsl index 712794e7a1..76b1344abb 100644 --- a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_cb9301() { - bool2 arg_0 = (false).xx; - bool2 arg_1 = (false).xx; - bool2 arg_2 = (false).xx; + bool2 arg_0 = (true).xx; + bool2 arg_1 = (true).xx; + bool2 arg_2 = (true).xx; bool2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.glsl index 83f3e7663b..8c7e5d2bf5 100644 --- a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_cb9301() { - bvec2 arg_0 = bvec2(false); - bvec2 arg_1 = bvec2(false); - bvec2 arg_2 = bvec2(false); + bvec2 arg_0 = bvec2(true); + bvec2 arg_1 = bvec2(true); + bvec2 arg_2 = bvec2(true); bvec2 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_cb9301() { - bvec2 arg_0 = bvec2(false); - bvec2 arg_1 = bvec2(false); - bvec2 arg_2 = bvec2(false); + bvec2 arg_0 = bvec2(true); + bvec2 arg_1 = bvec2(true); + bvec2 arg_2 = bvec2(true); bvec2 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_cb9301() { - bvec2 arg_0 = bvec2(false); - bvec2 arg_1 = bvec2(false); - bvec2 arg_2 = bvec2(false); + bvec2 arg_0 = bvec2(true); + bvec2 arg_1 = bvec2(true); + bvec2 arg_2 = bvec2(true); bvec2 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.msl b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.msl index f3fd18c507..3bdecabec1 100644 --- a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_cb9301() { - bool2 arg_0 = bool2(false); - bool2 arg_1 = bool2(false); - bool2 arg_2 = bool2(false); + bool2 arg_0 = bool2(true); + bool2 arg_1 = bool2(true); + bool2 arg_2 = bool2(true); bool2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.spvasm index 13598e7110..0060df1969 100644 --- a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,45 +35,47 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %15 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %25 = OpTypeFunction %v4float + %19 = OpConstantNull %v2bool + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_cb9301 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2bool Function %15 - %arg_1 = OpVariable %_ptr_Function_v2bool Function %15 - %arg_2 = OpVariable %_ptr_Function_v2bool Function %15 - %res = OpVariable %_ptr_Function_v2bool Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %21 = OpLoad %v2bool %arg_2 - %22 = OpLoad %v2bool %arg_1 - %23 = OpLoad %v2bool %arg_0 - %20 = OpSelect %v2bool %21 %22 %23 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v2bool Function %19 + %arg_1 = OpVariable %_ptr_Function_v2bool Function %19 + %arg_2 = OpVariable %_ptr_Function_v2bool Function %19 + %res = OpVariable %_ptr_Function_v2bool Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %23 = OpLoad %v2bool %arg_2 + %24 = OpLoad %v2bool %arg_1 + %25 = OpLoad %v2bool %arg_0 + %22 = OpSelect %v2bool %23 %24 %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %select_cb9301 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %select_cb9301 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_cb9301 + %36 = OpLabel + %37 = OpFunctionCall %void %select_cb9301 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_cb9301 + %39 = OpLabel + %40 = OpFunctionCall %void %select_cb9301 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.wgsl index ea47bdf86c..e5744baad6 100644 --- a/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/cb9301.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_cb9301() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(true); + var arg_1 = vec2(true); + var arg_2 = vec2(true); var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl b/test/tint/builtins/gen/var/select/e3e028.wgsl index 49f534ed62..319b243bca 100644 --- a/test/tint/builtins/gen/var/select/e3e028.wgsl +++ b/test/tint/builtins/gen/var/select/e3e028.wgsl @@ -25,9 +25,9 @@ // fn select(vec<4, bool>, vec<4, bool>, vec<4, bool>) -> vec<4, bool> fn select_e3e028() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(true); + var arg_1 = vec4(true); + var arg_2 = vec4(true); var res: vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.dxc.hlsl index 1f55573525..2d1efcf171 100644 --- a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_e3e028() { - bool4 arg_0 = (false).xxxx; - bool4 arg_1 = (false).xxxx; - bool4 arg_2 = (false).xxxx; + bool4 arg_0 = (true).xxxx; + bool4 arg_1 = (true).xxxx; + bool4 arg_2 = (true).xxxx; bool4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.fxc.hlsl index 1f55573525..2d1efcf171 100644 --- a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_e3e028() { - bool4 arg_0 = (false).xxxx; - bool4 arg_1 = (false).xxxx; - bool4 arg_2 = (false).xxxx; + bool4 arg_0 = (true).xxxx; + bool4 arg_1 = (true).xxxx; + bool4 arg_2 = (true).xxxx; bool4 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.glsl index f7c42e3ba8..afdfd70f00 100644 --- a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_e3e028() { - bvec4 arg_0 = bvec4(false); - bvec4 arg_1 = bvec4(false); - bvec4 arg_2 = bvec4(false); + bvec4 arg_0 = bvec4(true); + bvec4 arg_1 = bvec4(true); + bvec4 arg_2 = bvec4(true); bvec4 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_e3e028() { - bvec4 arg_0 = bvec4(false); - bvec4 arg_1 = bvec4(false); - bvec4 arg_2 = bvec4(false); + bvec4 arg_0 = bvec4(true); + bvec4 arg_1 = bvec4(true); + bvec4 arg_2 = bvec4(true); bvec4 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_e3e028() { - bvec4 arg_0 = bvec4(false); - bvec4 arg_1 = bvec4(false); - bvec4 arg_2 = bvec4(false); + bvec4 arg_0 = bvec4(true); + bvec4 arg_1 = bvec4(true); + bvec4 arg_2 = bvec4(true); bvec4 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.msl b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.msl index ad607f72dd..817ec0d363 100644 --- a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_e3e028() { - bool4 arg_0 = bool4(false); - bool4 arg_1 = bool4(false); - bool4 arg_2 = bool4(false); + bool4 arg_0 = bool4(true); + bool4 arg_1 = bool4(true); + bool4 arg_2 = bool4(true); bool4 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.spvasm index 7397e7d2d1..c5e95acdda 100644 --- a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,45 +35,47 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v4bool = OpTypeVector %bool 4 - %15 = OpConstantNull %v4bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4bool = OpTypePointer Function %v4bool - %25 = OpTypeFunction %v4float + %19 = OpConstantNull %v4bool + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_e3e028 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v4bool Function %15 - %arg_1 = OpVariable %_ptr_Function_v4bool Function %15 - %arg_2 = OpVariable %_ptr_Function_v4bool Function %15 - %res = OpVariable %_ptr_Function_v4bool Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %15 - %21 = OpLoad %v4bool %arg_2 - %22 = OpLoad %v4bool %arg_1 - %23 = OpLoad %v4bool %arg_0 - %20 = OpSelect %v4bool %21 %22 %23 - OpStore %res %20 + %arg_0 = OpVariable %_ptr_Function_v4bool Function %19 + %arg_1 = OpVariable %_ptr_Function_v4bool Function %19 + %arg_2 = OpVariable %_ptr_Function_v4bool Function %19 + %res = OpVariable %_ptr_Function_v4bool Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %16 + %23 = OpLoad %v4bool %arg_2 + %24 = OpLoad %v4bool %arg_1 + %25 = OpLoad %v4bool %arg_0 + %22 = OpSelect %v4bool %23 %24 %25 + OpStore %res %22 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %select_e3e028 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %select_e3e028 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %select_e3e028 + %36 = OpLabel + %37 = OpFunctionCall %void %select_e3e028 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_e3e028 + %39 = OpLabel + %40 = OpFunctionCall %void %select_e3e028 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.wgsl index f7aa2787ea..69fe77f464 100644 --- a/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/e3e028.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_e3e028() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(true); + var arg_1 = vec4(true); + var arg_2 = vec4(true); var res : vec4 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl b/test/tint/builtins/gen/var/select/ebfea2.wgsl index 5af3aa5ed8..ff33bac5a2 100644 --- a/test/tint/builtins/gen/var/select/ebfea2.wgsl +++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl @@ -25,9 +25,9 @@ // fn select(vec<3, f32>, vec<3, f32>, vec<3, bool>) -> vec<3, f32> fn select_ebfea2() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = vec3(true); var res: vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.dxc.hlsl index e7f7af298c..e60468fcfe 100644 --- a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_ebfea2() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - bool3 arg_2 = (false).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + bool3 arg_2 = (true).xxx; float3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.fxc.hlsl index e7f7af298c..e60468fcfe 100644 --- a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_ebfea2() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - bool3 arg_2 = (false).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + bool3 arg_2 = (true).xxx; float3 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.glsl index de4df3c393..38126c63ec 100644 --- a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_ebfea2() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - bvec3 arg_2 = bvec3(false); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + bvec3 arg_2 = bvec3(true); vec3 res = mix(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_ebfea2() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - bvec3 arg_2 = bvec3(false); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + bvec3 arg_2 = bvec3(true); vec3 res = mix(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_ebfea2() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - bvec3 arg_2 = bvec3(false); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + bvec3 arg_2 = bvec3(true); vec3 res = mix(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.msl b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.msl index a4bf7954c4..10ce571773 100644 --- a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_ebfea2() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); - bool3 arg_2 = bool3(false); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); + bool3 arg_2 = bool3(true); float3 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.spvasm index 17e6912e8a..0657b5e50d 100644 --- a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -34,49 +34,52 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float %bool = OpTypeBool %v3bool = OpTypeVector %bool 3 - %20 = OpConstantNull %v3bool + %true = OpConstantTrue %bool + %23 = OpConstantComposite %v3bool %true %true %true %_ptr_Function_v3bool = OpTypePointer Function %v3bool - %28 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %v3bool + %32 = OpTypeFunction %v4float %select_ebfea2 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %arg_2 = OpVariable %_ptr_Function_v3bool Function %20 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %20 - %24 = OpLoad %v3bool %arg_2 - %25 = OpLoad %v3float %arg_1 - %26 = OpLoad %v3float %arg_0 - %23 = OpSelect %v3float %24 %25 %26 - OpStore %res %23 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %arg_2 = OpVariable %_ptr_Function_v3bool Function %26 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %23 + %28 = OpLoad %v3bool %arg_2 + %29 = OpLoad %v3float %arg_1 + %30 = OpLoad %v3float %arg_0 + %27 = OpSelect %v3float %28 %29 %30 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %select_ebfea2 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %select_ebfea2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_ebfea2 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %9 %40 = OpLabel %41 = OpFunctionCall %void %select_ebfea2 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %9 + %43 = OpLabel + %44 = OpFunctionCall %void %select_ebfea2 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.wgsl index 5c5fef58ed..97db546920 100644 --- a/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/ebfea2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_ebfea2() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = vec3(true); var res : vec3 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl b/test/tint/builtins/gen/var/select/ed8a15.wgsl index 49aae0ac17..0912de829f 100644 --- a/test/tint/builtins/gen/var/select/ed8a15.wgsl +++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl @@ -27,7 +27,7 @@ fn select_ed8a15() { var arg_0 = 1; var arg_1 = 1; - var arg_2 = bool(); + var arg_2 = true; var res: i32 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.dxc.hlsl index 9c3ec95a49..a47eb0e4b4 100644 --- a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_ed8a15() { int arg_0 = 1; int arg_1 = 1; - bool arg_2 = false; + bool arg_2 = true; int res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.fxc.hlsl index 9c3ec95a49..a47eb0e4b4 100644 --- a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_ed8a15() { int arg_0 = 1; int arg_1 = 1; - bool arg_2 = false; + bool arg_2 = true; int res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.glsl index b8a1787872..57b434ca8e 100644 --- a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.glsl @@ -3,7 +3,7 @@ void select_ed8a15() { int arg_0 = 1; int arg_1 = 1; - bool arg_2 = false; + bool arg_2 = true; int res = (arg_2 ? arg_1 : arg_0); } @@ -26,7 +26,7 @@ precision mediump float; void select_ed8a15() { int arg_0 = 1; int arg_1 = 1; - bool arg_2 = false; + bool arg_2 = true; int res = (arg_2 ? arg_1 : arg_0); } @@ -43,7 +43,7 @@ void main() { void select_ed8a15() { int arg_0 = 1; int arg_1 = 1; - bool arg_2 = false; + bool arg_2 = true; int res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.msl b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.msl index f28caa9814..dba6c413f0 100644 --- a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; void select_ed8a15() { int arg_0 = 1; int arg_1 = 1; - bool arg_2 = false; + bool arg_2 = true; int res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.spvasm index 1479e66ce8..ecd306f7e0 100644 --- a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,45 +38,46 @@ %_ptr_Function_int = OpTypePointer Function %int %17 = OpConstantNull %int %bool = OpTypeBool - %20 = OpConstantNull %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool - %28 = OpTypeFunction %v4float + %23 = OpConstantNull %bool + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_ed8a15 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_int Function %17 %arg_1 = OpVariable %_ptr_Function_int Function %17 - %arg_2 = OpVariable %_ptr_Function_bool Function %20 + %arg_2 = OpVariable %_ptr_Function_bool Function %23 %res = OpVariable %_ptr_Function_int Function %17 OpStore %arg_0 %int_1 OpStore %arg_1 %int_1 - OpStore %arg_2 %20 - %24 = OpLoad %bool %arg_2 - %25 = OpLoad %int %arg_1 - %26 = OpLoad %int %arg_0 - %23 = OpSelect %int %24 %25 %26 - OpStore %res %23 + OpStore %arg_2 %true + %25 = OpLoad %bool %arg_2 + %26 = OpLoad %int %arg_1 + %27 = OpLoad %int %arg_0 + %24 = OpSelect %int %25 %26 %27 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %select_ed8a15 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %select_ed8a15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %select_ed8a15 + %38 = OpLabel + %39 = OpFunctionCall %void %select_ed8a15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %40 = OpLabel - %41 = OpFunctionCall %void %select_ed8a15 + %41 = OpLabel + %42 = OpFunctionCall %void %select_ed8a15 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.wgsl index 65bbb9833a..c3607cc237 100644 --- a/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/ed8a15.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_ed8a15() { var arg_0 = 1; var arg_1 = 1; - var arg_2 = bool(); + var arg_2 = true; var res : i32 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl b/test/tint/builtins/gen/var/select/fb7e53.wgsl index ee4dd96464..6f8b64670f 100644 --- a/test/tint/builtins/gen/var/select/fb7e53.wgsl +++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl @@ -25,9 +25,9 @@ // fn select(vec<2, bool>, vec<2, bool>, bool) -> vec<2, bool> fn select_fb7e53() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(true); + var arg_1 = vec2(true); + var arg_2 = true; var res: vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.dxc.hlsl index c5056e4117..db58f482a1 100644 --- a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void select_fb7e53() { - bool2 arg_0 = (false).xx; - bool2 arg_1 = (false).xx; - bool arg_2 = false; + bool2 arg_0 = (true).xx; + bool2 arg_1 = (true).xx; + bool arg_2 = true; bool2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.fxc.hlsl index c5056e4117..db58f482a1 100644 --- a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void select_fb7e53() { - bool2 arg_0 = (false).xx; - bool2 arg_1 = (false).xx; - bool arg_2 = false; + bool2 arg_0 = (true).xx; + bool2 arg_1 = (true).xx; + bool arg_2 = true; bool2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.glsl b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.glsl index af24c0081d..ba17a1bb48 100644 --- a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void select_fb7e53() { - bvec2 arg_0 = bvec2(false); - bvec2 arg_1 = bvec2(false); - bool arg_2 = false; + bvec2 arg_0 = bvec2(true); + bvec2 arg_1 = bvec2(true); + bool arg_2 = true; bvec2 res = (arg_2 ? arg_1 : arg_0); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void select_fb7e53() { - bvec2 arg_0 = bvec2(false); - bvec2 arg_1 = bvec2(false); - bool arg_2 = false; + bvec2 arg_0 = bvec2(true); + bvec2 arg_1 = bvec2(true); + bool arg_2 = true; bvec2 res = (arg_2 ? arg_1 : arg_0); } @@ -41,9 +41,9 @@ void main() { #version 310 es void select_fb7e53() { - bvec2 arg_0 = bvec2(false); - bvec2 arg_1 = bvec2(false); - bool arg_2 = false; + bvec2 arg_0 = bvec2(true); + bvec2 arg_1 = bvec2(true); + bool arg_2 = true; bvec2 res = (arg_2 ? arg_1 : arg_0); } diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.msl b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.msl index f5c62b7eca..4f7aebf107 100644 --- a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void select_fb7e53() { - bool2 arg_0 = bool2(false); - bool2 arg_1 = bool2(false); - bool arg_2 = false; + bool2 arg_0 = bool2(true); + bool2 arg_1 = bool2(true); + bool arg_2 = true; bool2 res = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.spvasm b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.spvasm index ea49de4824..ce869a995f 100644 --- a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -35,49 +35,51 @@ %9 = OpTypeFunction %void %bool = OpTypeBool %v2bool = OpTypeVector %bool 2 - %15 = OpConstantNull %v2bool + %true = OpConstantTrue %bool + %16 = OpConstantComposite %v2bool %true %true %_ptr_Function_v2bool = OpTypePointer Function %v2bool - %19 = OpConstantNull %bool + %19 = OpConstantNull %v2bool %_ptr_Function_bool = OpTypePointer Function %bool - %29 = OpTypeFunction %v4float + %23 = OpConstantNull %bool + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %select_fb7e53 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2bool Function %15 - %arg_1 = OpVariable %_ptr_Function_v2bool Function %15 - %arg_2 = OpVariable %_ptr_Function_bool Function %19 - %26 = OpVariable %_ptr_Function_v2bool Function %15 - %res = OpVariable %_ptr_Function_v2bool Function %15 - OpStore %arg_0 %15 - OpStore %arg_1 %15 - OpStore %arg_2 %19 - %23 = OpLoad %bool %arg_2 - %24 = OpLoad %v2bool %arg_1 - %25 = OpLoad %v2bool %arg_0 - %27 = OpCompositeConstruct %v2bool %23 %23 - %22 = OpSelect %v2bool %27 %24 %25 - OpStore %res %22 + %arg_0 = OpVariable %_ptr_Function_v2bool Function %19 + %arg_1 = OpVariable %_ptr_Function_v2bool Function %19 + %arg_2 = OpVariable %_ptr_Function_bool Function %23 + %28 = OpVariable %_ptr_Function_v2bool Function %19 + %res = OpVariable %_ptr_Function_v2bool Function %19 + OpStore %arg_0 %16 + OpStore %arg_1 %16 + OpStore %arg_2 %true + %25 = OpLoad %bool %arg_2 + %26 = OpLoad %v2bool %arg_1 + %27 = OpLoad %v2bool %arg_0 + %29 = OpCompositeConstruct %v2bool %25 %25 + %24 = OpSelect %v2bool %29 %26 %27 + OpStore %res %24 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %select_fb7e53 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %select_fb7e53 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %38 = OpLabel - %39 = OpFunctionCall %void %select_fb7e53 + %40 = OpLabel + %41 = OpFunctionCall %void %select_fb7e53 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %41 = OpLabel - %42 = OpFunctionCall %void %select_fb7e53 + %43 = OpLabel + %44 = OpFunctionCall %void %select_fb7e53 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.wgsl b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.wgsl index f7f0b1893f..c2ab9199aa 100644 --- a/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/select/fb7e53.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn select_fb7e53() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = bool(); + var arg_0 = vec2(true); + var arg_1 = vec2(true); + var arg_2 = true; var res : vec2 = select(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl b/test/tint/builtins/gen/var/sign/159665.wgsl index ab8e3d8662..0b7d1801ee 100644 --- a/test/tint/builtins/gen/var/sign/159665.wgsl +++ b/test/tint/builtins/gen/var/sign/159665.wgsl @@ -25,7 +25,7 @@ // fn sign(vec<3, f32>) -> vec<3, f32> fn sign_159665() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.dxc.hlsl index 6c8fde0111..0f5abe888e 100644 --- a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_159665() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.fxc.hlsl index 6c8fde0111..0f5abe888e 100644 --- a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sign_159665() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.glsl index 9427bed115..1666599392 100644 --- a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sign_159665() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sign(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sign_159665() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sign(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sign_159665() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.msl index 38383b4865..4d43529b52 100644 --- a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_159665() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.spvasm index 9bc6977c60..490da92087 100644 --- a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %sign_159665 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 FSign %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 FSign %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sign_159665 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sign_159665 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sign_159665 + %31 = OpLabel + %32 = OpFunctionCall %void %sign_159665 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sign_159665 + %34 = OpLabel + %35 = OpFunctionCall %void %sign_159665 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.wgsl index 60bd474843..b93768d7ee 100644 --- a/test/tint/builtins/gen/var/sign/159665.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/159665.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_159665() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl b/test/tint/builtins/gen/var/sign/b8f634.wgsl index c9d7756d16..c6dfdc9edb 100644 --- a/test/tint/builtins/gen/var/sign/b8f634.wgsl +++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl @@ -25,7 +25,7 @@ // fn sign(vec<4, f32>) -> vec<4, f32> fn sign_b8f634() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.dxc.hlsl index 19c3470a89..dd79825e0c 100644 --- a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_b8f634() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.fxc.hlsl index 19c3470a89..dd79825e0c 100644 --- a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sign_b8f634() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.glsl index 18bb2b050a..8ef9f02bf7 100644 --- a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sign_b8f634() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sign(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sign_b8f634() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sign(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sign_b8f634() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.msl index 3dc447320f..78e7a17601 100644 --- a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_b8f634() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.spvasm index 27635d8abc..39b2cc460d 100644 --- a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %sign_b8f634 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 FSign %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 FSign %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sign_b8f634 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sign_b8f634 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sign_b8f634 + %29 = OpLabel + %30 = OpFunctionCall %void %sign_b8f634 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sign_b8f634 + %32 = OpLabel + %33 = OpFunctionCall %void %sign_b8f634 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.wgsl index 54508497b9..efd95ce064 100644 --- a/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/b8f634.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_b8f634() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl b/test/tint/builtins/gen/var/sign/d065d8.wgsl index d38af2ff7e..cc7d078f1e 100644 --- a/test/tint/builtins/gen/var/sign/d065d8.wgsl +++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl @@ -25,7 +25,7 @@ // fn sign(vec<2, f32>) -> vec<2, f32> fn sign_d065d8() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.dxc.hlsl index 9abf6c402c..1c42f9a7d6 100644 --- a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sign_d065d8() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.fxc.hlsl index 9abf6c402c..1c42f9a7d6 100644 --- a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sign_d065d8() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.glsl index e98d5e32cd..e70621cec8 100644 --- a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sign_d065d8() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sign(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sign_d065d8() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sign(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sign_d065d8() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.msl b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.msl index ddcf6210f3..cc59629539 100644 --- a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sign_d065d8() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.spvasm index dfdb7fc24f..b751984fdb 100644 --- a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %sign_d065d8 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 FSign %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 FSign %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sign_d065d8 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sign_d065d8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sign_d065d8 + %31 = OpLabel + %32 = OpFunctionCall %void %sign_d065d8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sign_d065d8 + %34 = OpLabel + %35 = OpFunctionCall %void %sign_d065d8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.wgsl index 685db1e59b..f92d409d3f 100644 --- a/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/d065d8.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_d065d8() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/dd790e.wgsl b/test/tint/builtins/gen/var/sign/dd790e.wgsl index bb2c9cfd10..2a5fccb7ef 100644 --- a/test/tint/builtins/gen/var/sign/dd790e.wgsl +++ b/test/tint/builtins/gen/var/sign/dd790e.wgsl @@ -25,7 +25,7 @@ // fn sign(f32) -> f32 fn sign_dd790e() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.wgsl index ab2beee34b..0fa70cc0e9 100644 --- a/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sign/dd790e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sign_dd790e() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = sign(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl b/test/tint/builtins/gen/var/sin/01f241.wgsl index 807d5ba4cc..6dc1e4e39c 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl @@ -25,7 +25,7 @@ // fn sin(vec<3, f32>) -> vec<3, f32> fn sin_01f241() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl index d2419e7827..e8ff0a806b 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl index d2419e7827..e8ff0a806b 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_01f241() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl index f9b89812e0..9f99f43209 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_01f241() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sin_01f241() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sin_01f241() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl index 4beab98e37..d36e8b06c9 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_01f241() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.spvasm index 53fbcbd436..14c4afcd67 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %sin_01f241 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Sin %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Sin %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sin_01f241 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sin_01f241 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sin_01f241 + %31 = OpLabel + %32 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sin_01f241 + %34 = OpLabel + %35 = OpFunctionCall %void %sin_01f241 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl index e75c9e4d27..41822a417a 100644 --- a/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/01f241.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_01f241() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl index 6622071e65..94ca1e2ffc 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl @@ -25,7 +25,7 @@ // fn sin(vec<4, f32>) -> vec<4, f32> fn sin_4e3979() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl index 17d1855ce3..32993b495e 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl index 17d1855ce3..32993b495e 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_4e3979() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl index 201e133c6e..0134e30c75 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_4e3979() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sin_4e3979() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sin_4e3979() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl index 5d7e8fa43f..5ea6144da0 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_4e3979() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.spvasm index f8e43b0af9..cb3457f908 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %sin_4e3979 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Sin %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Sin %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sin_4e3979 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sin_4e3979 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sin_4e3979 + %29 = OpLabel + %30 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sin_4e3979 + %32 = OpLabel + %33 = OpFunctionCall %void %sin_4e3979 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl index 829c920440..d94d8d267d 100644 --- a/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/4e3979.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_4e3979() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl b/test/tint/builtins/gen/var/sin/b78c91.wgsl index 318b7e6273..1640a3c6f5 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl @@ -25,7 +25,7 @@ // fn sin(f32) -> f32 fn sin_b78c91() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl index 9c031bc376..ea62dd311a 100644 --- a/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/b78c91.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_b78c91() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl index 139591c94a..f6bd2d53bc 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl @@ -25,7 +25,7 @@ // fn sin(vec<2, f32>) -> vec<2, f32> fn sin_fc8bc4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl index a06c569dce..abef57b7a8 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl index a06c569dce..abef57b7a8 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sin_fc8bc4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl index d5071ce6a1..e1341c0ae0 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sin_fc8bc4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sin(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sin_fc8bc4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sin(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sin_fc8bc4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl index 602c0050f0..d303ffe586 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sin_fc8bc4() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.spvasm index e7dff32bba..add6aea88d 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %sin_fc8bc4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Sin %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Sin %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sin_fc8bc4 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sin_fc8bc4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sin_fc8bc4 + %31 = OpLabel + %32 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sin_fc8bc4 + %34 = OpLabel + %35 = OpFunctionCall %void %sin_fc8bc4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl index a0328019f4..ada801976c 100644 --- a/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sin/fc8bc4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sin_fc8bc4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = sin(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl b/test/tint/builtins/gen/var/sinh/445e33.wgsl index 479f81dad7..a3952f3f0e 100644 --- a/test/tint/builtins/gen/var/sinh/445e33.wgsl +++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl @@ -25,7 +25,7 @@ // fn sinh(vec<4, f32>) -> vec<4, f32> fn sinh_445e33() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.dxc.hlsl index 7ae5522f15..29cc9fc15a 100644 --- a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_445e33() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.fxc.hlsl index 7ae5522f15..29cc9fc15a 100644 --- a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sinh_445e33() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.glsl index 474189b165..6df1cb3595 100644 --- a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sinh_445e33() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sinh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sinh_445e33() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sinh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sinh_445e33() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.msl index 20a5830ce4..d4d686d211 100644 --- a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_445e33() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.spvasm index 0bf452a3d3..c58c7faa45 100644 --- a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %sinh_445e33 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Sinh %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Sinh %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sinh_445e33 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sinh_445e33 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sinh_445e33 + %29 = OpLabel + %30 = OpFunctionCall %void %sinh_445e33 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sinh_445e33 + %32 = OpLabel + %33 = OpFunctionCall %void %sinh_445e33 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.wgsl index 2d59ce51bc..367c9ebfa8 100644 --- a/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/445e33.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_445e33() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/7bb598.wgsl b/test/tint/builtins/gen/var/sinh/7bb598.wgsl index 90614967e8..a657838563 100644 --- a/test/tint/builtins/gen/var/sinh/7bb598.wgsl +++ b/test/tint/builtins/gen/var/sinh/7bb598.wgsl @@ -25,7 +25,7 @@ // fn sinh(f32) -> f32 fn sinh_7bb598() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.wgsl index 45a656ce8c..fb4583a972 100644 --- a/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/7bb598.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_7bb598() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl b/test/tint/builtins/gen/var/sinh/b9860e.wgsl index d01d522e3e..f25388ae83 100644 --- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl +++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl @@ -25,7 +25,7 @@ // fn sinh(vec<2, f32>) -> vec<2, f32> fn sinh_b9860e() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.dxc.hlsl index f1a64f6965..fc6a913e97 100644 --- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_b9860e() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.fxc.hlsl index f1a64f6965..fc6a913e97 100644 --- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sinh_b9860e() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.glsl index ad6e3fb073..613603e8c8 100644 --- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sinh_b9860e() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sinh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sinh_b9860e() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sinh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sinh_b9860e() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.msl index 13cb06a33f..c22f6a3483 100644 --- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_b9860e() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.spvasm index 5dbdbeb9c0..809a295555 100644 --- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %sinh_b9860e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Sinh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Sinh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sinh_b9860e +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sinh_b9860e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sinh_b9860e + %31 = OpLabel + %32 = OpFunctionCall %void %sinh_b9860e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sinh_b9860e + %34 = OpLabel + %35 = OpFunctionCall %void %sinh_b9860e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.wgsl index d7b13b82cb..33a4a41c36 100644 --- a/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/b9860e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_b9860e() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl index d6dcd5033a..c0ec1d4d7b 100644 --- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl +++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl @@ -25,7 +25,7 @@ // fn sinh(vec<3, f32>) -> vec<3, f32> fn sinh_c9a5eb() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.dxc.hlsl index b600a69bf7..92ed2f7eb9 100644 --- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sinh_c9a5eb() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.fxc.hlsl index b600a69bf7..92ed2f7eb9 100644 --- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sinh_c9a5eb() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.glsl b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.glsl index d8de41d991..2eab0a2aa9 100644 --- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sinh_c9a5eb() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sinh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sinh_c9a5eb() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sinh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sinh_c9a5eb() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.msl b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.msl index 6903d34869..ba159669c1 100644 --- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sinh_c9a5eb() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.spvasm index 06720a1bbc..f5619cd57d 100644 --- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %sinh_c9a5eb = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Sinh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Sinh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sinh_c9a5eb +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sinh_c9a5eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sinh_c9a5eb + %31 = OpLabel + %32 = OpFunctionCall %void %sinh_c9a5eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sinh_c9a5eb + %34 = OpLabel + %35 = OpFunctionCall %void %sinh_c9a5eb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.wgsl index b17650c24d..90f08fb89a 100644 --- a/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sinh/c9a5eb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sinh_c9a5eb() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = sinh(arg_0); } diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl index a197c30616..66ead99f19 100644 --- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl @@ -25,9 +25,9 @@ // fn smoothstep(vec<2, f32>, vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn smoothstep_392c19() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); + var arg_2 = vec2(1.f); var res: vec2 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.dxc.hlsl index 1d57c73c96..a63dae41f0 100644 --- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_392c19() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.fxc.hlsl index 1d57c73c96..a63dae41f0 100644 --- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_392c19() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; - float2 arg_2 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; + float2 arg_2 = (1.0f).xx; float2 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.glsl index 37a5da962a..9b89ca11f2 100644 --- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void smoothstep_392c19() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = smoothstep(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void smoothstep_392c19() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = smoothstep(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void smoothstep_392c19() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); - vec2 arg_2 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); + vec2 arg_2 = vec2(1.0f); vec2 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.msl index 38ba87cd3b..a833298557 100644 --- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void smoothstep_392c19() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); - float2 arg_2 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); + float2 arg_2 = float2(1.0f); float2 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.spvasm index b41e51a15d..2e3a4b1605 100644 --- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %27 = OpTypeFunction %v4float %smoothstep_392c19 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %arg_2 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v2float %arg_0 - %22 = OpLoad %v2float %arg_1 - %23 = OpLoad %v2float %arg_2 - %19 = OpExtInst %v2float %20 SmoothStep %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %arg_2 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v2float %arg_0 + %24 = OpLoad %v2float %arg_1 + %25 = OpLoad %v2float %arg_2 + %21 = OpExtInst %v2float %22 SmoothStep %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %smoothstep_392c19 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %smoothstep_392c19 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %smoothstep_392c19 + %35 = OpLabel + %36 = OpFunctionCall %void %smoothstep_392c19 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %smoothstep_392c19 + %38 = OpLabel + %39 = OpFunctionCall %void %smoothstep_392c19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.wgsl index 4c013fabe5..7d3c0d0ada 100644 --- a/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/392c19.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn smoothstep_392c19() { - var arg_0 = vec2(); - var arg_1 = vec2(); - var arg_2 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); + var arg_2 = vec2(1.0f); var res : vec2 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl index 63fc2ee727..9ec2aa5694 100644 --- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl @@ -25,9 +25,9 @@ // fn smoothstep(vec<4, f32>, vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn smoothstep_40864c() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); + var arg_2 = vec4(1.f); var res: vec4 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.dxc.hlsl index e9f0a25760..c164361fba 100644 --- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_40864c() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.fxc.hlsl index e9f0a25760..c164361fba 100644 --- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_40864c() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; - float4 arg_2 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; float4 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.glsl index 1a3e2c949e..84ac776bcc 100644 --- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void smoothstep_40864c() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = smoothstep(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void smoothstep_40864c() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = smoothstep(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void smoothstep_40864c() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); - vec4 arg_2 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); + vec4 arg_2 = vec4(1.0f); vec4 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.msl index dff1a8a0a2..6fb06e2f66 100644 --- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void smoothstep_40864c() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); - float4 arg_2 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); + float4 arg_2 = float4(1.0f); float4 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.spvasm index b85bcafabc..ae5cf318e1 100644 --- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,44 +34,45 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %25 = OpTypeFunction %v4float %smoothstep_40864c = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - OpStore %arg_2 %5 - %19 = OpLoad %v4float %arg_0 - %20 = OpLoad %v4float %arg_1 - %21 = OpLoad %v4float %arg_2 - %17 = OpExtInst %v4float %18 SmoothStep %19 %20 %21 - OpStore %res %17 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + OpStore %arg_2 %14 + %21 = OpLoad %v4float %arg_0 + %22 = OpLoad %v4float %arg_1 + %23 = OpLoad %v4float %arg_2 + %19 = OpExtInst %v4float %20 SmoothStep %21 %22 %23 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %smoothstep_40864c +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %smoothstep_40864c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %smoothstep_40864c + %33 = OpLabel + %34 = OpFunctionCall %void %smoothstep_40864c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %smoothstep_40864c + %36 = OpLabel + %37 = OpFunctionCall %void %smoothstep_40864c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.wgsl index 6d517e6fc8..c6405b6aba 100644 --- a/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/40864c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn smoothstep_40864c() { - var arg_0 = vec4(); - var arg_1 = vec4(); - var arg_2 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); + var arg_2 = vec4(1.0f); var res : vec4 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl b/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl index 07efb9ffe9..0b37e434ac 100644 --- a/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl @@ -25,9 +25,9 @@ // fn smoothstep(f32, f32, f32) -> f32 fn smoothstep_6c4975() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; + var arg_2 = 1.f; var res: f32 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.wgsl index 26820f3eb5..eaa85eee7f 100644 --- a/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/6c4975.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn smoothstep_6c4975() { - var arg_0 = 1.0; - var arg_1 = 1.0; - var arg_2 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; + var arg_2 = 1.0f; var res : f32 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl index 1aa6a12485..e0fc05bfba 100644 --- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl @@ -25,9 +25,9 @@ // fn smoothstep(vec<3, f32>, vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn smoothstep_aad1db() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); + var arg_2 = vec3(1.f); var res: vec3 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.dxc.hlsl index c8e7d3e18c..4e6c55ca15 100644 --- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_aad1db() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.fxc.hlsl index c8e7d3e18c..4e6c55ca15 100644 --- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ void smoothstep_aad1db() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; - float3 arg_2 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; + float3 arg_2 = (1.0f).xxx; float3 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.glsl b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.glsl index ae71ee9c84..632aa04dab 100644 --- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.glsl @@ -1,9 +1,9 @@ #version 310 es void smoothstep_aad1db() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = smoothstep(arg_0, arg_1, arg_2); } @@ -24,9 +24,9 @@ void main() { precision mediump float; void smoothstep_aad1db() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = smoothstep(arg_0, arg_1, arg_2); } @@ -41,9 +41,9 @@ void main() { #version 310 es void smoothstep_aad1db() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); - vec3 arg_2 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); + vec3 arg_2 = vec3(1.0f); vec3 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.msl b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.msl index 4f27d5d2e2..08e89ff712 100644 --- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void smoothstep_aad1db() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); - float3 arg_2 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); + float3 arg_2 = float3(1.0f); float3 res = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.spvasm index 0fa50776c6..124b722619 100644 --- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader - %20 = OpExtInstImport "GLSL.std.450" + %22 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -35,45 +35,46 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %27 = OpTypeFunction %v4float %smoothstep_aad1db = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %arg_2 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - OpStore %arg_2 %14 - %21 = OpLoad %v3float %arg_0 - %22 = OpLoad %v3float %arg_1 - %23 = OpLoad %v3float %arg_2 - %19 = OpExtInst %v3float %20 SmoothStep %21 %22 %23 - OpStore %res %19 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %arg_2 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + OpStore %arg_2 %15 + %23 = OpLoad %v3float %arg_0 + %24 = OpLoad %v3float %arg_1 + %25 = OpLoad %v3float %arg_2 + %21 = OpExtInst %v3float %22 SmoothStep %23 %24 %25 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %smoothstep_aad1db +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %smoothstep_aad1db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %smoothstep_aad1db + %35 = OpLabel + %36 = OpFunctionCall %void %smoothstep_aad1db OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %smoothstep_aad1db + %38 = OpLabel + %39 = OpFunctionCall %void %smoothstep_aad1db OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.wgsl index 5da4d55f6f..b8629a0115 100644 --- a/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/smoothstep/aad1db.wgsl.expected.wgsl @@ -1,7 +1,7 @@ fn smoothstep_aad1db() { - var arg_0 = vec3(); - var arg_1 = vec3(); - var arg_2 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); + var arg_2 = vec3(1.0f); var res : vec3 = smoothstep(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/sqrt/20c74e.wgsl b/test/tint/builtins/gen/var/sqrt/20c74e.wgsl index 8d81a83247..0d57380e2d 100644 --- a/test/tint/builtins/gen/var/sqrt/20c74e.wgsl +++ b/test/tint/builtins/gen/var/sqrt/20c74e.wgsl @@ -25,7 +25,7 @@ // fn sqrt(f32) -> f32 fn sqrt_20c74e() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.wgsl index 719553f2e3..239eb47ad9 100644 --- a/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/20c74e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_20c74e() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl index 34815b418b..19300c8877 100644 --- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl +++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl @@ -25,7 +25,7 @@ // fn sqrt(vec<2, f32>) -> vec<2, f32> fn sqrt_8c7024() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.dxc.hlsl index 3d8ed56b0c..3c82b5d641 100644 --- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_8c7024() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.fxc.hlsl index 3d8ed56b0c..3c82b5d641 100644 --- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sqrt_8c7024() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.glsl index b0ab296793..ca45d4a919 100644 --- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sqrt_8c7024() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sqrt(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sqrt_8c7024() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sqrt(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sqrt_8c7024() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.msl index d829aec5e6..d6cd786b90 100644 --- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_8c7024() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.spvasm index dcc06b2ac4..b49d96c9b3 100644 --- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %sqrt_8c7024 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Sqrt %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Sqrt %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sqrt_8c7024 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sqrt_8c7024 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sqrt_8c7024 + %31 = OpLabel + %32 = OpFunctionCall %void %sqrt_8c7024 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sqrt_8c7024 + %34 = OpLabel + %35 = OpFunctionCall %void %sqrt_8c7024 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.wgsl index c77283af6d..37caec7f26 100644 --- a/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/8c7024.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_8c7024() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl index 442bbfa718..308fe1a6a0 100644 --- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl +++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl @@ -25,7 +25,7 @@ // fn sqrt(vec<4, f32>) -> vec<4, f32> fn sqrt_aa0d7a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.dxc.hlsl index 5534c3dd07..09b9d922d1 100644 --- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_aa0d7a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.fxc.hlsl index 5534c3dd07..09b9d922d1 100644 --- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sqrt_aa0d7a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.glsl index 52c73ff3a4..8f5ac2a73d 100644 --- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sqrt_aa0d7a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sqrt(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sqrt_aa0d7a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sqrt(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sqrt_aa0d7a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.msl index 25da1a7da8..ee5234d84f 100644 --- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_aa0d7a() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.spvasm index 62b5d48117..f48213ad2e 100644 --- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %sqrt_aa0d7a = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Sqrt %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Sqrt %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %sqrt_aa0d7a +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %sqrt_aa0d7a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %sqrt_aa0d7a + %29 = OpLabel + %30 = OpFunctionCall %void %sqrt_aa0d7a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %sqrt_aa0d7a + %32 = OpLabel + %33 = OpFunctionCall %void %sqrt_aa0d7a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.wgsl index 66ed5230e5..9c7c972a0c 100644 --- a/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/aa0d7a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_aa0d7a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl index 09d5bf1039..8ca84df03b 100644 --- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl +++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl @@ -25,7 +25,7 @@ // fn sqrt(vec<3, f32>) -> vec<3, f32> fn sqrt_f8c59a() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.dxc.hlsl index d57de154ee..5f7d971362 100644 --- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void sqrt_f8c59a() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.fxc.hlsl index d57de154ee..5f7d971362 100644 --- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void sqrt_f8c59a() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.glsl b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.glsl index d62a3b32bf..45e447b9d8 100644 --- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void sqrt_f8c59a() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sqrt(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void sqrt_f8c59a() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sqrt(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void sqrt_f8c59a() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.msl b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.msl index 4f3289a94e..c0abaebf15 100644 --- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void sqrt_f8c59a() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.spvasm index ac3f688fe1..7a009b58cc 100644 --- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %sqrt_f8c59a = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Sqrt %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Sqrt %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %sqrt_f8c59a +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %sqrt_f8c59a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %sqrt_f8c59a + %31 = OpLabel + %32 = OpFunctionCall %void %sqrt_f8c59a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %sqrt_f8c59a + %34 = OpLabel + %35 = OpFunctionCall %void %sqrt_f8c59a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.wgsl index 69ed0969eb..248cee4e57 100644 --- a/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/sqrt/f8c59a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn sqrt_f8c59a() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = sqrt(arg_0); } diff --git a/test/tint/builtins/gen/var/step/0b073b.wgsl b/test/tint/builtins/gen/var/step/0b073b.wgsl index cb16a1755a..8d35edae73 100644 --- a/test/tint/builtins/gen/var/step/0b073b.wgsl +++ b/test/tint/builtins/gen/var/step/0b073b.wgsl @@ -25,8 +25,8 @@ // fn step(f32, f32) -> f32 fn step_0b073b() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.f; + var arg_1 = 1.f; var res: f32 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.wgsl index d40153b090..f570285d53 100644 --- a/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/0b073b.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn step_0b073b() { - var arg_0 = 1.0; - var arg_1 = 1.0; + var arg_0 = 1.0f; + var arg_1 = 1.0f; var res : f32 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl b/test/tint/builtins/gen/var/step/19accd.wgsl index e6a61d1fba..c279c310f8 100644 --- a/test/tint/builtins/gen/var/step/19accd.wgsl +++ b/test/tint/builtins/gen/var/step/19accd.wgsl @@ -25,8 +25,8 @@ // fn step(vec<2, f32>, vec<2, f32>) -> vec<2, f32> fn step_19accd() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.f); + var arg_1 = vec2(1.f); var res: vec2 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.dxc.hlsl index f94d6d23f4..b59f5215a5 100644 --- a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void step_19accd() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.fxc.hlsl index f94d6d23f4..b59f5215a5 100644 --- a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void step_19accd() { - float2 arg_0 = (0.0f).xx; - float2 arg_1 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; + float2 arg_1 = (1.0f).xx; float2 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.glsl index 5d65aabb47..475218ff23 100644 --- a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void step_19accd() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = step(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void step_19accd() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = step(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void step_19accd() { - vec2 arg_0 = vec2(0.0f); - vec2 arg_1 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); + vec2 arg_1 = vec2(1.0f); vec2 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.msl b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.msl index e1fbd2dcec..affcc0ba42 100644 --- a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void step_19accd() { - float2 arg_0 = float2(0.0f); - float2 arg_1 = float2(0.0f); + float2 arg_0 = float2(1.0f); + float2 arg_1 = float2(1.0f); float2 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.spvasm index fd5d44919f..4d25d5f7cc 100644 --- a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %25 = OpTypeFunction %v4float %step_19accd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %arg_1 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v2float %arg_0 - %21 = OpLoad %v2float %arg_1 - %18 = OpExtInst %v2float %19 Step %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %arg_1 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v2float %arg_0 + %23 = OpLoad %v2float %arg_1 + %20 = OpExtInst %v2float %21 Step %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %step_19accd +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %step_19accd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %step_19accd + %33 = OpLabel + %34 = OpFunctionCall %void %step_19accd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %step_19accd + %36 = OpLabel + %37 = OpFunctionCall %void %step_19accd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.wgsl index a6cac467c6..a47486530e 100644 --- a/test/tint/builtins/gen/var/step/19accd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/19accd.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn step_19accd() { - var arg_0 = vec2(); - var arg_1 = vec2(); + var arg_0 = vec2(1.0f); + var arg_1 = vec2(1.0f); var res : vec2 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/334303.wgsl b/test/tint/builtins/gen/var/step/334303.wgsl index 051309dff2..006165dbc6 100644 --- a/test/tint/builtins/gen/var/step/334303.wgsl +++ b/test/tint/builtins/gen/var/step/334303.wgsl @@ -25,8 +25,8 @@ // fn step(vec<3, f32>, vec<3, f32>) -> vec<3, f32> fn step_334303() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: vec3 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/334303.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/334303.wgsl.expected.dxc.hlsl index df6ff2ace5..4de9136234 100644 --- a/test/tint/builtins/gen/var/step/334303.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/step/334303.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void step_334303() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/334303.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/334303.wgsl.expected.fxc.hlsl index df6ff2ace5..4de9136234 100644 --- a/test/tint/builtins/gen/var/step/334303.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/step/334303.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void step_334303() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/334303.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/334303.wgsl.expected.glsl index 46aa17ef5c..b1bc1b6492 100644 --- a/test/tint/builtins/gen/var/step/334303.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/step/334303.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void step_334303() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = step(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void step_334303() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = step(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void step_334303() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/334303.wgsl.expected.msl b/test/tint/builtins/gen/var/step/334303.wgsl.expected.msl index 8deefd84cf..cac7c059f8 100644 --- a/test/tint/builtins/gen/var/step/334303.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/step/334303.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void step_334303() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float3 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/334303.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/334303.wgsl.expected.spvasm index 37a7b9d1cf..2f9fe018aa 100644 --- a/test/tint/builtins/gen/var/step/334303.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/step/334303.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %step_334303 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %v3float %19 Step %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %v3float %21 Step %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %step_334303 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %step_334303 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %step_334303 + %33 = OpLabel + %34 = OpFunctionCall %void %step_334303 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %step_334303 + %36 = OpLabel + %37 = OpFunctionCall %void %step_334303 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/step/334303.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/334303.wgsl.expected.wgsl index f02a0fb18c..70b550730f 100644 --- a/test/tint/builtins/gen/var/step/334303.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/334303.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn step_334303() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : vec3 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl b/test/tint/builtins/gen/var/step/e2b337.wgsl index d53d42619e..a3ddf69eed 100644 --- a/test/tint/builtins/gen/var/step/e2b337.wgsl +++ b/test/tint/builtins/gen/var/step/e2b337.wgsl @@ -25,8 +25,8 @@ // fn step(vec<4, f32>, vec<4, f32>) -> vec<4, f32> fn step_e2b337() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.f); + var arg_1 = vec4(1.f); var res: vec4 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.dxc.hlsl index 94366a619a..8c5c8d03e7 100644 --- a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void step_e2b337() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.fxc.hlsl index 94366a619a..8c5c8d03e7 100644 --- a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void step_e2b337() { - float4 arg_0 = (0.0f).xxxx; - float4 arg_1 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; + float4 arg_1 = (1.0f).xxxx; float4 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.glsl b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.glsl index ac7f19ff3c..7455c108fa 100644 --- a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void step_e2b337() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = step(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void step_e2b337() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = step(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void step_e2b337() { - vec4 arg_0 = vec4(0.0f); - vec4 arg_1 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); + vec4 arg_1 = vec4(1.0f); vec4 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.msl b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.msl index 8ec4bc3935..1fc7c3170a 100644 --- a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void step_e2b337() { - float4 arg_0 = float4(0.0f); - float4 arg_1 = float4(0.0f); + float4 arg_0 = float4(1.0f); + float4 arg_1 = float4(1.0f); float4 res = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.spvasm b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.spvasm index c97dcc734d..2aa2b49189 100644 --- a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,41 +33,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %23 = OpTypeFunction %v4float %step_e2b337 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %arg_1 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - OpStore %arg_1 %5 - %18 = OpLoad %v4float %arg_0 - %19 = OpLoad %v4float %arg_1 - %16 = OpExtInst %v4float %17 Step %18 %19 - OpStore %res %16 + OpStore %arg_0 %14 + OpStore %arg_1 %14 + %20 = OpLoad %v4float %arg_0 + %21 = OpLoad %v4float %arg_1 + %18 = OpExtInst %v4float %19 Step %20 %21 + OpStore %res %18 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %step_e2b337 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %step_e2b337 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %step_e2b337 + %31 = OpLabel + %32 = OpFunctionCall %void %step_e2b337 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %step_e2b337 + %34 = OpLabel + %35 = OpFunctionCall %void %step_e2b337 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.wgsl b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.wgsl index 7c051c2ee4..5dd29a4924 100644 --- a/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/step/e2b337.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn step_e2b337() { - var arg_0 = vec4(); - var arg_1 = vec4(); + var arg_0 = vec4(1.0f); + var arg_1 = vec4(1.0f); var res : vec4 = step(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl b/test/tint/builtins/gen/var/tan/244e2a.wgsl index b5c642792b..23388d0b4c 100644 --- a/test/tint/builtins/gen/var/tan/244e2a.wgsl +++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl @@ -25,7 +25,7 @@ // fn tan(vec<4, f32>) -> vec<4, f32> fn tan_244e2a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.dxc.hlsl index bec2384f9e..415a64c95c 100644 --- a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_244e2a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.fxc.hlsl index bec2384f9e..415a64c95c 100644 --- a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tan_244e2a() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.glsl index 69b815683a..1785332435 100644 --- a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tan_244e2a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tan(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void tan_244e2a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tan(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void tan_244e2a() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.msl index 8d4d8a6dfa..80d74762d2 100644 --- a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_244e2a() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.spvasm index c36cf98572..5e535822e9 100644 --- a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %tan_244e2a = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Tan %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Tan %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tan_244e2a +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %tan_244e2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tan_244e2a + %29 = OpLabel + %30 = OpFunctionCall %void %tan_244e2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tan_244e2a + %32 = OpLabel + %33 = OpFunctionCall %void %tan_244e2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.wgsl index 3db4284c6b..49715cc448 100644 --- a/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/244e2a.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_244e2a() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/2f030e.wgsl b/test/tint/builtins/gen/var/tan/2f030e.wgsl index a9b303b6ea..81f1fbbb68 100644 --- a/test/tint/builtins/gen/var/tan/2f030e.wgsl +++ b/test/tint/builtins/gen/var/tan/2f030e.wgsl @@ -25,7 +25,7 @@ // fn tan(f32) -> f32 fn tan_2f030e() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.wgsl index 96993de00c..f2fb49b282 100644 --- a/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/2f030e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_2f030e() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl b/test/tint/builtins/gen/var/tan/7ea104.wgsl index b2afe5c94c..441c70ccff 100644 --- a/test/tint/builtins/gen/var/tan/7ea104.wgsl +++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl @@ -25,7 +25,7 @@ // fn tan(vec<3, f32>) -> vec<3, f32> fn tan_7ea104() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.dxc.hlsl index 1dec135b54..6090fd69b2 100644 --- a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_7ea104() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.fxc.hlsl index 1dec135b54..6090fd69b2 100644 --- a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tan_7ea104() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.glsl index 61146c9de6..3114bf0079 100644 --- a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tan_7ea104() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tan(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void tan_7ea104() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tan(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void tan_7ea104() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.msl index 8edef08595..0eb10fb291 100644 --- a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_7ea104() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.spvasm index da69cee76a..69c8aeba58 100644 --- a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %tan_7ea104 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Tan %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Tan %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %tan_7ea104 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %tan_7ea104 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %tan_7ea104 + %31 = OpLabel + %32 = OpFunctionCall %void %tan_7ea104 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %tan_7ea104 + %34 = OpLabel + %35 = OpFunctionCall %void %tan_7ea104 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.wgsl index 5e33833c8d..99240ec8a2 100644 --- a/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/7ea104.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_7ea104() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl index e34a69344f..95261cfbf4 100644 --- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl +++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl @@ -25,7 +25,7 @@ // fn tan(vec<2, f32>) -> vec<2, f32> fn tan_8ce3e9() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.dxc.hlsl index 935530ef2f..66df261199 100644 --- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tan_8ce3e9() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.fxc.hlsl index 935530ef2f..66df261199 100644 --- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tan_8ce3e9() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.glsl index 211831f598..812a83ed92 100644 --- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tan_8ce3e9() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tan(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void tan_8ce3e9() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tan(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void tan_8ce3e9() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.msl b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.msl index 4584e1add8..94890c4d83 100644 --- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tan_8ce3e9() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.spvasm index 20a817e1d5..09c5c1aafb 100644 --- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %tan_8ce3e9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Tan %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Tan %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %tan_8ce3e9 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %tan_8ce3e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %tan_8ce3e9 + %31 = OpLabel + %32 = OpFunctionCall %void %tan_8ce3e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %tan_8ce3e9 + %34 = OpLabel + %35 = OpFunctionCall %void %tan_8ce3e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.wgsl index 2fe6fda66e..13d8264ab9 100644 --- a/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tan/8ce3e9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tan_8ce3e9() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = tan(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl b/test/tint/builtins/gen/var/tanh/5663c5.wgsl index d061b31e75..64bab80189 100644 --- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl +++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl @@ -25,7 +25,7 @@ // fn tanh(vec<4, f32>) -> vec<4, f32> fn tanh_5663c5() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.dxc.hlsl index 3860bf4586..527fc5be9f 100644 --- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_5663c5() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.fxc.hlsl index 3860bf4586..527fc5be9f 100644 --- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tanh_5663c5() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.glsl index cfa078331a..715eac62e2 100644 --- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tanh_5663c5() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tanh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void tanh_5663c5() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tanh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void tanh_5663c5() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.msl index 7e0c6cb852..1780f88f61 100644 --- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_5663c5() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.spvasm index 8cad240431..4afbb8b69d 100644 --- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %tanh_5663c5 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Tanh %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Tanh %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %tanh_5663c5 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %tanh_5663c5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %tanh_5663c5 + %29 = OpLabel + %30 = OpFunctionCall %void %tanh_5663c5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %tanh_5663c5 + %32 = OpLabel + %33 = OpFunctionCall %void %tanh_5663c5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.wgsl index 5e8ad97f2f..8c91cac8cb 100644 --- a/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/5663c5.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_5663c5() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl b/test/tint/builtins/gen/var/tanh/5724b3.wgsl index baacbd5a80..7032472523 100644 --- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl +++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl @@ -25,7 +25,7 @@ // fn tanh(vec<2, f32>) -> vec<2, f32> fn tanh_5724b3() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.dxc.hlsl index be9254c249..2b68673450 100644 --- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_5724b3() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.fxc.hlsl index be9254c249..2b68673450 100644 --- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tanh_5724b3() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.glsl index febcb148a7..3eacd11118 100644 --- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tanh_5724b3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tanh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void tanh_5724b3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tanh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void tanh_5724b3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.msl index d384399514..dea0ceb809 100644 --- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_5724b3() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.spvasm index a30467b9cc..0b576dcf6e 100644 --- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %tanh_5724b3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Tanh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Tanh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %tanh_5724b3 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %tanh_5724b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %tanh_5724b3 + %31 = OpLabel + %32 = OpFunctionCall %void %tanh_5724b3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %tanh_5724b3 + %34 = OpLabel + %35 = OpFunctionCall %void %tanh_5724b3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.wgsl index 2c6b8ac9fc..e7bea1967b 100644 --- a/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/5724b3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_5724b3() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl index 8ef2acea14..6968f153d7 100644 --- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl +++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl @@ -25,7 +25,7 @@ // fn tanh(vec<3, f32>) -> vec<3, f32> fn tanh_9f9fb9() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.dxc.hlsl index 2687494dd6..7af3f448a2 100644 --- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void tanh_9f9fb9() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.fxc.hlsl index 2687494dd6..7af3f448a2 100644 --- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void tanh_9f9fb9() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.glsl b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.glsl index 15f66f7225..48c56e87f1 100644 --- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void tanh_9f9fb9() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tanh(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void tanh_9f9fb9() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tanh(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void tanh_9f9fb9() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.msl b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.msl index 4e5e4a3eab..abecf13b60 100644 --- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void tanh_9f9fb9() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.spvasm index 2e2d6bc622..007cba69da 100644 --- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %tanh_9f9fb9 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Tanh %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Tanh %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %tanh_9f9fb9 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %tanh_9f9fb9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %tanh_9f9fb9 + %31 = OpLabel + %32 = OpFunctionCall %void %tanh_9f9fb9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %tanh_9f9fb9 + %34 = OpLabel + %35 = OpFunctionCall %void %tanh_9f9fb9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.wgsl index 78a8aefee3..b32a672800 100644 --- a/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/9f9fb9.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_9f9fb9() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/c15fdb.wgsl b/test/tint/builtins/gen/var/tanh/c15fdb.wgsl index 642ee64a4e..44eec697f6 100644 --- a/test/tint/builtins/gen/var/tanh/c15fdb.wgsl +++ b/test/tint/builtins/gen/var/tanh/c15fdb.wgsl @@ -25,7 +25,7 @@ // fn tanh(f32) -> f32 fn tanh_c15fdb() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.wgsl index 14b0c57ace..6f0f550cc8 100644 --- a/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/tanh/c15fdb.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn tanh_c15fdb() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = tanh(arg_0); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl index dbd06b9daa..c3f3eb3d39 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl @@ -28,7 +28,7 @@ // fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> vec4 fn textureGatherCompare_182fd4() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl index f9909202a8..d2d4c30811 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGatherCompare_182fd4() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl index f2519ce330..a82321a950 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl @@ -28,7 +28,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_313add() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl index 6d6db3d4c9..7b877b4023 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGatherCompare_313add() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl index cd30ef2529..c95807b2de 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl @@ -29,7 +29,7 @@ fn textureGatherCompare_60d2d1() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl index d786d88ea6..7dd1a55cd5 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureGatherCompare_60d2d1() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl index 0c0dd06bf7..6266d3fced 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl @@ -28,7 +28,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> vec4 fn textureGatherCompare_6d9352() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl index 2a39d9e9da..c20268270c 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGatherCompare_6d9352() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl index ca16ba1947..21a193e3f4 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl @@ -29,7 +29,7 @@ fn textureGatherCompare_783e65() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl index a9edd2617b..382239d237 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureGatherCompare_783e65() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl index 3ff121823e..d0a7cfb8b8 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl @@ -29,7 +29,7 @@ fn textureGatherCompare_f585cc() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl index 0bcc5a33d7..edea3695a2 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureGatherCompare_f585cc() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl b/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl index f7908af59f..b98e2d3753 100644 --- a/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl +++ b/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl @@ -27,7 +27,7 @@ // fn textureSample(texture: texture_1d, sampler: sampler, coords: f32) -> vec4 fn textureSample_6e64fb() { - var arg_2 = 1.0; + var arg_2 = 1.f; var res: vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.wgsl index 3e90df9724..bc576c3a13 100644 --- a/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/6e64fb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_6e64fb() { - var arg_2 = 1.0; + var arg_2 = 1.0f; var res : vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl index 645af1929a..d6863418f2 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl @@ -28,7 +28,7 @@ // fn textureSampleBias(texture: texture_cube, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_53b9f7() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl index 38e14778d4..b3ca71df60 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleBias_53b9f7() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl index 7cbae0c50d..4404b765f2 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl @@ -28,7 +28,7 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32, @const offset: vec3) -> vec4 fn textureSampleBias_594824() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, vec3()); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl index 721b7f915b..cca18b9853 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleBias_594824() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, vec3()); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl index 18c4785fff..20e2abcab1 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl @@ -28,7 +28,7 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32) -> vec4 fn textureSampleBias_6a9113() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl index 6fadfbc713..119bbcac37 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleBias_6a9113() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl index 816c341f88..5c49c42e21 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl @@ -29,7 +29,7 @@ fn textureSampleBias_80e579() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl index cffed38a1b..98cecfb304 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleBias_80e579() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl index 219bc9c98b..436d9bacb3 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl @@ -29,7 +29,7 @@ fn textureSampleBias_9dbb51() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl index 4575eb2fa7..63b803833e 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleBias_9dbb51() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl index 82ffc458f0..e88c5f9cf4 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl @@ -28,7 +28,7 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_a161cf() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl index 4c571694d5..45096c0840 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleBias_a161cf() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl index 7948c4e886..77eed6a6e9 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl @@ -28,7 +28,7 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_d3fa1b() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl index 68b46a84f6..c7a52318d0 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleBias_d3fa1b() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl index bf043ad815..81f29efdc6 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl @@ -29,7 +29,7 @@ fn textureSampleBias_eed7c4() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl index d31043ae4d..1098aca538 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleBias_eed7c4() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl index 738b5c5011..aa358d62a4 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl @@ -28,7 +28,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompare_3a5923() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl index 18b43a2dff..9afca36f34 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleCompare_3a5923() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl index f7789d0640..7eec4aaabe 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl @@ -28,7 +28,7 @@ // fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompare_63fb83() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl index da69864e7e..b52c5900a3 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleCompare_63fb83() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl index e94690bc16..d931d62ed2 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl @@ -29,7 +29,7 @@ fn textureSampleCompare_a3ca7e() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl index c5574d9391..dd14a37ff0 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleCompare_a3ca7e() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl index 9bf0514d62..b61147858f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl @@ -29,7 +29,7 @@ fn textureSampleCompare_af1051() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl index ac32534591..9c6081668f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleCompare_af1051() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl index aef2de2819..4d526b409c 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl @@ -29,7 +29,7 @@ fn textureSampleCompare_dd431d() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl index d61a1af774..e952b174a8 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleCompare_dd431d() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl index 63bb3cff75..9dfddd4fd7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl @@ -28,7 +28,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_dec064() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl index 39fc916aae..ccf80c9b9d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleCompare_dec064() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl index e5ccb7dce2..c0833f0015 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl @@ -29,7 +29,7 @@ fn textureSampleCompareLevel_1116ed() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl index 494aa6ca30..c8886981a9 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleCompareLevel_1116ed() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl index 3744becadd..83f9027e20 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl @@ -28,7 +28,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1568e3() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl index 032fe41952..db2ba7c57f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleCompareLevel_1568e3() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl index 1e4501f5ab..90c929e935 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl @@ -28,7 +28,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompareLevel_2ad2b1() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl index 4f0e0f8ecd..698fe146de 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleCompareLevel_2ad2b1() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl index a4e3605625..1e6f02e684 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl @@ -29,7 +29,7 @@ fn textureSampleCompareLevel_4cf3a2() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl index 8ba2618bdb..cae5cd45d7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleCompareLevel_4cf3a2() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl index 7503fbedcc..43705282a2 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl @@ -28,7 +28,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_7f2b9a() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl index 36f1122bb0..c4473ab925 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleCompareLevel_7f2b9a() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl index d8942b0e8b..59bcbc7ef5 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl @@ -29,7 +29,7 @@ fn textureSampleCompareLevel_b6e47c() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl index 3634251416..3bf14153c4 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleCompareLevel_b6e47c() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl index 7f847867a3..37e3a577e3 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl @@ -28,7 +28,7 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_0b0a1b() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl index 8419b64cba..751f1b3a28 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleLevel_0b0a1b() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl index ad28037e65..497302d489 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl @@ -29,7 +29,7 @@ fn textureSampleLevel_0bdd9a() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl index b9c8aa8edc..80e15ab12e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleLevel_0bdd9a() { var arg_2 = vec3(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl index 0652834a4a..7d509612eb 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl @@ -29,7 +29,7 @@ fn textureSampleLevel_302be4() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl index b106d3e2c4..4bb4b4d9b9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleLevel_302be4() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl index 41c233a19b..cdfd30cc24 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl @@ -28,7 +28,7 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_abfcc0() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl index eccd808645..73e792178e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleLevel_abfcc0() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl index ef80220033..85473533af 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl @@ -29,7 +29,7 @@ fn textureSampleLevel_b7c55c() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl index 9d7aaaf0b2..b03c566d0f 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl @@ -5,7 +5,7 @@ fn textureSampleLevel_b7c55c() { var arg_2 = vec2(); var arg_3 = 1; - var arg_4 = 1.0; + var arg_4 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, vec2()); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl index 9b9b03db7e..7c76443b2d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl @@ -28,7 +28,7 @@ // fn textureSampleLevel(texture: texture_cube, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_c32df7() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl index eca84cb707..46209393d4 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleLevel_c32df7() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl index 384580d173..04d23e4b3d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl @@ -28,7 +28,7 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32) -> vec4 fn textureSampleLevel_c6aca6() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl index 1c88dae04c..9fe9c9fb16 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleLevel_c6aca6() { var arg_2 = vec2(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl index ed4c5561f9..6fbc3e290b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl @@ -28,7 +28,7 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32, @const offset: vec3) -> vec4 fn textureSampleLevel_dcbecb() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, vec3()); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl index 62d461a0c8..298cf72c9e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureSampleLevel_dcbecb() { var arg_2 = vec3(); - var arg_3 = 1.0; + var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, vec3()); } diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl b/test/tint/builtins/gen/var/transpose/2585cd.wgsl index 4655c32305..4ced63ba4e 100644 --- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl +++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<4, 3, f32>) -> mat<3, 4, f32> fn transpose_2585cd() { - var arg_0 = mat4x3(); + var arg_0 = mat4x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat3x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.dxc.hlsl index 1dad91c813..5050a328de 100644 --- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_2585cd() { - float4x3 arg_0 = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4x3 arg_0 = float4x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); float3x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.fxc.hlsl index 1dad91c813..5050a328de 100644 --- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_2585cd() { - float4x3 arg_0 = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4x3 arg_0 = float4x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); float3x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.glsl index 121bc40af5..336d930269 100644 --- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_2585cd() { - mat4x3 arg_0 = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat4x3 arg_0 = mat4x3(vec3(1.0f), vec3(1.0f), vec3(1.0f), vec3(1.0f)); mat3x4 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_2585cd() { - mat4x3 arg_0 = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat4x3 arg_0 = mat4x3(vec3(1.0f), vec3(1.0f), vec3(1.0f), vec3(1.0f)); mat3x4 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_2585cd() { - mat4x3 arg_0 = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat4x3 arg_0 = mat4x3(vec3(1.0f), vec3(1.0f), vec3(1.0f), vec3(1.0f)); mat3x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.msl index 7e6823babf..f0cf8135d2 100644 --- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_2585cd() { - float4x3 arg_0 = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f)); + float4x3 arg_0 = float4x3(float3(1.0f), float3(1.0f), float3(1.0f), float3(1.0f)); float3x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.spvasm index b818932c1d..f75aad35ba 100644 --- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %mat4v3float = OpTypeMatrix %v3float 4 - %15 = OpConstantNull %mat4v3float + %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %17 = OpConstantComposite %mat4v3float %16 %16 %16 %16 %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float + %20 = OpConstantNull %mat4v3float %mat3v4float = OpTypeMatrix %v4float 3 %_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float - %23 = OpConstantNull %mat3v4float - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %mat3v4float + %27 = OpTypeFunction %v4float %transpose_2585cd = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v3float Function %15 - %res = OpVariable %_ptr_Function_mat3v4float Function %23 - OpStore %arg_0 %15 - %20 = OpLoad %mat4v3float %arg_0 - %18 = OpTranspose %mat3v4float %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_mat4v3float Function %20 + %res = OpVariable %_ptr_Function_mat3v4float Function %26 + OpStore %arg_0 %17 + %23 = OpLoad %mat4v3float %arg_0 + %21 = OpTranspose %mat3v4float %23 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %transpose_2585cd +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %transpose_2585cd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_2585cd + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_2585cd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %transpose_2585cd + %38 = OpLabel + %39 = OpFunctionCall %void %transpose_2585cd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.wgsl index 3d7c445f60..7390cfe0cc 100644 --- a/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/2585cd.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_2585cd() { - var arg_0 = mat4x3(); + var arg_0 = mat4x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat3x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl b/test/tint/builtins/gen/var/transpose/31d679.wgsl index 67f159cd5f..b301d0d74c 100644 --- a/test/tint/builtins/gen/var/transpose/31d679.wgsl +++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<2, 2, f32>) -> mat<2, 2, f32> fn transpose_31d679() { - var arg_0 = mat2x2(); + var arg_0 = mat2x2(1.f, 1.f, 1.f, 1.f); var res: mat2x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.dxc.hlsl index c777bd0397..cd4d593201 100644 --- a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_31d679() { - float2x2 arg_0 = float2x2((0.0f).xx, (0.0f).xx); + float2x2 arg_0 = float2x2((1.0f).xx, (1.0f).xx); float2x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.fxc.hlsl index c777bd0397..cd4d593201 100644 --- a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_31d679() { - float2x2 arg_0 = float2x2((0.0f).xx, (0.0f).xx); + float2x2 arg_0 = float2x2((1.0f).xx, (1.0f).xx); float2x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.glsl index 2a5e13cba7..4db7e7f753 100644 --- a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_31d679() { - mat2 arg_0 = mat2(vec2(0.0f), vec2(0.0f)); + mat2 arg_0 = mat2(vec2(1.0f), vec2(1.0f)); mat2 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_31d679() { - mat2 arg_0 = mat2(vec2(0.0f), vec2(0.0f)); + mat2 arg_0 = mat2(vec2(1.0f), vec2(1.0f)); mat2 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_31d679() { - mat2 arg_0 = mat2(vec2(0.0f), vec2(0.0f)); + mat2 arg_0 = mat2(vec2(1.0f), vec2(1.0f)); mat2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.msl index 060209218e..5029a9672f 100644 --- a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_31d679() { - float2x2 arg_0 = float2x2(float2(0.0f), float2(0.0f)); + float2x2 arg_0 = float2x2(float2(1.0f), float2(1.0f)); float2x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.spvasm index 10ee30e721..836104a7aa 100644 --- a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 - %15 = OpConstantNull %mat2v2float -%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v2float %float_1 %float_1 + %17 = OpConstantComposite %mat2v2float %16 %16 +%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float + %20 = OpConstantNull %mat2v2float + %24 = OpTypeFunction %v4float %transpose_31d679 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v2float Function %15 - %res = OpVariable %_ptr_Function_mat2v2float Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %mat2v2float %arg_0 - %18 = OpTranspose %mat2v2float %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_mat2v2float Function %20 + %res = OpVariable %_ptr_Function_mat2v2float Function %20 + OpStore %arg_0 %17 + %22 = OpLoad %mat2v2float %arg_0 + %21 = OpTranspose %mat2v2float %22 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %transpose_31d679 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %transpose_31d679 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %transpose_31d679 + %32 = OpLabel + %33 = OpFunctionCall %void %transpose_31d679 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_31d679 + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_31d679 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.wgsl index 797c093606..b647749045 100644 --- a/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/31d679.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_31d679() { - var arg_0 = mat2x2(); + var arg_0 = mat2x2(1.0f, 1.0f, 1.0f, 1.0f); var res : mat2x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl b/test/tint/builtins/gen/var/transpose/31e37e.wgsl index 194e650f52..f960c5873b 100644 --- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl +++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<4, 2, f32>) -> mat<2, 4, f32> fn transpose_31e37e() { - var arg_0 = mat4x2(); + var arg_0 = mat4x2(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat2x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.dxc.hlsl index c3edf30d28..85970ed8cc 100644 --- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_31e37e() { - float4x2 arg_0 = float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx); + float4x2 arg_0 = float4x2((1.0f).xx, (1.0f).xx, (1.0f).xx, (1.0f).xx); float2x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.fxc.hlsl index c3edf30d28..85970ed8cc 100644 --- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_31e37e() { - float4x2 arg_0 = float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx); + float4x2 arg_0 = float4x2((1.0f).xx, (1.0f).xx, (1.0f).xx, (1.0f).xx); float2x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.glsl index 46f50d579b..bf4eb4abd0 100644 --- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_31e37e() { - mat4x2 arg_0 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)); + mat4x2 arg_0 = mat4x2(vec2(1.0f), vec2(1.0f), vec2(1.0f), vec2(1.0f)); mat2x4 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_31e37e() { - mat4x2 arg_0 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)); + mat4x2 arg_0 = mat4x2(vec2(1.0f), vec2(1.0f), vec2(1.0f), vec2(1.0f)); mat2x4 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_31e37e() { - mat4x2 arg_0 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)); + mat4x2 arg_0 = mat4x2(vec2(1.0f), vec2(1.0f), vec2(1.0f), vec2(1.0f)); mat2x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.msl index 16ec8c1798..87dadd9553 100644 --- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_31e37e() { - float4x2 arg_0 = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f)); + float4x2 arg_0 = float4x2(float2(1.0f), float2(1.0f), float2(1.0f), float2(1.0f)); float2x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.spvasm index d7a07e4396..6a80ab51a7 100644 --- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,42 +33,44 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %mat4v2float = OpTypeMatrix %v2float 4 - %15 = OpConstantNull %mat4v2float + %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v2float %float_1 %float_1 + %17 = OpConstantComposite %mat4v2float %16 %16 %16 %16 %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float + %20 = OpConstantNull %mat4v2float %mat2v4float = OpTypeMatrix %v4float 2 %_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float - %23 = OpConstantNull %mat2v4float - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %mat2v4float + %27 = OpTypeFunction %v4float %transpose_31e37e = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v2float Function %15 - %res = OpVariable %_ptr_Function_mat2v4float Function %23 - OpStore %arg_0 %15 - %20 = OpLoad %mat4v2float %arg_0 - %18 = OpTranspose %mat2v4float %20 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_mat4v2float Function %20 + %res = OpVariable %_ptr_Function_mat2v4float Function %26 + OpStore %arg_0 %17 + %23 = OpLoad %mat4v2float %arg_0 + %21 = OpTranspose %mat2v4float %23 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %transpose_31e37e +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %transpose_31e37e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_31e37e + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_31e37e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %transpose_31e37e + %38 = OpLabel + %39 = OpFunctionCall %void %transpose_31e37e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.wgsl index f80f91d540..a19b38a770 100644 --- a/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/31e37e.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_31e37e() { - var arg_0 = mat4x2(); + var arg_0 = mat4x2(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat2x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl b/test/tint/builtins/gen/var/transpose/4ce359.wgsl index 9f65afb38b..1203d02322 100644 --- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl +++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<2, 4, f32>) -> mat<4, 2, f32> fn transpose_4ce359() { - var arg_0 = mat2x4(); + var arg_0 = mat2x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat4x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.dxc.hlsl index 6c67d928be..3ae0139957 100644 --- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_4ce359() { - float2x4 arg_0 = float2x4((0.0f).xxxx, (0.0f).xxxx); + float2x4 arg_0 = float2x4((1.0f).xxxx, (1.0f).xxxx); float4x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.fxc.hlsl index 6c67d928be..3ae0139957 100644 --- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_4ce359() { - float2x4 arg_0 = float2x4((0.0f).xxxx, (0.0f).xxxx); + float2x4 arg_0 = float2x4((1.0f).xxxx, (1.0f).xxxx); float4x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.glsl index e8afc4a9c7..1c639d62d0 100644 --- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_4ce359() { - mat2x4 arg_0 = mat2x4(vec4(0.0f), vec4(0.0f)); + mat2x4 arg_0 = mat2x4(vec4(1.0f), vec4(1.0f)); mat4x2 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_4ce359() { - mat2x4 arg_0 = mat2x4(vec4(0.0f), vec4(0.0f)); + mat2x4 arg_0 = mat2x4(vec4(1.0f), vec4(1.0f)); mat4x2 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_4ce359() { - mat2x4 arg_0 = mat2x4(vec4(0.0f), vec4(0.0f)); + mat2x4 arg_0 = mat2x4(vec4(1.0f), vec4(1.0f)); mat4x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.msl index 9ee08d482b..e6fb42dc76 100644 --- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_4ce359() { - float2x4 arg_0 = float2x4(float4(0.0f), float4(0.0f)); + float2x4 arg_0 = float2x4(float4(1.0f), float4(1.0f)); float4x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.spvasm index 17e7eb3c87..cc2dcb5851 100644 --- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,43 +32,45 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %mat2v4float = OpTypeMatrix %v4float 2 - %14 = OpConstantNull %mat2v4float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %16 = OpConstantComposite %mat2v4float %15 %15 %_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float + %19 = OpConstantNull %mat2v4float %v2float = OpTypeVector %float 2 %mat4v2float = OpTypeMatrix %v2float 4 %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float - %23 = OpConstantNull %mat4v2float - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %mat4v2float + %27 = OpTypeFunction %v4float %transpose_4ce359 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v4float Function %14 - %res = OpVariable %_ptr_Function_mat4v2float Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %mat2v4float %arg_0 - %17 = OpTranspose %mat4v2float %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_mat2v4float Function %19 + %res = OpVariable %_ptr_Function_mat4v2float Function %26 + OpStore %arg_0 %16 + %23 = OpLoad %mat2v4float %arg_0 + %20 = OpTranspose %mat4v2float %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %transpose_4ce359 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %transpose_4ce359 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_4ce359 + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_4ce359 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %transpose_4ce359 + %38 = OpLabel + %39 = OpFunctionCall %void %transpose_4ce359 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.wgsl index 80670b0d91..41d870dfbb 100644 --- a/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/4ce359.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_4ce359() { - var arg_0 = mat2x4(); + var arg_0 = mat2x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat4x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl index 85bf493c7f..62e42f2d45 100644 --- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl +++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<2, 3, f32>) -> mat<3, 2, f32> fn transpose_4dc9a1() { - var arg_0 = mat2x3(); + var arg_0 = mat2x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat3x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.dxc.hlsl index 129d6ca1df..140fa1c7a1 100644 --- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_4dc9a1() { - float2x3 arg_0 = float2x3((0.0f).xxx, (0.0f).xxx); + float2x3 arg_0 = float2x3((1.0f).xxx, (1.0f).xxx); float3x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.fxc.hlsl index 129d6ca1df..140fa1c7a1 100644 --- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_4dc9a1() { - float2x3 arg_0 = float2x3((0.0f).xxx, (0.0f).xxx); + float2x3 arg_0 = float2x3((1.0f).xxx, (1.0f).xxx); float3x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.glsl index 1e05e4c6e8..37428d1e12 100644 --- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_4dc9a1() { - mat2x3 arg_0 = mat2x3(vec3(0.0f), vec3(0.0f)); + mat2x3 arg_0 = mat2x3(vec3(1.0f), vec3(1.0f)); mat3x2 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_4dc9a1() { - mat2x3 arg_0 = mat2x3(vec3(0.0f), vec3(0.0f)); + mat2x3 arg_0 = mat2x3(vec3(1.0f), vec3(1.0f)); mat3x2 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_4dc9a1() { - mat2x3 arg_0 = mat2x3(vec3(0.0f), vec3(0.0f)); + mat2x3 arg_0 = mat2x3(vec3(1.0f), vec3(1.0f)); mat3x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.msl index b2e422f2de..df256e4823 100644 --- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_4dc9a1() { - float2x3 arg_0 = float2x3(float3(0.0f), float3(0.0f)); + float2x3 arg_0 = float2x3(float3(1.0f), float3(1.0f)); float3x2 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.spvasm index 6ec41694a7..2be80fea90 100644 --- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,43 +33,45 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %mat2v3float = OpTypeMatrix %v3float 2 - %15 = OpConstantNull %mat2v3float + %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %17 = OpConstantComposite %mat2v3float %16 %16 %_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float + %20 = OpConstantNull %mat2v3float %v2float = OpTypeVector %float 2 %mat3v2float = OpTypeMatrix %v2float 3 %_ptr_Function_mat3v2float = OpTypePointer Function %mat3v2float - %24 = OpConstantNull %mat3v2float - %25 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %27 = OpConstantNull %mat3v2float + %28 = OpTypeFunction %v4float %transpose_4dc9a1 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat2v3float Function %15 - %res = OpVariable %_ptr_Function_mat3v2float Function %24 - OpStore %arg_0 %15 - %21 = OpLoad %mat2v3float %arg_0 - %18 = OpTranspose %mat3v2float %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_mat2v3float Function %20 + %res = OpVariable %_ptr_Function_mat3v2float Function %27 + OpStore %arg_0 %17 + %24 = OpLoad %mat2v3float %arg_0 + %21 = OpTranspose %mat3v2float %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %transpose_4dc9a1 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %transpose_4dc9a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %transpose_4dc9a1 + %36 = OpLabel + %37 = OpFunctionCall %void %transpose_4dc9a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %transpose_4dc9a1 + %39 = OpLabel + %40 = OpFunctionCall %void %transpose_4dc9a1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.wgsl index 03a7290122..666dc84388 100644 --- a/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/4dc9a1.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_4dc9a1() { - var arg_0 = mat2x3(); + var arg_0 = mat2x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat3x2 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl b/test/tint/builtins/gen/var/transpose/854336.wgsl index 83540d0477..60acdadb4b 100644 --- a/test/tint/builtins/gen/var/transpose/854336.wgsl +++ b/test/tint/builtins/gen/var/transpose/854336.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<3, 3, f32>) -> mat<3, 3, f32> fn transpose_854336() { - var arg_0 = mat3x3(); + var arg_0 = mat3x3(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat3x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.dxc.hlsl index a4fa125515..838bc5106b 100644 --- a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_854336() { - float3x3 arg_0 = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3x3 arg_0 = float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); float3x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.fxc.hlsl index a4fa125515..838bc5106b 100644 --- a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_854336() { - float3x3 arg_0 = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float3x3 arg_0 = float3x3((1.0f).xxx, (1.0f).xxx, (1.0f).xxx); float3x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.glsl index c4d23d60b7..8a50d4322a 100644 --- a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_854336() { - mat3 arg_0 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat3 arg_0 = mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f)); mat3 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_854336() { - mat3 arg_0 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat3 arg_0 = mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f)); mat3 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_854336() { - mat3 arg_0 = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + mat3 arg_0 = mat3(vec3(1.0f), vec3(1.0f), vec3(1.0f)); mat3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.msl index 0548fab67b..5837ea60a9 100644 --- a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_854336() { - float3x3 arg_0 = float3x3(float3(0.0f), float3(0.0f), float3(0.0f)); + float3x3 arg_0 = float3x3(float3(1.0f), float3(1.0f), float3(1.0f)); float3x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.spvasm index 9c37bf3d59..406209bde8 100644 --- a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,39 +33,41 @@ %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 - %15 = OpConstantNull %mat3v3float -%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %17 = OpConstantComposite %mat3v3float %16 %16 %16 +%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float + %20 = OpConstantNull %mat3v3float + %24 = OpTypeFunction %v4float %transpose_854336 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v3float Function %15 - %res = OpVariable %_ptr_Function_mat3v3float Function %15 - OpStore %arg_0 %15 - %19 = OpLoad %mat3v3float %arg_0 - %18 = OpTranspose %mat3v3float %19 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_mat3v3float Function %20 + %res = OpVariable %_ptr_Function_mat3v3float Function %20 + OpStore %arg_0 %17 + %22 = OpLoad %mat3v3float %arg_0 + %21 = OpTranspose %mat3v3float %22 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %transpose_854336 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %transpose_854336 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %transpose_854336 + %32 = OpLabel + %33 = OpFunctionCall %void %transpose_854336 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_854336 + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_854336 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.wgsl index 1a0b25f212..e20f97e5bf 100644 --- a/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/854336.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_854336() { - var arg_0 = mat3x3(); + var arg_0 = mat3x3(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat3x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl b/test/tint/builtins/gen/var/transpose/c1b600.wgsl index 8433736cf3..fbb1a740d6 100644 --- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl +++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<4, 4, f32>) -> mat<4, 4, f32> fn transpose_c1b600() { - var arg_0 = mat4x4(); + var arg_0 = mat4x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat4x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.dxc.hlsl index eb1524a143..464f750876 100644 --- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_c1b600() { - float4x4 arg_0 = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4x4 arg_0 = float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); float4x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.fxc.hlsl index eb1524a143..464f750876 100644 --- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_c1b600() { - float4x4 arg_0 = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float4x4 arg_0 = float4x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); float4x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.glsl index d828caba01..b4705c83c0 100644 --- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_c1b600() { - mat4 arg_0 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat4 arg_0 = mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f)); mat4 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_c1b600() { - mat4 arg_0 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat4 arg_0 = mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f)); mat4 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_c1b600() { - mat4 arg_0 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat4 arg_0 = mat4(vec4(1.0f), vec4(1.0f), vec4(1.0f), vec4(1.0f)); mat4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.msl index 6125d3fec1..862013a575 100644 --- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_c1b600() { - float4x4 arg_0 = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)); + float4x4 arg_0 = float4x4(float4(1.0f), float4(1.0f), float4(1.0f), float4(1.0f)); float4x4 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.spvasm index 375945abc1..27235eee39 100644 --- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,39 +32,41 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %mat4v4float = OpTypeMatrix %v4float 4 - %14 = OpConstantNull %mat4v4float -%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %16 = OpConstantComposite %mat4v4float %15 %15 %15 %15 +%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float + %19 = OpConstantNull %mat4v4float + %23 = OpTypeFunction %v4float %transpose_c1b600 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat4v4float Function %14 - %res = OpVariable %_ptr_Function_mat4v4float Function %14 - OpStore %arg_0 %14 - %18 = OpLoad %mat4v4float %arg_0 - %17 = OpTranspose %mat4v4float %18 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_mat4v4float Function %19 + %res = OpVariable %_ptr_Function_mat4v4float Function %19 + OpStore %arg_0 %16 + %21 = OpLoad %mat4v4float %arg_0 + %20 = OpTranspose %mat4v4float %21 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %transpose_c1b600 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %transpose_c1b600 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %void %transpose_c1b600 + %31 = OpLabel + %32 = OpFunctionCall %void %transpose_c1b600 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %transpose_c1b600 + %34 = OpLabel + %35 = OpFunctionCall %void %transpose_c1b600 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.wgsl index 8dca67037b..435849ace5 100644 --- a/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/c1b600.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_c1b600() { - var arg_0 = mat4x4(); + var arg_0 = mat4x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat4x4 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl index 4e68e117e1..c695d830b6 100644 --- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl +++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<3, 4, f32>) -> mat<4, 3, f32> fn transpose_d8f8ba() { - var arg_0 = mat3x4(); + var arg_0 = mat3x4(1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat4x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.dxc.hlsl index 2a984c8f8d..2cd9d6bacc 100644 --- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_d8f8ba() { - float3x4 arg_0 = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float3x4 arg_0 = float3x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); float4x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.fxc.hlsl index 2a984c8f8d..2cd9d6bacc 100644 --- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_d8f8ba() { - float3x4 arg_0 = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); + float3x4 arg_0 = float3x4((1.0f).xxxx, (1.0f).xxxx, (1.0f).xxxx); float4x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.glsl index 61d6d2b8ac..fd91e2e185 100644 --- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_d8f8ba() { - mat3x4 arg_0 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat3x4 arg_0 = mat3x4(vec4(1.0f), vec4(1.0f), vec4(1.0f)); mat4x3 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_d8f8ba() { - mat3x4 arg_0 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat3x4 arg_0 = mat3x4(vec4(1.0f), vec4(1.0f), vec4(1.0f)); mat4x3 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_d8f8ba() { - mat3x4 arg_0 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)); + mat3x4 arg_0 = mat3x4(vec4(1.0f), vec4(1.0f), vec4(1.0f)); mat4x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.msl index 5e674fd2c8..29a2dad566 100644 --- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_d8f8ba() { - float3x4 arg_0 = float3x4(float4(0.0f), float4(0.0f), float4(0.0f)); + float3x4 arg_0 = float3x4(float4(1.0f), float4(1.0f), float4(1.0f)); float4x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.spvasm index 946dd8c8a1..b6b20c4123 100644 --- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,43 +32,45 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %mat3v4float = OpTypeMatrix %v4float 3 - %14 = OpConstantNull %mat3v4float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %16 = OpConstantComposite %mat3v4float %15 %15 %15 %_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float + %19 = OpConstantNull %mat3v4float %v3float = OpTypeVector %float 3 %mat4v3float = OpTypeMatrix %v3float 4 %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float - %23 = OpConstantNull %mat4v3float - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %26 = OpConstantNull %mat4v3float + %27 = OpTypeFunction %v4float %transpose_d8f8ba = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v4float Function %14 - %res = OpVariable %_ptr_Function_mat4v3float Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %mat3v4float %arg_0 - %17 = OpTranspose %mat4v3float %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_mat3v4float Function %19 + %res = OpVariable %_ptr_Function_mat4v3float Function %26 + OpStore %arg_0 %16 + %23 = OpLoad %mat3v4float %arg_0 + %20 = OpTranspose %mat4v3float %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %transpose_d8f8ba +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %transpose_d8f8ba OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %transpose_d8f8ba + %35 = OpLabel + %36 = OpFunctionCall %void %transpose_d8f8ba OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %transpose_d8f8ba + %38 = OpLabel + %39 = OpFunctionCall %void %transpose_d8f8ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.wgsl index 3fa2d48ffb..c7717059d1 100644 --- a/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/d8f8ba.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_d8f8ba() { - var arg_0 = mat3x4(); + var arg_0 = mat3x4(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat4x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl index 9e6edda074..89f299dff7 100644 --- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl +++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl @@ -25,7 +25,7 @@ // fn transpose(mat<3, 2, f32>) -> mat<2, 3, f32> fn transpose_ed4bdc() { - var arg_0 = mat3x2(); + var arg_0 = mat3x2(1.f, 1.f, 1.f, 1.f, 1.f, 1.f); var res: mat2x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.dxc.hlsl index d3b65766bb..78abe82781 100644 --- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void transpose_ed4bdc() { - float3x2 arg_0 = float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx); + float3x2 arg_0 = float3x2((1.0f).xx, (1.0f).xx, (1.0f).xx); float2x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.fxc.hlsl index d3b65766bb..78abe82781 100644 --- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void transpose_ed4bdc() { - float3x2 arg_0 = float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx); + float3x2 arg_0 = float3x2((1.0f).xx, (1.0f).xx, (1.0f).xx); float2x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.glsl b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.glsl index 37e1788aa8..00d785f233 100644 --- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void transpose_ed4bdc() { - mat3x2 arg_0 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + mat3x2 arg_0 = mat3x2(vec2(1.0f), vec2(1.0f), vec2(1.0f)); mat2x3 res = transpose(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void transpose_ed4bdc() { - mat3x2 arg_0 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + mat3x2 arg_0 = mat3x2(vec2(1.0f), vec2(1.0f), vec2(1.0f)); mat2x3 res = transpose(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void transpose_ed4bdc() { - mat3x2 arg_0 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); + mat3x2 arg_0 = mat3x2(vec2(1.0f), vec2(1.0f), vec2(1.0f)); mat2x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.msl b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.msl index 1aac4ca5e4..ecb35026f7 100644 --- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void transpose_ed4bdc() { - float3x2 arg_0 = float3x2(float2(0.0f), float2(0.0f), float2(0.0f)); + float3x2 arg_0 = float3x2(float2(1.0f), float2(1.0f), float2(1.0f)); float2x3 res = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.spvasm index 2b1a390546..da5aaeb7b2 100644 --- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,43 +33,45 @@ %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %mat3v2float = OpTypeMatrix %v2float 3 - %15 = OpConstantNull %mat3v2float + %float_1 = OpConstant %float 1 + %16 = OpConstantComposite %v2float %float_1 %float_1 + %17 = OpConstantComposite %mat3v2float %16 %16 %16 %_ptr_Function_mat3v2float = OpTypePointer Function %mat3v2float + %20 = OpConstantNull %mat3v2float %v3float = OpTypeVector %float 3 %mat2v3float = OpTypeMatrix %v3float 2 %_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float - %24 = OpConstantNull %mat2v3float - %25 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %27 = OpConstantNull %mat2v3float + %28 = OpTypeFunction %v4float %transpose_ed4bdc = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_mat3v2float Function %15 - %res = OpVariable %_ptr_Function_mat2v3float Function %24 - OpStore %arg_0 %15 - %21 = OpLoad %mat3v2float %arg_0 - %18 = OpTranspose %mat2v3float %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_mat3v2float Function %20 + %res = OpVariable %_ptr_Function_mat2v3float Function %27 + OpStore %arg_0 %17 + %24 = OpLoad %mat3v2float %arg_0 + %21 = OpTranspose %mat2v3float %24 + OpStore %res %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %transpose_ed4bdc +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %transpose_ed4bdc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %transpose_ed4bdc + %36 = OpLabel + %37 = OpFunctionCall %void %transpose_ed4bdc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %37 = OpLabel - %38 = OpFunctionCall %void %transpose_ed4bdc + %39 = OpLabel + %40 = OpFunctionCall %void %transpose_ed4bdc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.wgsl index f744685e2e..a024948e8b 100644 --- a/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/transpose/ed4bdc.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn transpose_ed4bdc() { - var arg_0 = mat3x2(); + var arg_0 = mat3x2(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); var res : mat2x3 = transpose(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl b/test/tint/builtins/gen/var/trunc/562d05.wgsl index 053f2d36d7..4c02b739b1 100644 --- a/test/tint/builtins/gen/var/trunc/562d05.wgsl +++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl @@ -25,7 +25,7 @@ // fn trunc(vec<3, f32>) -> vec<3, f32> fn trunc_562d05() { - var arg_0 = vec3(); + var arg_0 = vec3(1.f); var res: vec3 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.dxc.hlsl index e7ac694bc9..685ad83f10 100644 --- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_562d05() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.fxc.hlsl index e7ac694bc9..685ad83f10 100644 --- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void trunc_562d05() { - float3 arg_0 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; float3 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.glsl index a0cc091a46..7b2bc3cd7e 100644 --- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void trunc_562d05() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = trunc(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void trunc_562d05() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = trunc(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void trunc_562d05() { - vec3 arg_0 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); vec3 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.msl index a07446cc33..e5632e67dc 100644 --- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_562d05() { - float3 arg_0 = float3(0.0f); + float3 arg_0 = float3(1.0f); float3 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.spvasm index a689aae384..f5f52887b0 100644 --- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %23 = OpTypeFunction %v4float %trunc_562d05 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v3float %arg_0 - %17 = OpExtInst %v3float %18 Trunc %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v3float %arg_0 + %19 = OpExtInst %v3float %20 Trunc %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %trunc_562d05 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %trunc_562d05 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %trunc_562d05 + %31 = OpLabel + %32 = OpFunctionCall %void %trunc_562d05 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %trunc_562d05 + %34 = OpLabel + %35 = OpFunctionCall %void %trunc_562d05 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.wgsl index 0d53d82b83..f005830dc6 100644 --- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_562d05() { - var arg_0 = vec3(); + var arg_0 = vec3(1.0f); var res : vec3 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl index a272d15be4..cca818ce0d 100644 --- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl +++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl @@ -25,7 +25,7 @@ // fn trunc(vec<4, f32>) -> vec<4, f32> fn trunc_e183aa() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: vec4 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.dxc.hlsl index b69f9649eb..10af761992 100644 --- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_e183aa() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.fxc.hlsl index b69f9649eb..10af761992 100644 --- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void trunc_e183aa() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; float4 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.glsl index 52576b2a57..efb9d97035 100644 --- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void trunc_e183aa() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = trunc(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void trunc_e183aa() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = trunc(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void trunc_e183aa() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); vec4 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.msl index e57c538b06..4820d6cb84 100644 --- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_e183aa() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); float4 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.spvasm index e6efcfdfa6..565159a506 100644 --- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader - %16 = OpExtInstImport "GLSL.std.450" + %18 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,38 +32,39 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void -%_ptr_Function_v4float = OpTypePointer Function %v4float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %21 = OpTypeFunction %v4float %trunc_e183aa = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_0 %5 - %17 = OpLoad %v4float %arg_0 - %15 = OpExtInst %v4float %16 Trunc %17 - OpStore %res %15 + OpStore %arg_0 %14 + %19 = OpLoad %v4float %arg_0 + %17 = OpExtInst %v4float %18 Trunc %19 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %trunc_e183aa +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %trunc_e183aa OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %trunc_e183aa + %29 = OpLabel + %30 = OpFunctionCall %void %trunc_e183aa OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %trunc_e183aa + %32 = OpLabel + %33 = OpFunctionCall %void %trunc_e183aa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.wgsl index 4ab39edf46..f1f1db3af4 100644 --- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_e183aa() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : vec4 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/eb83df.wgsl b/test/tint/builtins/gen/var/trunc/eb83df.wgsl index 7cbbe9686b..a6e12acc85 100644 --- a/test/tint/builtins/gen/var/trunc/eb83df.wgsl +++ b/test/tint/builtins/gen/var/trunc/eb83df.wgsl @@ -25,7 +25,7 @@ // fn trunc(f32) -> f32 fn trunc_eb83df() { - var arg_0 = 1.0; + var arg_0 = 1.f; var res: f32 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.wgsl index e85b1b2767..ae1518f18a 100644 --- a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_eb83df() { - var arg_0 = 1.0; + var arg_0 = 1.0f; var res : f32 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl index 291e95b773..1cba7bfd64 100644 --- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl +++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl @@ -25,7 +25,7 @@ // fn trunc(vec<2, f32>) -> vec<2, f32> fn trunc_f370d3() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: vec2 = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.dxc.hlsl index 79c0c0e8f5..5f59f24583 100644 --- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void trunc_f370d3() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.fxc.hlsl index 79c0c0e8f5..5f59f24583 100644 --- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void trunc_f370d3() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; float2 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.glsl index 218ac0aafe..a850df2896 100644 --- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void trunc_f370d3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = trunc(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void trunc_f370d3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = trunc(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void trunc_f370d3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); vec2 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.msl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.msl index 9a020abae6..fdce7c2238 100644 --- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void trunc_f370d3() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); float2 res = trunc(arg_0); } diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.spvasm index 947d4967a0..3736cd6243 100644 --- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 36 ; Schema: 0 OpCapability Shader - %18 = OpExtInstImport "GLSL.std.450" + %20 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,39 +33,40 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float + %23 = OpTypeFunction %v4float %trunc_f370d3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_v2float Function %14 - OpStore %arg_0 %14 - %19 = OpLoad %v2float %arg_0 - %17 = OpExtInst %v2float %18 Trunc %19 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_v2float Function %18 + OpStore %arg_0 %15 + %21 = OpLoad %v2float %arg_0 + %19 = OpExtInst %v2float %20 Trunc %21 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %trunc_f370d3 +%vertex_main_inner = OpFunction %v4float None %23 + %25 = OpLabel + %26 = OpFunctionCall %void %trunc_f370d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %28 = OpLabel + %29 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %29 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %30 = OpLabel - %31 = OpFunctionCall %void %trunc_f370d3 + %31 = OpLabel + %32 = OpFunctionCall %void %trunc_f370d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %trunc_f370d3 + %34 = OpLabel + %35 = OpFunctionCall %void %trunc_f370d3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.wgsl index 3a179a8be9..537761fb75 100644 --- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn trunc_f370d3() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : vec2 = trunc(arg_0); } diff --git a/tools/src/cmd/intrinsic-gen/gen/generate.go b/tools/src/cmd/intrinsic-gen/gen/generate.go index 5d83b19235..04eb503982 100644 --- a/tools/src/cmd/intrinsic-gen/gen/generate.go +++ b/tools/src/cmd/intrinsic-gen/gen/generate.go @@ -70,6 +70,7 @@ func (g *generator) generate(tmpl string, w io.Writer, writeFile WriteFile) erro "IsTemplateNumberParam": is(sem.TemplateNumberParam{}), "IsTemplateTypeParam": is(sem.TemplateTypeParam{}), "IsType": is(sem.Type{}), + "IsAbstract": isAbstract, "IsDeclarable": isDeclarable, "IsFirstIn": isFirstIn, "IsLastIn": isLastIn, @@ -205,11 +206,24 @@ func iterate(n int) []int { return out } -// isDeclarable returns false if the FullyQualifiedName starts with a -// leading underscore. These are undeclarable as WGSL does not allow identifers -// to have a leading underscore. +// isAbstract returns true if the FullyQualifiedName refers to an abstract +// numeric type +func isAbstract(fqn sem.FullyQualifiedName) bool { + switch fqn.Target.GetName() { + case "ia", "fa": + return true + case "vec": + return isAbstract(fqn.TemplateArguments[1].(sem.FullyQualifiedName)) + case "mat": + return isAbstract(fqn.TemplateArguments[2].(sem.FullyQualifiedName)) + } + return false +} + +// isDeclarable returns false if the FullyQualifiedName refers to an abstract +// numeric type, or if it starts with a leading underscore. func isDeclarable(fqn sem.FullyQualifiedName) bool { - return !strings.HasPrefix(fqn.Target.GetName(), "_") + return !isAbstract(fqn) && !strings.HasPrefix(fqn.Target.GetName(), "_") } // pascalCase returns the snake-case string s transformed into 'PascalCase', diff --git a/tools/src/cmd/intrinsic-gen/gen/permutate.go b/tools/src/cmd/intrinsic-gen/gen/permutate.go index 7efca36770..9c4e485405 100644 --- a/tools/src/cmd/intrinsic-gen/gen/permutate.go +++ b/tools/src/cmd/intrinsic-gen/gen/permutate.go @@ -332,7 +332,7 @@ func validate(fqn sem.FullyQualifiedName, uses *sem.StageUses) bool { strings.Contains(elTyName, "sampler"), strings.Contains(elTyName, "texture"): return false // Not storable - case elTyName == "fa" || elTyName == "ia": + case isAbstract(elTy): return false // Abstract types are not typeable nor supported by arrays } case "ptr": @@ -367,8 +367,8 @@ func validate(fqn sem.FullyQualifiedName, uses *sem.StageUses) bool { } } - if !isDeclarable(fqn) { - return false + if strings.HasPrefix(fqn.Target.GetName(), "_") { + return false // Core, undeclarable WGSL type } for _, arg := range fqn.TemplateArguments {